From a7a5adaf5d33b7fef06f3713a5717bcdff6a3da2 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Fri, 6 Sep 2024 18:28:23 +0900 Subject: [PATCH] fix broken imports --- packages/frontend-embed/@types/global.d.ts | 23 +++++++++++++++++++ .../src/components/EmInstanceTicker.vue | 3 ++- .../frontend-embed/src/components/EmLink.vue | 2 +- .../frontend-embed/src/components/EmMfm.ts | 7 ++---- .../frontend-embed/src/components/I18n.vue | 2 +- packages/frontend-embed/tsconfig.json | 1 - 6 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 packages/frontend-embed/@types/global.d.ts diff --git a/packages/frontend-embed/@types/global.d.ts b/packages/frontend-embed/@types/global.d.ts new file mode 100644 index 0000000000..1025d1bedb --- /dev/null +++ b/packages/frontend-embed/@types/global.d.ts @@ -0,0 +1,23 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + +type FIXME = any; + +declare const _LANGS_: string[][]; +declare const _VERSION_: string; +declare const _ENV_: string; +declare const _DEV_: boolean; +declare const _PERF_PREFIX_: string; +declare const _DATA_TRANSFER_DRIVE_FILE_: string; +declare const _DATA_TRANSFER_DRIVE_FOLDER_: string; +declare const _DATA_TRANSFER_DECK_COLUMN_: string; + +// for dev-mode +declare const _LANGS_FULL_: string[][]; + +// TagCanvas +interface Window { + TagCanvas: any; +} diff --git a/packages/frontend-embed/src/components/EmInstanceTicker.vue b/packages/frontend-embed/src/components/EmInstanceTicker.vue index 6bea697a65..10eb3cc1c6 100644 --- a/packages/frontend-embed/src/components/EmInstanceTicker.vue +++ b/packages/frontend-embed/src/components/EmInstanceTicker.vue @@ -15,6 +15,7 @@ import { computed, inject } from 'vue'; import { DI } from '@/di.js'; +const serverMetadata = inject(DI.serverMetadata)!; const mediaProxy = inject(DI.mediaProxy)!; const props = defineProps<{ @@ -27,7 +28,7 @@ const props = defineProps<{ const faviconUrl = computed(() => mediaProxy.getProxiedImageUrlNullable(props.instance.faviconUrl, 'preview')); -const themeColor = instance.themeColor ?? '#777777'; +const themeColor = serverMetadata.themeColor ?? '#777777'; const bg = { background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)`, diff --git a/packages/frontend-embed/src/components/EmLink.vue b/packages/frontend-embed/src/components/EmLink.vue index d67d33e042..319ad72399 100644 --- a/packages/frontend-embed/src/components/EmLink.vue +++ b/packages/frontend-embed/src/components/EmLink.vue @@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only