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