impr: improve select menu semantics
This commit is contained in:
13 files changed
+170
-187
No files matched your search
@@ -88,53 +88,50 @@
|
||||
</Option>
|
||||
</Select>
|
||||
{#if selected?.startsWith('Top')}
|
||||
<div transition:fly={{ easing: backOut, x: 2 }}>
|
||||
<Select
|
||||
class="border-l-0 rounded-l-none"
|
||||
bind:value={selected}
|
||||
onchange={() => {
|
||||
sort = 'TopAll'
|
||||
if (navigate)
|
||||
searchParam(page.url, 'sort', selected, 'page', 'cursor')
|
||||
}}
|
||||
>
|
||||
{#snippet customLabel()}
|
||||
<span class="flex items-center gap-1">
|
||||
<Icon src={Clock} size="15" micro />
|
||||
{$t('filter.sort.top.time.label')}
|
||||
</span>
|
||||
{/snippet}
|
||||
<Option value="TopAll" icon={PlusCircle}>
|
||||
{$t('filter.sort.top.time.all')}
|
||||
</Option>
|
||||
<Option value="TopNineMonths" icon={Calendar}>
|
||||
{$t('filter.sort.top.time.9months')}
|
||||
</Option>
|
||||
<Option value="TopSixMonths" icon={Calendar}>
|
||||
{$t('filter.sort.top.time.6months')}
|
||||
</Option>
|
||||
<Option value="TopThreeMonths" icon={Calendar}>
|
||||
{$t('filter.sort.top.time.3months')}
|
||||
</Option>
|
||||
<Option value="TopMonth" icon={CalendarDays}>
|
||||
{$t('filter.sort.top.time.month')}
|
||||
</Option>
|
||||
<Option value="TopWeek" icon={CalendarDays}>
|
||||
{$t('filter.sort.top.time.week')}
|
||||
</Option>
|
||||
<Option value="TopDay" icon={Sun}>
|
||||
{$t('filter.sort.top.time.day')}
|
||||
</Option>
|
||||
<Option value="TopTwelveHour" icon={Clock}>
|
||||
{$t('filter.sort.top.time.12hours')}
|
||||
</Option>
|
||||
<Option value="TopSixHour" icon={Clock}>
|
||||
{$t('filter.sort.top.time.6hours')}
|
||||
</Option>
|
||||
<Option value="TopHour" icon={Clock}>
|
||||
{$t('filter.sort.top.time.hour')}
|
||||
</Option>
|
||||
</Select>
|
||||
</div>
|
||||
<Select
|
||||
class="border-l-0 rounded-l-none"
|
||||
bind:value={selected}
|
||||
onchange={() => {
|
||||
sort = 'TopAll'
|
||||
if (navigate) searchParam(page.url, 'sort', selected, 'page', 'cursor')
|
||||
}}
|
||||
>
|
||||
{#snippet customLabel()}
|
||||
<span class="flex items-center gap-1">
|
||||
<Icon src={Clock} size="15" micro />
|
||||
{$t('filter.sort.top.time.label')}
|
||||
</span>
|
||||
{/snippet}
|
||||
<Option value="TopAll" icon={PlusCircle}>
|
||||
{$t('filter.sort.top.time.all')}
|
||||
</Option>
|
||||
<Option value="TopNineMonths" icon={Calendar}>
|
||||
{$t('filter.sort.top.time.9months')}
|
||||
</Option>
|
||||
<Option value="TopSixMonths" icon={Calendar}>
|
||||
{$t('filter.sort.top.time.6months')}
|
||||
</Option>
|
||||
<Option value="TopThreeMonths" icon={Calendar}>
|
||||
{$t('filter.sort.top.time.3months')}
|
||||
</Option>
|
||||
<Option value="TopMonth" icon={CalendarDays}>
|
||||
{$t('filter.sort.top.time.month')}
|
||||
</Option>
|
||||
<Option value="TopWeek" icon={CalendarDays}>
|
||||
{$t('filter.sort.top.time.week')}
|
||||
</Option>
|
||||
<Option value="TopDay" icon={Sun}>
|
||||
{$t('filter.sort.top.time.day')}
|
||||
</Option>
|
||||
<Option value="TopTwelveHour" icon={Clock}>
|
||||
{$t('filter.sort.top.time.12hours')}
|
||||
</Option>
|
||||
<Option value="TopSixHour" icon={Clock}>
|
||||
{$t('filter.sort.top.time.6hours')}
|
||||
</Option>
|
||||
<Option value="TopHour" icon={Clock}>
|
||||
{$t('filter.sort.top.time.hour')}
|
||||
</Option>
|
||||
</Select>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -144,8 +144,9 @@
|
||||
>
|
||||
{#if showCommunity && community}
|
||||
<Popover>
|
||||
{#snippet target()}
|
||||
{#snippet target(attachment)}
|
||||
<button
|
||||
{@attach attachment}
|
||||
class={[
|
||||
'row-span-2 shrink-0 mr-2 self-center group/btn',
|
||||
'bg-slate-200 dark:bg-zinc-800 rounded-lg cursor-pointer',
|
||||
@@ -177,6 +178,7 @@
|
||||
rounding="2xl"
|
||||
elevation="high"
|
||||
class="max-w-2xl w-full max-h-128 overflow-auto"
|
||||
data-autoclose="false"
|
||||
>
|
||||
{#await import('../community/CommunityHeader.svelte') then { default: CommunityHeader }}
|
||||
<CommunityHeader {community} {subscribed} />
|
||||
|
||||
Reference in new issue
Block a user