Merge remote-tracking branch 'origin/feat-stats' into feat-stats
This commit is contained in:
@@ -43,6 +43,13 @@ class API {
|
||||
});
|
||||
}
|
||||
|
||||
async getUiDetailedStats() {
|
||||
return this.call({
|
||||
method: 'get',
|
||||
path: '/ui-detailed-stats',
|
||||
});
|
||||
}
|
||||
|
||||
async getSession() {
|
||||
return this.call({
|
||||
method: 'get',
|
||||
|
||||
@@ -53,6 +53,7 @@ new Vue({
|
||||
latestRelease: null,
|
||||
|
||||
isDark: null,
|
||||
uiDetailedStats: false,
|
||||
|
||||
chartOptions: {
|
||||
chart: {
|
||||
@@ -292,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)) {
|
||||
@@ -321,6 +331,6 @@ new Vue({
|
||||
|
||||
this.currentRelease = currentRelease;
|
||||
this.latestRelease = latestRelease;
|
||||
}).catch(console.error);
|
||||
}).catch((err) => console.error(err));
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user