misc: fix community textbox
This commit is contained in:
1 parent
919b2c1c99
commit
25c440516a
3 files changed
+15
-7
No files matched your search
@@ -45,6 +45,7 @@
|
||||
}
|
||||
|
||||
let saveDraft = edit ? false : true
|
||||
let communitySearch = passedCommunity?.name ?? ''
|
||||
|
||||
let communities: Community[] = []
|
||||
|
||||
@@ -143,8 +144,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
let communitySearch = ''
|
||||
|
||||
let uploadingImage = false
|
||||
</script>
|
||||
|
||||
@@ -177,7 +176,7 @@
|
||||
src={Check}
|
||||
mini
|
||||
size="20"
|
||||
class="text-green-400 ml-auto inline"
|
||||
class="text-green-600 ml-auto inline"
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores'
|
||||
import { navigating, page } from '$app/stores'
|
||||
import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte'
|
||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||
import Sort from '$lib/components/lemmy/Sort.svelte'
|
||||
import { fullCommunityName, searchParam } from '$lib/util.js'
|
||||
import { onMount } from 'svelte'
|
||||
import { onDestroy, onMount } from 'svelte'
|
||||
import { setSessionStorage } from '$lib/session.js'
|
||||
import PostFeed from '$lib/components/lemmy/post/PostFeed.svelte'
|
||||
import { Button, Modal } from 'mono-svelte'
|
||||
import { afterNavigate } from '$app/navigation'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -23,6 +24,12 @@
|
||||
),
|
||||
})
|
||||
})
|
||||
|
||||
onDestroy(() => {
|
||||
if ($navigating?.to?.route?.id == '/create/post') return
|
||||
|
||||
setSessionStorage('lastSeenCommunity', undefined)
|
||||
})
|
||||
</script>
|
||||
|
||||
<Modal bind:open={sidebar}>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { goto } from '$app/navigation'
|
||||
import PostForm from '$lib/components/lemmy/post/PostForm.svelte'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { onMount } from 'svelte'
|
||||
import { onDestroy, onMount } from 'svelte'
|
||||
import { getSessionStorage, setSessionStorage } from '$lib/session.js'
|
||||
|
||||
export let data
|
||||
@@ -17,7 +17,9 @@
|
||||
| { id: number; name: string }
|
||||
| undefined
|
||||
|
||||
setSessionStorage('lastSeenCommunity', undefined)
|
||||
onDestroy(() => {
|
||||
setSessionStorage('lastSeenCommunity', undefined)
|
||||
})
|
||||
|
||||
let draft = getSessionStorage('postDraft') as any
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user