Frontend: Fixed imports (???)
ci/woodpecker/push/ociImagePush Pipeline was successful Details

This commit is contained in:
Natty 2023-09-30 22:40:58 +02:00
parent 5c8db9b243
commit 3837980e50
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 5 additions and 7 deletions

View File

@ -42,7 +42,7 @@
</span> </span>
<span v-if="!isLocal"> <span v-if="!isLocal">
<span> · </span> <span> · </span>
<a v-if="!refreshing" @click.stop="refresh">{{ <a v-if="!pollRefreshing" @click.stop="refresh">{{
i18n.ts.reload i18n.ts.reload
}}</a> }}</a>
<span v-else>{{ i18n.ts._poll.refreshing }}</span> <span v-else>{{ i18n.ts._poll.refreshing }}</span>
@ -60,17 +60,15 @@ import * as misskey from "calckey-js";
import { sum } from "@/scripts/array"; import { sum } from "@/scripts/array";
import { pleaseLogin } from "@/scripts/please-login"; import { pleaseLogin } from "@/scripts/please-login";
import * as os from "@/os"; import * as os from "@/os";
import { alert } from "@/os";
import { i18n } from "@/i18n"; import { i18n } from "@/i18n";
import { useInterval } from "@/scripts/use-interval"; import { useInterval } from "@/scripts/use-interval";
import Mfm from "@/components/mfm";
const props = defineProps<{ const props = defineProps<{
note: misskey.entities.Note & Required<Pick<misskey.entities.Note, "poll">>; note: misskey.entities.Note & Required<Pick<misskey.entities.Note, "poll">>;
readOnly?: boolean; readOnly?: boolean;
}>(); }>();
const refreshing = ref(false); const pollRefreshing = ref(false);
const remaining = ref(-1); const remaining = ref(-1);
const total = computed(() => sum(props.note.poll.choices.map((x) => x.votes))); const total = computed(() => sum(props.note.poll.choices.map((x) => x.votes)));
@ -124,7 +122,7 @@ if (props.note.poll.expiresAt) {
async function refresh() { async function refresh() {
if (!props.note.uri) return; if (!props.note.uri) return;
refreshing.value = true; pollRefreshing.value = true;
os.api("ap/show", { uri: props.note.uri }) os.api("ap/show", { uri: props.note.uri })
.then((obj) => { .then((obj) => {
@ -133,13 +131,13 @@ async function refresh() {
} }
}) })
.catch((err) => { .catch((err) => {
alert({ os.alert({
type: "error", type: "error",
text: err.message + "\n" + (err as any).id, text: err.message + "\n" + (err as any).id,
}); });
}) })
.finally(() => { .finally(() => {
refreshing.value = false; pollRefreshing.value = false;
}); });
} }