[TSK-225] Tracker: add issue shortlink resolver (Part 2) (#2173)

Signed-off-by: Anna <anna.no@xored.com>
This commit is contained in:
Anna No
2022-06-30 10:46:46 +07:00
committed by GitHub
parent 94ee6f5afe
commit bf6780a32f
16 changed files with 158 additions and 57 deletions
@@ -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) {