refactor: change import type to radio
This commit is contained in:
parent
6f1a7d84d9
commit
17b05511aa
@ -21,9 +21,15 @@
|
||||
<template #icon
|
||||
><i class="ph-upload-simple ph-bold ph-lg"></i
|
||||
></template>
|
||||
<FormSwitch v-model="signatureCheck" class="_formBlock">
|
||||
<!-- <FormSwitch v-model="signatureCheck" class="_formBlock">
|
||||
Mastodon import? (not Akkoma!)
|
||||
</FormSwitch>
|
||||
</FormSwitch> -->
|
||||
<FormRadios v-model="importType" class="_formBlock">
|
||||
<option value="calckey">Calckey/Misskey</option>
|
||||
<option value="mastodon">Mastodon</option>
|
||||
<option disabled value="akkoma">Akkoma (soon)</option>
|
||||
<option disabled value="mastodon">Twitter (soon)</option>
|
||||
</FormRadios>
|
||||
<MkButton
|
||||
primary
|
||||
:class="$style.button"
|
||||
@ -183,7 +189,7 @@ import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
|
||||
const excludeMutingUsers = ref(false);
|
||||
const signatureCheck = ref(false);
|
||||
const importType = ref("calckey");
|
||||
const excludeInactiveUsers = ref(false);
|
||||
|
||||
const onExportSuccess = () => {
|
||||
@ -215,7 +221,7 @@ const importPosts = async (ev) => {
|
||||
const file = await selectFile(ev.currentTarget ?? ev.target);
|
||||
os.api("i/import-posts", {
|
||||
fileId: file.id,
|
||||
signatureCheck: signatureCheck.value,
|
||||
signatureCheck: importType.value === "mastodon" ? true : false,
|
||||
})
|
||||
.then(onImportSuccess)
|
||||
.catch(onError);
|
||||
|
Loading…
Reference in New Issue
Block a user