diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-10-20 01:11:13 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-10-20 01:11:13 +0900 |
| commit | bc19cd77adfc1ba73df5358dac0a7b49166b02ac (patch) | |
| tree | c142dd6ae9baf9c6e3a4d6bbf7f465bc2e1fb933 /src/client | |
| parent | refactor: use insert (diff) | |
| download | sharkey-bc19cd77adfc1ba73df5358dac0a7b49166b02ac.tar.gz sharkey-bc19cd77adfc1ba73df5358dac0a7b49166b02ac.tar.bz2 sharkey-bc19cd77adfc1ba73df5358dac0a7b49166b02ac.zip | |
feat: ミュートとブロックのインポート
Resolve #7885
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/pages/settings/import-export.vue | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/client/pages/settings/import-export.vue b/src/client/pages/settings/import-export.vue index 2b49996dda..eeaa1f1602 100644 --- a/src/client/pages/settings/import-export.vue +++ b/src/client/pages/settings/import-export.vue @@ -16,11 +16,13 @@ </FormSection> <FormSection> <template #label>{{ $ts._exportOrImport.muteList }}</template> - <MkButton :class="$style.button" inline @click="doExport('mute')"><i class="fas fa-download"></i> {{ $ts.export }}</MkButton> + <MkButton :class="$style.button" inline @click="doExport('muting')"><i class="fas fa-download"></i> {{ $ts.export }}</MkButton> + <MkButton :class="$style.button" inline @click="doImport('muting', $event)"><i class="fas fa-upload"></i> {{ $ts.import }}</MkButton> </FormSection> <FormSection> <template #label>{{ $ts._exportOrImport.blockingList }}</template> <MkButton :class="$style.button" inline @click="doExport('blocking')"><i class="fas fa-download"></i> {{ $ts.export }}</MkButton> + <MkButton :class="$style.button" inline @click="doImport('blocking', $event)"><i class="fas fa-upload"></i> {{ $ts.import }}</MkButton> </FormSection> </div> </template> @@ -58,11 +60,11 @@ export default defineComponent({ methods: { doExport(target) { os.api( - target == 'notes' ? 'i/export-notes' : - target == 'following' ? 'i/export-following' : - target == 'blocking' ? 'i/export-blocking' : - target == 'user-lists' ? 'i/export-user-lists' : - target == 'mute' ? 'i/export-mute' : + target === 'notes' ? 'i/export-notes' : + target === 'following' ? 'i/export-following' : + target === 'blocking' ? 'i/export-blocking' : + target === 'user-lists' ? 'i/export-user-lists' : + target === 'muting' ? 'i/export-mute' : null, {}) .then(() => { os.dialog({ @@ -81,8 +83,10 @@ export default defineComponent({ const file = await selectFile(e.currentTarget || e.target); os.api( - target == 'following' ? 'i/import-following' : - target == 'user-lists' ? 'i/import-user-lists' : + target === 'following' ? 'i/import-following' : + target === 'user-lists' ? 'i/import-user-lists' : + target === 'muting' ? 'i/import-muting' : + target === 'blocking' ? 'i/import-blocking' : null, { fileId: file.id }).then(() => { |