client: Fix reports not showing in control panel

Closes: FoundKeyGang/FoundKey#194
Changelog: Fixed
This commit is contained in:
Norm 2022-10-10 18:32:04 -04:00 committed by Gitea
parent 6d58d5ed3b
commit c29e24c103

View file

@ -34,15 +34,15 @@ const props = withDefaults(defineProps<{
}); });
const self = props.url.startsWith(local); const self = props.url.startsWith(local);
const url = new URL(props.url); const uri = new URL(props.url);
let el: HTMLElement | null = $ref(null); let el: HTMLElement | null = $ref(null);
let schema = $ref(url.protocol); let schema = $ref(uri.protocol);
let hostname = $ref(decodePunycode(url.hostname)); let hostname = $ref(decodePunycode(uri.hostname));
let port = $ref(url.port); let port = $ref(uri.port);
let pathname = $ref(safeURIDecode(url.pathname)); let pathname = $ref(safeURIDecode(uri.pathname));
let query = $ref(safeURIDecode(url.search)); let query = $ref(safeURIDecode(uri.search));
let hash = $ref(safeURIDecode(url.hash)); let hash = $ref(safeURIDecode(uri.hash));
let attr = $ref(self ? 'to' : 'href'); let attr = $ref(self ? 'to' : 'href');
let target = $ref(self ? null : '_blank'); let target = $ref(self ? null : '_blank');