migrate: change settings from a store to a state
This commit is contained in:
1 parent
ffcd9faa96
commit
d597349887
128 files changed
+1010
-1144
No files matched your search
@@ -1,13 +1,13 @@
|
||||
<script lang="ts">
|
||||
import type { Profile } from '$lib/auth.js'
|
||||
import type { Profile } from '$lib/auth.svelte.js'
|
||||
import { Icon, UserCircle } from 'svelte-hero-icons'
|
||||
|
||||
interface Props {
|
||||
profile?: Profile | undefined;
|
||||
selected?: boolean;
|
||||
index?: number;
|
||||
size?: number;
|
||||
guest?: boolean;
|
||||
profile?: Profile | undefined
|
||||
selected?: boolean
|
||||
index?: number
|
||||
size?: number
|
||||
guest?: boolean
|
||||
}
|
||||
|
||||
let {
|
||||
@@ -15,8 +15,8 @@
|
||||
selected = false,
|
||||
index = 0,
|
||||
size = 20,
|
||||
guest = false
|
||||
}: Props = $props();
|
||||
guest = false,
|
||||
}: Props = $props()
|
||||
</script>
|
||||
|
||||
{#if profile}
|
||||
@@ -40,8 +40,8 @@
|
||||
style={guest
|
||||
? `color: gray`
|
||||
: profile.color
|
||||
? `color: ${profile.color}`
|
||||
: `filter: hue-rotate(${index * 50}deg)`}
|
||||
? `color: ${profile.color}`
|
||||
: `filter: hue-rotate(${index * 50}deg)`}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { fullCommunityName } from '$lib/util'
|
||||
import { fullCommunityName } from '$lib/util.svelte'
|
||||
import type { Community, Person } from 'lemmy-js-client'
|
||||
|
||||
export const communityLink = (community: Community, prefix: string = '') =>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { profile, profileData } from '$lib/auth'
|
||||
import { profile, profileData } from '$lib/auth.svelte'
|
||||
import type {
|
||||
CommentReportView,
|
||||
CommentView,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { profile, profileData, type Profile } from '$lib/auth.js'
|
||||
import { profile, profileData, type Profile } from '$lib/auth.svelte'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { trycatch } from '$lib/util.js'
|
||||
import { trycatch } from '$lib/util.svelte'
|
||||
import type { Community, MyUserInfo, PersonView } from 'lemmy-js-client'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
|
||||
Reference in new issue
Block a user