twitter working
This commit is contained in:
@@ -12,7 +12,6 @@ const AvailableCommandsIcons = props => {
|
|||||||
<Tooltip title="default search on google">
|
<Tooltip title="default search on google">
|
||||||
<img className={styles.icon} src={envVars.DEFAULT_LOGO} />
|
<img className={styles.icon} src={envVars.DEFAULT_LOGO} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
{/* Gmail */}
|
{/* Gmail */}
|
||||||
<Tooltip title="gmail">
|
<Tooltip title="gmail">
|
||||||
<img
|
<img
|
||||||
@@ -20,7 +19,6 @@ const AvailableCommandsIcons = props => {
|
|||||||
src={'https://image.flaticon.com/icons/png/512/281/281769.png'}
|
src={'https://image.flaticon.com/icons/png/512/281/281769.png'}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
{/* Reddit */}
|
{/* Reddit */}
|
||||||
<Tooltip title="red">
|
<Tooltip title="red">
|
||||||
<img
|
<img
|
||||||
@@ -30,7 +28,6 @@ const AvailableCommandsIcons = props => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
{/* Youtube */}
|
{/* Youtube */}
|
||||||
<Tooltip title="utube">
|
<Tooltip title="utube">
|
||||||
<img
|
<img
|
||||||
@@ -41,6 +38,15 @@ const AvailableCommandsIcons = props => {
|
|||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
|
{/* Twitter */}
|
||||||
|
<Tooltip title="twit">
|
||||||
|
<img
|
||||||
|
className={styles.icon}
|
||||||
|
src={
|
||||||
|
'https://www.coopdgii.com/wp-content/uploads/2016/12/Icono_Twitter.png.png'
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
{/* Slack */}
|
{/* Slack */}
|
||||||
{/* <img
|
{/* <img
|
||||||
className={styles.icon}
|
className={styles.icon}
|
||||||
@@ -48,7 +54,6 @@ const AvailableCommandsIcons = props => {
|
|||||||
'https://a.slack-edge.com/4a5c4/marketing/img/meta/slack_hash_256.png'
|
'https://a.slack-edge.com/4a5c4/marketing/img/meta/slack_hash_256.png'
|
||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
|
|
||||||
{/* Google Maps */}
|
{/* Google Maps */}
|
||||||
{/* <img
|
{/* <img
|
||||||
className={styles.icon}
|
className={styles.icon}
|
||||||
@@ -56,7 +61,6 @@ const AvailableCommandsIcons = props => {
|
|||||||
'https://travelhoney.com/wp-content/uploads/2017/03/google-maps-for-ios-8-1.png'
|
'https://travelhoney.com/wp-content/uploads/2017/03/google-maps-for-ios-8-1.png'
|
||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
|
|
||||||
{/* Android Messages */}
|
{/* Android Messages */}
|
||||||
{/* <img
|
{/* <img
|
||||||
className={styles.icon}
|
className={styles.icon}
|
||||||
|
|||||||
@@ -142,6 +142,16 @@ class MainCommand extends Component {
|
|||||||
newInput = newInput.replace('red', '');
|
newInput = newInput.replace('red', '');
|
||||||
newCommandComplete = true;
|
newCommandComplete = true;
|
||||||
newCommandInputPlaceholder = 'search for any subreddit';
|
newCommandInputPlaceholder = 'search for any subreddit';
|
||||||
|
} else if (
|
||||||
|
newInput.includes('twit') &&
|
||||||
|
newCommandIcon == envVars.DEFAULT_LOGO
|
||||||
|
) {
|
||||||
|
newCommand = 'twitter';
|
||||||
|
newCommandIcon =
|
||||||
|
'https://www.coopdgii.com/wp-content/uploads/2016/12/Icono_Twitter.png.png';
|
||||||
|
newInput = newInput.replace('twit', '');
|
||||||
|
newCommandComplete = true;
|
||||||
|
newCommandInputPlaceholder = "what's happening";
|
||||||
} else if (newCommand == 'google') {
|
} else if (newCommand == 'google') {
|
||||||
newCommand = 'google';
|
newCommand = 'google';
|
||||||
newCommandComplete = true;
|
newCommandComplete = true;
|
||||||
@@ -219,6 +229,8 @@ class MainCommand extends Component {
|
|||||||
);
|
);
|
||||||
} else if (this.state.command == 'reddit') {
|
} else if (this.state.command == 'reddit') {
|
||||||
window.open('https://www.reddit.com/r/' + commandInput, '_blank');
|
window.open('https://www.reddit.com/r/' + commandInput, '_blank');
|
||||||
|
} else if (this.state.command == 'twitter') {
|
||||||
|
window.open('https://twitter.com/search?q=' + commandInput, '_blank');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState(INITIAL_COMMAND_STATE, () => {
|
this.setState(INITIAL_COMMAND_STATE, () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user