Merge pull request #364 from Xyphyn/command-palette
feat: add a command palette
This commit is contained in:
14 files changed
+837
-6
No files matched your search
@@ -32,6 +32,7 @@
|
||||
import EntityHeader from '$lib/components/ui/EntityHeader.svelte'
|
||||
import CommunityLink from '$lib/components/lemmy/community/CommunityLink.svelte'
|
||||
import Subscribe from '../../communities/Subscribe.svelte'
|
||||
import { resumables } from '$lib/lemmy/item'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -45,6 +46,13 @@
|
||||
'lastSeenCommunity',
|
||||
data.community.community_view.community,
|
||||
)
|
||||
|
||||
resumables.add({
|
||||
name: community.community.title,
|
||||
type: 'community',
|
||||
url: $page.url.toString(),
|
||||
avatar: community.community.icon,
|
||||
})
|
||||
})
|
||||
|
||||
onDestroy(() => {
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
import { Popover } from 'mono-svelte'
|
||||
import { t } from '$lib/translations.js'
|
||||
import { createWindowVirtualizer } from '@tanstack/svelte-virtual'
|
||||
import { resumables } from '$lib/lemmy/item.js'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -62,6 +63,13 @@
|
||||
post_id: post.post_view.post.id,
|
||||
})
|
||||
}
|
||||
|
||||
resumables.add({
|
||||
name: post.post_view.post.name,
|
||||
type: 'post',
|
||||
url: $page.url.toString(),
|
||||
avatar: post.post_view.post.thumbnail_url,
|
||||
})
|
||||
})
|
||||
|
||||
afterNavigate(async () => {
|
||||
@@ -83,7 +91,7 @@
|
||||
if (res.post) {
|
||||
removeToast(id)
|
||||
goto(`/post/${$instance}/${res.post.post.id}`, {}).then(() =>
|
||||
removeToast(id),
|
||||
removeToast(id)
|
||||
)
|
||||
}
|
||||
} catch (err) {
|
||||
@@ -372,7 +380,7 @@ flex-wrap gap-4 sticky top-20 w-full box-border z-20 mt-4"
|
||||
!(
|
||||
($userSettings.hidePosts.deleted && c.comment.deleted) ||
|
||||
($userSettings.hidePosts.removed && c.comment.removed)
|
||||
),
|
||||
)
|
||||
)}
|
||||
isParent={true}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user