This commit is contained in:
syuilo 2022-03-27 02:22:31 +09:00
parent a3cdb4cca1
commit c7969ef418

View file

@ -24,6 +24,14 @@ import { url as local } from '@/config';
import * as os from '@/os'; import * as os from '@/os';
import { useTooltip } from '@/scripts/use-tooltip'; import { useTooltip } from '@/scripts/use-tooltip';
function safeURIDecode(str: string) {
try {
return decodeURIComponent(str);
} catch {
return str;
}
}
export default defineComponent({ export default defineComponent({
props: { props: {
url: { url: {
@ -49,14 +57,6 @@ export default defineComponent({
}, {}, 'closed'); }, {}, 'closed');
}); });
function safeURIDecode(str: string) {
try {
return decodeURIComponent(str);
} catch {
return str;
}
}
return { return {
local, local,
schema: url.protocol, schema: url.protocol,