Skip to content

Commit

Permalink
Move supported commands to the web
Browse files Browse the repository at this point in the history
  • Loading branch information
hao1300 committed Feb 19, 2020
1 parent 08773ca commit a525292
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 267 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -36,4 +34,4 @@
"webpack-dev-server": "3.10.1",
"write-file-webpack-plugin": "4.5.0"
}
}
}
4 changes: 1 addition & 3 deletions src/js/plugins/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/");
}
},
{
Expand Down
142 changes: 0 additions & 142 deletions src/js/sample_queries.js

This file was deleted.

64 changes: 48 additions & 16 deletions src/svelte/NotificationUi.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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")
});
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -145,6 +159,37 @@
class="chrome-voice-assistant"
in:scale={{ easing: elasticOut, duration: 500 }}
out:scale={{ duration: 200 }}>
<svg
width="24"
height="24"
on:click={viewOptions}
class="chrome-voice-assistant-options"
viewBox="0 0 24 24">
<path
fill="#666"
d="M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1
12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0
12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34
7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95
4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78
2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95
2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66
8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18
14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66
16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05
19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22
21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05
21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04
19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68
14.87,18.93L14.5,21.58C14.46,21.82 14.25,22
14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5
7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64
6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14
10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5
16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37
17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86
13.12,6.62L12.75,4H11.25Z" />
</svg>
<svg
width="24"
height="24"
Expand All @@ -159,7 +204,6 @@
12,2M14.59,8L12,10.59L9.41,8L8,9.41L10.59,12L8,14.59L9.41,16L12,13.41L14.59,16L16,14.59L13.41,12L16,9.41L14.59,8Z" />
</svg>
<h1 class="chrome-voice-assistant-title">

<img
class="chrome-voice-assistant-logo"
src="img/icon_128.png"
Expand All @@ -173,21 +217,9 @@
<svg
xmlns="http://www.w3.org/2000/svg"
class="chrome-voice-assistant-icon"
viewBox="0 0 20 20">
<path fill="none" d="M0 0h20v20H0V0z" />
viewBox="0 0 24 24">
<path
d="M15.95
10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12
2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3
2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6
2.77c-.1.18-.06.39.1.51l1.69
1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37
12.1c-.15.12-.19.34-.1.51l1.6
2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3
2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47
1.35-.78l1.99.8c.18.07.39 0
.49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65
0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z" />
d="M9,5V9H21V5M9,19H21V15H9M9,14H21V10H9M4,9H8V5H4M4,19H8V15H4M4,14H8V10H4V14Z" />
</svg>
See supported commands
</div>
Expand Down
33 changes: 0 additions & 33 deletions src/svelte/OptionPlugin.svelte

This file was deleted.

Loading

0 comments on commit a525292

Please sign in to comment.