Coves frontend - a photon fork

fix: messed up redirects for http urls

Xylight fdcef736 a42644a0

+31 -27
+2 -2
src/lib/app/i18n/en.json
··· 599 599 "title": "Removing Submission", 600 600 "titleRestore": "Restoring Submission", 601 601 "titlePurge": "Purging Submission", 602 - "withReason": "Notify user", 602 + "withReason": "Notify author", 603 603 "comment": "Comment", 604 604 "message": "Message", 605 605 "failReply": "Failed to post reply. Removing anyway...", 606 606 "failMessage": "Failed to message user. Removing anyway...", 607 - "failEmptyReply": "Your reply cannot be empty if 'Notify user' is enabled.", 607 + "failEmptyReply": "Your reply cannot be empty if 'Notify author' is enabled.", 608 608 "successPurge": "Successfully purged that submission." 609 609 }, 610 610 "reportModal": {
+4 -5
src/lib/feature/comment/CommentVote.svelte
··· 6 6 import { t } from '$lib/app/i18n' 7 7 import { settings } from '$lib/app/settings.svelte' 8 8 import FormattedNumber from '$lib/ui/util/FormattedNumber.svelte' 9 - import { buttonColor, toast } from 'mono-svelte' 9 + import { toast } from 'mono-svelte' 10 10 import { ChevronDown, ChevronUp, Icon } from 'svelte-hero-icons/dist' 11 11 import { backOut } from 'svelte/easing' 12 12 import { fly } from 'svelte/transition' ··· 74 74 <button 75 75 onclick={() => castVote(vote == targetNum ? 0 : targetNum)} 76 76 class={[ 77 - 'flex items-center gap-0.5 transition-colors relative cursor-pointer h-full p-1.5', 77 + 'flex items-center gap-0.5 transition-colors relative cursor-pointer px-1.5 py-1', 78 78 'first:rounded-l-3xl last:rounded-r-3xl', 79 79 'last:flex-row-reverse', 80 80 vote == targetNum ··· 112 112 113 113 <div 114 114 class={[ 115 - 'h-full relative flex items-center overflow-hidden rounded-full hover:bg-transparent font-medium hover:dark:bg-transparent', 116 - buttonColor.ghost, 115 + 'h-full relative flex items-center overflow-hidden rounded-full font-medium', 117 116 voteRatio < 85 && settings.voteRatioBar && 'vote-ratio', 117 + 'divide-x divide-slate-200 dark:divide-zinc-800 border border-slate-200 dark:border-zinc-800', 118 118 ]} 119 119 style="--vote-ratio: {voteRatio}%;" 120 120 > 121 121 {@render voteButton(upvotes, 'upvote', vote)} 122 - <div class="h-full p-0! border-l border-slate-200 dark:border-zinc-800"></div> 123 122 {#if site.data?.site_view.local_site.enable_downvotes ?? true} 124 123 {@render voteButton(downvotes, 'downvote', vote)} 125 124 {/if}
+1 -1
src/lib/ui/layout/CommonList.svelte
··· 22 22 items, 23 23 item: itemSnippet, 24 24 children, 25 - animate = false, 25 + animate = true, 26 26 size = 'sm', 27 27 class: clazz, 28 28 selected,
+1 -1
src/lib/ui/shared/materials/Material.svelte
··· 37 37 default: 38 38 'bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 border-b-slate-300 dark:border-t-zinc-700', 39 39 distinct: 40 - 'bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800 border-b-slate-300 dark:border-t-zinc-700', 40 + 'bg-white dark:bg-zinc-925 border border-slate-200 dark:border-zinc-900 border-b-slate-300 dark:border-t-zinc-800', 41 41 transparent: 42 42 'border border-slate-200 dark:border-zinc-900 border-b-slate-300 dark:border-t-zinc-800', 43 43 uniform:
+1 -1
src/routes/comment/[instance]/+page.ts
··· 7 7 redirect( 8 8 302, 9 9 resolveRoute('/comment/[instance]/[id]', { 10 - instance: instance.data.toLowerCase(), 10 + instance: encodeURIComponent(instance.data.toLowerCase()), 11 11 id: params.instance, 12 12 }), 13 13 )
+1 -1
src/routes/comment/[instance]/[id]/+page.ts
··· 23 23 resolveRoute( 24 24 `/post/[instance]/[id]?thread=${threadPath}#${comment.comment_view.comment.id}`, 25 25 { 26 - instance: params.instance, 26 + instance: encodeURIComponent(params.instance), 27 27 id: comment.comment_view.post.id.toString(), 28 28 }, 29 29 ),
+21 -16
src/routes/moderation/+page.svelte
··· 138 138 {/if} 139 139 {#if data.items?.value && data.items?.value.length > 0} 140 140 <CommonList items={data.items?.value} size="lg"> 141 - {#snippet item(item)} 142 - <Material 143 - rounding={item.length == 1 ? 'none' : '2xl'} 144 - color={item.length == 1 ? 'none' : 'uniform'} 145 - padding={item.length == 1 ? 'none' : 'md'} 146 - class={['space-y-2 w-full']} 141 + {#each data.items.value ?? [] as item} 142 + <svelte:element 143 + this={item.length == 1 ? 'li' : 'div'} 144 + class="z-0 relative" 147 145 > 148 - <Report {item} /> 149 - </Material> 150 - {#if item.length > 1} 151 146 <Material 152 - padding="none" 153 - rounding="none" 154 - color="uniform" 155 - class="-mt-3 rounded-b-2xl w-[95%] h-4 bg-slate-50! dark:bg-zinc-950!" 156 - ></Material> 157 - {/if} 158 - {/snippet} 147 + rounding={item.length == 1 ? 'none' : '2xl'} 148 + color={item.length == 1 ? 'none' : 'distinct'} 149 + padding={item.length == 1 ? 'none' : 'md'} 150 + class={['space-y-2 w-full z-10 relative']} 151 + > 152 + <Report {item} /> 153 + </Material> 154 + {#if item.length > 1} 155 + <Material 156 + padding="none" 157 + rounding="none" 158 + color="uniform" 159 + class="-mt-1 rounded-b-2xl w-[97%] h-6 opacity-70 left-1/2 -translate-x-1/2 -z-10 relative" 160 + ></Material> 161 + {/if} 162 + </svelte:element> 163 + {/each} 159 164 </CommonList> 160 165 <Fixate placement="bottom"> 161 166 <Pageination