fix stuff?
This commit is contained in:
parent
92cb05cc9a
commit
1ca221ffc2
|
@ -24,6 +24,7 @@ const res = await Device.getInfo();
|
|||
localStorage.setItem("lang", lang);
|
||||
localStorage.setItem("locale", await lang_res.text());
|
||||
localStorage.setItem("localeVersion", version);
|
||||
document.location.href = '/';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { url } from "@/config";
|
||||
import { ColdDeviceStorage } from "@/store";
|
||||
|
||||
const cache = new Map<string, HTMLAudioElement>();
|
||||
|
@ -7,7 +8,7 @@ export function getAudio(file: string, useCache = true): HTMLAudioElement {
|
|||
if (useCache && cache.has(file)) {
|
||||
audio = cache.get(file);
|
||||
} else {
|
||||
audio = new Audio(`/static-assets/sounds/${file}.mp3`);
|
||||
audio = new Audio(`${url}+/static-assets/sounds/${file}.mp3`);
|
||||
if (useCache) cache.set(file, audio);
|
||||
}
|
||||
return audio;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
export const twemojiSvgBase = "/twemoji";
|
||||
import { url } from "@/config";
|
||||
|
||||
export const twemojiSvgBase = `${url}/twemoji`;
|
||||
|
||||
export function char2fileName(char: string): string {
|
||||
let codes = Array.from(char).map((x) => x.codePointAt(0)?.toString(16));
|
||||
|
|
|
@ -10,7 +10,7 @@ import getUserName from "@/scripts/get-user-name";
|
|||
import { I18n } from "@/scripts/i18n";
|
||||
import { getAccountFromId } from "@/scripts/get-account-from-id";
|
||||
import { char2fileName } from "@/scripts/twemoji-base";
|
||||
import * as url from "@/scripts/url";
|
||||
import * as urlObject from "@/scripts/url";
|
||||
|
||||
const iconUrl = (name: string) =>
|
||||
`/static-assets/notification-badges/${name}.png`;
|
||||
|
@ -178,7 +178,7 @@ async function composeNotification<K extends keyof pushNotificationDataMap>(
|
|||
badge = u.href;
|
||||
} else {
|
||||
const dummy = `${u.host}${u.pathname}`; // 拡張子がないとキャッシュしてくれないCDNがあるので
|
||||
badge = `${origin}/proxy/${dummy}?${url.query({
|
||||
badge = `${origin}/proxy/${dummy}?${urlObject.query({
|
||||
url: u.href,
|
||||
badge: "1",
|
||||
})}`;
|
||||
|
|
Loading…
Reference in New Issue