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"
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"

View File

@ -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',
},

View File

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

View File

@ -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),
}),