mirror of
https://github.com/mue/mue.git
synced 2026-07-15 13:03:55 +02:00
fix: various settings
This commit is contained in:
@@ -57,7 +57,7 @@ export default function AppearanceSettings() {
|
||||
|
||||
<h3>{appearance.accessibility.title}</h3>
|
||||
<Checkbox name='animations' text={appearance.animations} betaFeature={true} />
|
||||
<Slider title={appearance.accessibility.zoom} name='zoom' default='100' min='50' max='200' display='%'/>
|
||||
<Slider title={appearance.accessibility.widget_zoom} name='widgetzoom' default='100' min='50' max='200' display='%'/>
|
||||
<Slider title={appearance.accessibility.toast_duration} name='toastDisplayTime' default='2500' min='500' max='5000' display={' ' + appearance.accessibility.milliseconds} />
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-attachment: fixed;
|
||||
zoom: 100% !important;
|
||||
}
|
||||
|
||||
#backgroundVideo {
|
||||
|
||||
@@ -19,7 +19,7 @@ window.languagecode = languagecode.replace('-', '_');
|
||||
window.language = merge(require('./translations/en_GB.json'), require(`./translations/${window.languagecode}.json`));
|
||||
// set html language tag
|
||||
if (window.languagecode !== 'en_GB' || window.languagecode !== 'en_US') {
|
||||
document.documentElement.lang = window.languagecode;
|
||||
document.documentElement.lang = window.languagecode.split('_')[0];
|
||||
}
|
||||
|
||||
// window.constants
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
"value": "dots"
|
||||
},
|
||||
{
|
||||
"name": "zoom",
|
||||
"name": "widgetzoom",
|
||||
"value": 100
|
||||
},
|
||||
{
|
||||
|
||||
@@ -59,6 +59,8 @@ export default class SettingsFunctions {
|
||||
localStorage.setItem('language', 'en_GB');
|
||||
}
|
||||
|
||||
localStorage.setItem('tabName', window.language.tabname);
|
||||
|
||||
if (reset) {
|
||||
localStorage.setItem('showWelcome', false);
|
||||
}
|
||||
@@ -105,13 +107,14 @@ export default class SettingsFunctions {
|
||||
${fontweight}
|
||||
${fontstyle}
|
||||
}
|
||||
</style>`);
|
||||
</style>
|
||||
`);
|
||||
}
|
||||
|
||||
const zoom = localStorage.getItem('zoom');
|
||||
const widgetzoom = localStorage.getItem('widgetzoom');
|
||||
// don't bother if it's default zoom
|
||||
if (zoom !== 100) {
|
||||
document.body.style.zoom = zoom + '%';
|
||||
if (widgetzoom !== '100') {
|
||||
document.getElementById('root').style.zoom = widgetzoom + '%';
|
||||
}
|
||||
|
||||
const theme = localStorage.getItem('theme');
|
||||
@@ -125,7 +128,7 @@ export default class SettingsFunctions {
|
||||
}
|
||||
|
||||
const tabName = localStorage.getItem('tabName');
|
||||
if (tabName) {
|
||||
if (tabName !== window.language.tabname) {
|
||||
document.title = tabName;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"tabname": "New Tab",
|
||||
"widgets": {
|
||||
"greeting": {
|
||||
"morning": "Good Morning",
|
||||
@@ -136,7 +137,7 @@
|
||||
},
|
||||
"accessibility": {
|
||||
"title": "Accessibility",
|
||||
"zoom": "Zoom",
|
||||
"widget_zoom": "Widget Zoom",
|
||||
"toast_duration": "Toast Duration",
|
||||
"milliseconds": "milliseconds"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user