feat: add setting to reverse action row
This commit is contained in:
1 parent
f057f24b20
commit
be2f8663b0
5 files changed
+17
-1
No files matched your search
@@ -44,7 +44,10 @@
|
|||||||
<Translation bind:open={translating} />
|
<Translation bind:open={translating} />
|
||||||
{/if}
|
{/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
|
<CommentVote
|
||||||
bind:upvotes={comment.counts.upvotes}
|
bind:upvotes={comment.counts.upvotes}
|
||||||
bind:downvotes={comment.counts.downvotes}
|
bind:downvotes={comment.counts.downvotes}
|
||||||
@@ -151,4 +154,5 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</Menu>
|
</Menu>
|
||||||
|
<div class="flex-1 w-full" />
|
||||||
</div>
|
</div>
|
||||||
@@ -118,6 +118,7 @@
|
|||||||
|
|
||||||
<footer
|
<footer
|
||||||
class="flex flex-row gap-2 items-center flex-shrink-0 {buttonHeight}"
|
class="flex flex-row gap-2 items-center flex-shrink-0 {buttonHeight}"
|
||||||
|
class:flex-row-reverse={$userSettings.posts.reverseActions}
|
||||||
style={$$props.style ?? ''}
|
style={$$props.style ?? ''}
|
||||||
>
|
>
|
||||||
<PostVote
|
<PostVote
|
||||||
|
|||||||
@@ -772,6 +772,10 @@
|
|||||||
"hide": "Hide",
|
"hide": "Hide",
|
||||||
"show": "Show"
|
"show": "Show"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"reverseActions": {
|
||||||
|
"title": "Reverse action row",
|
||||||
|
"description": "Reverses the order of actions on posts and comments."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"embeds": {
|
"embeds": {
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ interface Settings {
|
|||||||
compactFeatured: boolean
|
compactFeatured: boolean
|
||||||
showHidden: boolean
|
showHidden: boolean
|
||||||
noVirtualize: boolean
|
noVirtualize: boolean
|
||||||
|
reverseActions: boolean
|
||||||
}
|
}
|
||||||
infiniteScroll: boolean
|
infiniteScroll: boolean
|
||||||
language: string | null
|
language: string | null
|
||||||
@@ -175,6 +176,7 @@ export const defaultSettings: Settings = {
|
|||||||
compactFeatured: toBool(env.PUBLIC_COMPACT_FEATURED) ?? true,
|
compactFeatured: toBool(env.PUBLIC_COMPACT_FEATURED) ?? true,
|
||||||
showHidden: false,
|
showHidden: false,
|
||||||
noVirtualize: false,
|
noVirtualize: false,
|
||||||
|
reverseActions: toBool(env.PUBLIC_REVERSE_ACTIONS) ?? false,
|
||||||
},
|
},
|
||||||
infiniteScroll: true,
|
infiniteScroll: true,
|
||||||
language: env.PUBLIC_LANGUAGE ?? null,
|
language: env.PUBLIC_LANGUAGE ?? null,
|
||||||
|
|||||||
@@ -325,6 +325,11 @@
|
|||||||
bind:selected={$userSettings.leftAlign}
|
bind:selected={$userSettings.leftAlign}
|
||||||
/>
|
/>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<ToggleSetting
|
||||||
|
bind:checked={$userSettings.posts.reverseActions}
|
||||||
|
title={$t('settings.app.reverseActions.title')}
|
||||||
|
description={$t('settings.app.reverseActions.description')}
|
||||||
|
/>
|
||||||
<ToggleSetting
|
<ToggleSetting
|
||||||
supportedPlatforms={{ desktop: true, tablet: false, mobile: false }}
|
supportedPlatforms={{ desktop: true, tablet: false, mobile: false }}
|
||||||
bind:checked={$userSettings.newWidth}
|
bind:checked={$userSettings.newWidth}
|
||||||
|
|||||||
Reference in new issue
Block a user