[Client] Use localStorage instead of window

This commit is contained in:
syuilo 2019-02-05 14:42:18 +09:00
parent 6f473aa64a
commit 01983da514
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
2 changed files with 2 additions and 2 deletions

View file

@ -66,7 +66,7 @@
lang = settings.device.lang; lang = settings.device.lang;
} }
window.lang = lang; localStorage.setItem('lang', lang);
//#endregion //#endregion
//#region Fetch locale data //#region Fetch locale data

View file

@ -12,7 +12,7 @@ export const hostname = address.hostname;
export const url = address.origin; export const url = address.origin;
export const apiUrl = url + '/api'; export const apiUrl = url + '/api';
export const wsUrl = url.replace('http://', 'ws://').replace('https://', 'wss://') + '/streaming'; export const wsUrl = url.replace('http://', 'ws://').replace('https://', 'wss://') + '/streaming';
export const lang = window.lang; export const lang = localStorage.getItem('lang');
export const langs = _LANGS_; export const langs = _LANGS_;
export const locale = JSON.parse(localStorage.getItem('locale')); export const locale = JSON.parse(localStorage.getItem('locale'));
export const copyright = _COPYRIGHT_; export const copyright = _COPYRIGHT_;