Fix doubled side rail and some space navigation
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {debounce} from "throttle-debounce"
|
import {debounce} from "throttle-debounce"
|
||||||
import {dissoc, maybe} from "@welshman/lib"
|
import {dissoc, maybe} from "@welshman/lib"
|
||||||
import {goto} from "$app/navigation"
|
|
||||||
import {preventDefault} from "@lib/html"
|
import {preventDefault} from "@lib/html"
|
||||||
import {slideAndFade} from "@lib/transition"
|
import {slideAndFade} from "@lib/transition"
|
||||||
import Spinner from "@lib/components/Spinner.svelte"
|
import Spinner from "@lib/components/Spinner.svelte"
|
||||||
@@ -22,7 +21,7 @@
|
|||||||
import RelaySummary from "@app/components/RelaySummary.svelte"
|
import RelaySummary from "@app/components/RelaySummary.svelte"
|
||||||
import SpaceJoinSettings from "@app/components/SpaceJoinSettings.svelte"
|
import SpaceJoinSettings from "@app/components/SpaceJoinSettings.svelte"
|
||||||
import {pushToast} from "@app/toast"
|
import {pushToast} from "@app/toast"
|
||||||
import {makeSpacePath} from "@app/routes"
|
import {goToSpace} from "@app/routes"
|
||||||
import {relaysMostlyRestricted} from "@app/policies"
|
import {relaysMostlyRestricted} from "@app/policies"
|
||||||
import {notificationSettings, setSpaceNotifications} from "@app/settings"
|
import {notificationSettings, setSpaceNotifications} from "@app/settings"
|
||||||
import {parseInviteLink} from "@app/invites"
|
import {parseInviteLink} from "@app/invites"
|
||||||
@@ -68,7 +67,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
await addSpace(url)
|
await addSpace(url)
|
||||||
await goto(makeSpacePath(url), {replaceState: true})
|
await goToSpace(url)
|
||||||
|
|
||||||
broadcastUserData([url])
|
broadcastUserData([url])
|
||||||
relaysMostlyRestricted.update(dissoc(url))
|
relaysMostlyRestricted.update(dissoc(url))
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {onMount} from "svelte"
|
import {onMount} from "svelte"
|
||||||
import {goto} from "$app/navigation"
|
|
||||||
import {dissoc, maybe} from "@welshman/lib"
|
import {dissoc, maybe} from "@welshman/lib"
|
||||||
import {preventDefault} from "@lib/html"
|
import {preventDefault} from "@lib/html"
|
||||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||||
@@ -22,7 +21,7 @@
|
|||||||
import {notificationSettings} from "@app/settings"
|
import {notificationSettings} from "@app/settings"
|
||||||
import {pushModal} from "@app/modal"
|
import {pushModal} from "@app/modal"
|
||||||
import {pushToast} from "@app/toast"
|
import {pushToast} from "@app/toast"
|
||||||
import {makeSpacePath} from "@app/routes"
|
import {goToSpace} from "@app/routes"
|
||||||
import {Push} from "@app/push"
|
import {Push} from "@app/push"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -56,7 +55,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
await addSpace(url)
|
await addSpace(url)
|
||||||
await goto(makeSpacePath(url), {replaceState: true})
|
await goToSpace(url)
|
||||||
|
|
||||||
broadcastUserData([url])
|
broadcastUserData([url])
|
||||||
relaysMostlyRestricted.update(dissoc(url))
|
relaysMostlyRestricted.update(dissoc(url))
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import {
|
|||||||
import {DM_KINDS, CONTENT_KINDS, makeCommentFilter} from "@app/content"
|
import {DM_KINDS, CONTENT_KINDS, makeCommentFilter} from "@app/content"
|
||||||
import {notificationSettings, shouldNotify, userSettingsValues} from "@app/settings"
|
import {notificationSettings, shouldNotify, userSettingsValues} from "@app/settings"
|
||||||
import {userSpaceUrls} from "@app/groups"
|
import {userSpaceUrls} from "@app/groups"
|
||||||
import {makeSpacePath, getEventPath} from "@app/routes"
|
import {getEventPath, goToSpace} from "@app/routes"
|
||||||
|
|
||||||
export type PushSubscription = {
|
export type PushSubscription = {
|
||||||
key: string
|
key: string
|
||||||
@@ -111,7 +111,7 @@ export const onPushNotificationAction = async (action: ActionPerformed) => {
|
|||||||
if (event) {
|
if (event) {
|
||||||
goto(await getEventPath(event, [relay]))
|
goto(await getEventPath(event, [relay]))
|
||||||
} else {
|
} else {
|
||||||
goto(makeSpacePath(relay))
|
goToSpace(relay)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
const url = decodeRelay($page.params.relay!)
|
const url = decodeRelay($page.params.relay!)
|
||||||
const md = parseFloat(theme.screens.md) * 16
|
const md = parseFloat(theme.screens.md) * 16
|
||||||
|
|
||||||
let width = $state(0)
|
let width = $state(window.innerWidth)
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (width > md) {
|
if (width > md) {
|
||||||
|
|||||||
Reference in New Issue
Block a user