From de81fac33453b72e76ae5bdc3186da45fc0c55e6 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Fri, 26 May 2023 20:56:47 +0200 Subject: [PATCH] client: remove favorites --- packages/client/src/menu.ts | 6 --- packages/client/src/pages/favorites.vue | 50 -------------------- packages/client/src/router.ts | 4 -- packages/client/src/scripts/get-note-menu.ts | 15 ------ packages/client/src/store.ts | 1 - 5 files changed, 76 deletions(-) delete mode 100644 packages/client/src/pages/favorites.vue diff --git a/packages/client/src/menu.ts b/packages/client/src/menu.ts index 1de63b4dc..8fc98b33a 100644 --- a/packages/client/src/menu.ts +++ b/packages/client/src/menu.ts @@ -120,12 +120,6 @@ export const menuDef = reactive({ indicated: computed(() => $i != null && $i.hasUnreadSpecifiedNotes), to: '/my/notifications#directNotes', }, - favorites: { - title: 'favorites', - icon: 'fas fa-star', - show: computed(() => $i != null), - to: '/my/favorites', - }, pages: { title: 'pages', icon: 'fas fa-file-alt', diff --git a/packages/client/src/pages/favorites.vue b/packages/client/src/pages/favorites.vue deleted file mode 100644 index f9e0b552a..000000000 --- a/packages/client/src/pages/favorites.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - diff --git a/packages/client/src/router.ts b/packages/client/src/router.ts index 6ba2c09ef..6b9d82b57 100644 --- a/packages/client/src/router.ts +++ b/packages/client/src/router.ts @@ -148,10 +148,6 @@ export const routes = [{ component: page(() => import('./pages/notifications.vue')), hash: 'initialTab', loginRequired: true, -}, { - path: '/my/favorites', - component: page(() => import('./pages/favorites.vue')), - loginRequired: true, }, { name: 'messaging', path: '/my/messaging', diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index 73b960cae..61fc4cc73 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -48,12 +48,6 @@ export function getNoteMenu(props: { }); } - function toggleFavorite(favorite: boolean): void { - os.apiWithDialog(favorite ? 'notes/favorites/create' : 'notes/favorites/delete', { - noteId: appearNote.id, - }); - } - function toggleWatch(watch: boolean): void { os.apiWithDialog(watch ? 'notes/watching/create' : 'notes/watching/delete', { noteId: appearNote.id, @@ -244,15 +238,6 @@ export function getNoteMenu(props: { action: translate, } : undefined, null, - statePromise.then(state => state.isFavorited ? { - icon: 'fas fa-star', - text: i18n.ts.unfavorite, - action: () => toggleFavorite(false), - } : { - icon: 'fas fa-star', - text: i18n.ts.favorite, - action: () => toggleFavorite(true), - }), { icon: 'fas fa-paperclip', text: i18n.ts.clip, diff --git a/packages/client/src/store.ts b/packages/client/src/store.ts index 489cca84d..a267a3634 100644 --- a/packages/client/src/store.ts +++ b/packages/client/src/store.ts @@ -59,7 +59,6 @@ export const defaultStore = markRaw(new Storage('base', { where: 'deviceAccount', default: [ 'notifications', - 'favorites', 'drive', 'followRequests', '-',