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