From f393b6b898d146fbd1c88d9713fba94c8b2f1284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:14:02 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix(frontend/frontend-embed):=20=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=88=E3=83=91=E3=82=B9=E3=83=BB?= =?UTF-8?q?=E3=83=86=E3=83=BC=E3=83=9E=E3=81=BE=E3=82=8F=E3=82=8A=E3=81=AA?= =?UTF-8?q?=E3=81=A9=E3=81=AE=E4=BF=AE=E6=AD=A3=20(#14535)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(frontend/frontend-embed): wrong imports * enhance(frontend-embed): サーバーデフォルトのテーマがある場合はそちらを利用するように * :art: * :art: * :art: --- packages/frontend-embed/src/boot.ts | 37 ++++++++++++++----- packages/frontend-embed/src/pages/clip.vue | 2 +- packages/frontend-embed/src/pages/tag.vue | 2 +- .../src/pages/user-timeline.vue | 2 +- .../frontend-embed/src/server-metadata.ts | 5 ++- packages/frontend-embed/src/theme.ts | 8 ++-- packages/frontend-embed/src/ui.vue | 2 +- .../src/components/MkEmbedCodeGenDialog.vue | 2 +- packages/frontend/src/scripts/theme.ts | 2 +- 9 files changed, 42 insertions(+), 20 deletions(-) diff --git a/packages/frontend-embed/src/boot.ts b/packages/frontend-embed/src/boot.ts index 4676baa905..6c73fecd76 100644 --- a/packages/frontend-embed/src/boot.ts +++ b/packages/frontend-embed/src/boot.ts @@ -10,23 +10,42 @@ import '@tabler/icons-webfont/dist/tabler-icons.scss'; import '@/style.scss'; import { createApp, defineAsyncComponent } from 'vue'; -import lightTheme from '@@/themes/l-light.json5'; -import darkTheme from '@@/themes/d-dark.json5'; +import defaultLightTheme from '@@/themes/l-light.json5'; +import defaultDarkTheme from '@@/themes/d-dark.json5'; import { MediaProxy } from '@@/js/media-proxy.js'; -import { applyTheme } from './theme.js'; -import { fetchCustomEmojis } from './custom-emojis.js'; -import { DI } from './di.js'; -import { serverMetadata } from './server-metadata.js'; -import { url } from './config.js'; +import { applyTheme, assertIsTheme } from '@/theme.js'; +import { fetchCustomEmojis } from '@/custom-emojis.js'; +import { DI } from '@/di.js'; +import { serverMetadata } from '@/server-metadata.js'; +import { url } from '@/config.js'; import { parseEmbedParams } from '@@/js/embed-page.js'; import { postMessageToParentWindow, setIframeId } from '@/post-message.js'; -console.info('Misskey Embed'); +import type { Theme } from '@/theme.js'; + +console.log('Misskey Embed'); const params = new URLSearchParams(location.search); const embedParams = parseEmbedParams(params); -console.info(embedParams); +if (_DEV_) console.log(embedParams); + +function parseThemeOrNull(theme: string | null): Theme | null { + if (theme == null) return null; + try { + const parsed = JSON.parse(theme); + if (assertIsTheme(parsed)) { + return parsed; + } else { + return null; + } + } catch (err) { + return null; + } +} + +const lightTheme = parseThemeOrNull(serverMetadata.defaultLightTheme) ?? defaultLightTheme; +const darkTheme = parseThemeOrNull(serverMetadata.defaultDarkTheme) ?? defaultDarkTheme; if (embedParams.colorMode === 'dark') { applyTheme(darkTheme); diff --git a/packages/frontend-embed/src/pages/clip.vue b/packages/frontend-embed/src/pages/clip.vue index 28bd0ab772..29b5480c35 100644 --- a/packages/frontend-embed/src/pages/clip.vue +++ b/packages/frontend-embed/src/pages/clip.vue @@ -135,7 +135,7 @@ misskeyApi('clips/show', { .instanceIcon { height: 24px; - border-radius: 4px; + border-radius: 3px; } } diff --git a/packages/frontend-embed/src/pages/tag.vue b/packages/frontend-embed/src/pages/tag.vue index d69555287a..ea45d7129e 100644 --- a/packages/frontend-embed/src/pages/tag.vue +++ b/packages/frontend-embed/src/pages/tag.vue @@ -119,7 +119,7 @@ function top(ev: MouseEvent) { .instanceIcon { height: 24px; - border-radius: 4px; + border-radius: 3px; } } diff --git a/packages/frontend-embed/src/pages/user-timeline.vue b/packages/frontend-embed/src/pages/user-timeline.vue index d590f6e650..431577d04b 100644 --- a/packages/frontend-embed/src/pages/user-timeline.vue +++ b/packages/frontend-embed/src/pages/user-timeline.vue @@ -132,7 +132,7 @@ misskeyApi('users/show', { .instanceIcon { height: 24px; - border-radius: 4px; + border-radius: 3px; } } diff --git a/packages/frontend-embed/src/server-metadata.ts b/packages/frontend-embed/src/server-metadata.ts index 2bd57a0990..6c94aacd48 100644 --- a/packages/frontend-embed/src/server-metadata.ts +++ b/packages/frontend-embed/src/server-metadata.ts @@ -3,13 +3,14 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +import * as Misskey from 'misskey-js'; import { misskeyApi } from '@/misskey-api.js'; const providedMetaEl = document.getElementById('misskey_meta'); -const _serverMetadata = (providedMetaEl && providedMetaEl.textContent) ? JSON.parse(providedMetaEl.textContent) : null; +const _serverMetadata: Misskey.entities.MetaDetailed | null = (providedMetaEl && providedMetaEl.textContent) ? JSON.parse(providedMetaEl.textContent) : null; // NOTE: devモードのときしか _serverMetadata が null になることは無い -export const serverMetadata = _serverMetadata ?? await misskeyApi('meta', { +export const serverMetadata: Misskey.entities.MetaDetailed = _serverMetadata ?? await misskeyApi('meta', { detail: true, }); diff --git a/packages/frontend-embed/src/theme.ts b/packages/frontend-embed/src/theme.ts index 050d8cf63b..ee633fae94 100644 --- a/packages/frontend-embed/src/theme.ts +++ b/packages/frontend-embed/src/theme.ts @@ -26,6 +26,10 @@ export type Theme = { let timeout: number | null = null; +export function assertIsTheme(theme: Record): theme is Theme { + return typeof theme === 'object' && theme !== null && 'id' in theme && 'name' in theme && 'author' in theme && 'props' in theme; +} + export function applyTheme(theme: Theme, persist = true) { if (timeout) window.clearTimeout(timeout); @@ -35,8 +39,6 @@ export function applyTheme(theme: Theme, persist = true) { document.documentElement.classList.remove('_themeChanging_'); }, 1000); - const colorScheme = theme.base === 'dark' ? 'dark' : 'light'; - // Deep copy const _theme = JSON.parse(JSON.stringify(theme)); @@ -58,7 +60,7 @@ export function applyTheme(theme: Theme, persist = true) { document.documentElement.style.setProperty(`--${k}`, v.toString()); } - document.documentElement.style.setProperty('color-scheme', colorScheme); + // iframeを正常に透過させるために、cssのcolor-schemeは `light dark;` 固定にしてある。style.scss参照 } function compile(theme: Theme): Record { diff --git a/packages/frontend-embed/src/ui.vue b/packages/frontend-embed/src/ui.vue index 3b8449dac8..35d9946b12 100644 --- a/packages/frontend-embed/src/ui.vue +++ b/packages/frontend-embed/src/ui.vue @@ -40,7 +40,7 @@ import XNotFound from '@/pages/not-found.vue'; const page = location.pathname.split('/')[2]; const contentId = location.pathname.split('/')[3]; -console.log(page, contentId); +if (_DEV_) console.log(page, contentId); const embedParams = inject(DI.embedParams, defaultEmbedParams); diff --git a/packages/frontend/src/components/MkEmbedCodeGenDialog.vue b/packages/frontend/src/components/MkEmbedCodeGenDialog.vue index 51630c427c..c1de803007 100644 --- a/packages/frontend/src/components/MkEmbedCodeGenDialog.vue +++ b/packages/frontend/src/components/MkEmbedCodeGenDialog.vue @@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only @close="cancel()" @closed="$emit('closed')" > - +
Promise.all( 'd-cherry', 'd-ice', 'd-u0', - ].map(name => import(`@/themes/${name}.json5`).then(({ default: _default }): Theme => _default)), + ].map(name => import(`@@/themes/${name}.json5`).then(({ default: _default }): Theme => _default)), ); export const getBuiltinThemesRef = () => { From 05c944c2ccd9231f1e64f9ff67250102a1b27e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:25:36 +0900 Subject: [PATCH 2/4] =?UTF-8?q?Update=20CHANGELOG.md=20(=E6=9B=B8=E3=81=8D?= =?UTF-8?q?=E6=96=B9=E3=82=92=E6=8F=83=E3=81=88=E3=82=8B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16c6eb674d..9d7425d463 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,12 @@ ### Client - Feat: ノート単体・ユーザーのノート・クリップのノートの埋め込み機能 - 埋め込みコードやウェブサイトへの実装方法の詳細はMisskey Hubに掲載予定です -- サイズ制限を超過するファイルをアップロードしようとした際にエラーを出すように +- Enhance: サイズ制限を超過するファイルをアップロードしようとした際にエラーを出すように - Enhance: アイコンデコレーション管理画面にプレビューを追加 - Fix: サーバーメトリクスが2つ以上あるとリロード直後の表示がおかしくなる問題を修正 ### Server -- ファイルがサイズの制限を超えてアップロードされた際にエラーを返さなかった問題を修正 +- Fix: ファイルがサイズの制限を超えてアップロードされた際にエラーを返さなかった問題を修正 ## 2024.8.0 From 0c2cfe31a3bacefbcc84412c43ac058213b2a3d8 Mon Sep 17 00:00:00 2001 From: KanariKanaru <93921745+kanarikanaru@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:33:14 +0900 Subject: [PATCH 3/4] =?UTF-8?q?Dev:=20cypress=E3=82=92dev=20container?= =?UTF-8?q?=E3=81=A7=E5=AE=9F=E8=A1=8C=E5=8F=AF=E3=81=AB(e2e-dev-container?= =?UTF-8?q?)=20(#14526)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/cypress-devcontainer.yml | 203 +++++++++++++++++++++++++++++++ .devcontainer/init.sh | 3 + .gitignore | 1 + package.json | 1 + 4 files changed, 208 insertions(+) create mode 100644 .config/cypress-devcontainer.yml diff --git a/.config/cypress-devcontainer.yml b/.config/cypress-devcontainer.yml new file mode 100644 index 0000000000..e8da5f5e27 --- /dev/null +++ b/.config/cypress-devcontainer.yml @@ -0,0 +1,203 @@ +#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +# Misskey configuration +#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +# ┌─────┐ +#───┘ URL └───────────────────────────────────────────────────── + +# Final accessible URL seen by a user. +url: 'http://misskey.local' + +# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE +# URL SETTINGS AFTER THAT! + +# ┌───────────────────────┐ +#───┘ Port and TLS settings └─────────────────────────────────── + +# +# Misskey requires a reverse proxy to support HTTPS connections. +# +# +----- https://example.tld/ ------------+ +# +------+ |+-------------+ +----------------+| +# | User | ---> || Proxy (443) | ---> | Misskey (3000) || +# +------+ |+-------------+ +----------------+| +# +---------------------------------------+ +# +# You need to set up a reverse proxy. (e.g. nginx) +# An encrypted connection with HTTPS is highly recommended +# because tokens may be transferred in GET requests. + +# The port that your Misskey server should listen on. +port: 61812 + +# ┌──────────────────────────┐ +#───┘ PostgreSQL configuration └──────────────────────────────── + +db: + host: db + port: 5432 + + # Database name + db: misskey + + # Auth + user: postgres + pass: postgres + + # Whether disable Caching queries + #disableCache: true + + # Extra Connection options + #extra: + # ssl: true + +dbReplications: false + +# You can configure any number of replicas here +#dbSlaves: +# - +# host: +# port: +# db: +# user: +# pass: +# - +# host: +# port: +# db: +# user: +# pass: + +# ┌─────────────────────┐ +#───┘ Redis configuration └───────────────────────────────────── + +redis: + host: redis + port: 6379 + #family: 0 # 0=Both, 4=IPv4, 6=IPv6 + #pass: example-pass + #prefix: example-prefix + #db: 1 + +#redisForPubsub: +# host: redis +# port: 6379 +# #family: 0 # 0=Both, 4=IPv4, 6=IPv6 +# #pass: example-pass +# #prefix: example-prefix +# #db: 1 + +#redisForJobQueue: +# host: redis +# port: 6379 +# #family: 0 # 0=Both, 4=IPv4, 6=IPv6 +# #pass: example-pass +# #prefix: example-prefix +# #db: 1 + +#redisForTimelines: +# host: redis +# port: 6379 +# #family: 0 # 0=Both, 4=IPv4, 6=IPv6 +# #pass: example-pass +# #prefix: example-prefix +# #db: 1 + +# ┌───────────────────────────┐ +#───┘ MeiliSearch configuration └───────────────────────────── + +#meilisearch: +# host: meilisearch +# port: 7700 +# apiKey: '' +# ssl: true +# index: '' + +# ┌───────────────┐ +#───┘ ID generation └─────────────────────────────────────────── + +# You can select the ID generation method. +# You don't usually need to change this setting, but you can +# change it according to your preferences. + +# Available methods: +# aid ... Short, Millisecond accuracy +# aidx ... Millisecond accuracy +# meid ... Similar to ObjectID, Millisecond accuracy +# ulid ... Millisecond accuracy +# objectid ... This is left for backward compatibility + +# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE +# ID SETTINGS AFTER THAT! + +id: 'aidx' + +# ┌────────────────┐ +#───┘ Error tracking └────────────────────────────────────────── + +# Sentry is available for error tracking. +# See the Sentry documentation for more details on options. + +#sentryForBackend: +# enableNodeProfiling: true +# options: +# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0' + +#sentryForFrontend: +# options: +# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0' + +# ┌─────────────────────┐ +#───┘ Other configuration └───────────────────────────────────── + +# Whether disable HSTS +#disableHsts: true + +# Number of worker processes +#clusterLimit: 1 + +# Job concurrency per worker +# deliverJobConcurrency: 128 +# inboxJobConcurrency: 16 + +# Job rate limiter +# deliverJobPerSec: 128 +# inboxJobPerSec: 32 + +# Job attempts +# deliverJobMaxAttempts: 12 +# inboxJobMaxAttempts: 8 + +# IP address family used for outgoing request (ipv4, ipv6 or dual) +#outgoingAddressFamily: ipv4 + +# Proxy for HTTP/HTTPS +#proxy: http://127.0.0.1:3128 + +proxyBypassHosts: + - api.deepl.com + - api-free.deepl.com + - www.recaptcha.net + - hcaptcha.com + - challenges.cloudflare.com + +# Proxy for SMTP/SMTPS +#proxySmtp: http://127.0.0.1:3128 # use HTTP/1.1 CONNECT +#proxySmtp: socks4://127.0.0.1:1080 # use SOCKS4 +#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5 + +# Media Proxy +#mediaProxy: https://example.com/proxy + +# Proxy remote files (default: true) +proxyRemoteFiles: true + +# Sign to ActivityPub GET request (default: true) +signToActivityPubGet: true + +allowedPrivateNetworks: [ + '127.0.0.1/32' +] + +# Upload or download file size limits (bytes) +#maxFileSize: 262144000 diff --git a/.devcontainer/init.sh b/.devcontainer/init.sh index 55fb1e6fa6..e02a533c15 100755 --- a/.devcontainer/init.sh +++ b/.devcontainer/init.sh @@ -3,6 +3,8 @@ set -xe sudo chown node node_modules +sudo apt-get update +sudo apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb git config --global --add safe.directory /workspace git submodule update --init corepack install @@ -12,3 +14,4 @@ pnpm install --frozen-lockfile cp .devcontainer/devcontainer.yml .config/default.yml pnpm build pnpm migrate +pnpm exec cypress install diff --git a/.gitignore b/.gitignore index 0f896f4a98..4d5bd1ce08 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ coverage !/.config/example.yml !/.config/docker_example.yml !/.config/docker_example.env +!/.config/cypress-devcontainer.yml docker-compose.yml compose.yml .devcontainer/compose.yml diff --git a/package.json b/package.json index f6507acdb2..85b4f62752 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "cy:open": "pnpm cypress open --browser --e2e --config-file=cypress.config.ts", "cy:run": "pnpm cypress run", "e2e": "pnpm start-server-and-test start:test http://localhost:61812 cy:run", + "e2e-dev-container": "cp ./.config/cypress-devcontainer.yml ./.config/test.yml && pnpm start-server-and-test start:test http://localhost:61812 cy:run", "jest": "cd packages/backend && pnpm jest", "jest-and-coverage": "cd packages/backend && pnpm jest-and-coverage", "test": "pnpm -r test", From 837a8e15d893a670ab2ce51b3ec87e6b62a51da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 10 Sep 2024 18:39:53 +0900 Subject: [PATCH 4/4] =?UTF-8?q?refactor(frontend):=20frontend-embed/src/to?= =?UTF-8?q?-be-shared=E3=82=92=E5=85=B1=E9=80=9A=E5=8C=96=20(#14536)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor(frontend): shouldCollapsedを共通化 * refactor(frontend): config.js, worker-multi-dispatch.js, intl-const.jsを共通化 * fix(frontend-shared): fix type error * refactor(frontend): is-link.jsと、同一の振る舞いをする記述を共通化 * fix * fix lint * lint fixes --- packages/frontend-embed/src/boot.ts | 2 +- .../frontend-embed/src/components/EmAcct.vue | 2 +- .../src/components/EmImgWithBlurhash.vue | 2 +- .../frontend-embed/src/components/EmLink.vue | 2 +- .../src/components/EmMention.vue | 2 +- .../frontend-embed/src/components/EmMfm.ts | 2 +- .../frontend-embed/src/components/EmNote.vue | 4 +- .../src/components/EmNoteDetailed.vue | 4 +- .../src/components/EmSubNoteContent.vue | 4 +- .../frontend-embed/src/components/EmTime.vue | 2 +- .../frontend-embed/src/components/EmUrl.vue | 2 +- packages/frontend-embed/src/i18n.ts | 2 +- packages/frontend-embed/src/misskey-api.ts | 2 +- packages/frontend-embed/src/pages/clip.vue | 4 +- packages/frontend-embed/src/pages/tag.vue | 4 +- .../src/pages/user-timeline.vue | 2 +- .../src/to-be-shared/worker-multi-dispatch.ts | 82 ------------------- packages/frontend-embed/src/utils.ts | 2 +- packages/frontend-shared/@types/global.d.ts | 25 ++++++ packages/frontend-shared/eslint.config.js | 6 +- .../js}/collapsed.ts | 4 +- .../src => frontend-shared/js}/config.ts | 14 +++- packages/frontend-shared/js/emoji-base.ts | 4 +- .../js}/intl-const.ts | 3 +- .../js}/is-link.ts | 0 .../js}/worker-multi-dispatch.ts | 12 ++- packages/frontend-shared/tsconfig.json | 7 ++ packages/frontend/src/account.ts | 2 +- packages/frontend/src/boot/common.ts | 2 +- packages/frontend/src/boot/main-boot.ts | 2 +- .../src/components/MkAccountMoved.vue | 2 +- .../src/components/MkCropperDialog.vue | 2 +- .../frontend/src/components/MkDonation.vue | 2 +- .../src/components/MkEmbedCodeGenDialog.vue | 2 +- .../src/components/MkFollowButton.vue | 2 +- .../src/components/MkImgWithBlurhash.vue | 2 +- .../src/components/MkInstanceTicker.vue | 2 +- packages/frontend/src/components/MkLink.vue | 2 +- .../frontend/src/components/MkMention.vue | 2 +- packages/frontend/src/components/MkNote.vue | 15 +--- .../src/components/MkNoteDetailed.vue | 11 +-- .../frontend/src/components/MkPageWindow.vue | 2 +- packages/frontend/src/components/MkPoll.vue | 2 +- .../frontend/src/components/MkPostForm.vue | 2 +- .../frontend/src/components/MkPreview.vue | 2 +- packages/frontend/src/components/MkSignin.vue | 2 +- .../src/components/MkSignupDialog.form.vue | 2 +- .../components/MkSourceCodeAvailablePopup.vue | 2 +- .../src/components/MkSubNoteContent.vue | 2 +- .../src/components/MkTutorialDialog.vue | 2 +- .../frontend/src/components/MkUpdated.vue | 2 +- .../frontend/src/components/MkUrlPreview.vue | 4 +- .../src/components/MkUserSelectDialog.vue | 2 +- .../src/components/MkUserSetupDialog.vue | 2 +- .../src/components/MkVisitorDashboard.vue | 2 +- .../frontend/src/components/MkWidgets.vue | 8 +- .../src/components/MkYouTubePlayer.vue | 2 +- .../frontend/src/components/global/MkA.vue | 2 +- .../frontend/src/components/global/MkAcct.vue | 2 +- .../frontend/src/components/global/MkAd.vue | 2 +- .../global/MkMisskeyFlavoredMarkdown.ts | 2 +- .../components/global/MkTime.stories.impl.ts | 2 +- .../frontend/src/components/global/MkTime.vue | 2 +- .../frontend/src/components/global/MkUrl.vue | 2 +- packages/frontend/src/config.ts | 27 ------ packages/frontend/src/filters/date.ts | 2 +- packages/frontend/src/filters/number.ts | 2 +- packages/frontend/src/filters/user.ts | 2 +- packages/frontend/src/i18n.ts | 2 +- packages/frontend/src/navbar.ts | 2 +- packages/frontend/src/pages/_error_.vue | 2 +- packages/frontend/src/pages/about-misskey.vue | 2 +- .../frontend/src/pages/about.overview.vue | 2 +- packages/frontend/src/pages/admin-user.vue | 2 +- .../frontend/src/pages/admin/branding.vue | 2 +- packages/frontend/src/pages/admin/queue.vue | 2 +- packages/frontend/src/pages/channel.vue | 2 +- packages/frontend/src/pages/clip.vue | 2 +- .../src/pages/drop-and-fusion.game.vue | 2 +- packages/frontend/src/pages/flash/flash.vue | 2 +- packages/frontend/src/pages/gallery/post.vue | 2 +- .../src/pages/page-editor/page-editor.vue | 2 +- packages/frontend/src/pages/page.vue | 2 +- .../frontend/src/pages/reversi/game.board.vue | 2 +- packages/frontend/src/pages/reversi/game.vue | 2 +- packages/frontend/src/pages/role.vue | 2 +- .../frontend/src/pages/settings/general.vue | 2 +- .../pages/settings/preferences-backups.vue | 2 +- packages/frontend/src/pages/theme-editor.vue | 2 +- packages/frontend/src/pages/welcome.setup.vue | 2 +- packages/frontend/src/pages/welcome.vue | 2 +- packages/frontend/src/scripts/aiscript/api.ts | 2 +- packages/frontend/src/scripts/collapsed.ts | 22 ----- .../frontend/src/scripts/gen-search-query.ts | 2 +- .../frontend/src/scripts/get-embed-code.ts | 2 +- .../frontend/src/scripts/get-note-menu.ts | 2 +- .../frontend/src/scripts/get-user-menu.ts | 2 +- .../frontend/src/scripts/initialize-sw.ts | 2 +- packages/frontend/src/scripts/intl-const.ts | 2 +- packages/frontend/src/scripts/is-link.ts | 12 --- packages/frontend/src/scripts/media-proxy.ts | 2 +- packages/frontend/src/scripts/misskey-api.ts | 2 +- .../src/scripts/player-url-transform.ts | 2 +- packages/frontend/src/scripts/popout.ts | 2 +- packages/frontend/src/scripts/upload.ts | 2 +- packages/frontend/src/store.ts | 4 +- packages/frontend/src/stream.ts | 2 +- packages/frontend/src/ui/_common_/common.ts | 2 +- packages/frontend/src/ui/classic.sidebar.vue | 2 +- packages/frontend/src/ui/classic.vue | 10 +-- packages/frontend/src/ui/deck/main-column.vue | 7 +- packages/frontend/src/ui/minimum.vue | 2 +- packages/frontend/src/ui/universal.vue | 9 +- packages/frontend/src/ui/visitor.vue | 2 +- packages/frontend/src/ui/zen.vue | 2 +- .../src/widgets/WidgetInstanceInfo.vue | 2 +- packages/frontend/src/widgets/WidgetRss.vue | 2 +- .../frontend/src/widgets/WidgetRssTicker.vue | 2 +- 118 files changed, 181 insertions(+), 309 deletions(-) delete mode 100644 packages/frontend-embed/src/to-be-shared/worker-multi-dispatch.ts create mode 100644 packages/frontend-shared/@types/global.d.ts rename packages/{frontend-embed/src/to-be-shared => frontend-shared/js}/collapsed.ts (86%) rename packages/{frontend-embed/src => frontend-shared/js}/config.ts (58%) rename packages/{frontend-embed/src/to-be-shared => frontend-shared/js}/intl-const.ts (91%) rename packages/{frontend-embed/src/to-be-shared => frontend-shared/js}/is-link.ts (100%) rename packages/{frontend/src/scripts => frontend-shared/js}/worker-multi-dispatch.ts (84%) delete mode 100644 packages/frontend/src/config.ts delete mode 100644 packages/frontend/src/scripts/collapsed.ts delete mode 100644 packages/frontend/src/scripts/is-link.ts diff --git a/packages/frontend-embed/src/boot.ts b/packages/frontend-embed/src/boot.ts index 6c73fecd76..fcea7d32ea 100644 --- a/packages/frontend-embed/src/boot.ts +++ b/packages/frontend-embed/src/boot.ts @@ -17,7 +17,7 @@ import { applyTheme, assertIsTheme } from '@/theme.js'; import { fetchCustomEmojis } from '@/custom-emojis.js'; import { DI } from '@/di.js'; import { serverMetadata } from '@/server-metadata.js'; -import { url } from '@/config.js'; +import { url } from '@@/js/config.js'; import { parseEmbedParams } from '@@/js/embed-page.js'; import { postMessageToParentWindow, setIframeId } from '@/post-message.js'; diff --git a/packages/frontend-embed/src/components/EmAcct.vue b/packages/frontend-embed/src/components/EmAcct.vue index 07315e6a8b..6856b8272e 100644 --- a/packages/frontend-embed/src/components/EmAcct.vue +++ b/packages/frontend-embed/src/components/EmAcct.vue @@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only