diff --git a/ui/commands/common.js b/ui/commands/common.js
index 36e56ca..ca55bff 100644
--- a/ui/commands/common.js
+++ b/ui/commands/common.js
@@ -99,7 +99,7 @@ const hostnameCharators = {
* @returns {boolean} Return true if given string is all number, false otherwise
*
*/
-function isNumber(d) {
+export function isNumber(d) {
for (let i = 0; i < d.length; i++) {
if (!numCharators[d[i]]) {
return false;
@@ -117,7 +117,7 @@ function isNumber(d) {
* @returns {boolean} Return true if given string is all hex, false otherwise
*
*/
-function isHex(d) {
+export function isHex(d) {
let dd = d.toLowerCase();
for (let i = 0; i < dd.length; i++) {
diff --git a/ui/common.css b/ui/common.css
index fc14d57..ec0ac2e 100644
--- a/ui/common.css
+++ b/ui/common.css
@@ -276,6 +276,15 @@ body {
content: "\25CF";
}
+.icon.icon-keyboardkey1 {
+ background: #fff;
+ color: #999;
+ padding: 4px 6px;
+ display: inline-block;
+ border-radius: 3px;
+ box-shadow: 1px 1px 0 2px #0003;
+}
+
/* Windows */
.window {
position: absolute;
diff --git a/ui/control/ssh.js b/ui/control/ssh.js
index d9e268a..9ff320b 100644
--- a/ui/control/ssh.js
+++ b/ui/control/ssh.js
@@ -80,7 +80,7 @@ class Control {
this.enable = false;
}
- retap() {}
+ retap(isOn) {}
receive() {
return this.subs.subscribe();
diff --git a/ui/control/telnet.js b/ui/control/telnet.js
index d961ac4..e108279 100644
--- a/ui/control/telnet.js
+++ b/ui/control/telnet.js
@@ -399,7 +399,7 @@ class Control {
this.enable = false;
}
- retap() {}
+ retap(isOn) {}
receive() {
return this.subs.subscribe();
diff --git a/ui/home.vue b/ui/home.vue
index 9636e51..efe5687 100644
--- a/ui/home.vue
+++ b/ui/home.vue
@@ -448,6 +448,7 @@ export default {
name: data.name,
info: data.info,
control: data.control,
+ toolbar: false,
indicator: {
error: "",
updated: false
@@ -475,7 +476,9 @@ export default {
await this.tab.tabs[this.tab.current].control.enabled();
},
async retapTab(tab) {
- await this.tab.tabs[tab].control.retap();
+ this.tab.tabs[tab].toolbar = !this.tab.tabs[tab].toolbar;
+
+ await this.tab.tabs[tab].control.retap(this.tab.tabs[tab].toolbar);
},
async closeTab(index) {
if (this.tab.tabs[index].status.closing) {
diff --git a/ui/widgets/screen_console.css b/ui/widgets/screen_console.css
index 89ca9f7..d73124b 100644
--- a/ui/widgets/screen_console.css
+++ b/ui/widgets/screen_console.css
@@ -20,4 +20,116 @@
@charset "utf-8";
#home-content > .screen > .screen-screen > .screen-console {
+ position: relative;
+}
+
+#home-content > .screen > .screen-screen > .screen-console > .console-toolbar {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ width: 100%;
+ max-height: 100%;
+ overflow: auto;
+ background: #222;
+ color: #fff;
+ box-shadow: 0 0 5px #0006;
+}
+
+#home-content
+ > .screen
+ > .screen-screen
+ > .screen-console
+ > .console-toolbar
+ > .console-toolbar-item {
+ padding: 15px;
+ float: left;
+}
+
+#home-content
+ > .screen
+ > .screen-screen
+ > .screen-console
+ > .console-toolbar
+ > .console-toolbar-item
+ .tb-title {
+ font-size: 0.8em;
+ text-transform: uppercase;
+ margin: 0 0 5px 10px;
+ color: #fff9;
+ text-shadow: 1px 1px 1px #0005;
+}
+
+#home-content
+ > .screen
+ > .screen-screen
+ > .screen-console
+ > .console-toolbar
+ > .console-toolbar-item
+ .tb-item {
+ display: block;
+ font-size: 0.7em;
+ padding: 10px;
+ text-decoration: none;
+ color: inherit;
+ border-radius: 3px;
+}
+
+#home-content
+ > .screen
+ > .screen-screen
+ > .screen-console
+ > .console-toolbar
+ > .console-toolbar-item
+ .tb-item:active {
+ background: #fff3;
+}
+
+#home-content
+ > .screen
+ > .screen-screen
+ > .screen-console
+ > .console-toolbar
+ > .console-toolbar-item
+ .tb-item
+ > .tb-key-icon {
+ margin: 0 5px;
+ background: #fff2;
+ color: #fff;
+}
+
+#home-content
+ > .screen
+ > .screen-screen
+ > .screen-console
+ > .console-toolbar
+ > .console-toolbar-item
+ .tb-item
+ > .tb-key-icon:first-child {
+ margin-left: 0;
+}
+
+#home-content
+ > .screen
+ > .screen-screen
+ > .screen-console
+ > .console-toolbar
+ > .console-toolbar-item
+ .tb-item
+ > .tb-key-icon:last-child {
+ margin-right: 0;
+}
+
+#home-content
+ > .screen
+ > .screen-screen
+ > .screen-console
+ > .console-toolbar
+ > .console-toolbar-item
+ .tb-item:active
+ .tb-key-icon {
+ opacity: 0.5;
+}
+
+#home-content > .screen > .screen-screen > .screen-console > .console-console {
}
diff --git a/ui/widgets/screen_console.vue b/ui/widgets/screen_console.vue
index 36b59dd..07ba671 100644
--- a/ui/widgets/screen_console.vue
+++ b/ui/widgets/screen_console.vue
@@ -18,21 +18,58 @@
-->
-
+