From b7ed6a6c565746ab0474551dfab4caaa06d394b5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 6 Feb 2021 21:36:47 +0900 Subject: [PATCH] Add AiScript console widget --- locales/ja-JP.yml | 1 + src/client/widgets/aiscript.vue | 164 ++++++++++++++++++++++++++++++++ src/client/widgets/index.ts | 2 + src/client/widgets/memo.vue | 12 ++- 4 files changed, 176 insertions(+), 3 deletions(-) create mode 100644 src/client/widgets/aiscript.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 2233fa27f..3f8542dfd 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1067,6 +1067,7 @@ _widgets: onlineUsers: "オンラインユーザー" jobQueue: "ジョブキュー" serverMetric: "サーバーメトリクス" + aiscript: "AiScriptコンソール" _cw: hide: "隠す" diff --git a/src/client/widgets/aiscript.vue b/src/client/widgets/aiscript.vue new file mode 100644 index 000000000..4e788b4b4 --- /dev/null +++ b/src/client/widgets/aiscript.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/src/client/widgets/index.ts b/src/client/widgets/index.ts index 0c7e82430..38cb85494 100644 --- a/src/client/widgets/index.ts +++ b/src/client/widgets/index.ts @@ -18,6 +18,7 @@ export default function(app: App) { app.component('MkwOnlineUsers', defineAsyncComponent(() => import('./online-users.vue'))); app.component('MkwJobQueue', defineAsyncComponent(() => import('./job-queue.vue'))); app.component('MkwButton', defineAsyncComponent(() => import('./button.vue'))); + app.component('MkwAiscript', defineAsyncComponent(() => import('./aiscript.vue'))); } export const widgets = [ @@ -38,4 +39,5 @@ export const widgets = [ 'onlineUsers', 'jobQueue', 'button', + 'aiscript', ]; diff --git a/src/client/widgets/memo.vue b/src/client/widgets/memo.vue index dab19cd16..3512429e0 100644 --- a/src/client/widgets/memo.vue +++ b/src/client/widgets/memo.vue @@ -74,12 +74,18 @@ export default defineComponent({ max-width: 100%; min-width: 100%; padding: 16px; - color: var(--inputText); - background: var(--face); + color: var(--fg); + background: transparent; border: none; - border-bottom: solid var(--lineWidth) var(--faceDivider); + border-bottom: solid 1px var(--divider); border-radius: 0; box-sizing: border-box; + font: inherit; + font-size: 0.9em; + + &:focus { + outline: none; + } } > button {