forked from FoundKeyGang/FoundKey
client: remove favorites
This commit is contained in:
parent
6695171b6a
commit
de81fac334
5 changed files with 0 additions and 76 deletions
|
@ -120,12 +120,6 @@ export const menuDef = reactive({
|
||||||
indicated: computed(() => $i != null && $i.hasUnreadSpecifiedNotes),
|
indicated: computed(() => $i != null && $i.hasUnreadSpecifiedNotes),
|
||||||
to: '/my/notifications#directNotes',
|
to: '/my/notifications#directNotes',
|
||||||
},
|
},
|
||||||
favorites: {
|
|
||||||
title: 'favorites',
|
|
||||||
icon: 'fas fa-star',
|
|
||||||
show: computed(() => $i != null),
|
|
||||||
to: '/my/favorites',
|
|
||||||
},
|
|
||||||
pages: {
|
pages: {
|
||||||
title: 'pages',
|
title: 'pages',
|
||||||
icon: 'fas fa-file-alt',
|
icon: 'fas fa-file-alt',
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
<template>
|
|
||||||
<MkStickyContainer>
|
|
||||||
<template #header><MkPageHeader/></template>
|
|
||||||
<MkSpacer :content-max="800">
|
|
||||||
<MkPagination ref="pagingComponent" :pagination="pagination">
|
|
||||||
<template #empty>
|
|
||||||
<div class="_fullinfo">
|
|
||||||
<img :src="instance.images.info" class="_ghost"/>
|
|
||||||
<div>{{ i18n.ts.noNotes }}</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #default="{ items }">
|
|
||||||
<XList v-slot="{ item }" :items="items" :direction="'down'" :no-gap="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/ui/pagination.vue';
|
|
||||||
import XNote from '@/components/note.vue';
|
|
||||||
import XList from '@/components/date-separated-list.vue';
|
|
||||||
import { i18n } from '@/i18n';
|
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
|
||||||
import { instance } from '@/instance';
|
|
||||||
|
|
||||||
const pagination = {
|
|
||||||
endpoint: 'i/favorites' as const,
|
|
||||||
limit: 10,
|
|
||||||
};
|
|
||||||
|
|
||||||
const pagingComponent = ref<InstanceType<typeof MkPagination>>();
|
|
||||||
|
|
||||||
definePageMetadata({
|
|
||||||
title: i18n.ts.favorites,
|
|
||||||
icon: 'fas fa-star',
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" module>
|
|
||||||
.note {
|
|
||||||
background: var(--panel);
|
|
||||||
border-radius: var(--radius);
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -148,10 +148,6 @@ export const routes = [{
|
||||||
component: page(() => import('./pages/notifications.vue')),
|
component: page(() => import('./pages/notifications.vue')),
|
||||||
hash: 'initialTab',
|
hash: 'initialTab',
|
||||||
loginRequired: true,
|
loginRequired: true,
|
||||||
}, {
|
|
||||||
path: '/my/favorites',
|
|
||||||
component: page(() => import('./pages/favorites.vue')),
|
|
||||||
loginRequired: true,
|
|
||||||
}, {
|
}, {
|
||||||
name: 'messaging',
|
name: 'messaging',
|
||||||
path: '/my/messaging',
|
path: '/my/messaging',
|
||||||
|
|
|
@ -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 {
|
function toggleWatch(watch: boolean): void {
|
||||||
os.apiWithDialog(watch ? 'notes/watching/create' : 'notes/watching/delete', {
|
os.apiWithDialog(watch ? 'notes/watching/create' : 'notes/watching/delete', {
|
||||||
noteId: appearNote.id,
|
noteId: appearNote.id,
|
||||||
|
@ -244,15 +238,6 @@ export function getNoteMenu(props: {
|
||||||
action: translate,
|
action: translate,
|
||||||
} : undefined,
|
} : undefined,
|
||||||
null,
|
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',
|
icon: 'fas fa-paperclip',
|
||||||
text: i18n.ts.clip,
|
text: i18n.ts.clip,
|
||||||
|
|
|
@ -59,7 +59,6 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||||
where: 'deviceAccount',
|
where: 'deviceAccount',
|
||||||
default: [
|
default: [
|
||||||
'notifications',
|
'notifications',
|
||||||
'favorites',
|
|
||||||
'drive',
|
'drive',
|
||||||
'followRequests',
|
'followRequests',
|
||||||
'-',
|
'-',
|
||||||
|
|
Loading…
Reference in a new issue