diff --git a/package.json b/package.json index 65c0c0f..ec14b5b 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,6 @@ "@material/typography": "^4.0.0", "@mdi/js": "^4.8.95", "@smui/card": "^1.0.0-beta.19", - "@smui/tab": "^1.0.0-beta.19", - "@smui/tab-bar": "^1.0.0-beta.19", "@smui/textfield": "^1.0.0-beta.19", "axios": "^0.19.2", "cheerio": "^1.0.0-rc.3", @@ -36,4 +34,4 @@ "webpack-dev-server": "3.10.1", "write-file-webpack-plugin": "4.5.0" } -} +} \ No newline at end of file diff --git a/src/js/plugins/extension.js b/src/js/plugins/extension.js index ef5fc09..a10e974 100644 --- a/src/js/plugins/extension.js +++ b/src/js/plugins/extension.js @@ -10,9 +10,7 @@ const commands = [ { commands: ["see supported commands", "what can you do"], callback: () => { - commander.openTabWithUrl( - chrome.runtime.getURL("/options.html?tab=1") - ); + commander.openTabWithUrl("https://bewisse.com/heybuddy/commands/"); } }, { diff --git a/src/js/sample_queries.js b/src/js/sample_queries.js deleted file mode 100644 index 267e6d2..0000000 --- a/src/js/sample_queries.js +++ /dev/null @@ -1,142 +0,0 @@ -import { - mdiBookmark, - mdiMicrophone, - mdiPencil, - mdiFileFind, - mdiArrowRight, - mdiPlayCircleOutline, - mdiTab, - mdiCamera, - mdiNewspaper, - mdiMap, - mdiWikipedia, - mdiVideo, - mdiMusic, - mdiShopping, - mdiStar, - mdiMagnify -} from "@mdi/js"; - -const plugins = [ - { - name: "Browser tab", - icon: mdiTab, - queries: [ - "close tab", - "close other tabs | close all tabs", - "close tabs to the left | close tabs to the right", - "pin tab | unpin tab", - "mute | unmute", - "maximize window | minimize window", - "enter fullscreen | exit fullscreen" - ], - }, - { - name: "Media player", - icon: mdiPlayCircleOutline, - queries: [ - "pause | stop | play | resume", - "volume up | volume down", - "skip 10 seconds | skip 1 minute", - "back 10 seconds | back 1 minute", - "go back to the beginning", - "go to the end" - ], - }, - { - name: "Bookmark", - icon: mdiBookmark, - queries: ["bookmark", "bookmark (this) page", "remove bookmark"], - }, - { - name: "Navigation", - icon: mdiArrowRight, - queries: ["go back", "go forward", "reload | refresh"], - }, - { - name: "Page control", - icon: mdiFileFind, - queries: [ - "zoom in | make it larger", - "zoom out | make it smaller", - "reset zoom | make it normal size", - "find | look for ", - "scroll down | page down", - "scroll up | page up", - "go to top | go to bottom" - ], - }, - { - name: "Voice assistant", - icon: mdiMicrophone, - queries: [ - "bye | good bye | close", - "see supported commands", - "what can you do" - ], - }, - { - name: "Voice input", - icon: mdiPencil, - queries: ["write ", "submit | enter"], - }, - { - name: "Image", - icon: mdiCamera, - queries: [ - "images of kittens", - "pictures of puppies", - "photos of Tailor Swift" - ], - }, - { - name: "News", - icon: mdiNewspaper, - queries: ["news of Google", "news about technology", "news | today's news"], - }, - { - name: "Maps & directions", - icon: mdiMap, - queries: [ - "map of United States", - "direction to Las Vegas", - "direction from home to work" - ], - }, - { - name: "Wikipedia", - icon: mdiWikipedia, - queries: ["about California", "wiki about the Universe", "wikipedia"], - }, - { - name: "Video", - icon: mdiVideo, - queries: ["video", "video of cats", "watch baby shark"], - }, - { - name: "Music", - icon: mdiMusic, - queries: ["music", "play music"], - }, - { - name: "Shopping", - icon: mdiShopping, - queries: ["shopping | buy something", "shop for paper towel"], - }, - { - name: "Quick links", - icon: mdiStar, - queries: ["go to Facebook", "open downloads", "open bookmarks"], - }, - { - name: "Search", - icon: mdiMagnify, - queries: [ - "Search for | Google ", - " on (Bing | Yahoo | Amazon | and others)", - "" - ], - } -]; - -export { plugins }; diff --git a/src/svelte/NotificationUi.svelte b/src/svelte/NotificationUi.svelte index eaa68c1..4396660 100644 --- a/src/svelte/NotificationUi.svelte +++ b/src/svelte/NotificationUi.svelte @@ -40,7 +40,14 @@ function seeAllCommands() { chrome.runtime.sendMessage({ type: "OPEN_URL", - url: chrome.runtime.getURL("/options.html?tab=1") + url: "https://bewisse.com/heybuddy/commands/" + }); + } + + function viewOptions() { + chrome.runtime.sendMessage({ + type: "OPEN_URL", + url: chrome.runtime.getURL("/options.html") }); } @@ -117,6 +124,13 @@ vertical-align: middle; } + .chrome-voice-assistant-options { + cursor: pointer; + position: absolute; + top: 5px; + right: 35px; + } + .chrome-voice-assistant-close { cursor: pointer; position: absolute; @@ -145,6 +159,37 @@ class="chrome-voice-assistant" in:scale={{ easing: elasticOut, duration: 500 }} out:scale={{ duration: 200 }}> + + +

- - + viewBox="0 0 24 24"> + d="M9,5V9H21V5M9,19H21V15H9M9,14H21V10H9M4,9H8V5H4M4,19H8V15H4M4,14H8V10H4V14Z" /> See supported commands diff --git a/src/svelte/OptionPlugin.svelte b/src/svelte/OptionPlugin.svelte deleted file mode 100644 index 3b9db6f..0000000 --- a/src/svelte/OptionPlugin.svelte +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - -
- - {plugin.name} -
- - - - {#each plugin.queries as query} -
{query}
- {/each} -
-
diff --git a/src/svelte/Options.svelte b/src/svelte/Options.svelte index db9514f..9c71e0b 100644 --- a/src/svelte/Options.svelte +++ b/src/svelte/Options.svelte @@ -8,23 +8,17 @@ mdiTextToSpeech, mdiContactMail, mdiEarHearing, + mdiViewList, mdiThumbUp } from "@mdi/js"; import Card, { Content } from "@smui/card"; import Textfield from "@smui/textfield"; - import Tab, { Icon, Label as TabLabel } from "@smui/tab"; - import TabBar from "@smui/tab-bar"; import Button, { Label } from "@smui/button"; import { fly } from "svelte/transition"; import MdiIcon from "./MdiIcon.svelte"; import OptionCard from "./OptionCard.svelte"; - import OptionPlugin from "./OptionPlugin.svelte"; import { DEBUG, ICON_COLOR, storage } from "../js/common"; - import { plugins } from "../js/sample_queries"; - let tabs = ["Options", "Supported commands"]; - const tabIndex = new URL(window.location).searchParams.get("tab") || 0; - let activeTab = tabs[tabIndex]; let customHotword = ""; let voiceOption = { @@ -182,11 +176,6 @@ vertical-align: middle; } - .flex-container { - display: flex; - flex-wrap: wrap; - } - .transition-container { position: absolute; width: 800px; @@ -202,6 +191,12 @@

+ +  
- - - - - - {#if activeTab === tabs[0]} -
- {#if !voiceOption.enabled} - - -
- 🎉 Thank you for installing Hey Buddy 🎉 -
-
- We just need one more permission from you to access your - microphone -
-
-
- - {:else} - - - - - - -
Hotwords
-
- Say one of these hotwords to trigger Hey Buddy by voice. -
- - -
-
- {/if} -
- {/if} - {#if activeTab === tabs[1]} -
- {#each plugins as plugin} - - {/each} -
- {/if} +
+ {#if !voiceOption.enabled} + + +
+ 🎉 Thank you for installing Hey Buddy 🎉 +
+
+ We just need one more permission from you to access your microphone +
+
+
+ + {:else} + + + + + + +
Hotwords
+
+ Say one of these hotwords to trigger Hey Buddy by voice. +
+ + +
+
+ {/if} +