From 21fc2595ce2e40345ef9f0993329e3f662ff2bfb Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Tue, 27 Aug 2024 08:24:34 +0900 Subject: [PATCH] wip --- packages/frontend-embed/src/boot.ts | 2 ++ packages/frontend-embed/src/ui.vue | 3 +++ packages/frontend/vite.config.local-dev.ts | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/frontend-embed/src/boot.ts b/packages/frontend-embed/src/boot.ts index b12d7d668c..3ae65b92cc 100644 --- a/packages/frontend-embed/src/boot.ts +++ b/packages/frontend-embed/src/boot.ts @@ -16,6 +16,8 @@ console.info('Misskey Embed'); const params = new URLSearchParams(location.search); const embedParams = parseEmbedParams(params); +console.info(embedParams); + // サイズの制限 document.documentElement.style.maxWidth = '500px'; diff --git a/packages/frontend-embed/src/ui.vue b/packages/frontend-embed/src/ui.vue index 55fab898f2..ec159e5a3b 100644 --- a/packages/frontend-embed/src/ui.vue +++ b/packages/frontend-embed/src/ui.vue @@ -29,6 +29,9 @@ import type { ParsedEmbedParams } from '@/embed-page.js'; import { postMessageToParentWindow } from '@/post-message.js'; import { defaultEmbedParams } from '@/embed-page.js'; +const page = location.href.split('/')[1]; +console.log(page); + const embedParams = inject('embedParams', defaultEmbedParams); //#region Embed Style diff --git a/packages/frontend/vite.config.local-dev.ts b/packages/frontend/vite.config.local-dev.ts index 9adb290412..922fb45995 100644 --- a/packages/frontend/vite.config.local-dev.ts +++ b/packages/frontend/vite.config.local-dev.ts @@ -53,7 +53,10 @@ const devConfig: UserConfig = { '/favicon.ico': httpUrl, '/robots.txt': httpUrl, '/embed.js': httpUrl, - '/embed': embedUrl, + '/embed': { + target: embedUrl, + ws: true, + }, '/identicon': { target: httpUrl, rewrite(path) {