From bd695880cc298044b7cf2a4ee8f1b1fe179a5834 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Mon, 16 Mar 2020 17:09:38 +0300 Subject: [PATCH] Resolved #229 - Terminal Component --- exports/terminal.d.ts | 1 + exports/terminal.js | 2 + exports/terminalservice.d.ts | 1 + exports/terminalservice.js | 2 + public/themes/luna-amber/theme.css | 30 +-- public/themes/luna-blue/theme.css | 30 +-- public/themes/luna-green/theme.css | 30 +-- public/themes/luna-pink/theme.css | 30 +-- public/themes/nova-colored/theme.css | 30 +-- public/themes/nova-dark/theme.css | 30 +-- public/themes/nova-light/theme.css | 24 --- public/themes/nova-vue/theme.css | 30 +-- public/themes/rhea/theme.css | 30 +-- src/AppMenu.vue | 1 + src/components/terminal/Terminal.d.ts | 6 + src/components/terminal/Terminal.vue | 86 +++++++++ src/components/terminal/TerminalService.d.ts | 6 + src/components/terminal/TerminalService.js | 4 + src/components/toast/ToastService.d.ts | 12 +- src/main.js | 2 + src/router.js | 5 + src/views/terminal/TerminalDemo.vue | 81 ++++++++ src/views/terminal/TerminalDoc.vue | 191 +++++++++++++++++++ 23 files changed, 434 insertions(+), 230 deletions(-) create mode 100644 exports/terminal.d.ts create mode 100644 exports/terminal.js create mode 100644 exports/terminalservice.d.ts create mode 100644 exports/terminalservice.js create mode 100644 src/components/terminal/Terminal.d.ts create mode 100644 src/components/terminal/Terminal.vue create mode 100644 src/components/terminal/TerminalService.d.ts create mode 100644 src/components/terminal/TerminalService.js create mode 100644 src/views/terminal/TerminalDemo.vue create mode 100644 src/views/terminal/TerminalDoc.vue diff --git a/exports/terminal.d.ts b/exports/terminal.d.ts new file mode 100644 index 000000000..d1d85eb37 --- /dev/null +++ b/exports/terminal.d.ts @@ -0,0 +1 @@ +export * from './components/terminal/Terminal'; \ No newline at end of file diff --git a/exports/terminal.js b/exports/terminal.js new file mode 100644 index 000000000..d02a18461 --- /dev/null +++ b/exports/terminal.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = require('./components/terminal/Terminal.vue'); \ No newline at end of file diff --git a/exports/terminalservice.d.ts b/exports/terminalservice.d.ts new file mode 100644 index 000000000..d648a31f5 --- /dev/null +++ b/exports/terminalservice.d.ts @@ -0,0 +1 @@ +export * from './components/terminal/TerminalService'; \ No newline at end of file diff --git a/exports/terminalservice.js b/exports/terminalservice.js new file mode 100644 index 000000000..dd1a263a0 --- /dev/null +++ b/exports/terminalservice.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = require('./components/terminal/TerminalService.js'); \ No newline at end of file diff --git a/public/themes/luna-amber/theme.css b/public/themes/luna-amber/theme.css index 5a742c1b4..cb8532558 100644 --- a/public/themes/luna-amber/theme.css +++ b/public/themes/luna-amber/theme.css @@ -3133,7 +3133,8 @@ body .p-toast .p-toast-item-container.p-toast-message-error .p-toast-icon-close } body .p-component-overlay { - background-color: rgba(0, 0, 0, 0.4); + background-color: #000000; + opacity: 0.4; } body .p-overlaypanel { background-color: #323232; @@ -3980,29 +3981,6 @@ body .p-progressbar .p-progressbar-label { color: #dedede; line-height: 24px; } -body .p-galleria .p-galleria-nav-prev, -body .p-galleria .p-galleria-nav-next { - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - -webkit-transition: all 0.2s; - transition: all 0.2s; - position: absolute; - color: #888888; -} -body .p-galleria .p-galleria-nav-prev:hover, -body .p-galleria .p-galleria-nav-next:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); -} -body .p-galleria .p-galleria-nav-prev { - font-size: 16px; -} -body .p-galleria .p-galleria-nav-next { - font-size: 16px; -} body .p-terminal { background-color: #323232; color: #dedede; @@ -4012,7 +3990,6 @@ body .p-terminal { body .p-terminal .p-terminal-input { font-size: 14px; font-family: "Open Sans", "Helvetica Neue", sans-serif; - height: 16px; } body .p-terminal .p-terminal-command { height: 16px; @@ -4045,5 +4022,8 @@ body .p-fluid .p-inplace.p-inplace-closable .p-inplace-content > :first-child { display: inline-block; width: calc(100% - 2.357em); } +body .p-blockui { + transition-duration: 0.2s; +} /* Add your customizations of theme here */ diff --git a/public/themes/luna-blue/theme.css b/public/themes/luna-blue/theme.css index 3a9c5e02e..d74f751da 100644 --- a/public/themes/luna-blue/theme.css +++ b/public/themes/luna-blue/theme.css @@ -3133,7 +3133,8 @@ body .p-toast .p-toast-item-container.p-toast-message-error .p-toast-icon-close } body .p-component-overlay { - background-color: rgba(0, 0, 0, 0.4); + background-color: #000000; + opacity: 0.4; } body .p-overlaypanel { background-color: #323232; @@ -3980,29 +3981,6 @@ body .p-progressbar .p-progressbar-label { color: #dedede; line-height: 24px; } -body .p-galleria .p-galleria-nav-prev, -body .p-galleria .p-galleria-nav-next { - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - -webkit-transition: all 0.2s; - transition: all 0.2s; - position: absolute; - color: #888888; -} -body .p-galleria .p-galleria-nav-prev:hover, -body .p-galleria .p-galleria-nav-next:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); -} -body .p-galleria .p-galleria-nav-prev { - font-size: 16px; -} -body .p-galleria .p-galleria-nav-next { - font-size: 16px; -} body .p-terminal { background-color: #323232; color: #dedede; @@ -4012,7 +3990,6 @@ body .p-terminal { body .p-terminal .p-terminal-input { font-size: 14px; font-family: "Open Sans", "Helvetica Neue", sans-serif; - height: 16px; } body .p-terminal .p-terminal-command { height: 16px; @@ -4045,5 +4022,8 @@ body .p-fluid .p-inplace.p-inplace-closable .p-inplace-content > :first-child { display: inline-block; width: calc(100% - 2.357em); } +body .p-blockui { + transition-duration: 0.2s; +} /* Add your customizations of theme here */ diff --git a/public/themes/luna-green/theme.css b/public/themes/luna-green/theme.css index bdc96295f..b02ccd0f0 100644 --- a/public/themes/luna-green/theme.css +++ b/public/themes/luna-green/theme.css @@ -3133,7 +3133,8 @@ body .p-toast .p-toast-item-container.p-toast-message-error .p-toast-icon-close } body .p-component-overlay { - background-color: rgba(0, 0, 0, 0.4); + background-color: #000000; + opacity: 0.4; } body .p-overlaypanel { background-color: #323232; @@ -3980,29 +3981,6 @@ body .p-progressbar .p-progressbar-label { color: #dedede; line-height: 24px; } -body .p-galleria .p-galleria-nav-prev, -body .p-galleria .p-galleria-nav-next { - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - -webkit-transition: all 0.2s; - transition: all 0.2s; - position: absolute; - color: #888888; -} -body .p-galleria .p-galleria-nav-prev:hover, -body .p-galleria .p-galleria-nav-next:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); -} -body .p-galleria .p-galleria-nav-prev { - font-size: 16px; -} -body .p-galleria .p-galleria-nav-next { - font-size: 16px; -} body .p-terminal { background-color: #323232; color: #dedede; @@ -4012,7 +3990,6 @@ body .p-terminal { body .p-terminal .p-terminal-input { font-size: 14px; font-family: "Open Sans", "Helvetica Neue", sans-serif; - height: 16px; } body .p-terminal .p-terminal-command { height: 16px; @@ -4045,5 +4022,8 @@ body .p-fluid .p-inplace.p-inplace-closable .p-inplace-content > :first-child { display: inline-block; width: calc(100% - 2.357em); } +body .p-blockui { + transition-duration: 0.2s; +} /* Add your customizations of theme here */ diff --git a/public/themes/luna-pink/theme.css b/public/themes/luna-pink/theme.css index dc204300f..1febff941 100644 --- a/public/themes/luna-pink/theme.css +++ b/public/themes/luna-pink/theme.css @@ -3133,7 +3133,8 @@ body .p-toast .p-toast-item-container.p-toast-message-error .p-toast-icon-close } body .p-component-overlay { - background-color: rgba(0, 0, 0, 0.4); + background-color: #000000; + opacity: 0.4; } body .p-overlaypanel { background-color: #323232; @@ -3980,29 +3981,6 @@ body .p-progressbar .p-progressbar-label { color: #dedede; line-height: 24px; } -body .p-galleria .p-galleria-nav-prev, -body .p-galleria .p-galleria-nav-next { - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - -webkit-transition: all 0.2s; - transition: all 0.2s; - position: absolute; - color: #888888; -} -body .p-galleria .p-galleria-nav-prev:hover, -body .p-galleria .p-galleria-nav-next:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); -} -body .p-galleria .p-galleria-nav-prev { - font-size: 16px; -} -body .p-galleria .p-galleria-nav-next { - font-size: 16px; -} body .p-terminal { background-color: #323232; color: #dedede; @@ -4012,7 +3990,6 @@ body .p-terminal { body .p-terminal .p-terminal-input { font-size: 14px; font-family: "Open Sans", "Helvetica Neue", sans-serif; - height: 16px; } body .p-terminal .p-terminal-command { height: 16px; @@ -4045,5 +4022,8 @@ body .p-fluid .p-inplace.p-inplace-closable .p-inplace-content > :first-child { display: inline-block; width: calc(100% - 2.357em); } +body .p-blockui { + transition-duration: 0.2s; +} /* Add your customizations of theme here */ diff --git a/public/themes/nova-colored/theme.css b/public/themes/nova-colored/theme.css index eddd84706..f9ca9a5d5 100644 --- a/public/themes/nova-colored/theme.css +++ b/public/themes/nova-colored/theme.css @@ -3133,7 +3133,8 @@ body .p-toast .p-toast-item-container.p-toast-message-error .p-toast-icon-close } body .p-component-overlay { - background-color: rgba(0, 0, 0, 0.4); + background-color: #000000; + opacity: 0.4; } body .p-overlaypanel { background-color: #ffffff; @@ -3980,29 +3981,6 @@ body .p-progressbar .p-progressbar-label { color: #333333; line-height: 24px; } -body .p-galleria .p-galleria-nav-prev, -body .p-galleria .p-galleria-nav-next { - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - -webkit-transition: all 0.2s; - transition: all 0.2s; - position: absolute; - color: #848484; -} -body .p-galleria .p-galleria-nav-prev:hover, -body .p-galleria .p-galleria-nav-next:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); -} -body .p-galleria .p-galleria-nav-prev { - font-size: 16px; -} -body .p-galleria .p-galleria-nav-next { - font-size: 16px; -} body .p-terminal { background-color: #ffffff; color: #333333; @@ -4012,7 +3990,6 @@ body .p-terminal { body .p-terminal .p-terminal-input { font-size: 14px; font-family: "Open Sans", "Helvetica Neue", sans-serif; - height: 16px; } body .p-terminal .p-terminal-command { height: 16px; @@ -4045,5 +4022,8 @@ body .p-fluid .p-inplace.p-inplace-closable .p-inplace-content > :first-child { display: inline-block; width: calc(100% - 2.357em); } +body .p-blockui { + transition-duration: 0.2s; +} /* Add your customizations of theme here */ diff --git a/public/themes/nova-dark/theme.css b/public/themes/nova-dark/theme.css index d3f0512e0..30ebd78be 100644 --- a/public/themes/nova-dark/theme.css +++ b/public/themes/nova-dark/theme.css @@ -3133,7 +3133,8 @@ body .p-toast .p-toast-item-container.p-toast-message-error .p-toast-icon-close } body .p-component-overlay { - background-color: rgba(0, 0, 0, 0.4); + background-color: #000000; + opacity: 0.4; } body .p-overlaypanel { background-color: #ffffff; @@ -3980,29 +3981,6 @@ body .p-progressbar .p-progressbar-label { color: #333333; line-height: 24px; } -body .p-galleria .p-galleria-nav-prev, -body .p-galleria .p-galleria-nav-next { - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - -webkit-transition: all 0.2s; - transition: all 0.2s; - position: absolute; - color: #848484; -} -body .p-galleria .p-galleria-nav-prev:hover, -body .p-galleria .p-galleria-nav-next:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); -} -body .p-galleria .p-galleria-nav-prev { - font-size: 16px; -} -body .p-galleria .p-galleria-nav-next { - font-size: 16px; -} body .p-terminal { background-color: #ffffff; color: #333333; @@ -4012,7 +3990,6 @@ body .p-terminal { body .p-terminal .p-terminal-input { font-size: 14px; font-family: "Open Sans", "Helvetica Neue", sans-serif; - height: 16px; } body .p-terminal .p-terminal-command { height: 16px; @@ -4045,5 +4022,8 @@ body .p-fluid .p-inplace.p-inplace-closable .p-inplace-content > :first-child { display: inline-block; width: calc(100% - 2.357em); } +body .p-blockui { + transition-duration: 0.2s; +} /* Add your customizations of theme here */ diff --git a/public/themes/nova-light/theme.css b/public/themes/nova-light/theme.css index d5b761113..d5da3665f 100644 --- a/public/themes/nova-light/theme.css +++ b/public/themes/nova-light/theme.css @@ -3981,29 +3981,6 @@ body .p-progressbar .p-progressbar-label { color: #333333; line-height: 24px; } -body .p-galleria .p-galleria-nav-prev, -body .p-galleria .p-galleria-nav-next { - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - -webkit-transition: all 0.2s; - transition: all 0.2s; - position: absolute; - color: #848484; -} -body .p-galleria .p-galleria-nav-prev:hover, -body .p-galleria .p-galleria-nav-next:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); -} -body .p-galleria .p-galleria-nav-prev { - font-size: 16px; -} -body .p-galleria .p-galleria-nav-next { - font-size: 16px; -} body .p-terminal { background-color: #ffffff; color: #333333; @@ -4013,7 +3990,6 @@ body .p-terminal { body .p-terminal .p-terminal-input { font-size: 14px; font-family: "Open Sans", "Helvetica Neue", sans-serif; - height: 16px; } body .p-terminal .p-terminal-command { height: 16px; diff --git a/public/themes/nova-vue/theme.css b/public/themes/nova-vue/theme.css index 9227b4ad6..49af24781 100644 --- a/public/themes/nova-vue/theme.css +++ b/public/themes/nova-vue/theme.css @@ -3133,7 +3133,8 @@ body .p-toast .p-toast-item-container.p-toast-message-error .p-toast-icon-close } body .p-component-overlay { - background-color: rgba(0, 0, 0, 0.4); + background-color: #000000; + opacity: 0.4; } body .p-overlaypanel { background-color: #ffffff; @@ -3980,29 +3981,6 @@ body .p-progressbar .p-progressbar-label { color: #333333; line-height: 24px; } -body .p-galleria .p-galleria-nav-prev, -body .p-galleria .p-galleria-nav-next { - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - -webkit-transition: all 0.2s; - transition: all 0.2s; - position: absolute; - color: #848484; -} -body .p-galleria .p-galleria-nav-prev:hover, -body .p-galleria .p-galleria-nav-next:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); -} -body .p-galleria .p-galleria-nav-prev { - font-size: 16px; -} -body .p-galleria .p-galleria-nav-next { - font-size: 16px; -} body .p-terminal { background-color: #ffffff; color: #333333; @@ -4012,7 +3990,6 @@ body .p-terminal { body .p-terminal .p-terminal-input { font-size: 14px; font-family: "Open Sans", "Helvetica Neue", sans-serif; - height: 16px; } body .p-terminal .p-terminal-command { height: 16px; @@ -4045,5 +4022,8 @@ body .p-fluid .p-inplace.p-inplace-closable .p-inplace-content > :first-child { display: inline-block; width: calc(100% - 2.357em); } +body .p-blockui { + transition-duration: 0.2s; +} /* Add your customizations of theme here */ diff --git a/public/themes/rhea/theme.css b/public/themes/rhea/theme.css index 31b808800..495516174 100644 --- a/public/themes/rhea/theme.css +++ b/public/themes/rhea/theme.css @@ -3133,7 +3133,8 @@ body .p-toast .p-toast-item-container.p-toast-message-error .p-toast-icon-close } body .p-component-overlay { - background-color: rgba(0, 0, 0, 0.4); + background-color: #000000; + opacity: 0.4; } body .p-overlaypanel { background-color: #ffffff; @@ -3980,29 +3981,6 @@ body .p-progressbar .p-progressbar-label { color: #666666; line-height: 1.714em; } -body .p-galleria .p-galleria-nav-prev, -body .p-galleria .p-galleria-nav-next { - -moz-transition: all 0.2s; - -o-transition: all 0.2s; - -webkit-transition: all 0.2s; - transition: all 0.2s; - position: absolute; - color: #a6a6a6; -} -body .p-galleria .p-galleria-nav-prev:hover, -body .p-galleria .p-galleria-nav-next:hover { - -webkit-transform: scale(1.2); - -moz-transform: scale(1.2); - -o-transform: scale(1.2); - -ms-transform: scale(1.2); - transform: scale(1.2); -} -body .p-galleria .p-galleria-nav-prev { - font-size: 16px; -} -body .p-galleria .p-galleria-nav-next { - font-size: 16px; -} body .p-terminal { background-color: #ffffff; color: #666666; @@ -4012,7 +3990,6 @@ body .p-terminal { body .p-terminal .p-terminal-input { font-size: 14px; font-family: "Open Sans", "Helvetica Neue", sans-serif; - height: 16px; } body .p-terminal .p-terminal-command { height: 16px; @@ -4045,5 +4022,8 @@ body .p-fluid .p-inplace.p-inplace-closable .p-inplace-content > :first-child { display: inline-block; width: calc(100% - 2.357em); } +body .p-blockui { + transition-duration: 0.2s; +} /* Add your customizations of theme here */ diff --git a/src/AppMenu.vue b/src/AppMenu.vue index 66821fb68..44398a80e 100644 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -140,6 +140,7 @@ Inplace ProgressBar ProgressSpinner + Terminal diff --git a/src/components/terminal/Terminal.d.ts b/src/components/terminal/Terminal.d.ts new file mode 100644 index 000000000..0b4dec9ef --- /dev/null +++ b/src/components/terminal/Terminal.d.ts @@ -0,0 +1,6 @@ +import Vue from 'vue'; + +export declare class Terminal extends Vue { + welcomeMessage?: string; + prompt?: string; +} \ No newline at end of file diff --git a/src/components/terminal/Terminal.vue b/src/components/terminal/Terminal.vue new file mode 100644 index 000000000..54b16ac83 --- /dev/null +++ b/src/components/terminal/Terminal.vue @@ -0,0 +1,86 @@ + + + + + \ No newline at end of file diff --git a/src/components/terminal/TerminalService.d.ts b/src/components/terminal/TerminalService.d.ts new file mode 100644 index 000000000..b368d60b1 --- /dev/null +++ b/src/components/terminal/TerminalService.d.ts @@ -0,0 +1,6 @@ +export declare class TerminalService { + $on(action: string, fn: any): any; + $emit(action: string, params?: any): any; + $off(action: string, id: number): void; + $subscribed(action: string): boolean; +} \ No newline at end of file diff --git a/src/components/terminal/TerminalService.js b/src/components/terminal/TerminalService.js new file mode 100644 index 000000000..0dd4cfedc --- /dev/null +++ b/src/components/terminal/TerminalService.js @@ -0,0 +1,4 @@ +import Vue from 'vue'; +const TerminalService = new Vue(); + +export default TerminalService; \ No newline at end of file diff --git a/src/components/toast/ToastService.d.ts b/src/components/toast/ToastService.d.ts index aae540544..b9697e628 100644 --- a/src/components/toast/ToastService.d.ts +++ b/src/components/toast/ToastService.d.ts @@ -3,13 +3,13 @@ import Vue, { PluginFunction } from 'vue'; export const install: PluginFunction<{}>; interface ToastServiceMethods { - add(message: any): any; - removeGroup(group: any): void; - removeAllGroups(): void; + add(message: any): any; + removeGroup(group: any): void; + removeAllGroups(): void; } declare module 'vue/types/vue' { - interface Vue { - $toast: ToastServiceMethods; - } + interface Vue { + $toast: ToastServiceMethods; + } } \ No newline at end of file diff --git a/src/main.js b/src/main.js index 30948d62d..d73f58852 100644 --- a/src/main.js +++ b/src/main.js @@ -58,6 +58,7 @@ import Steps from './components/steps/Steps'; import TabMenu from './components/tabmenu/TabMenu'; import TabView from './components/tabview/TabView'; import TabPanel from './components/tabpanel/TabPanel'; +import Terminal from './components/terminal/Terminal'; import Textarea from './components/textarea/Textarea'; import TieredMenu from './components/tieredmenu/TieredMenu'; import Tree from './components/tree/Tree'; @@ -145,6 +146,7 @@ Vue.component('Steps', Steps); Vue.component('TabView', TabView); Vue.component('TabPanel', TabPanel); Vue.component('TabMenu', TabMenu); +Vue.component('Terminal', Terminal); Vue.component('Textarea', Textarea); Vue.component('TieredMenu', TieredMenu); Vue.component('Toast', Toast); diff --git a/src/router.js b/src/router.js index 2e35634cb..8871f592f 100644 --- a/src/router.js +++ b/src/router.js @@ -490,6 +490,11 @@ export default new Router({ name: 'tabview', component: () => import('./views/tabview/TabViewDemo.vue') }, + { + path: '/terminal', + name: 'terminal', + component: () => import('./views/terminal/TerminalDemo.vue') + }, { path: '/tieredmenu', name: 'tieredmenu', diff --git a/src/views/terminal/TerminalDemo.vue b/src/views/terminal/TerminalDemo.vue new file mode 100644 index 000000000..10c7ee609 --- /dev/null +++ b/src/views/terminal/TerminalDemo.vue @@ -0,0 +1,81 @@ + + + + + \ No newline at end of file diff --git a/src/views/terminal/TerminalDoc.vue b/src/views/terminal/TerminalDoc.vue new file mode 100644 index 000000000..fb189dfa6 --- /dev/null +++ b/src/views/terminal/TerminalDoc.vue @@ -0,0 +1,191 @@ + \ No newline at end of file