enhance(frontend): バックアップされた設定のプロファイルを削除できるように
This commit is contained in:
parent
95a1d17cf6
commit
5d787e5bb9
6 changed files with 86 additions and 11 deletions
47
packages/frontend/src/pages/settings/profiles.vue
Normal file
47
packages/frontend/src/pages/settings/profiles.vue
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<SearchMarker path="/settings/profiles" :label="i18n.ts._preferencesProfile.manageProfiles" :keywords="['profile', 'settings', 'preferences', 'manage']" icon="ti ti-settings-cog">
|
||||
<div class="_gaps">
|
||||
<MkFolder v-for="backup in backups">
|
||||
<template #label>{{ backup.name }}</template>
|
||||
<MkButton danger @click="del(backup)">{{ i18n.ts.delete }}</MkButton>
|
||||
</MkFolder>
|
||||
</div>
|
||||
</SearchMarker>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import type { MenuItem } from '@/types/menu.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||
import { $i } from '@/i.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePage } from '@/page.js';
|
||||
import { prefer } from '@/preferences.js';
|
||||
import { deleteCloudBackup, listCloudBackups } from '@/preferences/utility.js';
|
||||
|
||||
const backups = await listCloudBackups();
|
||||
|
||||
function del(backup) {
|
||||
deleteCloudBackup(backup.name);
|
||||
}
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePage(() => ({
|
||||
title: i18n.ts._preferencesProfile.manageProfiles,
|
||||
icon: 'ti ti-settings-cog',
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue