diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-09-10 19:26:43 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-09-10 19:26:43 +0900 |
| commit | a2a1636c1031e4dd5c60e5a5108386f4716a16a1 (patch) | |
| tree | 00935b52e10c1f02d7e681ac2d09158301251abc /packages/client/src/scripts | |
| parent | Merge branch 'develop' (diff) | |
| parent | 12.119.0 (diff) | |
| download | misskey-a2a1636c1031e4dd5c60e5a5108386f4716a16a1.tar.gz misskey-a2a1636c1031e4dd5c60e5a5108386f4716a16a1.tar.bz2 misskey-a2a1636c1031e4dd5c60e5a5108386f4716a16a1.zip | |
Merge branch 'develop'
Diffstat (limited to 'packages/client/src/scripts')
| -rw-r--r-- | packages/client/src/scripts/autocomplete.ts | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/get-note-menu.ts | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/get-user-menu.ts | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/please-login.ts | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/reaction-picker.ts | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/theme.ts | 5 | ||||
| -rw-r--r-- | packages/client/src/scripts/use-chart-tooltip.ts | 2 |
7 files changed, 11 insertions, 6 deletions
diff --git a/packages/client/src/scripts/autocomplete.ts b/packages/client/src/scripts/autocomplete.ts index 3ef6224175..206724de9e 100644 --- a/packages/client/src/scripts/autocomplete.ts +++ b/packages/client/src/scripts/autocomplete.ts @@ -157,7 +157,7 @@ export class Autocomplete { const _y = ref(y); const _q = ref(q); - const { dispose } = await popup(defineAsyncComponent(() => import('@/components/autocomplete.vue')), { + const { dispose } = await popup(defineAsyncComponent(() => import('@/components/MkAutocomplete.vue')), { textarea: this.textarea, close: this.close, type: type, diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index 632143f514..a5cf982066 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -289,7 +289,7 @@ export function getNoteMenu(props: { text: i18n.ts.reportAbuse, action: () => { const u = appearNote.url || appearNote.uri || `${url}/notes/${appearNote.id}`; - os.popup(defineAsyncComponent(() => import('@/components/abuse-report-window.vue')), { + os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), { user: appearNote.user, initialComment: `Note: ${u}\n-----\n`, }, {}, 'closed'); diff --git a/packages/client/src/scripts/get-user-menu.ts b/packages/client/src/scripts/get-user-menu.ts index c609fddd51..4a5a2d42f0 100644 --- a/packages/client/src/scripts/get-user-menu.ts +++ b/packages/client/src/scripts/get-user-menu.ts @@ -129,7 +129,7 @@ export function getUserMenu(user, router: Router = mainRouter) { } function reportAbuse() { - os.popup(defineAsyncComponent(() => import('@/components/abuse-report-window.vue')), { + os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), { user: user, }, {}, 'closed'); } diff --git a/packages/client/src/scripts/please-login.ts b/packages/client/src/scripts/please-login.ts index 1f38061841..3323968f71 100644 --- a/packages/client/src/scripts/please-login.ts +++ b/packages/client/src/scripts/please-login.ts @@ -6,7 +6,7 @@ import { popup } from '@/os'; export function pleaseLogin(path?: string) { if ($i) return; - popup(defineAsyncComponent(() => import('@/components/signin-dialog.vue')), { + popup(defineAsyncComponent(() => import('@/components/MkSigninDialog.vue')), { autoSet: true, message: i18n.ts.signinRequired }, { diff --git a/packages/client/src/scripts/reaction-picker.ts b/packages/client/src/scripts/reaction-picker.ts index b7699cae4a..a6d0940a40 100644 --- a/packages/client/src/scripts/reaction-picker.ts +++ b/packages/client/src/scripts/reaction-picker.ts @@ -12,7 +12,7 @@ class ReactionPicker { } public async init() { - await popup(defineAsyncComponent(() => import('@/components/emoji-picker-dialog.vue')), { + await popup(defineAsyncComponent(() => import('@/components/MkEmojiPickerDialog.vue')), { src: this.src, asReactionPicker: true, manualShowing: this.manualShowing diff --git a/packages/client/src/scripts/theme.ts b/packages/client/src/scripts/theme.ts index 02ac77b59d..3f55d9ae86 100644 --- a/packages/client/src/scripts/theme.ts +++ b/packages/client/src/scripts/theme.ts @@ -57,6 +57,8 @@ export function applyTheme(theme: Theme, persist = true) { document.documentElement.classList.remove('_themeChanging_'); }, 1000); + const colorSchema = theme.base === 'dark' ? 'dark' : 'light'; + // Deep copy const _theme = JSON.parse(JSON.stringify(theme)); @@ -78,8 +80,11 @@ export function applyTheme(theme: Theme, persist = true) { document.documentElement.style.setProperty(`--${k}`, v.toString()); } + document.documentElement.style.setProperty('color-schema', colorSchema); + if (persist) { localStorage.setItem('theme', JSON.stringify(props)); + localStorage.setItem('colorSchema', colorSchema); } // 色計算など再度行えるようにクライアント全体に通知 diff --git a/packages/client/src/scripts/use-chart-tooltip.ts b/packages/client/src/scripts/use-chart-tooltip.ts index ab57165694..91c27585f3 100644 --- a/packages/client/src/scripts/use-chart-tooltip.ts +++ b/packages/client/src/scripts/use-chart-tooltip.ts @@ -1,6 +1,6 @@ import { onUnmounted, ref } from 'vue'; import * as os from '@/os'; -import MkChartTooltip from '@/components/chart-tooltip.vue'; +import MkChartTooltip from '@/components/MkChartTooltip.vue'; export function useChartTooltip() { const tooltipShowing = ref(false); |