mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 16:30:13 +00:00
add menu to toggle user replies / boosts
This commit is contained in:
parent
7603ecddac
commit
f43cb514b0
1 changed files with 23 additions and 4 deletions
|
@ -63,6 +63,7 @@ import MkNotes from '@/components/MkNotes.vue';
|
||||||
import MkUserInfo from '@/components/MkUserInfo.vue';
|
import MkUserInfo from '@/components/MkUserInfo.vue';
|
||||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||||
import { useRouter } from '@/router/supplier.js';
|
import { useRouter } from '@/router/supplier.js';
|
||||||
|
import * as os from '@/os.js';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
initialTab?: FollowingFeedTab,
|
initialTab?: FollowingFeedTab,
|
||||||
|
@ -156,15 +157,15 @@ const latestNotesPagination: Paging<'notes/following'> = {
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const withUserRenotes = ref(false);
|
||||||
|
const withUserReplies = ref(true);
|
||||||
const userNotesPagination: Paging<'users/notes'> = {
|
const userNotesPagination: Paging<'users/notes'> = {
|
||||||
endpoint: 'users/notes' as const,
|
endpoint: 'users/notes' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: computed(() => ({
|
params: computed(() => ({
|
||||||
userId: selectedUserId.value,
|
userId: selectedUserId.value,
|
||||||
withRenotes: false,
|
withRenotes: withUserRenotes.value,
|
||||||
withReplies: true,
|
withReplies: withUserReplies.value,
|
||||||
withChannelNotes: false,
|
|
||||||
withFiles: false,
|
|
||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -174,6 +175,24 @@ const headerActions: PageHeaderItem[] = [
|
||||||
text: i18n.ts.reload,
|
text: i18n.ts.reload,
|
||||||
handler: () => reload(),
|
handler: () => reload(),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: 'ti ti-dots',
|
||||||
|
text: i18n.ts.options,
|
||||||
|
handler: (ev) => {
|
||||||
|
os.popupMenu([
|
||||||
|
{
|
||||||
|
type: 'switch',
|
||||||
|
text: i18n.ts.showRenotes,
|
||||||
|
ref: withUserRenotes,
|
||||||
|
}, {
|
||||||
|
type: 'switch',
|
||||||
|
text: i18n.ts.showRepliesToOthersInTimeline,
|
||||||
|
ref: withUserReplies,
|
||||||
|
},
|
||||||
|
], ev.currentTarget ?? ev.target);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const headerTabs = computed(() => [
|
const headerTabs = computed(() => [
|
||||||
|
|
Loading…
Reference in a new issue