{{ i18n.ts.somethingHappened }}
@@ -13,7 +13,6 @@ import MkButton from '@/components/MkButton.vue'; import { i18n } from '@/i18n'; import { defaultStore } from '@/store'; -const animation = $ref(defaultStore.reactiveState.animation); const emit = defineEmits<{ (ev: 'retry'): void; }>(); diff --git a/packages/frontend/src/components/global/MkPageHeader.vue b/packages/frontend/src/components/global/MkPageHeader.vue index 4d968db6a3..0d229a9370 100644 --- a/packages/frontend/src/components/global/MkPageHeader.vue +++ b/packages/frontend/src/components/global/MkPageHeader.vue @@ -241,7 +241,7 @@ onUnmounted(() => { display: flex; align-items: center; max-width: min(30vw, 400px); - overflow: auto; + overflow: clip; white-space: nowrap; text-align: left; font-weight: bold; diff --git a/packages/frontend/src/components/page/page.post.vue b/packages/frontend/src/components/page/page.post.vue index 6de0a78694..141141ec80 100644 --- a/packages/frontend/src/components/page/page.post.vue +++ b/packages/frontend/src/components/page/page.post.vue @@ -16,6 +16,7 @@ import { apiUrl } from '@/config'; import * as os from '@/os'; import { PostBlock } from '@/scripts/hpml/block'; import { Hpml } from '@/scripts/hpml/evaluator'; +import { defaultStore } from '@/store'; export default defineComponent({ components: { @@ -55,8 +56,8 @@ export default defineComponent({ const formData = new FormData(); formData.append('file', blob); formData.append('i', this.$i.token); - if (this.$store.state.uploadFolder) { - formData.append('folderId', this.$store.state.uploadFolder); + if (defaultStore.state.uploadFolder) { + formData.append('folderId', defaultStore.state.uploadFolder); } window.fetch(apiUrl + '/drive/files/create', { diff --git a/packages/frontend/src/directives/user-preview.ts b/packages/frontend/src/directives/user-preview.ts index 2f5936de3d..ae12f2670a 100644 --- a/packages/frontend/src/directives/user-preview.ts +++ b/packages/frontend/src/directives/user-preview.ts @@ -1,5 +1,4 @@ import { defineAsyncComponent, Directive, ref } from 'vue'; -import autobind from 'autobind-decorator'; import { popup } from '@/os'; export class UserPreview { @@ -15,9 +14,16 @@ export class UserPreview { this.user = user; this.attach(); + + this.show = this.show.bind(this); + this.close = this.close.bind(this); + this.onMouseover = this.onMouseover.bind(this); + this.onMouseleave = this.onMouseleave.bind(this); + this.onClick = this.onClick.bind(this); + this.attach = this.attach.bind(this); + this.detach = this.detach.bind(this); } - @autobind private show() { if (!document.body.contains(this.el)) return; if (this.promise) return; @@ -53,7 +59,6 @@ export class UserPreview { }, 1000); } - @autobind private close() { if (this.promise) { window.clearInterval(this.checkTimer); @@ -62,34 +67,29 @@ export class UserPreview { } } - @autobind private onMouseover() { window.clearTimeout(this.showTimer); window.clearTimeout(this.hideTimer); this.showTimer = window.setTimeout(this.show, 500); } - @autobind private onMouseleave() { window.clearTimeout(this.showTimer); window.clearTimeout(this.hideTimer); this.hideTimer = window.setTimeout(this.close, 500); } - @autobind private onClick() { window.clearTimeout(this.showTimer); this.close(); } - @autobind public attach() { this.el.addEventListener('mouseover', this.onMouseover); this.el.addEventListener('mouseleave', this.onMouseleave); this.el.addEventListener('click', this.onClick); } - @autobind public detach() { this.el.removeEventListener('mouseover', this.onMouseover); this.el.removeEventListener('mouseleave', this.onMouseleave); diff --git a/packages/frontend/src/init.ts b/packages/frontend/src/init.ts index a2dff87e8e..87ba06d17b 100644 --- a/packages/frontend/src/init.ts +++ b/packages/frontend/src/init.ts @@ -201,8 +201,6 @@ if (_DEV_) { // TODO: 廃止 app.config.globalProperties = { $i, - $store: defaultStore, - $instance: instance, $t: i18n.t, $ts: i18n.ts, }; @@ -356,7 +354,7 @@ const hotkeys = { }, 's': (): void => { mainRouter.push('/search'); - } + }, }; if ($i) { diff --git a/packages/frontend/src/pages/_error_.vue b/packages/frontend/src/pages/_error_.vue index 5001b5a8b4..f53fec7d94 100644 --- a/packages/frontend/src/pages/_error_.vue +++ b/packages/frontend/src/pages/_error_.vue @@ -1,6 +1,6 @@{{ i18n.ts.pageLoadError }}
@@ -27,6 +27,7 @@ import { unisonReload } from '@/scripts/unison-reload'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; import { miLocalStorage } from '@/local-storage'; +import { defaultStore } from '@/store'; const props = withDefaults(defineProps<{ error?: Error; diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index be0c1828a3..d54d93eaee 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -3,18 +3,18 @@