Supports displaying short links, for easy downloading on TVs and Android TVs

This commit is contained in:
Vadim Babadzhanyan 2024-08-16 18:39:24 +03:00
parent 2ea37dd7ba
commit 0a33b1f7df
8 changed files with 45 additions and 3 deletions

View file

@ -71,6 +71,7 @@ new Vue({
uiTrafficStats: false,
uiChartType: 0,
uiShowLinks: false,
uiShowCharts: localStorage.getItem('uiShowCharts') === '1',
uiTheme: localStorage.theme || 'auto',
prefersDarkScheme: window.matchMedia('(prefers-color-scheme: dark)'),
@ -384,6 +385,14 @@ new Vue({
this.uiChartType = 0;
});
this.api.getUIShowLinks()
.then((res) => {
this.uiShowLinks = res;
})
.catch(() => {
this.uiShowLinks = false;
});
Promise.resolve().then(async () => {
const lang = await this.api.getLang();
if (lang !== localStorage.getItem('lang') && i18n.availableLocales.includes(lang)) {