mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-25 07:36:18 +09:00
refactor: change import type to radio
This commit is contained in:
parent
5b7ea542c7
commit
bc00184399
@ -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