Merge branch 'main' into infinite-scroll

This commit is contained in:
Xylight committed 2024-07-05 18:16:22 -07:00
commit c8efc4c44b
6 files changed
+21 -16

No files matched your search

@@ -80,7 +80,7 @@
}}
class="absolute bottom-0 left-0 text-sm m-2 text-left"
size="sm"
rounding="pill"
rounding="lg"
alignment="left"
>
{#if showAltText}
@@ -102,7 +102,7 @@
{:else if type == 'embed' && post.url}
<PostLink
url={post.url}
thumbnail_url={post.thumbnail_url}
thumbnail_url={view != 'list' ? post.thumbnail_url : undefined}
nsfw={post.nsfw}
embed_description={post.embed_description}
embed_title={post.embed_title}
@@ -17,13 +17,16 @@
export let type: MediaType = 'none'
</script>
{#if view == 'compact' || (view == 'list' && (!post.embed_title || type == 'iframe') && type != 'none')}
{#if view == 'compact' || (view == 'list' && type != 'none')}
<div
class="w-24 sm:w-32 h-24 relative group/media {$$props.class ?? ''}"
style={$$props.style ?? ''}
>
{#if post.alt_text}
<Popover openOnHover placement="bottom-end">
<Popover
openOnHover
placement={$userSettings.leftAlign ? 'bottom-start' : 'bottom-end'}
>
<Material
slot="target"
padding="none"
@@ -24,9 +24,7 @@
on:click={async () => {
switching = true
if ($profile?.id == prof.id) {
await setUserID(-1)
} else {
if ($profile?.id != prof.id) {
await setUserID(prof.id)
}
+10 -6
View File
@@ -23,6 +23,7 @@
import {
ArrowLeftOnRectangle,
ArrowRightOnRectangle,
ArrowsRightLeft,
ArrowUturnLeft,
BugAnt,
Check,
@@ -184,21 +185,24 @@
? 'Switch'
: 'Current'}
on:click={async () => {
if (profile.id == $currentProfile?.id) setUserID(-1)
else {
if (profile.id != $currentProfile?.id) {
switching = profile.id
await setUserID(profile.id)
switching = -69
}
}}
size="square-md"
color={profile.id == $currentProfile?.id ? 'primary' : 'secondary'}
color={profile.id == $currentProfile?.id ? 'primary' : 'ghost'}
loading={switching == profile.id}
disabled={switching == profile.id}
>
{#if profile.id == $currentProfile?.id}
<Icon src={Check} mini size="16" />
{/if}
<svelte:fragment slot="prefix">
{#if profile.id == $currentProfile?.id}
<Icon src={Check} mini size="16" />
{:else}
<Icon src={ArrowsRightLeft} size="16" mini />
{/if}
</svelte:fragment>
</Button>
<Menu placement="bottom-end">
<Button size="square-md" slot="target">
+2 -2
View File
@@ -107,8 +107,8 @@
size="square-md"
slot="target"
disabled={$userSettings.dock.pins
.map((p) => p.url)
.includes(pin.url)}
?.map((p) => p.url)
?.includes(pin.url)}
on:click={() => {
$userSettings.dock.pins = [
...($userSettings.dock.pins ?? []),