From 3837980e50f86707af86356661193a23b2fdb637 Mon Sep 17 00:00:00 2001 From: Natty Date: Sat, 30 Sep 2023 22:40:58 +0200 Subject: [PATCH] Frontend: Fixed imports (???) --- fe_calckey/frontend/client/src/components/MkPoll.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/fe_calckey/frontend/client/src/components/MkPoll.vue b/fe_calckey/frontend/client/src/components/MkPoll.vue index 119cb1f..d349611 100644 --- a/fe_calckey/frontend/client/src/components/MkPoll.vue +++ b/fe_calckey/frontend/client/src/components/MkPoll.vue @@ -42,7 +42,7 @@ ยท - {{ + {{ i18n.ts.reload }} {{ i18n.ts._poll.refreshing }} @@ -60,17 +60,15 @@ import * as misskey from "calckey-js"; import { sum } from "@/scripts/array"; import { pleaseLogin } from "@/scripts/please-login"; import * as os from "@/os"; -import { alert } from "@/os"; import { i18n } from "@/i18n"; import { useInterval } from "@/scripts/use-interval"; -import Mfm from "@/components/mfm"; const props = defineProps<{ note: misskey.entities.Note & Required>; readOnly?: boolean; }>(); -const refreshing = ref(false); +const pollRefreshing = ref(false); const remaining = ref(-1); const total = computed(() => sum(props.note.poll.choices.map((x) => x.votes))); @@ -124,7 +122,7 @@ if (props.note.poll.expiresAt) { async function refresh() { if (!props.note.uri) return; - refreshing.value = true; + pollRefreshing.value = true; os.api("ap/show", { uri: props.note.uri }) .then((obj) => { @@ -133,13 +131,13 @@ async function refresh() { } }) .catch((err) => { - alert({ + os.alert({ type: "error", text: err.message + "\n" + (err as any).id, }); }) .finally(() => { - refreshing.value = false; + pollRefreshing.value = false; }); }