Skip to content

Commit 7ae10d0

Browse files
committed
Moved aiy mode and fixed smaller issues.
1 parent b5d1794 commit 7ae10d0

File tree

17 files changed

+240
-123
lines changed

17 files changed

+240
-123
lines changed

package-lock.json

Lines changed: 154 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"author": "Markus Bordihn ([email protected])",
66
"license": "Apache-2.0",
77
"private": true,
8-
"dependencies": {
9-
},
8+
"dependencies": {},
109
"devDependencies": {
1110
"bestzip": "^1.1.6",
1211
"closure-builder": "^2.3.0",

src/mode/aiy/connection.js renamed to src/mode/boards/aiy/connection.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ goog.require('cwc.protocol.mDNS.Api');
2525
goog.require('cwc.utils.Dialog');
2626
goog.require('cwc.utils.Database');
2727

28+
2829
/**
2930
* @constructor
3031
* @param {!cwc.utils.Helper} helper

src/mode/aiy/editor/editor.js renamed to src/mode/boards/aiy/editor/editor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ cwc.mode.aiy.Editor.prototype.decorate = function() {
5555
this.helper.setInstance('editor', this.editor, true);
5656
this.editor.decorate(this.node);
5757
this.editor.showMode(false);
58+
this.editor.showExpandButton(false);
5859
};

src/mode/aiy/editor/editor.soy renamed to src/mode/boards/aiy/editor/editor.soy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@
6161
</div>
6262
</div>
6363
<div id="{$prefix}editor-chrome"></div>
64-
<div id="{$prefix}terminal-chrome"></div>
64+
<div id="{$prefix}aiy-terminal-chrome"></div>
6565
</div>
6666
{/template}
File renamed without changes.

src/mode/aiy/mod.js renamed to src/mode/boards/aiy/mod.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ goog.require('cwc.ui.EditorContent');
3131
goog.require('cwc.utils.Dialog');
3232
goog.require('cwc.utils.Events');
3333

34+
3435
/**
3536
* @constructor
3637
* @param {!cwc.utils.Helper} helper
@@ -108,6 +109,7 @@ cwc.mode.aiy.Mod.prototype.initEvents = function() {
108109
cwc.mode.aiy.Mod.prototype.decorateTerminal = async function() {
109110
this.helper.setInstance('terminal', this.terminal, true);
110111
await this.terminal.decorate();
112+
this.terminal.write('Waiting for connection ...');
111113
};
112114

113115

src/mode/aiy/terminal/terminal.gss renamed to src/mode/boards/aiy/terminal/terminal.gss

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,52 @@
1515
*/
1616

1717

18-
#{$prefix}terminal-body {
18+
#{$prefix}aiy-terminal-body {
1919
background: #eee;
2020
display: flex;
2121
flex-direction: column;
2222
height: 200px;
2323
width: 100%;
2424
}
2525

26-
#{$prefix}terminal-content {
26+
#{$prefix}aiy-terminal-content {
2727
background: #111;
2828
color: lime;
2929
letter-spacing: 0.5px;
3030
padding: 0.5em;
3131
flex: 1;
3232
font-family: "Consolas","Courier new","Courier",monospace;
3333
overflow-y: scroll;
34+
-webkit-user-select: all;
3435
}
3536

36-
#{$prefix}terminal-content .error {
37+
#{$prefix}aiy-terminal-content .error {
3738
color: red;
3839
}
3940

40-
#{$prefix}terminal-content .meta {
41+
#{$prefix}aiy-terminal-content .meta {
4142
font-style: italic;
4243
}
4344

44-
#{$prefix}terminal-toolbar {
45+
#{$prefix}aiy-terminal-toolbar {
4546
height: 24px;
4647
border-top: 1px solid #e5e5e5;
4748
border-bottom: 1px solid #ebebeb;
4849
padding: 1px 5px;
4950
}
5051

51-
#{$prefix}terminal-toolbar .material-icons {
52+
#{$prefix}aiy-terminal-toolbar .material-icons {
5253
color: #2B78FE;
5354
vertical-align: middle;
5455
}
5556

56-
#{$prefix}terminal-clear {
57+
#{$prefix}aiy-terminal-clear {
5758
float: right;
5859
height: 22px;
5960
width: 22px;
6061
min-width: 22px;
6162
}
6263

63-
#{$prefix}terminal-clear .material-icons {
64+
#{$prefix}aiy-terminal-clear .material-icons {
6465
font-size: 20px;
6566
}

src/mode/aiy/terminal/terminal.js renamed to src/mode/boards/aiy/terminal/terminal.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ goog.require('cwc.utils.Logger');
2525

2626
goog.require('goog.dom.classlist');
2727

28+
2829
/**
2930
* Class represents the console the UI.
3031
* @param {!cwc.utils.Helper} helper
@@ -34,13 +35,13 @@ goog.require('goog.dom.classlist');
3435
*/
3536
cwc.mode.aiy.Terminal = function(helper) {
3637
/** @type {string} */
37-
this.name = 'Terminal';
38+
this.name = 'AIY Terminal';
3839

3940
/** @type {!cwc.utils.Helper} */
4041
this.helper = helper;
4142

4243
/** @type {string} */
43-
this.prefix = this.helper.getPrefix('terminal');
44+
this.prefix = this.helper.getPrefix('aiy-terminal');
4445

4546
/** @type {Element} */
4647
this.node = null;

0 commit comments

Comments
 (0)