misc: Tweak CORS

This commit is contained in:
Xyphyn committed 2023-07-09 12:29:41 -07:00
1 parent 740664d918
commit 981d1581a4
8 files changed
+39 -29

No files matched your search

@@ -74,14 +74,14 @@
<div class="max-w-full break-words text-sm leading-6">
<Markdown source={node.comment_view.comment.content} />
</div>
<div class="flex flex-row gap-2 items-center mt-1">
<div class="flex flex-row gap-2 items-center mt-1 h-[26px]">
<CommentVote
bind:score={node.comment_view.counts.score}
bind:vote={node.comment_view.my_vote}
commentId={node.comment_view.comment.id}
/>
<button
class="{Color.borderDark} px-2 py-1 flex flex-row items-center gap-1
class="{Color.borderDark} h-full px-2 flex flex-row items-center gap-1
rounded-md transition-colors"
on:click={() => (replying = !replying)}
>
@@ -57,12 +57,12 @@
</script>
<div
class="flex flex-row items-center rounded-md px-2 py-0.5 transition-colors
cursor-pointer {Color.borderDark}"
class="flex flex-row items-center rounded-md transition-colors
cursor-pointer h-full {Color.borderDark}"
>
<button
on:click={upvote}
class="pr-1.5 {vote == 1 ? 'text-orange-500' : ''}"
class="px-1.5 {vote == 1 ? 'text-orange-500' : ''}"
aria-label="Upvote"
>
<Icon src={ChevronUp} width={19} mini />
@@ -72,7 +72,7 @@
</span>
<button
on:click={downvote}
class="pl-1.5 {vote == -1 ? 'text-blue-500' : ''}"
class="px-1.5 {vote == -1 ? 'text-blue-500' : ''}"
aria-label="Downvote"
>
<Icon src={ChevronDown} width={19} mini />
@@ -67,17 +67,14 @@
<svelte:self {post} nodes={node.children} isParent={false} />
{/if}
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
<div class="m-1 w-full max-w-[9rem]">
<Button
loading={loadingChildren}
disabled={loadingChildren}
on:click={() => fetchChildren(node)}
large
>
<Icon src={ChevronDown} width={16} mini />
Load {node.comment_view.counts.child_count} more
</Button>
</div>
<Button
loading={loadingChildren}
disabled={loadingChildren}
on:click={() => fetchChildren(node)}
>
<Icon src={ChevronDown} width={16} mini />
Load {node.comment_view.counts.child_count} more
</Button>
{/if}
</Comment>
{/each}
+1 -3
View File
@@ -6,9 +6,7 @@
</script>
<img
src="{url ??
`https://api.dicebear.com/6.x/initials/svg?seed=${alt}`}?format=webp&thumbnail={width *
2}"
src="{url ?? `/img/logo-background.svg`}?format=webp&thumbnail={width * 2}"
{alt}
{width}
loading="lazy"
+1 -6
View File
@@ -17,12 +17,7 @@
href={linkFromCommunity(user)}
>
{#if avatar}
<Avatar
url={user.avatar ??
`https://api.dicebear.com/6.x/initials/svg?seed=${user.name}`}
alt={user.name}
width={avatarSize}
/>
<Avatar url={user.avatar} alt={user.name} width={avatarSize} />
{/if}
{user.name}
</a>
+1 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts">
export let date: Date
export let relativeTo: Date | undefined
export let relativeTo: Date | undefined = undefined
function formatRelativeDate(date: Date) {
const now = relativeTo?.getTime() ?? Date.now()