feat: add setting to reverse action row

This commit is contained in:
Xylight committed 2024-10-18 13:26:45 -07:00
1 parent f057f24b20
commit be2f8663b0
5 files changed
+17 -1

No files matched your search

@@ -44,7 +44,10 @@
<Translation bind:open={translating} />
{/if}
<div class="flex flex-row items-center gap-0.5 h-7">
<div
class="flex flex-row items-center gap-0.5 h-7 w-full"
class:flex-row-reverse={$userSettings.posts.reverseActions}
>
<CommentVote
bind:upvotes={comment.counts.upvotes}
bind:downvotes={comment.counts.downvotes}
@@ -151,4 +154,5 @@
{/if}
{/if}
</Menu>
<div class="flex-1 w-full" />
</div>
@@ -118,6 +118,7 @@
<footer
class="flex flex-row gap-2 items-center flex-shrink-0 {buttonHeight}"
class:flex-row-reverse={$userSettings.posts.reverseActions}
style={$$props.style ?? ''}
>
<PostVote
+4
View File
@@ -772,6 +772,10 @@
"hide": "Hide",
"show": "Show"
}
},
"reverseActions": {
"title": "Reverse action row",
"description": "Reverses the order of actions on posts and comments."
}
},
"embeds": {
+2
View File
@@ -94,6 +94,7 @@ interface Settings {
compactFeatured: boolean
showHidden: boolean
noVirtualize: boolean
reverseActions: boolean
}
infiniteScroll: boolean
language: string | null
@@ -175,6 +176,7 @@ export const defaultSettings: Settings = {
compactFeatured: toBool(env.PUBLIC_COMPACT_FEATURED) ?? true,
showHidden: false,
noVirtualize: false,
reverseActions: toBool(env.PUBLIC_REVERSE_ACTIONS) ?? false,
},
infiniteScroll: true,
language: env.PUBLIC_LANGUAGE ?? null,
+5
View File
@@ -325,6 +325,11 @@
bind:selected={$userSettings.leftAlign}
/>
</Setting>
<ToggleSetting
bind:checked={$userSettings.posts.reverseActions}
title={$t('settings.app.reverseActions.title')}
description={$t('settings.app.reverseActions.description')}
/>
<ToggleSetting
supportedPlatforms={{ desktop: true, tablet: false, mobile: false }}
bind:checked={$userSettings.newWidth}