fix: design shown problems in post polls/form

This commit is contained in:
Xylight committed 2025-11-16 15:56:44 -08:00
1 parent 26540cec82
commit 4605cddc60
5 files changed
+11 -12

No files matched your search

+2 -1
View File
@@ -594,7 +594,8 @@
"results": {
"show": "Show results",
"hide": "Hide results",
"ends": "Ends {{time}}"
"ends": "Ends {{time}}",
"ended": "Ended {{time}}"
},
"choices": "Choices",
"single": "Single choice",
+2 -6
View File
@@ -429,12 +429,8 @@
}
:global(.badge-tag-color) {
background-color: color-mix(
in oklab,
#eee,
var(--tag-color, #fff)
) !important;
color: color-mix(in oklab, #000, var(--tag-text-color, #000)) !important;
background-color: var(--tag-color, #fff) !important;
color: var(--tag-text-color, #000) !important;
@variant dark {
background-color: color-mix(
+1 -1
View File
@@ -73,7 +73,7 @@
let uploadImage = $state(false)
</script>
{#if client() instanceof PiefedClient}
{#if client() instanceof PiefedClient && !editPost}
<div class="mb-3">
<MultiSelect
options={['normal', 'poll']}
+5 -3
View File
@@ -2,6 +2,7 @@
import { client } from '$lib/api/client.svelte'
import { PiefedClient } from '$lib/api/piefed/adapter'
import type { Post, PostPoll } from '$lib/api/types'
import { profile } from '$lib/app/auth.svelte'
import { errorMessage } from '$lib/app/error'
import { t } from '$lib/app/i18n'
import { CommonList } from '$lib/ui/layout'
@@ -20,13 +21,14 @@
let selected = $state<number | number[]>()
let chosen = $state<number>()
let canVote = $state<boolean>(
!(
post.poll.end_poll &&
publishedToDate(post.poll.end_poll).getTime() < Date.now()
(post.poll.end_poll &&
publishedToDate(post.poll.end_poll).getTime() < Date.now()) ||
!profile.current.jwt
),
)
let chosen = $state<number | undefined>(canVote ? undefined : -1)
let options = $derived(
post.poll.choices.map((i) => ({
+1 -1
View File
@@ -24,7 +24,7 @@
<div
class={[
toastColors[toast.type],
'relative rounded-2xl overflow-hidden flex flex-row items-center gap-1 px-2 py-2 backdrop-blur-xl',
'relative rounded-2xl overflow-hidden flex flex-row items-center gap-1 px-2 py-2 backdrop-blur-3xl',
'bg-white dark:bg-zinc-925 shadow-lg',
toast.long ? 'w-full max-w-lg' : 'w-80',
]}