feat: use list view by default
This commit is contained in:
1 parent
c53ec52d86
commit
54a9d1b346
5 files changed
+29
-10
No files matched your search
@@ -0,0 +1,18 @@
|
||||
<script lang="ts">
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import { Select } from 'mono-svelte'
|
||||
import { Icon, ViewColumns } from 'svelte-hero-icons'
|
||||
|
||||
let value = `${$userSettings.showCompactPosts}`
|
||||
|
||||
$: $userSettings.showCompactPosts = value == 'true'
|
||||
</script>
|
||||
|
||||
<Select bind:value>
|
||||
<span slot="label" class="flex items-center gap-1">
|
||||
<Icon src={ViewColumns} size="14" mini />
|
||||
View
|
||||
</span>
|
||||
<option value="true">List</option>
|
||||
<option value="false">Cards</option>
|
||||
</Select>
|
||||
@@ -111,14 +111,14 @@
|
||||
<Menu
|
||||
alignment="bottom-right"
|
||||
containerClass="overflow-auto max-h-[400px]"
|
||||
class="h-full max-h-screen"
|
||||
itemsClass="!h-full"
|
||||
>
|
||||
<Button
|
||||
let:toggleOpen
|
||||
slot="button"
|
||||
aria-label="Post actions"
|
||||
on:click={toggleOpen}
|
||||
class="hover:text-inherit"
|
||||
class="hover:text-inherit h-8"
|
||||
size="square-md"
|
||||
>
|
||||
<Icon slot="prefix" src={EllipsisHorizontal} width={16} mini />
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ export const defaultSettings: Settings = {
|
||||
community: toBool(env.PUBLIC_SHOW_INSTANCES_COMMUNITY) ?? true,
|
||||
comments: toBool(env.PUBLIC_SHOW_INSTANCES_COMMENTS) ?? false,
|
||||
},
|
||||
showCompactPosts: toBool(env.PUBLIC_SHOW_COMPACT_POSTS) ?? false,
|
||||
showCompactPosts: toBool(env.PUBLIC_SHOW_COMPACT_POSTS) ?? true,
|
||||
defaultSort: {
|
||||
sort: env.PUBLIC_DEFAULT_FEED_SORT ?? ('Active' as any),
|
||||
feed: env.PUBLIC_DEFAULT_FEED ?? ('Local' as any),
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
import { Button, Modal, Select, Spinner } from 'mono-svelte'
|
||||
import { GlobeAmericas, Icon } from 'svelte-hero-icons'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import ViewSelect from '$lib/components/lemmy/ViewSelect.svelte'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -37,7 +38,7 @@
|
||||
<Button on:click={() => (sidebar = !sidebar)}>About</Button>
|
||||
</div>
|
||||
<div
|
||||
class="flex flex-row gap-4 max-w-full w-full justify-between flex-wrap"
|
||||
class="flex flex-row gap-4 max-w-full justify-between w-full flex-wrap"
|
||||
>
|
||||
<Select
|
||||
bind:value={data.listingType}
|
||||
@@ -53,7 +54,10 @@
|
||||
<option value="Local">Local</option>
|
||||
<option value="Subscribed" disabled={!$profile?.jwt}>Subscribed</option>
|
||||
</Select>
|
||||
<Sort selected={data.sort} />
|
||||
<div class="flex gap-4 flex-wrap">
|
||||
<Sort selected={data.sort} />
|
||||
<ViewSelect />
|
||||
</div>
|
||||
</div>
|
||||
<section class="flex flex-col gap-3 sm:gap-4 h-full">
|
||||
<PostFeed posts={data.posts.posts} />
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
import { removalTemplate } from '$lib/components/lemmy/moderation/moderation.js'
|
||||
import { Button, Checkbox, Select } from 'mono-svelte'
|
||||
import ViewSelect from '$lib/components/lemmy/ViewSelect.svelte'
|
||||
|
||||
let data = {
|
||||
loading: false,
|
||||
@@ -130,11 +131,7 @@
|
||||
</Setting>
|
||||
<Setting>
|
||||
<span slot="title">Post style</span>
|
||||
<MultiSelect
|
||||
options={[false, true]}
|
||||
optionNames={['Cards', 'Compact']}
|
||||
bind:selected={$userSettings.showCompactPosts}
|
||||
/>
|
||||
<ViewSelect />
|
||||
</Setting>
|
||||
<Setting>
|
||||
<Checkbox bind:checked={$userSettings.nsfwBlur} slot="title">
|
||||
|
||||
Reference in new issue
Block a user