From bc6169e1c8e0a6222ab4f2bdcae536516abaa39e Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 3 Dec 2022 16:02:03 -0800 Subject: [PATCH] Rename/re-icon "favorites" to "bookmarks": closes #9176 --- locales/en-US.yml | 18 +++--- packages/client/src/navbar.ts | 2 +- packages/client/src/pages/favorites.vue | 62 ++++++++++++-------- packages/client/src/scripts/get-note-menu.ts | 6 +- 4 files changed, 49 insertions(+), 39 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 6ad3bf614..f58296b9f 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -32,12 +32,12 @@ uploading: "Uploading..." save: "Save" users: "Users" addUser: "Add a user" -favorite: "Add to favorites" -favorites: "Favorites" -unfavorite: "Remove from favorites" -favorited: "Added to favorites." -alreadyFavorited: "Already added to favorites." -cantFavorite: "Couldn't add to favorites." +favorite: "Add to bookmarks" +favorites: "Bookmarks" +unfavorite: "Remove from bookmarks" +favorited: "Added to bookmarks." +alreadyFavorited: "Already added to bookmarks." +cantFavorite: "Couldn't add to bookmarks." pin: "Pin to profile" unpin: "Unpin from profile" copyContent: "Copy contents" @@ -679,7 +679,7 @@ disableShowingAnimatedImages: "Don't play animated images" verificationEmailSent: "A verification email has been sent. Please follow the included link to complete verification." notSet: "Not set" emailVerified: "Email has been verified" -noteFavoritesCount: "Number of favorite notes" +noteFavoritesCount: "Number of bookmarked notes" pageLikesCount: "Number of liked Pages" pageLikedCount: "Number of received Page likes" contact: "Contact" @@ -1250,8 +1250,8 @@ _permissions: "write:blocks": "Edit your list of blocked users" "read:drive": "Access your Drive files and folders" "write:drive": "Edit or delete your Drive files and folders" - "read:favorites": "View your list of favorites" - "write:favorites": "Edit your list of favorites" + "read:favorites": "View your list of bookmarks" + "write:favorites": "Edit your list of bookmarks" "read:following": "View information on who you follow" "write:following": "Follow or unfollow other accounts" "read:messaging": "View your chats" diff --git a/packages/client/src/navbar.ts b/packages/client/src/navbar.ts index 308f3f96b..6785428a5 100644 --- a/packages/client/src/navbar.ts +++ b/packages/client/src/navbar.ts @@ -72,7 +72,7 @@ export const navbarItemDef = reactive({ }, favorites: { title: 'favorites', - icon: 'ph-star-bold ph-lg', + icon: 'ph-bookmark-simple-bold ph-lg', show: computed(() => $i != null), to: '/my/favorites', }, diff --git a/packages/client/src/pages/favorites.vue b/packages/client/src/pages/favorites.vue index c2a6b0600..4895af18d 100644 --- a/packages/client/src/pages/favorites.vue +++ b/packages/client/src/pages/favorites.vue @@ -1,35 +1,45 @@ diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index 0e53aad2a..9c52b2e24 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -231,12 +231,12 @@ export function getNoteMenu(props: { action: translate, } : undefined, null, - statePromise.then(state => state.isFavorited ? { - icon: 'ph-star-bold ph-lg', + statePromise.then(state => state?.isFavorited ? { + icon: 'ph-bookmark-simple-bold ph-lg', text: i18n.ts.unfavorite, action: () => toggleFavorite(false), } : { - icon: 'ph-star-bold ph-lg', + icon: 'ph-bookmark-simple-bold ph-lg', text: i18n.ts.favorite, action: () => toggleFavorite(true), }),