mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 09:35:00 +02:00
[TSK-225] Tracker: add issue shortlink resolver (Part 2) (#2173)
Signed-off-by: Anna <anna.no@xored.com>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
Label,
|
||||
location,
|
||||
Location,
|
||||
areLocationsEqual,
|
||||
navigate,
|
||||
PanelInstance,
|
||||
Popup,
|
||||
@@ -169,6 +170,17 @@
|
||||
navigatorModel = currentApplication?.navigatorModel
|
||||
}
|
||||
|
||||
// resolve short links
|
||||
if (currentApplication?.locationResolver) {
|
||||
const resolver = await getResource(currentApplication.locationResolver)
|
||||
const resolvedLocation = await resolver?.(loc)
|
||||
if (resolvedLocation && !areLocationsEqual(loc, resolvedLocation)) {
|
||||
// make sure not to go into infinite loop here
|
||||
navigate(resolvedLocation)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (space === undefined) {
|
||||
const last = localStorage.getItem(`platform_last_loc_${app}`)
|
||||
if (last !== null) {
|
||||
|
||||
Reference in New Issue
Block a user