fix: make settings page usable
This commit is contained in:
1 parent
0718c8e0c6
commit
d670f39f0a
11 files changed
+47
-60
No files matched your search
@@ -209,7 +209,7 @@
|
||||
<div
|
||||
class="-z-10 bg-slate-100 dark:bg-zinc-900 absolute -top-9 -bottom-1.5
|
||||
-inset-x-6 -right-6"
|
||||
/>
|
||||
></div>
|
||||
{/if}
|
||||
<div
|
||||
class="max-w-full mt-0.5 break-words text-[15px] text-slate-800 dark:text-zinc-100"
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
alt={item.name}
|
||||
title={item.name}
|
||||
width={24}
|
||||
slot="prefix"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col max-w-full break-words">
|
||||
|
||||
@@ -113,13 +113,7 @@
|
||||
text-xs flex-shrink-0"
|
||||
rounding="pill"
|
||||
>
|
||||
<Icon
|
||||
src={LinkIcon}
|
||||
size="16"
|
||||
micro
|
||||
slot="prefix"
|
||||
class="flex-shrink-0"
|
||||
/>
|
||||
<Icon src={LinkIcon} size="16" micro class="flex-shrink-0" />
|
||||
{$t('post.actions.link.actions')}
|
||||
</Button>
|
||||
</PostLinkSources>
|
||||
@@ -136,10 +130,10 @@
|
||||
text-xs"
|
||||
>
|
||||
<div class="mr-0.5" style="width: 8px;">
|
||||
<Icon src={LinkIcon} size="16" micro slot="prefix" />
|
||||
<Icon src={LinkIcon} size="16" micro />
|
||||
</div>
|
||||
<div class="mr-1" style="width: 8px;">
|
||||
<Icon src={ChevronDown} size="16" micro slot="suffix" />
|
||||
<Icon src={ChevronDown} size="16" micro />
|
||||
</div>
|
||||
</Button>
|
||||
</PostLinkSources>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</script>
|
||||
|
||||
<ul
|
||||
class="divide-y divide-slate-200 dark:divide-zinc-900 flex flex-col {class}"
|
||||
class="divide-y divide-slate-200 dark:divide-zinc-900 flex flex-col {clazz}"
|
||||
>
|
||||
<slot {action} />
|
||||
</ul>
|
||||
@@ -50,14 +50,14 @@
|
||||
transition:scale={{ opacity: 0, start: 0.3 }}
|
||||
style="grid-row: 1; grid-column: 1;"
|
||||
>
|
||||
<Icon src={Clipboard} size="16" slot="prefix" />
|
||||
<Icon src={Clipboard} size="16" />
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
transition:scale={{ opacity: 0, start: 0.3 }}
|
||||
style="grid-row: 1; grid-column: 1;"
|
||||
>
|
||||
<Icon src={Check} size="16" mini slot="prefix" />
|
||||
<Icon src={Check} size="16" mini />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
class="top-0 left-0"
|
||||
style="grid-row: 1; grid-column: 1;"
|
||||
>
|
||||
<Icon src={Clipboard} size="18" mini slot="prefix" />
|
||||
<Icon src={Clipboard} size="18" mini />
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
@@ -48,7 +48,7 @@
|
||||
class="top-0 left-0"
|
||||
style="grid-row: 1; grid-column: 1;"
|
||||
>
|
||||
<Icon src={Check} size="18" mini slot="prefix" />
|
||||
<Icon src={Check} size="18" mini />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -1,41 +1,45 @@
|
||||
<script lang="ts">
|
||||
export let defaultValue: boolean = false
|
||||
export let checked: boolean = defaultValue
|
||||
export let defaultValue: boolean = false
|
||||
export let checked: boolean = defaultValue
|
||||
|
||||
export let labelClass: string = ''
|
||||
export let labelClass: string = ''
|
||||
let clazz: string = ''
|
||||
export { clazz as class }
|
||||
</script>
|
||||
|
||||
<label class="font-normal cursor-pointer flex flex-row items-start gap-4 group {class}">
|
||||
<div
|
||||
class="w-11 h-6 rounded-full relative z-[inherit] cursor-pointer flex flex-row transition-colors shadow-sm
|
||||
{checked ? 'bg-primary-900 dark:bg-primary-100' : 'bg-slate-200 dark:bg-zinc-800'}
|
||||
<label
|
||||
class="font-normal cursor-pointer flex flex-row items-start gap-4 group {clazz}"
|
||||
>
|
||||
<div
|
||||
class="w-11 h-6 rounded-full relative z-[inherit] cursor-pointer flex flex-row transition-colors shadow-sm
|
||||
{checked
|
||||
? 'bg-primary-900 dark:bg-primary-100'
|
||||
: 'bg-slate-200 dark:bg-zinc-800'}
|
||||
p-0.5 flex-shrink-0"
|
||||
>
|
||||
<input
|
||||
bind:checked
|
||||
type="checkbox"
|
||||
class="peer appearance-none absolute top-0 left-0 w-full h-full cursor-pointer z-10"
|
||||
/>
|
||||
<div
|
||||
class="box-border w-5 h-full bg-white peer-checked:dark:bg-black rounded-full shadow-sm
|
||||
>
|
||||
<input
|
||||
bind:checked
|
||||
type="checkbox"
|
||||
class="peer appearance-none absolute top-0 left-0 w-full h-full cursor-pointer z-10"
|
||||
/>
|
||||
<div
|
||||
class="box-border w-5 h-full bg-white peer-checked:dark:bg-black rounded-full shadow-sm
|
||||
group-active:w-6 transition peer-checked:translate-x-5 group-active:peer-checked:translate-x-4
|
||||
rtl:peer-checked:-translate-x-5 rtl:group-active:peer-checked:-translate-x-4"
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col {labelClass}">
|
||||
<slot />
|
||||
{#if $$slots.description}
|
||||
<span class="font-normal text-sm text-slate-700 dark:text-zinc-300">
|
||||
<slot name="description" />
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col {labelClass}">
|
||||
<slot />
|
||||
{#if $$slots.description}
|
||||
<span class="font-normal text-sm text-slate-700 dark:text-zinc-300">
|
||||
<slot name="description" />
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<style>
|
||||
.transition {
|
||||
transition: all 500ms cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||
}
|
||||
.transition {
|
||||
transition: all 500ms cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||
}
|
||||
</style>
|
||||
@@ -32,7 +32,7 @@
|
||||
color={action.type}
|
||||
>
|
||||
{#if action.icon}
|
||||
<Icon src={action.icon} mini size="16" slot="prefix" />
|
||||
<Icon src={action.icon} mini size="16" />
|
||||
{/if}
|
||||
{action.content}
|
||||
</Button>
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
}}
|
||||
{...$$restProps}
|
||||
inlineAffixes
|
||||
slot="target"
|
||||
>
|
||||
<div slot="prefix" class="h-5 flex items-center">
|
||||
<Icon src={MagnifyingGlass} mini size="16" />
|
||||
|
||||
@@ -226,15 +226,8 @@
|
||||
name: locale,
|
||||
}}
|
||||
<option value={locale}>
|
||||
<span>{mapped?.flag}</span>
|
||||
<span>{mapped?.name}</span>
|
||||
<div
|
||||
class="text-slate-600 dark:text-zinc-400 text-xs ml-auto"
|
||||
data-hide-selected
|
||||
data-label={mapped.translated < 0
|
||||
? ''
|
||||
: `${mapped.translated * 100}%`}
|
||||
></div>
|
||||
{mapped?.flag}
|
||||
{mapped?.name}
|
||||
</option>
|
||||
{/each}
|
||||
</Select>
|
||||
@@ -635,7 +628,7 @@
|
||||
<summary
|
||||
class="cursor-pointer inline-flex flex-row items-center w-full gap-1"
|
||||
>
|
||||
<Icon src={ChevronDown} mini size="16" slot="prefix" />
|
||||
<Icon src={ChevronDown} mini size="16" />
|
||||
{preset.title}
|
||||
<Button
|
||||
size="square-md"
|
||||
@@ -647,7 +640,7 @@
|
||||
$userSettings.moderation.presets
|
||||
}}
|
||||
>
|
||||
<Icon src={Trash} size="16" mini slot="prefix" />
|
||||
<Icon src={Trash} size="16" mini />
|
||||
</Button>
|
||||
</summary>
|
||||
<div class="flex flex-col gap-3 mt-2">
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
Icon,
|
||||
} from 'svelte-hero-icons'
|
||||
|
||||
export let vertical: boolean = false
|
||||
|
||||
export let supportedPlatforms = {
|
||||
desktop: true,
|
||||
tablet: true,
|
||||
@@ -18,7 +16,7 @@
|
||||
|
||||
export let mainClass: string = ''
|
||||
export let itemsClass: string = ''
|
||||
export let optionsClass: string = ''
|
||||
export let optionClass: string = ''
|
||||
let clazz: string = ''
|
||||
export { clazz as class }
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user