mirror of
https://github.com/w0rng/amnezia-wg-easy.git
synced 2025-04-26 13:20:11 +03:00
Fix some bugs
json error update css some refactoring for getUiDetailedStats
This commit is contained in:
parent
a4049acdb6
commit
c47ade71cc
3 changed files with 15 additions and 8 deletions
|
@ -293,6 +293,15 @@ new Vue({
|
|||
}).catch(console.error);
|
||||
}, 1000);
|
||||
|
||||
this.api.getUiDetailedStats()
|
||||
.then((res) => {
|
||||
this.uiDetailedStats = res;
|
||||
})
|
||||
.catch(() => {
|
||||
console.log('Failed to get ui-detailed-stats');
|
||||
this.uiDetailedStats = false;
|
||||
});
|
||||
|
||||
Promise.resolve().then(async () => {
|
||||
const lang = await this.api.getLang();
|
||||
if (lang !== localStorage.getItem('lang') && i18n.availableLocales.includes(lang)) {
|
||||
|
@ -300,8 +309,6 @@ new Vue({
|
|||
i18n.locale = lang;
|
||||
}
|
||||
|
||||
this.uiDetailedStats = await this.api.getUiDetailedStats();
|
||||
|
||||
const currentRelease = await this.api.getRelease();
|
||||
const latestRelease = await fetch('https://wg-easy.github.io/wg-easy/changelog.json')
|
||||
.then((res) => res.json())
|
||||
|
@ -324,6 +331,6 @@ new Vue({
|
|||
|
||||
this.currentRelease = currentRelease;
|
||||
this.latestRelease = latestRelease;
|
||||
}).catch(console.error);
|
||||
}).catch((err) => console.error(err));
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue