misc: Change settings menu
This commit is contained in:
1 parent
da65dec43a
commit
75a7e87110
3 files changed
+35
-24
No files matched your search
@@ -14,13 +14,13 @@
|
|||||||
|
|
||||||
<style lang="postcss">
|
<style lang="postcss">
|
||||||
.markdown :global(h1) {
|
.markdown :global(h1) {
|
||||||
@apply text-3xl font-bold my-2;
|
@apply text-3xl font-bold mb-1 mt-3;
|
||||||
}
|
}
|
||||||
.markdown :global(h2) {
|
.markdown :global(h2) {
|
||||||
@apply text-2xl font-bold my-2;
|
@apply text-2xl font-bold mb-1 mt-3;
|
||||||
}
|
}
|
||||||
.markdown :global(h3) {
|
.markdown :global(h3) {
|
||||||
@apply text-xl font-bold my-2;
|
@apply text-xl font-bold mb-1 mt-3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown :global(hr) {
|
.markdown :global(hr) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
import { Color } from '$lib/ui/colors.js'
|
import { Color } from '$lib/ui/colors.js'
|
||||||
import Button from '$lib/components/input/Button.svelte'
|
import Button from '$lib/components/input/Button.svelte'
|
||||||
import { ToastType, toast } from '$lib/components/ui/toasts/toasts.js'
|
import { ToastType, toast } from '$lib/components/ui/toasts/toasts.js'
|
||||||
|
import Setting from './Setting.svelte'
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
newInstance: $instance,
|
newInstance: $instance,
|
||||||
@@ -46,9 +47,9 @@
|
|||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<h1 class="text-3xl font-bold">Settings</h1>
|
<h1 class="text-3xl font-bold">Settings</h1>
|
||||||
<h2 class="uppercase font-bold opacity-80 text-sm mt-4">General</h2>
|
<h2 class="uppercase font-bold opacity-80 text-sm mt-4">General</h2>
|
||||||
<Card class="flex flex-col gap-3 p-6 text-sm my-2">
|
<Setting>
|
||||||
<h1 class="font-bold">Instance</h1>
|
<span slot="title">Instance</span>
|
||||||
<p>Changing this will log you out.</p>
|
<span slot="description">Changing this will log you out.</span>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={data.newInstance}
|
bind:value={data.newInstance}
|
||||||
@@ -58,38 +59,37 @@
|
|||||||
<div class="w-24">
|
<div class="w-24">
|
||||||
<Button
|
<Button
|
||||||
color="primary"
|
color="primary"
|
||||||
large
|
|
||||||
loading={data.loading}
|
loading={data.loading}
|
||||||
disabled={data.loading}
|
disabled={data.loading}
|
||||||
on:click={changeInstance}
|
on:click={changeInstance}
|
||||||
|
size="lg"
|
||||||
|
class="h-full"
|
||||||
>
|
>
|
||||||
Change
|
Change
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Setting>
|
||||||
<h2 class="uppercase font-bold opacity-80 text-sm mt-4">UI</h2>
|
<h2 class="uppercase font-bold opacity-80 text-sm mt-4">UI</h2>
|
||||||
<Card class="flex flex-col gap-3 p-6 text-sm my-2">
|
<Setting>
|
||||||
<h1 class="font-bold">Mark read posts</h1>
|
<span slot="title">Mark read posts</span>
|
||||||
<p>Fade the title of posts you've already read.</p>
|
<span slot="description">Fade the title of posts you've already read.</span>
|
||||||
<Switch bind:enabled={$userSettings.markReadPosts} />
|
<Switch bind:enabled={$userSettings.markReadPosts} />
|
||||||
</Card>
|
</Setting>
|
||||||
<Card class="flex flex-col gap-3 p-6 text-sm my-2">
|
<Setting>
|
||||||
<h1 class="font-bold">Revert vote colors</h1>
|
<span slot="title">Revert vote colors</span>
|
||||||
<p>Make upvotes orange and downvotes blue, like Reddit used to do.</p>
|
<span slot="description">
|
||||||
|
Make upvotes orange and downvotes blue, like Reddit used to do.
|
||||||
|
</span>
|
||||||
<Switch bind:enabled={$userSettings.revertColors} />
|
<Switch bind:enabled={$userSettings.revertColors} />
|
||||||
</Card>
|
</Setting>
|
||||||
<Card class="flex flex-col gap-3 p-6 text-sm my-2">
|
<Setting>
|
||||||
<h1 class="font-bold">New comment design</h1>
|
<span slot="title">Show user instances</span>
|
||||||
<Switch bind:enabled={$userSettings.newComments} />
|
<span slot="description">Show user's instances.</span>
|
||||||
</Card>
|
|
||||||
<Card class="flex flex-col gap-3 p-6 text-sm my-2">
|
|
||||||
<h1 class="font-bold">Show user instances</h1>
|
|
||||||
<p>Show user's instances.</p>
|
|
||||||
<span class="flex gap-0 px-3 py-2 bg-slate-100 dark:bg-zinc-800 rounded-md">
|
<span class="flex gap-0 px-3 py-2 bg-slate-100 dark:bg-zinc-800 rounded-md">
|
||||||
Xylight
|
Xylight
|
||||||
<span class="opacity-50">@example.com</span>
|
<span class="opacity-50">@example.com</span>
|
||||||
</span>
|
</span>
|
||||||
<Switch bind:enabled={$userSettings.showInstance} />
|
<Switch bind:enabled={$userSettings.showInstance} />
|
||||||
</Card>
|
</Setting>
|
||||||
</div>
|
</div>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import Card from '$lib/components/ui/Card.svelte'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Card class="flex flex-col gap-3 p-6 text-sm my-2">
|
||||||
|
<h1 class="font-bold"><slot name="title" /></h1>
|
||||||
|
<p class="text-slate-700 dark:text-zinc-300">
|
||||||
|
<slot name="description" />
|
||||||
|
</p>
|
||||||
|
<slot />
|
||||||
|
</Card>
|
||||||
Reference in new issue
Block a user