diff --git a/src/lib/components/lemmy/post/Post.svelte b/src/lib/components/lemmy/post/Post.svelte
index 8cc1fbcf..28200b13 100644
--- a/src/lib/components/lemmy/post/Post.svelte
+++ b/src/lib/components/lemmy/post/Post.svelte
@@ -156,7 +156,7 @@
{/if}
{#if actions}
-
+
{:else if view == 'compact'}
diff --git a/src/lib/components/lemmy/post/PostActions.svelte b/src/lib/components/lemmy/post/PostActions.svelte
index 1a14cda7..5f96d9ae 100644
--- a/src/lib/components/lemmy/post/PostActions.svelte
+++ b/src/lib/components/lemmy/post/PostActions.svelte
@@ -48,13 +48,12 @@
import { fediseer, type Data } from '$lib/fediseer/fediseer'
import { t } from '$lib/translations'
import { text } from '$lib/components/translate/translation'
- import { hidePost, type MediaType } from './helpers'
+ import { hidePost } from './helpers'
import { feature } from '$lib/version'
import Switch from '$lib/components/input/Switch.svelte'
import { instanceToURL } from '$lib/util'
export let post: PostView
- export let type: MediaType | undefined = undefined
export let view: View = 'cozy'
export let debug: boolean = false
diff --git a/src/lib/components/ui/navbar/commands/Commands.svelte b/src/lib/components/ui/navbar/commands/Commands.svelte
index 5004f033..d73b63ea 100644
--- a/src/lib/components/ui/navbar/commands/Commands.svelte
+++ b/src/lib/components/ui/navbar/commands/Commands.svelte
@@ -9,13 +9,19 @@
import { afterNavigate, goto } from '$app/navigation'
import { profile, profileData } from '$lib/auth'
import { getGroups, type Action, type Group } from './actions'
+ import { themeData } from '$lib/ui/colors'
export let open = false
$: if (open) search = ''
export let groups: Group[] = []
- $: groups = getGroups($resumables, $profile, $profileData.profiles)
+ $: groups = getGroups(
+ $resumables,
+ $profile,
+ $profileData.profiles,
+ $themeData
+ )
let search = ''
let container: HTMLElement
diff --git a/src/lib/components/ui/navbar/commands/actions.ts b/src/lib/components/ui/navbar/commands/actions.ts
index 886b3589..980e9f6e 100644
--- a/src/lib/components/ui/navbar/commands/actions.ts
+++ b/src/lib/components/ui/navbar/commands/actions.ts
@@ -8,7 +8,7 @@ import {
import { resumables, type ResumableItem } from '$lib/lemmy/item'
import { userSettings } from '$lib/settings'
import { t } from '$lib/translations'
-import { colorScheme } from '$lib/ui/colors'
+import { colorScheme, theme, themeData, type ThemeData } from '$lib/ui/colors'
import { fullCommunityName } from '$lib/util'
import {
ArrowRightOnRectangle,
@@ -42,6 +42,7 @@ import {
ArrowTrendingDown,
ChatBubbleOvalLeftEllipsis,
ChatBubbleLeftRight,
+ Swatch,
} from 'svelte-hero-icons'
import { get } from 'svelte/store'
@@ -64,7 +65,8 @@ export interface Action {
export function getGroups(
resumables: ResumableItem[],
profile: Profile,
- profiles: Profile[]
+ profiles: Profile[],
+ td: ThemeData
) {
return [
{
@@ -373,6 +375,19 @@ export function getGroups(
},
],
},
+ {
+ name: t.get('nav.commands.setTheme'),
+ icon: Swatch,
+ subActions: td.themes.map((th) => ({
+ name: t.get('nav.commands.setThemeTo', { default: th.name }),
+ icon: Swatch,
+ handle: () =>
+ themeData.update((td) => ({
+ ...td,
+ currentTheme: th.id,
+ })),
+ })),
+ },
],
},
{
diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json
index 601ec33b..e1b4fb3e 100644
--- a/src/lib/i18n/en.json
+++ b/src/lib/i18n/en.json
@@ -44,7 +44,9 @@
"setColor": "Set color scheme",
"setColorTo": "Set color scheme to {{default}}",
"feeds": "Feeds",
- "downloading": "Downloading actions"
+ "downloading": "Downloading actions",
+ "setTheme": "Set theme",
+ "setThemeTo": "Set theme to {{default}}"
}
},
"account": {