Merge pull request #643 from Xyphyn/2.0.2-consistency

improve consistency of i18n and design
This commit is contained in:
Xylight authored and GitHub committed 2025-08-31 18:11:08 +00:00
commit e7531227d8
18 files changed
+181 -145

No files matched your search

+11 -1
View File
@@ -60,7 +60,7 @@
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
{#if taglines && taglines.length > 0} {#if taglines && taglines.length > 0}
<Markdown <Markdown
class="pt-0!" class="pt-0! mx-3"
source={taglines[Math.floor(Math.random() * taglines.length)].content} source={taglines[Math.floor(Math.random() * taglines.length)].content}
/> />
{/if} {/if}
@@ -98,6 +98,16 @@
content={site.counts.posts.toString()} content={site.counts.posts.toString()}
formatted formatted
/> />
<LabelStat
label={$t('content.comments')}
content={site.counts.comments.toString()}
formatted
/>
<LabelStat
label={$t('cards.community.activeDay')}
content={site.counts.users_active_day.toString()}
formatted
/>
<LabelStat <LabelStat
label={$t('content.communities')} label={$t('content.communities')}
content={site.counts.communities.toString()} content={site.counts.communities.toString()}
@@ -185,7 +185,7 @@
<Icon src={Pencil} micro size="14" /> <Icon src={Pencil} micro size="14" />
</div> </div>
{/if} {/if}
{#if node.comment_view.comment.deleted || node.comment_view.comment.removed} {#if node.comment_view.comment.deleted}
<Icon <Icon
src={Trash} src={Trash}
solid solid
@@ -194,6 +194,15 @@
class="text-red-600 dark:text-red-500" class="text-red-600 dark:text-red-500"
/> />
{/if} {/if}
{#if node.comment_view.comment.removed}
<Icon
src={Trash}
solid
size="12"
aria-label={$t('post.badges.removed')}
class="text-green-600 dark:text-green-500"
/>
{/if}
{#if node.comment_view.saved} {#if node.comment_view.saved}
<Icon <Icon
src={Bookmark} src={Bookmark}
@@ -104,8 +104,9 @@
previewButton={previewAction} previewButton={previewAction}
> >
<Menu> <Menu>
{#snippet target()} {#snippet target(attachment)}
<Button <Button
{@attach attachment}
size="custom" size="custom"
rounding="xl" rounding="xl"
class="w-7.5 h-7.5" class="w-7.5 h-7.5"
@@ -1,3 +1,4 @@
import { t } from '$lib/i18n/translations'
import type { Comment, CommentView } from 'lemmy-js-client' import type { Comment, CommentView } from 'lemmy-js-client'
import { SvelteMap } from 'svelte/reactivity' import { SvelteMap } from 'svelte/reactivity'
@@ -35,6 +36,9 @@ export function buildCommentsTree(
for (const comment_view of comments) { for (const comment_view of comments) {
const depthI = getDepthFromComment(comment_view.comment) ?? 0 const depthI = getDepthFromComment(comment_view.comment) ?? 0
const depth = depthI + baseDepth const depth = depthI + baseDepth
if (comment_view.comment.content == '' && comment_view.comment.removed) {
comment_view.comment.content = `*Removed by Moderator — [${t.get('routes.modlog.title')}](/modlog?comment=${comment_view.comment.id})*`
}
const node: CommentNodeI = { const node: CommentNodeI = {
comment_view, comment_view,
children: [], children: [],
@@ -41,6 +41,7 @@
banner?: boolean banner?: boolean
class?: string class?: string
compact?: 'lg' compact?: 'lg'
avatarCircle?: boolean
} }
let { let {
+5 -2
View File
@@ -23,6 +23,7 @@
actions?: import('svelte').Snippet actions?: import('svelte').Snippet
children?: import('svelte').Snippet children?: import('svelte').Snippet
compact?: 'lg' compact?: 'lg'
avatarCircle?: boolean
} }
let { let {
@@ -38,6 +39,7 @@
actions, actions,
children, children,
compact, compact,
avatarCircle = true,
...rest ...rest
}: Props = $props() }: Props = $props()
</script> </script>
@@ -71,10 +73,11 @@
width={96} width={96}
url={avatar} url={avatar}
alt={name} alt={name}
circle={false} circle={avatarCircle}
class={[ class={[
'ring-slate-25 bg-slate-25 dark:bg-zinc-925 ring-6 relative dark:ring-zinc-950 rounded-3xl!', 'ring-slate-25 bg-slate-25 dark:bg-zinc-925 ring-6 relative dark:ring-zinc-950',
banner && '-mt-12 ml-4', banner && '-mt-12 ml-4',
!avatarCircle && 'rounded-3xl!',
]} ]}
/> />
<div class="py-4 flex flex-col xl:flex-row gap-4"> <div class="py-4 flex flex-col xl:flex-row gap-4">
+2 -2
View File
@@ -65,7 +65,7 @@
color="tertiary" color="tertiary"
size="square-lg" size="square-lg"
rounding="pill" rounding="pill"
title={$t('post.actions.more.share')} aria-label={$t('post.actions.more.share')}
> >
{#snippet prefix()} {#snippet prefix()}
<Icon src={Share} size="20" micro /> <Icon src={Share} size="20" micro />
@@ -76,7 +76,7 @@
color="tertiary" color="tertiary"
size="square-lg" size="square-lg"
rounding="pill" rounding="pill"
title={$t('post.image.close')} aria-label={$t('common.back')}
> >
{#snippet prefix()} {#snippet prefix()}
<Icon src={XMark} size="20" micro /> <Icon src={XMark} size="20" micro />
@@ -392,14 +392,9 @@ export function getGroups(
actions: [ actions: [
{ {
href: '/create/post', href: '/create/post',
name: t.get('routes.createPost'), name: t.get('form.post.create'),
icon: PencilSquare, icon: PencilSquare,
}, },
{
href: '/create/community',
name: t.get('routes.createCommunity'),
icon: Newspaper,
},
], ],
}, },
{ {
+43 -63
View File
@@ -22,7 +22,7 @@
"app": "App", "app": "App",
"settings": "Settings", "settings": "Settings",
"colorscheme": { "colorscheme": {
"label": "Color Scheme", "label": "Color scheme",
"system": "System", "system": "System",
"dark": "Dark", "dark": "Dark",
"light": "Light" "light": "Light"
@@ -34,7 +34,7 @@
"instance": "Instance" "instance": "Instance"
}, },
"commands": { "commands": {
"prompt": "Command Palette", "prompt": "Command palette",
"recents": "Recents", "recents": "Recents",
"content": "Content", "content": "Content",
"search": "Search for {{default}}", "search": "Search for {{default}}",
@@ -52,15 +52,15 @@
"notifications": "Notifications" "notifications": "Notifications"
}, },
"account": { "account": {
"login": "Log In", "login": "Log in",
"logout": "Log Out", "logout": "Log out",
"signup": "Sign Up", "signup": "Sign up",
"accounts": "Accounts", "accounts": "Accounts",
"changeinstance": "Change Instance", "changeinstance": "Change instance",
"resetColor": "Reset Color", "resetColor": "Reset color",
"addGuest": "Add Guest", "addGuest": "Add guest",
"moveUp": "Move Up", "moveUp": "Move up",
"moveDown": "Move Down", "moveDown": "Move down",
"guest": "Guest", "guest": "Guest",
"versionGate": "This version of Photon supports instances running {{version}} or higher." "versionGate": "This version of Photon supports instances running {{version}} or higher."
}, },
@@ -121,24 +121,24 @@
"name": "Name", "name": "Name",
"instance": "Instance URL", "instance": "Instance URL",
"password": "Password", "password": "Password",
"confirmPassword": "Confirm Password", "confirmPassword": "Confirm password",
"2fa": "2FA Code", "2fa": "2FA Code",
"forgotpassword": "Forgot Password", "forgotpassword": "Forgot password",
"submit": "Submit", "submit": "Submit",
"edit": "Edit", "edit": "Edit",
"preview": "Preview", "preview": "Preview",
"post": { "post": {
"create": "Create Post", "create": "Create post",
"edit": "Edit Post", "edit": "Edit post",
"community": "Community", "community": "Community",
"title": "Title", "title": "Title",
"url": "URL", "url": "URL",
"body": "Body", "body": "Body",
"nsfw": "NSFW", "nsfw": "NSFW",
"generateTitle": "Generate Title", "generateTitle": "Generate title",
"uploadImage": "Upload Image", "uploadImage": "Upload image",
"selectFile": "Select a file", "selectFile": "Select a file",
"altText": "Alt Text", "altText": "Alt text",
"addUrl": "Add URL", "addUrl": "Add URL",
"setLanguage": "Set language", "setLanguage": "Set language",
"unset": "Unset", "unset": "Unset",
@@ -150,15 +150,15 @@
"avatar": "Avatar", "avatar": "Avatar",
"banner": "Banner", "banner": "Banner",
"email": "Email", "email": "Email",
"matrix": "Matrix User", "matrix": "Matrix user",
"showNSFW": "Show NSFW content", "showNSFW": "Show NSFW content",
"scores": "Show Scores", "scores": "Show scores",
"bot": "Bot Account", "bot": "Bot account",
"showBots": "Show Bots", "showBots": "Show bots",
"showRead": "Show Read Posts", "showRead": "Show read posts",
"currentPassword": "Current Password", "currentPassword": "Current password",
"newPassword": "New Password", "newPassword": "New password",
"verifyNewPassword": "Verify New Password", "verifyNewPassword": "Verify new password",
"2fa": { "2fa": {
"totp": "TOTP", "totp": "TOTP",
"2fa": "2FA", "2fa": "2FA",
@@ -166,7 +166,6 @@
"disabled": "2FA is disabled" "disabled": "2FA is disabled"
}, },
"deleteAccount": { "deleteAccount": {
"label": "Delete account",
"deleteContent": "Delete content", "deleteContent": "Delete content",
"warning": "This will delete ALL of your submissions." "warning": "This will delete ALL of your submissions."
}, },
@@ -253,7 +252,6 @@
"download": "Download" "download": "Download"
}, },
"logins": "Logins", "logins": "Logins",
"welcome": "Welcome, {{default}}!",
"delete": { "delete": {
"title": "Delete account", "title": "Delete account",
"warning": "This is permanent. Are you sure you want to do this?" "warning": "This is permanent. Are you sure you want to do this?"
@@ -284,8 +282,6 @@
"other": "Other results" "other": "Other results"
}, },
"saved": "Saved", "saved": "Saved",
"createPost": "Create Post",
"createCommunity": "Create Community",
"post": { "post": {
"crosspostCount": "Crossposts", "crosspostCount": "Crossposts",
"commentCount": "Comments", "commentCount": "Comments",
@@ -365,15 +361,15 @@
"sidebar": "Sidebar", "sidebar": "Sidebar",
"icon": "Icon", "icon": "Icon",
"banner": "Banner", "banner": "Banner",
"downvotesEnabled": "Enable Downvotes", "downvotesEnabled": "Enable downvotes",
"nsfwEnabled": "Enable NSFW", "nsfwEnabled": "Enable NSFW",
"registration": { "registration": {
"label": "Registration Mode", "label": "Registration mode",
"open": "Open", "open": "Open",
"application": "Require Application", "application": "Require application",
"closed": "Closed" "closed": "Closed"
}, },
"applicationQuestion": "Application Question", "applicationQuestion": "Application question",
"adminCommunityOnly": "Only admins can create communities", "adminCommunityOnly": "Only admins can create communities",
"requireVerifyEmail": "Require email verification", "requireVerifyEmail": "Require email verification",
"emailAdminsOnApplication": "Email admins on receiving new applications", "emailAdminsOnApplication": "Email admins on receiving new applications",
@@ -389,7 +385,7 @@
"federation": "Federation enabled", "federation": "Federation enabled",
"federationDebug": "Federation debug mode", "federationDebug": "Federation debug mode",
"captcha": { "captcha": {
"enabled": "CAPTCHA Enabled" "enabled": "CAPTCHA enabled"
} }
}, },
"applications": { "applications": {
@@ -405,7 +401,7 @@
"deny": "Deny", "deny": "Deny",
"approve": "Approve", "approve": "Approve",
"reason": "Reason", "reason": "Reason",
"modalTitle": "Deny Application" "modalTitle": "Deny application"
}, },
"taglines": { "taglines": {
"title": "Taglines", "title": "Taglines",
@@ -425,10 +421,10 @@
"federation": { "federation": {
"title": "Federation", "title": "Federation",
"csv": "Upload CSV", "csv": "Upload CSV",
"blocked": "Blocked Instances", "blocked": "Blocked instances",
"block": "Block", "block": "Block",
"blockplaceholder": "Block an instance...", "blockplaceholder": "Block an instance...",
"allowed": "Whitelisted Instances", "allowed": "Whitelisted instances",
"allow": "Whitelist", "allow": "Whitelist",
"allowplaceholder": "Whitelist an instance", "allowplaceholder": "Whitelist an instance",
"emptyBlock": { "emptyBlock": {
@@ -449,7 +445,7 @@
"error": "Failed to verify your email." "error": "Failed to verify your email."
}, },
"passwordChange": { "passwordChange": {
"title": "Change Password", "title": "Change password",
"description": "Choose your new password.", "description": "Choose your new password.",
"instance": "Which instance is your account hosted on?" "instance": "Which instance is your account hosted on?"
}, },
@@ -459,25 +455,22 @@
}, },
"theme": { "theme": {
"title": "Theme", "title": "Theme",
"import": "Import",
"export": "Export",
"reset": "Reset",
"accent": "Accent", "accent": "Accent",
"resetWarning": { "resetWarning": {
"title": "Reset Theme", "title": "Reset theme",
"description": "This will reset all of your colors to the default. It is recommended to export your theme before this." "description": "This will reset all of your colors to the default. It is recommended to export your theme before this."
}, },
"preset": { "preset": {
"title": "Can't be modified", "title": "Can't be modified",
"description": "This is a default theme, and can't be modified.", "description": "This is a default theme, and can't be modified.",
"delete": { "delete": {
"title": "Delete Theme", "title": "Delete theme",
"confirm": "Confirm" "confirm": "Confirm"
}, },
"default": "Default", "default": "Default",
"classic": "Classic", "classic": "Classic",
"imported": "Your Theme", "imported": "Your theme",
"new": "New Theme", "new": "New theme",
"presets": "Presets" "presets": "Presets"
} }
}, },
@@ -505,8 +498,6 @@
"block": "Block", "block": "Block",
"unblock": "Unblock", "unblock": "Unblock",
"blockInstance": "Block instance", "blockInstance": "Block instance",
"favorite": "Favorite",
"unfavorite": "Remove Favorite",
"activeDay": "Active Today" "activeDay": "Active Today"
} }
}, },
@@ -515,7 +506,7 @@
"instance": "Instance", "instance": "Instance",
"label": "Administration", "label": "Administration",
"purgeCommunity": { "purgeCommunity": {
"title": "Purging Community", "title": "Purging community",
"warning": "This will delete all posts. Are you sure? (The button will enable in 3 seconds.)" "warning": "This will delete all posts. Are you sure? (The button will enable in 3 seconds.)"
} }
}, },
@@ -535,25 +526,19 @@
"save": "Save", "save": "Save",
"unsave": "Unsave", "unsave": "Unsave",
"more": { "more": {
"label": "More Actions", "label": "More actions",
"edit": "Edit", "edit": "Edit",
"creator": "Creator", "creator": "Creator",
"actions": "Actions", "actions": "Actions",
"markRead": "Mark as Read", "markRead": "Mark as read",
"markUnread": "Mark as Unread", "markUnread": "Mark as unread",
"hide": "Hide", "hide": "Hide",
"unhide": "Unhide", "unhide": "Unhide",
"translate": "Translate",
"mediaBias": "Media Bias",
"share": "Share", "share": "Share",
"crosspost": "Crosspost", "crosspost": "Crosspost",
"delete": "Delete", "delete": "Delete",
"restore": "Restore" "restore": "Restore"
}, },
"link": {
"title": "Alternative Links",
"actions": "Link Actions"
},
"vote": { "vote": {
"upvote": "Upvote", "upvote": "Upvote",
"downvote": "Downvote", "downvote": "Downvote",
@@ -570,8 +555,7 @@
}, },
"image": { "image": {
"zoomIn": "Zoom in", "zoomIn": "Zoom in",
"zoomOut": "Zoom out", "zoomOut": "Zoom out"
"close": "Close"
}, },
"meta": { "meta": {
"lastEdited": "Last edited {{default}}", "lastEdited": "Last edited {{default}}",
@@ -738,10 +722,6 @@
"description": "Customize the UI colors.", "description": "Customize the UI colors.",
"link": "Go to themes" "link": "Go to themes"
}, },
"colorscheme": {
"title": "Color Scheme",
"description": "The color scheme to use."
},
"lang": { "lang": {
"title": "Language", "title": "Language",
"description": "The language used for text in the UI.", "description": "The language used for text in the UI.",
+1 -1
View File
@@ -46,7 +46,7 @@
{#snippet extended()} {#snippet extended()}
<form class="" method="get" action="/"> <form class="" method="get" action="/">
<div class="flex flex-row gap-4"> <div class="flex flex-row gap-2">
{#if data.filters.value.type_} {#if data.filters.value.type_}
<Location <Location
name="type" name="type"
+2 -1
View File
@@ -248,8 +248,9 @@
<span>{$t('routes.admin.federation.allowed')}</span> <span>{$t('routes.admin.federation.allowed')}</span>
{#if allowInstance.instance || !(data.instances.value.allowed?.length == 0)} {#if allowInstance.instance || !(data.instances.value.allowed?.length == 0)}
<Popover openOnHover placement="bottom-end"> <Popover openOnHover placement="bottom-end">
{#snippet target()} {#snippet target(attachment)}
<Icon <Icon
{@attach attachment}
src={ExclamationTriangle} src={ExclamationTriangle}
solid solid
class="text-yellow-500" class="text-yellow-500"
+1
View File
@@ -72,6 +72,7 @@
counts={data.community.value.community_view.counts} counts={data.community.value.community_view.counts}
class="w-full relative" class="w-full relative"
compact="lg" compact="lg"
avatarCircle={false}
/> />
</div> </div>
{#snippet extended()} {#snippet extended()}
@@ -143,8 +143,7 @@
<Button <Button
loading={formData.addingModerator} loading={formData.addingModerator}
disabled={formData.addingModerator} disabled={formData.addingModerator}
size="lg" rounding="xl"
class="w-max shrink-0"
color="primary" color="primary"
submit submit
> >
@@ -10,7 +10,7 @@
import { settings } from '$lib/settings.svelte' import { settings } from '$lib/settings.svelte'
import type { PrivateMessageResponse } from 'lemmy-js-client' import type { PrivateMessageResponse } from 'lemmy-js-client'
import { Button, Material, TextInput, toast } from 'mono-svelte' import { Button, Material, TextInput, toast } from 'mono-svelte'
import { tick } from 'svelte' import { onDestroy, onMount, tick } from 'svelte'
import { import {
ArrowLeft, ArrowLeft,
Icon, Icon,
@@ -84,6 +84,25 @@
), ),
} }
} }
let interval: number = -1
onMount(() => {
interval = setInterval(async () => {
const res = await client().getPrivateMessages({
creator_id: Number(data.creator.value.person_view.person.id),
limit: 50,
page: 1,
})
data.message.value = res
}, 5 * 1000) as unknown as number
return () => clearInterval(interval)
})
onDestroy(() => {
clearInterval(interval)
})
</script> </script>
<Header pageHeader> <Header pageHeader>
@@ -104,12 +123,12 @@
rounding="2xl" rounding="2xl"
padding="none" padding="none"
class="bg-white dark:bg-zinc-950 dark:border-t-zinc-900 class="bg-white dark:bg-zinc-950 dark:border-t-zinc-900
w-full overflow-auto mt-6 relative max-h-128 h-full" w-full overflow-auto relative h-full"
> >
<div class="h-full overflow-auto" bind:this={chatWindow}> <div class="h-full overflow-auto" bind:this={chatWindow}>
<ul id="chat-window" class=" h-full flex flex-col gap-1 flex-1 px-4 py-4"> <ul id="chat-window" class=" h-full flex flex-col gap-1 flex-1 px-4 py-4">
<div class="mt-auto"></div> <div class="mt-auto"></div>
<p class="mx-auto mt-auto text-slate-400 dark:text-zinc-600"> <p class="mx-auto mt-auto text-slate-400 dark:text-zinc-600 text-center">
{$t('routes.inbox.messages.conversation', { {$t('routes.inbox.messages.conversation', {
user: user:
data.creator.value.person_view.person.name + data.creator.value.person_view.person.name +
@@ -51,8 +51,9 @@
{/if} {/if}
</div> </div>
<Menu> <Menu>
{#snippet target()} {#snippet target(attachment)}
<Button <Button
{@attach attachment}
color="tertiary" color="tertiary"
class="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-all shrink-0" class="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-all shrink-0"
size="square-md" size="square-md"
+15 -6
View File
@@ -3,7 +3,7 @@
import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte' import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
import { t } from '$lib/i18n/translations' import { t } from '$lib/i18n/translations'
import { defaultSettings, settings } from '$lib/settings.svelte' import { defaultSettings, settings } from '$lib/settings.svelte'
import { Button, toast, Modal } from 'mono-svelte' import { Button, toast, Modal, modal, action } from 'mono-svelte'
import TextArea from 'mono-svelte/forms/TextArea.svelte' import TextArea from 'mono-svelte/forms/TextArea.svelte'
import { import {
ArrowDownTray, ArrowDownTray,
@@ -78,11 +78,20 @@
</Button> </Button>
<Button <Button
onclick={() => { onclick={() => {
toast({ modal({
content: $t('toast.resetSettings'), title: $t('settings.reset'),
action: () => { body: $t('toast.resetSettings'),
Object.assign(settings, defaultSettings) actions: [
}, action({
action: () => Object.assign(settings, defaultSettings),
close: true,
type: 'danger',
content: $t('settings.reset'),
}),
action({
content: $t('common.cancel'),
}),
],
}) })
}} }}
rounding="pill" rounding="pill"
+4 -4
View File
@@ -105,7 +105,7 @@
disabled={themeData.current.id <= 0} disabled={themeData.current.id <= 0}
> >
<Icon src={ArrowUpTray} size="16" mini /> <Icon src={ArrowUpTray} size="16" mini />
{$t('routes.theme.import')} {$t('settings.import')}
</Button> </Button>
<Button <Button
onclick={() => { onclick={() => {
@@ -115,7 +115,7 @@
size="lg" size="lg"
> >
<Icon src={ArrowDownTray} size="16" mini /> <Icon src={ArrowDownTray} size="16" mini />
{$t('routes.theme.export')} {$t('settings.export')}
</Button> </Button>
<Button <Button
disabled={themeData.current.id <= 0} disabled={themeData.current.id <= 0}
@@ -135,7 +135,7 @@
slate: {}, slate: {},
} }
}, },
content: $t('routes.theme.reset'), content: $t('settings.reset'),
close: true, close: true,
type: 'danger', type: 'danger',
}), }),
@@ -147,7 +147,7 @@
size="lg" size="lg"
> >
<Icon src={ArrowPath} size="16" mini /> <Icon src={ArrowPath} size="16" mini />
{$t('routes.theme.reset')} {$t('settings.reset')}
</Button> </Button>
</div> </div>
{#if themeData.current.id <= 0} {#if themeData.current.id <= 0}
+54 -51
View File
@@ -156,6 +156,7 @@
<Header pageHeader class="tracking-normal!"> <Header pageHeader class="tracking-normal!">
<div class="w-full"> <div class="w-full">
<EntityHeader <EntityHeader
avatarCircle
avatar={data.person_view.value.person.avatar} avatar={data.person_view.value.person.avatar}
name={data.person_view.value.person.display_name || name={data.person_view.value.person.display_name ||
data.person_view.value.person.name} data.person_view.value.person.name}
@@ -216,7 +217,7 @@
<Button <Button
size="sm" size="sm"
rounding="pill" rounding="pill"
color="secondary" color="primary"
href="/inbox/messages/{data.person_view.value.person.id}" href="/inbox/messages/{data.person_view.value.person.id}"
> >
{#snippet prefix()} {#snippet prefix()}
@@ -278,8 +279,8 @@
</Menu> </Menu>
{/if} {/if}
<Menu placement="bottom-end"> <Menu placement="bottom-end">
{#snippet target()} {#snippet target(attachment)}
<Button size="custom" class="h-7 w-7" rounding="pill"> <Button {@attach attachment} size="custom" class="h-8 w-8" rounding="pill">
{#snippet prefix()} {#snippet prefix()}
<Icon src={EllipsisHorizontal} size="16" mini /> <Icon src={EllipsisHorizontal} size="16" mini />
{/snippet} {/snippet}
@@ -305,56 +306,58 @@
{/snippet} {/snippet}
</EntityHeader> </EntityHeader>
</div> </div>
{#snippet extended()}
<div class="flex flex-col gap-4 max-w-full w-full min-w-0">
<form
action={page.url.origin + page.url.pathname}
method="GET"
class="flex flex-row gap-4 flex-wrap"
bind:this={sortForm}
>
<Select
bind:value={data.filters.value.type}
name="type"
onchange={() => sortForm?.requestSubmit()}
>
{#snippet customLabel()}
<span class="flex items-center gap-1">
<Icon src={AdjustmentsHorizontal} size="15" mini />
{$t('filter.type')}
</span>
{/snippet}
<Option value="all">{$t('content.all')}</Option>
<Option value="posts">{$t('content.posts')}</Option>
<Option value="comments">{$t('content.comments')}</Option>
</Select>
<Sort
bind:selected={data.filters.value.sort}
onchange={() => sortForm?.requestSubmit()}
/>
</form>
</div>
{/snippet}
</Header> </Header>
{/if} {/if}
<div class="flex flex-col gap-4 max-w-full w-full min-w-0"> {#if data.items.value.length == 0}
<form <Placeholder
action={page.url.origin + page.url.pathname} icon={PencilSquare}
method="GET" title="No submissions"
class="flex flex-row gap-4 flex-wrap" description="This user has no submissions that match this filter."
bind:this={sortForm}
>
<Select
bind:value={data.filters.value.type}
name="type"
onchange={() => sortForm?.requestSubmit()}
>
{#snippet customLabel()}
<span class="flex items-center gap-1">
<Icon src={AdjustmentsHorizontal} size="15" mini />
{$t('filter.type')}
</span>
{/snippet}
<Option value="all">{$t('content.all')}</Option>
<Option value="posts">{$t('content.posts')}</Option>
<Option value="comments">{$t('content.comments')}</Option>
</Select>
<Sort
bind:selected={data.filters.value.sort}
onchange={() => sortForm?.requestSubmit()}
/>
</form>
{#if data.items.value.length == 0}
<Placeholder
icon={PencilSquare}
title="No submissions"
description="This user has no submissions that match this filter."
/>
{:else}
<CommonList items={data.items.value}>
{#snippet item(item)}
{#if isCommentView(item)}
<CommentItem comment={item} />
{:else if !isCommentView(item)}
<PostItem post={item} />
{/if}
{/snippet}
</CommonList>
{/if}
<Pageination
bind:page={data.filters.value.page}
href={page => `?page=${page}`}
/> />
</div> {:else}
<CommonList items={data.items.value}>
{#snippet item(item)}
{#if isCommentView(item)}
<CommentItem comment={item} />
{:else if !isCommentView(item)}
<PostItem post={item} />
{/if}
{/snippet}
</CommonList>
{/if}
<Pageination
bind:page={data.filters.value.page}
href={page => `?page=${page}`}
/>
</div> </div>