From 1c966db324af1571459417ec82ce1ad31a15bcf9 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Mon, 25 Aug 2025 17:12:11 +0900 Subject: [PATCH] refactor --- .../frontend/src/pages/antenna-timeline.vue | 19 +------------------ packages/frontend/src/pages/auth.form.vue | 12 +++++++----- packages/frontend/src/pages/channel.vue | 4 +++- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/packages/frontend/src/pages/antenna-timeline.vue b/packages/frontend/src/pages/antenna-timeline.vue index 88ae39d5e1..9030fa0e29 100644 --- a/packages/frontend/src/pages/antenna-timeline.vue +++ b/packages/frontend/src/pages/antenna-timeline.vue @@ -37,27 +37,14 @@ const props = defineProps<{ const antenna = ref(null); const tlEl = useTemplateRef('tlEl'); -async function timetravel() { - const { canceled, result: date } = await os.inputDate({ - title: i18n.ts.date, - }); - if (canceled) return; - - tlEl.value.timetravel(date); -} - function settings() { router.push('/my/antennas/:antennaId', { params: { antennaId: props.antennaId, - } + }, }); } -function focus() { - tlEl.value.focus(); -} - watch(() => props.antennaId, async () => { antenna.value = await misskeyApi('antennas/show', { antennaId: props.antennaId, @@ -65,10 +52,6 @@ watch(() => props.antennaId, async () => { }, { immediate: true }); const headerActions = computed(() => antenna.value ? [{ - icon: 'ti ti-calendar-time', - text: i18n.ts.jumpToSpecifiedDate, - handler: timetravel, -}, { icon: 'ti ti-settings', text: i18n.ts.settings, handler: settings, diff --git a/packages/frontend/src/pages/auth.form.vue b/packages/frontend/src/pages/auth.form.vue index 5b1fd1a386..1a0c9b36c4 100644 --- a/packages/frontend/src/pages/auth.form.vue +++ b/packages/frontend/src/pages/auth.form.vue @@ -44,11 +44,13 @@ const name = computed(() => { }); function cancel() { - misskeyApi('auth/deny', { - token: props.session.token, - }).then(() => { - emit('denied'); - }); + //misskeyApi('auth/deny', { + // token: props.session.token, + //}).then(() => { + // emit('denied'); + //}); + + emit('denied'); } function accept() { diff --git a/packages/frontend/src/pages/channel.vue b/packages/frontend/src/pages/channel.vue index 0437191695..9e1608f24d 100644 --- a/packages/frontend/src/pages/channel.vue +++ b/packages/frontend/src/pages/channel.vue @@ -131,6 +131,8 @@ watch(() => props.channelId, async () => { channel.value = await misskeyApi('channels/show', { channelId: props.channelId, }); + if (channel.value == null) return; // TSを黙らすため + favorited.value = channel.value.isFavorited ?? false; if (favorited.value || channel.value.isFollowing) { tab.value = 'timeline'; @@ -150,7 +152,7 @@ function edit() { router.push('/channels/:channelId/edit', { params: { channelId: props.channelId, - } + }, }); }