design: add unified notifications button

This commit is contained in:
James Xylight committed 2025-07-04 19:02:07 -07:00
1 parent d0ade27f99
commit 3706b31fda
8 files changed
+112 -76

No files matched your search

+5 -5
View File
@@ -15,8 +15,8 @@
let { data = $bindable() } = $props()
let type = $state(data.feed.value.type_)
let sort = $state(data.feed.value.sort)
let type = $state(data.feed.type_)
let sort = $state(data.feed.sort)
$effect(() => {
if (type) settings.defaultSort.feed = type
@@ -62,8 +62,8 @@
</header>
<FeedComponent
bind:posts={data.feed.value.posts.posts}
bind:feedData={data.feed.value}
bind:posts={data.feed.posts.posts}
bind:feedData={data.feed}
feedId="main"
/>
<svelte:element
@@ -73,7 +73,7 @@
class="mt-auto"
>
<Pageination
cursor={{ next: data.feed.value.cursor.next }}
cursor={{ next: data.feed.cursor.next }}
href={page =>
typeof page == 'number' ? `?page=${page}` : `?cursor=${page}`}
back={false}
+12 -14
View File
@@ -14,20 +14,18 @@ export async function load({ url, fetch }) {
(url.searchParams.get('type') as ListingType) || settings.defaultSort.feed
return {
feed: new ReactiveState(
await postFeed({
id: 'main',
request: {
page_cursor: cursor,
sort: sort,
type_: listingType,
limit: 20,
show_hidden: settings.posts.showHidden,
},
url: url,
fetch: fetch,
}),
),
feed: await postFeed({
id: 'main',
request: {
page_cursor: cursor,
sort: sort,
type_: listingType,
limit: 20,
show_hidden: settings.posts.showHidden,
},
url: url,
fetch: fetch,
}),
contextual: {
actions: [
{
+2 -2
View File
@@ -4,8 +4,8 @@ import type { SortType } from 'lemmy-js-client'
export async function load({ url, fetch, parent }) {
const page = Number(url.searchParams.get('page')) || 1
const type: 'comments' | 'posts' =
(url.searchParams.get('type') as 'comments' | 'posts') || 'posts'
const type: 'comments' | 'posts' | 'all' =
(url.searchParams.get('type') as 'comments' | 'posts' | 'all') || 'all'
const sort: SortType = (url.searchParams.get('sort') as SortType) || 'New'
const { my_user } = await parent()