@@ -186,7 +171,7 @@ import { i18n } from '@/i18n.js';
import { definePage } from '@/page.js';
import MkUserCardMini from '@/components/MkUserCardMini.vue';
import * as os from '@/os.js';
-import { instance, infoImageUrl } from '@/instance.js';
+import { instance } from '@/instance.js';
import { ensureSignin } from '@/i.js';
import MkInfo from '@/components/MkInfo.vue';
import MkFolder from '@/components/MkFolder.vue';
diff --git a/packages/frontend/src/pages/settings/profiles.vue b/packages/frontend/src/pages/settings/profiles.vue
new file mode 100644
index 0000000000..4804c11f7a
--- /dev/null
+++ b/packages/frontend/src/pages/settings/profiles.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+ {{ backup.name }}
+ {{ i18n.ts.delete }}
+
+
+
+
+
+
+
+
diff --git a/packages/frontend/src/preferences/utility.ts b/packages/frontend/src/preferences/utility.ts
index adba908c3c..af5b178df6 100644
--- a/packages/frontend/src/preferences/utility.ts
+++ b/packages/frontend/src/preferences/utility.ts
@@ -74,12 +74,17 @@ export function getPreferencesProfileMenu(): MenuItem[] {
action: () => {
importProfile();
},
+ }, {
+ type: 'divider',
+ }, {
+ type: 'link',
+ text: i18n.ts._preferencesProfile.manageProfiles + '...',
+ icon: 'ti ti-settings-cog',
+ to: '/settings/profiles',
}];
if (prefer.s.devMode) {
menu.push({
- type: 'divider',
- }, {
text: 'Copy profile as text',
icon: 'ti ti-clipboard',
action: () => {
@@ -145,17 +150,30 @@ export async function cloudBackup() {
});
}
-export async function restoreFromCloudBackup() {
- if ($i == null) return;
-
- // TODO: 更新日時でソートして取得したい
+export async function listCloudBackups() {
const keys = await misskeyApi('i/registry/keys', {
scope: ['client', 'preferences', 'backups'],
});
- if (_DEV_) console.log(keys);
+ return keys.map(k => ({
+ name: k,
+ }));
+}
- if (keys.length === 0) {
+export async function deleteCloudBackup(key: string) {
+ await os.apiWithDialog('i/registry/remove', {
+ scope: ['client', 'preferences', 'backups'],
+ key,
+ });
+}
+
+export async function restoreFromCloudBackup() {
+ if ($i == null) return;
+
+ // TODO: 更新日時でソートしたい
+ const backups = await listCloudBackups();
+
+ if (backups.length === 0) {
os.alert({
type: 'warning',
title: i18n.ts._preferencesBackup.noBackupsFoundTitle,
@@ -166,9 +184,9 @@ export async function restoreFromCloudBackup() {
const select = await os.select({
title: i18n.ts._preferencesBackup.selectBackupToRestore,
- items: keys.map(k => ({
- text: k,
- value: k,
+ items: backups.map(backup => ({
+ text: backup.name,
+ value: backup.name,
})),
});
if (select.canceled) return;
diff --git a/packages/frontend/src/router.definition.ts b/packages/frontend/src/router.definition.ts
index d8bdbb7d02..462b8e713f 100644
--- a/packages/frontend/src/router.definition.ts
+++ b/packages/frontend/src/router.definition.ts
@@ -180,6 +180,10 @@ export const ROUTE_DEF = [{
path: '/custom-css',
name: 'preferences',
component: page(() => import('@/pages/settings/custom-css.vue')),
+ }, {
+ path: '/profiles',
+ name: 'profiles',
+ component: page(() => import('@/pages/settings/profiles.vue')),
}, {
path: '/accounts',
name: 'profile',
diff --git a/packages/frontend/src/style.scss b/packages/frontend/src/style.scss
index b7ca0cfd01..341f5cb621 100644
--- a/packages/frontend/src/style.scss
+++ b/packages/frontend/src/style.scss
@@ -486,18 +486,6 @@ rt {
}
}
-._fullinfo {
- padding: 64px 32px;
- text-align: center;
-
- > img {
- vertical-align: bottom;
- height: 128px;
- margin-bottom: 16px;
- border-radius: 16px;
- }
-}
-
._link {
color: var(--MI_THEME-link);
}
diff --git a/packages/frontend/src/widgets/WidgetBirthdayFollowings.vue b/packages/frontend/src/widgets/WidgetBirthdayFollowings.vue
index 6fe743aed2..4790f143cb 100644
--- a/packages/frontend/src/widgets/WidgetBirthdayFollowings.vue
+++ b/packages/frontend/src/widgets/WidgetBirthdayFollowings.vue
@@ -15,8 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only