fix(frontend): follow-up of #13089 (#14206)

* fix(frontend): #13089 を修正

* fix

* 正規表現を強化

* fix
This commit is contained in:
かっこかり
2024-07-14 17:28:34 +09:00
committed by GitHub
parent 09d30fef5b
commit 722acf5986
7 changed files with 56 additions and 28 deletions

View File

@@ -36,6 +36,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
import { host } from '@/config.js';
import { useInterval } from '@/scripts/use-interval.js';
import type { OpenOnRemoteOptions } from '@/scripts/please-login.js';
const props = defineProps<{
noteId: string;
@@ -61,10 +62,10 @@ const timer = computed(() => i18n.tsx._poll[
const showResult = ref(props.readOnly || isVoted.value);
const pleaseLoginContext = {
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
type: 'lookup',
path: `https://${host}/notes/${props.note.id}`,
} as const;
url: `https://${host}/notes/${props.noteId}`,
}));
// 期限付きアンケート
if (props.poll.expiresAt) {
@@ -82,7 +83,7 @@ if (props.poll.expiresAt) {
}
const vote = async (id) => {
pleaseLogin(undefined, pleaseLoginContext);
pleaseLogin(undefined, pleaseLoginContext.value);
if (props.readOnly || closed.value || isVoted.value) return;