fix: broken 'all comments' links
This commit is contained in:
6 files changed
+10
-9
No files matched your search
@@ -21,7 +21,7 @@
|
|||||||
<svelte:element
|
<svelte:element
|
||||||
this={href ? 'a' : 'button'}
|
this={href ? 'a' : 'button'}
|
||||||
class={[
|
class={[
|
||||||
'px-2.5 py-1 rounded-xl text-sm font-medium transition-colors duration-75 relative cursor-pointer border',
|
'px-2.5 py-1 rounded-xl text-sm font-medium transition-colors duration-75 relative cursor-pointer border shadow-xs',
|
||||||
selected
|
selected
|
||||||
? 'border-transparent bg-primary-900 dark:bg-primary-100 text-slate-50 dark:text-zinc-900 hover:brightness-90 active:brightness-75'
|
? 'border-transparent bg-primary-900 dark:bg-primary-100 text-slate-50 dark:text-zinc-900 hover:brightness-90 active:brightness-75'
|
||||||
: ' dark:bg-zinc-900/50 bg-white border-slate-200 dark:border-zinc-800 hover:bg-slate-100 hover:dark:bg-zinc-800 active:bg-slate-200 active:dark:bg-zinc-900',
|
: ' dark:bg-zinc-900/50 bg-white border-slate-200 dark:border-zinc-800 hover:bg-slate-100 hover:dark:bg-zinc-800 active:bg-slate-200 active:dark:bg-zinc-900',
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<nav
|
<nav
|
||||||
class={[
|
class={[
|
||||||
'flex flex-row items-center justify-center sm:justify-start my-2 sm:mt-0 flex-wrap z-20',
|
'flex flex-row items-center justify-center sm:justify-start my-2 sm:mt-0 flex-wrap z-20',
|
||||||
style == 'header' ? 'p-1 gap-x-8 gap-y-4' : 'gap-3',
|
style == 'header' ? 'p-1 gap-x-8 gap-y-4' : 'gap-2',
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{#each routes as route (route.href)}
|
{#each routes as route (route.href)}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
{#if customIcon}
|
{#if customIcon}
|
||||||
{@render customIcon({ selected })}
|
{@render customIcon({ selected })}
|
||||||
{:else if icon}
|
{:else if icon}
|
||||||
<Icon src={icon} mini size="18" />
|
<Icon src={icon} solid size="18" />
|
||||||
{/if}
|
{/if}
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{label}
|
{label}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
placeholder = undefined,
|
placeholder = undefined,
|
||||||
label = undefined,
|
label = undefined,
|
||||||
size = 'md',
|
size = 'md',
|
||||||
shadow = 'sm',
|
shadow = 'none',
|
||||||
id = generateID(),
|
id = generateID(),
|
||||||
class: clazz = '',
|
class: clazz = '',
|
||||||
baseClass = '',
|
baseClass = '',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { page } from '$app/state'
|
import { page } from '$app/state'
|
||||||
import { profile } from '$lib/auth.svelte.js'
|
import { profile } from '$lib/auth.svelte.js'
|
||||||
import PostActions from '$lib/components/lemmy/post/actions/PostActions.svelte'
|
import PostActions from '$lib/components/lemmy/post/actions/PostActions.svelte'
|
||||||
import { mediaType } from '$lib/components/lemmy/post/helpers.js'
|
import { mediaType, postLink } from '$lib/components/lemmy/post/helpers.js'
|
||||||
import PostMedia from '$lib/components/lemmy/post/media/PostMedia.svelte'
|
import PostMedia from '$lib/components/lemmy/post/media/PostMedia.svelte'
|
||||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||||
import PostMeta, {
|
import PostMeta, {
|
||||||
@@ -227,11 +227,12 @@
|
|||||||
href={data.thread.value.showContext
|
href={data.thread.value.showContext
|
||||||
? `/comment/${
|
? `/comment/${
|
||||||
// split first comment path to get 5 before
|
// split first comment path to get 5 before
|
||||||
comments.comments[0].comment.path.split('.').slice(-5)[0]
|
comments.comments[0].comment.path.split('.').slice(-5)[1]
|
||||||
}`
|
}`
|
||||||
: undefined}
|
: data.thread.value.singleThread
|
||||||
|
? postLink(data.post.value.post_view.post)
|
||||||
|
: undefined}
|
||||||
class="hover:bg-white/50 dark:hover:bg-zinc-800/30"
|
class="hover:bg-white/50 dark:hover:bg-zinc-800/30"
|
||||||
onclick={data.thread.value.singleThread ? reloadComments : undefined}
|
|
||||||
>
|
>
|
||||||
{data.thread.value.showContext
|
{data.thread.value.showContext
|
||||||
? $t('routes.post.thread.context')
|
? $t('routes.post.thread.context')
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<div class="mt-4 mb-0 sticky z-30 top-6 lg:top-22">
|
<div class="mt-4 mb-0 sticky z-30 top-6 lg:top-22">
|
||||||
<div
|
<div
|
||||||
class="flex gap-2 flex-row items-center w-full text-base h-10 drop-shadow-md"
|
class="flex gap-2 flex-row items-center w-full text-base h-10 drop-shadow-xl"
|
||||||
>
|
>
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={query}
|
bind:value={query}
|
||||||
|
|||||||
Reference in new issue
Block a user