migrate: run bunx migrate
This commit is contained in:
115 files changed
+329
-326
No files matched your search
@@ -2,9 +2,9 @@
|
||||
import { settings } from '$lib/settings.svelte.js'
|
||||
export const voteColor = (vote: number, border: boolean = false) =>
|
||||
vote == 1
|
||||
? `bg-gradient-to-br from-blue-500 to-indigo-500 dark:from-blue-400 dark:to-indigo-500 text-slate-50 dark:text-zinc-900`
|
||||
? `bg-linear-to-br from-blue-500 to-indigo-500 dark:from-blue-400 dark:to-indigo-500 text-slate-50 dark:text-zinc-900`
|
||||
: vote == -1
|
||||
? `bg-gradient-to-br from-red-500 to-pink-500 dark:from-red-400 dark:to-pink-600 text-slate-50 `
|
||||
? `bg-linear-to-br from-red-500 to-pink-500 dark:from-red-400 dark:to-pink-600 text-slate-50 `
|
||||
: ''
|
||||
|
||||
export const shouldShowVoteColor = (
|
||||
@@ -73,10 +73,10 @@
|
||||
{#if children}{@render children({ vote, score })}{:else}
|
||||
<div
|
||||
class="{buttonColor.ghost} rounded-full h-full font-medium flex items-center *:p-2
|
||||
hover:bg-white hover:dark:bg-zinc-900 overflow-hidden transition-colors flex-shrink-0
|
||||
hover:bg-white dark:hover:bg-zinc-900 overflow-hidden transition-colors shrink-0
|
||||
{vote != 0
|
||||
? ''
|
||||
: '!text-inherit'} !text-inherit divide-x divide-slate-200 dark:divide-zinc-800
|
||||
: 'text-inherit!'} text-inherit! divide-x divide-slate-200 dark:divide-zinc-800
|
||||
{loading ? 'animate-pulse opacity-75 pointer-events-none' : ''}"
|
||||
role="group"
|
||||
aria-label={$t('aria.vote.group')}
|
||||
@@ -86,7 +86,7 @@
|
||||
class="flex items-center gap-0.5 transition-colors relative z-0
|
||||
{vote == 1
|
||||
? shouldShowVoteColor(vote, 'upvotes')
|
||||
: 'hover:bg-slate-100 hover:dark:bg-zinc-800'}"
|
||||
: 'hover:bg-slate-100 dark:hover:bg-zinc-800'}"
|
||||
aria-pressed={vote == 1}
|
||||
aria-label={$t('post.actions.vote.upvote')}
|
||||
>
|
||||
@@ -112,7 +112,7 @@
|
||||
class="flex items-center flex-row-reverse gap-0.5 transition-colors
|
||||
{vote == -1
|
||||
? shouldShowVoteColor(vote, 'downvotes')
|
||||
: 'hover:bg-slate-100 hover:dark:bg-zinc-800'}"
|
||||
: 'hover:bg-slate-100 dark:hover:bg-zinc-800'}"
|
||||
aria-pressed={vote == -1}
|
||||
aria-label={$t('post.actions.vote.downvote')}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user