mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-27 01:13:27 +03:00
parent
35315bbf7e
commit
66275fd344
@ -53,10 +53,10 @@ export function parseLocation (location: Location | URL): PlatformLocation {
|
||||
}
|
||||
}
|
||||
|
||||
function parseQuery (query: string): Record<string, string | null> {
|
||||
function parseQuery (query: string): Record<string, string | null> | undefined {
|
||||
query = query.trim()
|
||||
if (query.length === 0 || !query.startsWith('?')) {
|
||||
return {}
|
||||
return
|
||||
}
|
||||
query = decodeURIComponent(query).substring(1)
|
||||
const vars = query.split('&')
|
||||
|
@ -82,6 +82,7 @@
|
||||
let currentAppAlias: string | undefined
|
||||
let currentSpace: Ref<Space> | undefined
|
||||
let currentSpecial: string | undefined
|
||||
let currentQuery: Record<string, string | null> | undefined
|
||||
let specialComponent: SpecialNavModel | undefined
|
||||
let asideId: string | undefined
|
||||
let currentFragment: string | undefined = ''
|
||||
@ -264,6 +265,7 @@
|
||||
break
|
||||
}
|
||||
}
|
||||
loc.query = resolved.loc.query ?? loc.query ?? currentQuery ?? resolved.defaultLocation.query
|
||||
loc.fragment = resolved.loc.fragment ?? loc.fragment ?? resolved.defaultLocation.fragment
|
||||
return loc
|
||||
}
|
||||
@ -363,6 +365,7 @@
|
||||
if (app !== undefined) {
|
||||
localStorage.setItem(`platform_last_loc_${app}`, originalLoc)
|
||||
}
|
||||
currentQuery = loc.query
|
||||
if (fragment !== currentFragment) {
|
||||
currentFragment = fragment
|
||||
if (fragment !== undefined && fragment.trim().length > 0) {
|
||||
@ -533,8 +536,6 @@
|
||||
: 'account'
|
||||
let popupSpacePosition: PopupPosAlignment
|
||||
$: popupSpacePosition = appsMini ? 'logo-mini' : appsDirection === 'horizontal' ? 'logo-portrait' : 'logo'
|
||||
let notifyPosition: PopupPosAlignment
|
||||
$: notifyPosition = appsDirection === 'horizontal' ? 'notify-mobile' : 'notify'
|
||||
|
||||
onMount(() => subscribeMobile(setTheme))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user