upgrade: mono-svelte
This commit is contained in:
1 parent
5611fbdf98
commit
8d1dc7468f
4 files changed
+176
-20
No files matched your search
@@ -4,7 +4,13 @@
|
|||||||
import { userSettings } from '$lib/settings'
|
import { userSettings } from '$lib/settings'
|
||||||
import { searchParam } from '$lib/util'
|
import { searchParam } from '$lib/util'
|
||||||
import { Select } from 'mono-svelte'
|
import { Select } from 'mono-svelte'
|
||||||
import { GlobeAmericas, Icon } from 'svelte-hero-icons'
|
import {
|
||||||
|
GlobeAmericas,
|
||||||
|
Icon,
|
||||||
|
MapPin,
|
||||||
|
Newspaper,
|
||||||
|
ShieldCheck,
|
||||||
|
} from 'svelte-hero-icons'
|
||||||
import { amModOfAny } from '../moderation/moderation'
|
import { amModOfAny } from '../moderation/moderation'
|
||||||
import { t } from '$lib/translations'
|
import { t } from '$lib/translations'
|
||||||
|
|
||||||
@@ -38,15 +44,42 @@
|
|||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<option value="All">{$t('filter.location.all')}</option>
|
<option value="All">
|
||||||
<option value="Local">{$t('filter.location.local')}</option>
|
<Icon
|
||||||
|
src={GlobeAmericas}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.location.all')}
|
||||||
|
</option>
|
||||||
|
<option value="Local">
|
||||||
|
<Icon
|
||||||
|
src={MapPin}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>{$t('filter.location.local')}
|
||||||
|
</option>
|
||||||
<option value="Subscribed" disabled={$profile?.jwt == undefined}>
|
<option value="Subscribed" disabled={$profile?.jwt == undefined}>
|
||||||
|
<Icon
|
||||||
|
src={Newspaper}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
{$t('filter.location.subscribed')}
|
{$t('filter.location.subscribed')}
|
||||||
</option>
|
</option>
|
||||||
<option
|
<option
|
||||||
value="ModeratorView"
|
value="ModeratorView"
|
||||||
disabled={!$profile?.jwt || !amModOfAny($profile?.user)}
|
disabled={!$profile?.jwt || !amModOfAny($profile?.user)}
|
||||||
>
|
>
|
||||||
|
<Icon
|
||||||
|
src={ShieldCheck}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
{$t('filter.location.moderator')}
|
{$t('filter.location.moderator')}
|
||||||
</option>
|
</option>
|
||||||
</Select>
|
</Select>
|
||||||
@@ -7,7 +7,19 @@
|
|||||||
import { feature } from '$lib/version.js'
|
import { feature } from '$lib/version.js'
|
||||||
import type { SortType } from 'lemmy-js-client'
|
import type { SortType } from 'lemmy-js-client'
|
||||||
import { Select } from 'mono-svelte'
|
import { Select } from 'mono-svelte'
|
||||||
import { ChartBar, Clock, Icon } from 'svelte-hero-icons'
|
import {
|
||||||
|
ArrowTrendingDown,
|
||||||
|
ArrowTrendingUp,
|
||||||
|
ChartBar,
|
||||||
|
ChatBubbleLeftRight,
|
||||||
|
ChatBubbleOvalLeft,
|
||||||
|
Clock,
|
||||||
|
Fire,
|
||||||
|
Icon,
|
||||||
|
Scale,
|
||||||
|
Star,
|
||||||
|
Trophy,
|
||||||
|
} from 'svelte-hero-icons'
|
||||||
import { backOut } from 'svelte/easing'
|
import { backOut } from 'svelte/easing'
|
||||||
import { fly, slide } from 'svelte/transition'
|
import { fly, slide } from 'svelte/transition'
|
||||||
|
|
||||||
@@ -39,17 +51,87 @@
|
|||||||
<Icon src={ChartBar} size="13" mini />
|
<Icon src={ChartBar} size="13" mini />
|
||||||
{$t('filter.sort.label')}
|
{$t('filter.sort.label')}
|
||||||
</span>
|
</span>
|
||||||
<option value="Active">{$t('filter.sort.active')}</option>
|
<option value="Active">
|
||||||
<option value="Hot">{$t('filter.sort.hot')}</option>
|
<Icon
|
||||||
{#if feature('scaledSort', $site?.version)}
|
src={ArrowTrendingUp}
|
||||||
<option value="Scaled">{$t('filter.sort.scaled')}</option>
|
size="16"
|
||||||
{/if}
|
mini
|
||||||
<option value="TopAll">{$t('filter.sort.top.label')}</option>
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
<option value="New">{$t('filter.sort.new')}</option>
|
/>
|
||||||
<option value="Old">{$t('filter.sort.old')}</option>
|
{$t('filter.sort.active')}
|
||||||
<option value="Controversial">{$t('filter.sort.controversial')}</option>
|
</option>
|
||||||
<option value="MostComments">{$t('filter.sort.mostcomments')}</option>
|
<option value="Hot">
|
||||||
<option value="NewComments">{$t('filter.sort.newcomments')}</option>
|
<Icon
|
||||||
|
src={Fire}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.sort.hot')}
|
||||||
|
</option>
|
||||||
|
<option value="Scaled">
|
||||||
|
<Icon
|
||||||
|
src={Scale}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.sort.scaled')}
|
||||||
|
</option>
|
||||||
|
<option value="TopAll">
|
||||||
|
<Icon
|
||||||
|
src={Trophy}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.sort.top.label')}
|
||||||
|
</option>
|
||||||
|
<option value="New">
|
||||||
|
<Icon
|
||||||
|
src={Star}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.sort.new')}
|
||||||
|
</option>
|
||||||
|
<option value="Old">
|
||||||
|
<Icon
|
||||||
|
src={Clock}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.sort.old')}
|
||||||
|
</option>
|
||||||
|
<option value="Controversial">
|
||||||
|
<Icon
|
||||||
|
src={ArrowTrendingDown}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.sort.controversial')}
|
||||||
|
</option>
|
||||||
|
<option value="MostComments">
|
||||||
|
<Icon
|
||||||
|
src={ChatBubbleOvalLeft}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.sort.mostcomments')}
|
||||||
|
</option>
|
||||||
|
<option value="NewComments">
|
||||||
|
<Icon
|
||||||
|
src={ChatBubbleLeftRight}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.sort.newcomments')}
|
||||||
|
</option>
|
||||||
</Select>
|
</Select>
|
||||||
{#if selected?.startsWith('Top')}
|
{#if selected?.startsWith('Top')}
|
||||||
<div transition:fly={{ easing: backOut, x: 2 }}>
|
<div transition:fly={{ easing: backOut, x: 2 }}>
|
||||||
|
|||||||
@@ -2,7 +2,16 @@
|
|||||||
import { userSettings } from '$lib/settings.js'
|
import { userSettings } from '$lib/settings.js'
|
||||||
import { t } from '$lib/translations'
|
import { t } from '$lib/translations'
|
||||||
import { Select } from 'mono-svelte'
|
import { Select } from 'mono-svelte'
|
||||||
import { Icon, ViewColumns } from 'svelte-hero-icons'
|
import {
|
||||||
|
Bars3,
|
||||||
|
Clock,
|
||||||
|
Icon,
|
||||||
|
ListBullet,
|
||||||
|
QueueList,
|
||||||
|
RectangleGroup,
|
||||||
|
Square2Stack,
|
||||||
|
ViewColumns,
|
||||||
|
} from 'svelte-hero-icons'
|
||||||
|
|
||||||
export let showLabel = true
|
export let showLabel = true
|
||||||
</script>
|
</script>
|
||||||
@@ -16,8 +25,40 @@
|
|||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<option value="cozy">{$t('filter.view.cozy')}</option>
|
<option value="cozy">
|
||||||
<option value="list">{$t('filter.view.list')}</option>
|
<Icon
|
||||||
<option value="compact">{$t('filter.view.compact')}</option>
|
src={RectangleGroup}
|
||||||
<option value="card">{$t('filter.view.legacy')}</option>
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.view.cozy')}
|
||||||
|
</option>
|
||||||
|
<option value="list">
|
||||||
|
<Icon
|
||||||
|
src={QueueList}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.view.list')}
|
||||||
|
</option>
|
||||||
|
<option value="compact">
|
||||||
|
<Icon
|
||||||
|
src={Bars3}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.view.compact')}
|
||||||
|
</option>
|
||||||
|
<option value="card">
|
||||||
|
<Icon
|
||||||
|
src={Clock}
|
||||||
|
size="16"
|
||||||
|
mini
|
||||||
|
class="text-slate-600 dark:text-zinc-400"
|
||||||
|
/>
|
||||||
|
{$t('filter.view.legacy')}
|
||||||
|
</option>
|
||||||
</Select>
|
</Select>
|
||||||
Reference in new issue
Block a user