fix: messed up redirects for http urls
This commit is contained in:
7 files changed
+31
-27
No files matched your search
@@ -7,7 +7,7 @@ export function load({ params }) {
|
||||
redirect(
|
||||
302,
|
||||
resolveRoute('/comment/[instance]/[id]', {
|
||||
instance: instance.data.toLowerCase(),
|
||||
instance: encodeURIComponent(instance.data.toLowerCase()),
|
||||
id: params.instance,
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -23,7 +23,7 @@ export async function load({ params, fetch }) {
|
||||
resolveRoute(
|
||||
`/post/[instance]/[id]?thread=${threadPath}#${comment.comment_view.comment.id}`,
|
||||
{
|
||||
instance: params.instance,
|
||||
instance: encodeURIComponent(params.instance),
|
||||
id: comment.comment_view.post.id.toString(),
|
||||
},
|
||||
),
|
||||
|
||||
@@ -138,24 +138,29 @@
|
||||
{/if}
|
||||
{#if data.items?.value && data.items?.value.length > 0}
|
||||
<CommonList items={data.items?.value} size="lg">
|
||||
{#snippet item(item)}
|
||||
<Material
|
||||
rounding={item.length == 1 ? 'none' : '2xl'}
|
||||
color={item.length == 1 ? 'none' : 'uniform'}
|
||||
padding={item.length == 1 ? 'none' : 'md'}
|
||||
class={['space-y-2 w-full']}
|
||||
{#each data.items.value ?? [] as item}
|
||||
<svelte:element
|
||||
this={item.length == 1 ? 'li' : 'div'}
|
||||
class="z-0 relative"
|
||||
>
|
||||
<Report {item} />
|
||||
</Material>
|
||||
{#if item.length > 1}
|
||||
<Material
|
||||
padding="none"
|
||||
rounding="none"
|
||||
color="uniform"
|
||||
class="-mt-3 rounded-b-2xl w-[95%] h-4 bg-slate-50! dark:bg-zinc-950!"
|
||||
></Material>
|
||||
{/if}
|
||||
{/snippet}
|
||||
rounding={item.length == 1 ? 'none' : '2xl'}
|
||||
color={item.length == 1 ? 'none' : 'distinct'}
|
||||
padding={item.length == 1 ? 'none' : 'md'}
|
||||
class={['space-y-2 w-full z-10 relative']}
|
||||
>
|
||||
<Report {item} />
|
||||
</Material>
|
||||
{#if item.length > 1}
|
||||
<Material
|
||||
padding="none"
|
||||
rounding="none"
|
||||
color="uniform"
|
||||
class="-mt-1 rounded-b-2xl w-[97%] h-6 opacity-70 left-1/2 -translate-x-1/2 -z-10 relative"
|
||||
></Material>
|
||||
{/if}
|
||||
</svelte:element>
|
||||
{/each}
|
||||
</CommonList>
|
||||
<Fixate placement="bottom">
|
||||
<Pageination
|
||||
|
||||
Reference in new issue
Block a user