Rename/re-icon "favorites" to "bookmarks": closes #9176

This commit is contained in:
ThatOneCalculator 2022-12-03 16:02:03 -08:00
parent 3bd909db1a
commit bc6169e1c8
4 changed files with 49 additions and 39 deletions

View File

@ -32,12 +32,12 @@ uploading: "Uploading..."
save: "Save" save: "Save"
users: "Users" users: "Users"
addUser: "Add a user" addUser: "Add a user"
favorite: "Add to favorites" favorite: "Add to bookmarks"
favorites: "Favorites" favorites: "Bookmarks"
unfavorite: "Remove from favorites" unfavorite: "Remove from bookmarks"
favorited: "Added to favorites." favorited: "Added to bookmarks."
alreadyFavorited: "Already added to favorites." alreadyFavorited: "Already added to bookmarks."
cantFavorite: "Couldn't add to favorites." cantFavorite: "Couldn't add to bookmarks."
pin: "Pin to profile" pin: "Pin to profile"
unpin: "Unpin from profile" unpin: "Unpin from profile"
copyContent: "Copy contents" 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." verificationEmailSent: "A verification email has been sent. Please follow the included link to complete verification."
notSet: "Not set" notSet: "Not set"
emailVerified: "Email has been verified" emailVerified: "Email has been verified"
noteFavoritesCount: "Number of favorite notes" noteFavoritesCount: "Number of bookmarked notes"
pageLikesCount: "Number of liked Pages" pageLikesCount: "Number of liked Pages"
pageLikedCount: "Number of received Page likes" pageLikedCount: "Number of received Page likes"
contact: "Contact" contact: "Contact"
@ -1250,8 +1250,8 @@ _permissions:
"write:blocks": "Edit your list of blocked users" "write:blocks": "Edit your list of blocked users"
"read:drive": "Access your Drive files and folders" "read:drive": "Access your Drive files and folders"
"write:drive": "Edit or delete your Drive files and folders" "write:drive": "Edit or delete your Drive files and folders"
"read:favorites": "View your list of favorites" "read:favorites": "View your list of bookmarks"
"write:favorites": "Edit your list of favorites" "write:favorites": "Edit your list of bookmarks"
"read:following": "View information on who you follow" "read:following": "View information on who you follow"
"write:following": "Follow or unfollow other accounts" "write:following": "Follow or unfollow other accounts"
"read:messaging": "View your chats" "read:messaging": "View your chats"

View File

@ -72,7 +72,7 @@ export const navbarItemDef = reactive({
}, },
favorites: { favorites: {
title: 'favorites', title: 'favorites',
icon: 'ph-star-bold ph-lg', icon: 'ph-bookmark-simple-bold ph-lg',
show: computed(() => $i != null), show: computed(() => $i != null),
to: '/my/favorites', to: '/my/favorites',
}, },

View File

@ -1,35 +1,45 @@
<template> <template>
<MkStickyContainer> <MkStickyContainer>
<template #header><MkPageHeader/></template> <template #header><MkPageHeader /></template>
<MkSpacer :content-max="800"> <MkSpacer :content-max="800">
<MkPagination ref="pagingComponent" :pagination="pagination"> <MkPagination ref="pagingComponent" :pagination="pagination">
<template #empty> <template #empty>
<div class="_fullinfo"> <div class="_fullinfo">
<img src="/static-assets/badges/info.png" class="_ghost" alt="Info"/> <img
<div>{{ i18n.ts.noNotes }}</div> src="/static-assets/badges/info.png"
</div> class="_ghost"
</template> alt="Info"
/>
<div>{{ i18n.ts.noNotes }}</div>
</div>
</template>
<template #default="{ items }"> <template #default="{ items }">
<XList v-slot="{ item }" :items="items" :direction="'down'" :no-gap="false" :ad="false"> <XList
<XNote :key="item.id" :note="item.note" :class="$style.note"/> v-slot="{ item }"
</XList> :items="items"
</template> :direction="'down'"
</MkPagination> :no-gap="false"
</MkSpacer> :ad="false"
</MkStickyContainer> >
<XNote :key="item.id" :note="item.note" :class="$style.note" />
</XList>
</template>
</MkPagination>
</MkSpacer>
</MkStickyContainer>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue'; import { ref } from "vue";
import MkPagination from '@/components/MkPagination.vue'; import MkPagination from "@/components/MkPagination.vue";
import XNote from '@/components/MkNote.vue'; import XNote from "@/components/MkNote.vue";
import XList from '@/components/MkDateSeparatedList.vue'; import XList from "@/components/MkDateSeparatedList.vue";
import { i18n } from '@/i18n'; import { i18n } from "@/i18n";
import { definePageMetadata } from '@/scripts/page-metadata'; import { definePageMetadata } from "@/scripts/page-metadata";
const pagination = { const pagination = {
endpoint: 'i/favorites' as const, endpoint: "i/favorites" as const,
limit: 10, limit: 10,
}; };
@ -37,7 +47,7 @@ const pagingComponent = ref<InstanceType<typeof MkPagination>>();
definePageMetadata({ definePageMetadata({
title: i18n.ts.favorites, title: i18n.ts.favorites,
icon: 'ph-star-bold ph-lg', icon: "ph-bookmark-simple-bold ph-lg",
}); });
</script> </script>

View File

@ -231,12 +231,12 @@ export function getNoteMenu(props: {
action: translate, action: translate,
} : undefined, } : undefined,
null, null,
statePromise.then(state => state.isFavorited ? { statePromise.then(state => state?.isFavorited ? {
icon: 'ph-star-bold ph-lg', icon: 'ph-bookmark-simple-bold ph-lg',
text: i18n.ts.unfavorite, text: i18n.ts.unfavorite,
action: () => toggleFavorite(false), action: () => toggleFavorite(false),
} : { } : {
icon: 'ph-star-bold ph-lg', icon: 'ph-bookmark-simple-bold ph-lg',
text: i18n.ts.favorite, text: i18n.ts.favorite,
action: () => toggleFavorite(true), action: () => toggleFavorite(true),
}), }),