mirror of
https://github.com/acid-info/Kurate.git
synced 2025-01-12 08:54:08 +00:00
feat: enable sorting and filtering even without being signed in (#361)
This commit is contained in:
parent
e0b4d297dc
commit
6c2ef2f9f7
@ -73,37 +73,32 @@
|
||||
<svelte:fragment slot="buttons">
|
||||
{#if $profile.signer !== undefined}
|
||||
<Button icon={Add} label="Create persona" on:click={createDraft} />
|
||||
<Dropdown>
|
||||
<Button slot="button" icon={SettingsView} />
|
||||
|
||||
<DropdownItem active={sortBy === 'date'} onClick={() => (sortBy = 'date')}>
|
||||
Sort by date of creation
|
||||
</DropdownItem>
|
||||
<DropdownItem
|
||||
active={sortBy === 'participantsCount'}
|
||||
onClick={() => (sortBy = 'participantsCount')}
|
||||
>
|
||||
Sort by number of participants
|
||||
</DropdownItem>
|
||||
<DropdownItem active={sortBy === 'postsCount'} onClick={() => (sortBy = 'postsCount')}>
|
||||
Sort by number of posts
|
||||
</DropdownItem>
|
||||
<DropdownItem
|
||||
active={sortBy === 'alphabetical'}
|
||||
onClick={() => (sortBy = 'alphabetical')}
|
||||
>
|
||||
Sort by name (alphabetical)
|
||||
</DropdownItem>
|
||||
</Dropdown>
|
||||
<Button
|
||||
icon={sortAsc ? SortAscending : SortDescending}
|
||||
on:click={() => (sortAsc = !sortAsc)}
|
||||
/>
|
||||
{/if}
|
||||
<Dropdown>
|
||||
<Button slot="button" icon={SettingsView} />
|
||||
|
||||
<DropdownItem active={sortBy === 'date'} onClick={() => (sortBy = 'date')}>
|
||||
Sort by date of creation
|
||||
</DropdownItem>
|
||||
<DropdownItem
|
||||
active={sortBy === 'participantsCount'}
|
||||
onClick={() => (sortBy = 'participantsCount')}
|
||||
>
|
||||
Sort by number of participants
|
||||
</DropdownItem>
|
||||
<DropdownItem active={sortBy === 'postsCount'} onClick={() => (sortBy = 'postsCount')}>
|
||||
Sort by number of posts
|
||||
</DropdownItem>
|
||||
<DropdownItem active={sortBy === 'alphabetical'} onClick={() => (sortBy = 'alphabetical')}>
|
||||
Sort by name (alphabetical)
|
||||
</DropdownItem>
|
||||
</Dropdown>
|
||||
<Button
|
||||
icon={sortAsc ? SortAscending : SortDescending}
|
||||
on:click={() => (sortAsc = !sortAsc)}
|
||||
/>
|
||||
</svelte:fragment>
|
||||
{#if $profile.signer !== undefined}
|
||||
<Search bind:filterQuery />
|
||||
{/if}
|
||||
<Search bind:filterQuery />
|
||||
</SectionTitle>
|
||||
|
||||
<Grid>
|
||||
|
@ -133,29 +133,25 @@
|
||||
|
||||
<SectionTitle title="All posts">
|
||||
<svelte:fragment slot="buttons">
|
||||
{#if $profile.signer !== undefined}
|
||||
<Dropdown>
|
||||
<Button slot="button" icon={SettingsView} />
|
||||
<Dropdown>
|
||||
<Button slot="button" icon={SettingsView} />
|
||||
|
||||
<DropdownItem active={sortBy === 'date'} onClick={() => (sortBy = 'date')}>
|
||||
Sort by date of creation
|
||||
</DropdownItem>
|
||||
<DropdownItem
|
||||
active={sortBy === 'alphabetical'}
|
||||
onClick={() => (sortBy = 'alphabetical')}
|
||||
>
|
||||
Sort by name (alphabetical)
|
||||
</DropdownItem>
|
||||
</Dropdown>
|
||||
<Button
|
||||
icon={sortAsc ? SortAscending : SortDescending}
|
||||
on:click={() => (sortAsc = !sortAsc)}
|
||||
/>
|
||||
{/if}
|
||||
<DropdownItem active={sortBy === 'date'} onClick={() => (sortBy = 'date')}>
|
||||
Sort by date of creation
|
||||
</DropdownItem>
|
||||
<DropdownItem
|
||||
active={sortBy === 'alphabetical'}
|
||||
onClick={() => (sortBy = 'alphabetical')}
|
||||
>
|
||||
Sort by name (alphabetical)
|
||||
</DropdownItem>
|
||||
</Dropdown>
|
||||
<Button
|
||||
icon={sortAsc ? SortAscending : SortDescending}
|
||||
on:click={() => (sortAsc = !sortAsc)}
|
||||
/>
|
||||
</svelte:fragment>
|
||||
{#if $profile.signer !== undefined}
|
||||
<Search bind:filterQuery />
|
||||
{/if}
|
||||
<Search bind:filterQuery />
|
||||
</SectionTitle>
|
||||
|
||||
{#if !personaPosts || personaPosts.loading}
|
||||
|
@ -200,29 +200,22 @@
|
||||
|
||||
<SectionTitle title="All pending posts">
|
||||
<svelte:fragment slot="buttons">
|
||||
{#if $profile.signer !== undefined}
|
||||
<Dropdown>
|
||||
<Button slot="button" icon={SettingsView} />
|
||||
<Dropdown>
|
||||
<Button slot="button" icon={SettingsView} />
|
||||
|
||||
<DropdownItem active={sortBy === 'date'} onClick={() => (sortBy = 'date')}>
|
||||
Sort by date of creation
|
||||
</DropdownItem>
|
||||
<DropdownItem
|
||||
active={sortBy === 'alphabetical'}
|
||||
onClick={() => (sortBy = 'alphabetical')}
|
||||
>
|
||||
Sort by name (alphabetical)
|
||||
</DropdownItem>
|
||||
</Dropdown>
|
||||
<Button
|
||||
icon={sortAsc ? SortAscending : SortDescending}
|
||||
on:click={() => (sortAsc = !sortAsc)}
|
||||
/>
|
||||
{/if}
|
||||
<DropdownItem active={sortBy === 'date'} onClick={() => (sortBy = 'date')}>
|
||||
Sort by date of creation
|
||||
</DropdownItem>
|
||||
<DropdownItem active={sortBy === 'alphabetical'} onClick={() => (sortBy = 'alphabetical')}>
|
||||
Sort by name (alphabetical)
|
||||
</DropdownItem>
|
||||
</Dropdown>
|
||||
<Button
|
||||
icon={sortAsc ? SortAscending : SortDescending}
|
||||
on:click={() => (sortAsc = !sortAsc)}
|
||||
/>
|
||||
</svelte:fragment>
|
||||
{#if $profile.signer !== undefined}
|
||||
<Search bind:filterQuery />
|
||||
{/if}
|
||||
<Search bind:filterQuery />
|
||||
</SectionTitle>
|
||||
|
||||
{#if !personaPosts || personaPosts.loading}
|
||||
|
Loading…
x
Reference in New Issue
Block a user