From 5e9cc09fcb6cb88cc4d2c3040bf085e9e278d22e Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 3 Mar 2021 01:03:29 +0900 Subject: [PATCH] Bios (#7286) * wip * wip * wip --- gulpfile.ts | 4 +- src/client/components/form/link.vue | 6 +- src/client/components/global/a.vue | 5 ++ src/client/pages/settings/other.vue | 7 ++- src/server/web/bios.css | 40 +++++++++++++ src/server/web/bios.js | 87 +++++++++++++++++++++++++++++ src/server/web/cli.css | 19 +++++++ src/server/web/cli.js | 55 ++++++++++++++++++ src/server/web/index.ts | 12 ++++ src/server/web/views/bios.pug | 20 +++++++ src/server/web/views/cli.pug | 21 +++++++ 11 files changed, 271 insertions(+), 5 deletions(-) create mode 100644 src/server/web/bios.css create mode 100644 src/server/web/bios.js create mode 100644 src/server/web/cli.css create mode 100644 src/server/web/cli.js create mode 100644 src/server/web/views/bios.pug create mode 100644 src/server/web/views/cli.pug diff --git a/gulpfile.ts b/gulpfile.ts index bdc20089cd..b394e4f44c 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -45,7 +45,7 @@ gulp.task('build:copy:locales', cb => { }); gulp.task('build:client:script', () => { - return gulp.src(['./src/server/web/boot.js']) + return gulp.src(['./src/server/web/boot.js', './src/server/web/bios.js', './src/server/web/cli.js']) .pipe(replace('VERSION', JSON.stringify(meta.version))) .pipe(replace('LANGS', JSON.stringify(Object.keys(locales)))) .pipe(terser({ @@ -55,7 +55,7 @@ gulp.task('build:client:script', () => { }); gulp.task('build:client:style', () => { - return gulp.src(['./src/server/web/style.css']) + return gulp.src(['./src/server/web/style.css', './src/server/web/bios.css', './src/server/web/cli.css']) .pipe(cssnano()) .pipe(gulp.dest('./built/server/web/')); }); diff --git a/src/client/components/form/link.vue b/src/client/components/form/link.vue index 7093f50397..2efc6b58c9 100644 --- a/src/client/components/form/link.vue +++ b/src/client/components/form/link.vue @@ -8,7 +8,7 @@ - + @@ -38,6 +38,10 @@ export default defineComponent({ type: Boolean, required: false }, + behavior: { + type: String, + required: false, + }, }, data() { return { diff --git a/src/client/components/global/a.vue b/src/client/components/global/a.vue index cf894deaba..d293cb571f 100644 --- a/src/client/components/global/a.vue +++ b/src/client/components/global/a.vue @@ -98,6 +98,11 @@ export default defineComponent({ }, nav() { + if (this.behavior === 'browser') { + location.href = this.to; + return; + } + if (this.to.startsWith('/my/messaging')) { if (ColdDeviceStorage.get('chatOpenBehavior') === 'window') return this.window(); if (ColdDeviceStorage.get('chatOpenBehavior') === 'popout') return this.popout(); diff --git a/src/client/pages/settings/other.vue b/src/client/pages/settings/other.vue index c0b9625098..a14e101328 100644 --- a/src/client/pages/settings/other.vue +++ b/src/client/pages/settings/other.vue @@ -23,13 +23,16 @@ {{ $ts.registry }} + BIOS + CLI + {{ $ts.closeAccount }}