From 8407702b38ead9fab4aab6698b9e0be1457218a0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 4 Sep 2021 17:54:24 +0900 Subject: 藍モード (#7687) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * wip * wip * シンボリックリンクやめた * install lib dependency * bring live2d assets from misskey-dev/assets * refactor * nanka iroiro * コミット忘れ * random motion * wip * run git submodule update --init * コミット忘れ * refactor * fix bug * Update misskey-assets * lint * lint * lint * 藍モード修正 (#7702) * lazy load live2d script * fix typo * lazy load also widget * hot link to cubism core * https://github.com/misskey-dev/misskey/pull/7702/files#r695623821 * fix lint * remove live2d stuff * use iframe * update * Update gulpfile.ts * update * Update .gitattributes * update Co-authored-by: tamaina --- src/client/pages/settings/general.vue | 9 ++++++ src/client/store.ts | 4 +++ src/client/tsconfig.json | 3 +- src/client/ui/default.vue | 31 +++++++++++++++++- src/client/widgets/aichan.vue | 59 +++++++++++++++++++++++++++++++++++ src/client/widgets/index.ts | 2 ++ 6 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 src/client/widgets/aichan.vue (limited to 'src') diff --git a/src/client/pages/settings/general.vue b/src/client/pages/settings/general.vue index cfa8107d28..f8e8e6b24b 100644 --- a/src/client/pages/settings/general.vue +++ b/src/client/pages/settings/general.vue @@ -45,6 +45,10 @@ + + {{ $ts.aiChanMode }} + + @@ -149,6 +153,7 @@ export default defineComponent({ enableInfiniteScroll: defaultStore.makeGetterSetter('enableInfiniteScroll'), useReactionPickerForContextMenu: defaultStore.makeGetterSetter('useReactionPickerForContextMenu'), squareAvatars: defaultStore.makeGetterSetter('squareAvatars'), + aiChanMode: defaultStore.makeGetterSetter('aiChanMode'), }, watch: { @@ -184,6 +189,10 @@ export default defineComponent({ this.reloadAsk(); }, + aiChanMode() { + this.reloadAsk(); + }, + showGapBetweenNotesInTimeline() { this.reloadAsk(); }, diff --git a/src/client/store.ts b/src/client/store.ts index 4c4a7d93e9..e4b762873d 100644 --- a/src/client/store.ts +++ b/src/client/store.ts @@ -210,6 +210,10 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: '' }, + aiChanMode: { + where: 'device', + default: false + }, })); // TODO: 他のタブと永続化されたstateを同期 diff --git a/src/client/tsconfig.json b/src/client/tsconfig.json index ac7ef7ddfc..7a26047ddf 100644 --- a/src/client/tsconfig.json +++ b/src/client/tsconfig.json @@ -21,7 +21,8 @@ "baseUrl": ".", "paths": { "@/*": ["../*"], - "@client/*": ["./*"] + "@client/*": ["./*"], + "@lib/*": ["../../lib/*"], }, "typeRoots": [ "node_modules/@types", diff --git a/src/client/ui/default.vue b/src/client/ui/default.vue index 23b63114cc..eef693faef 100644 --- a/src/client/ui/default.vue +++ b/src/client/ui/default.vue @@ -54,12 +54,14 @@ + + @@ -458,5 +477,15 @@ export default defineComponent({ overflow: auto; background: var(--bg); } + + > .ivnzpscs { + position: fixed; + bottom: 0; + right: 0; + width: 300px; + height: 600px; + border: none; + pointer-events: none; + } } diff --git a/src/client/widgets/aichan.vue b/src/client/widgets/aichan.vue new file mode 100644 index 0000000000..06c49090a1 --- /dev/null +++ b/src/client/widgets/aichan.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/src/client/widgets/index.ts b/src/client/widgets/index.ts index 38cb85494a..51a82af080 100644 --- a/src/client/widgets/index.ts +++ b/src/client/widgets/index.ts @@ -19,6 +19,7 @@ export default function(app: App) { app.component('MkwJobQueue', defineAsyncComponent(() => import('./job-queue.vue'))); app.component('MkwButton', defineAsyncComponent(() => import('./button.vue'))); app.component('MkwAiscript', defineAsyncComponent(() => import('./aiscript.vue'))); + app.component('MkwAichan', defineAsyncComponent(() => import('./aichan.vue'))); } export const widgets = [ @@ -40,4 +41,5 @@ export const widgets = [ 'jobQueue', 'button', 'aiscript', + 'aichan', ]; -- cgit v1.2.3-freya