add minEnabledHeight to settings

This commit is contained in:
Tamius Han 2024-12-28 01:42:13 +01:00
parent 002dfacc3e
commit ed2886d449
5 changed files with 8 additions and 3 deletions

View File

@ -219,6 +219,7 @@ interface SettingsInterface {
enabledFullscreenOnly: boolean,
popupAlignment: 'left' | 'right',
minEnabledWidth: number, // don't show UI if player is narrower than % of screen width
minEnabledHeight: number, // don't show UI if player is narrower than % of screen height
activation: 'trigger-zone' | 'player', // what needs to be hovered in order for UI to be visible
triggerZoneDimensions: { // how large the trigger zone is (relative to player size)
width: number

View File

@ -104,6 +104,10 @@ export default {
return this.settings?.getSiteSettings(this.site) ?? null;
}
return null;
},
resetSettings() {
this.settings.active = JSON.parse(JSON.stringify(this.settings.default));
this.settings.saveWithoutReload();
}
},
methods: {

View File

@ -184,7 +184,7 @@ export default {
methods: {
optionalToFixed(v, n) {
if ((`${v}`.split('.')[1]?.length ?? 0) > n) {
return v.toFixed(2);
return v.toFixed(n);
}
return v;
},
@ -292,8 +292,6 @@ export default {
this.settings.active.ui.inPlayer.triggerZoneDimensions.offsetY = cy;
},
//#region slider window
forceNumber(value) {
// Change EU format to US if needed

View File

@ -172,6 +172,7 @@ const ExtensionConfPatch = [
enabled: true, // enable by default on new installs
enabledFullscreenOnly: false,
minEnabledWidth: 0.75,
minEnabledHeight: 0.75,
activation: 'player',
popupAlignment: 'left',
triggerZoneDimensions: {

View File

@ -163,6 +163,7 @@ const ExtensionConf: SettingsInterface = {
enabled: true, // enable by default on new installs
enabledFullscreenOnly: false,
minEnabledWidth: 0.75,
minEnabledHeight: 0.75,
activation: 'player',
popupAlignment: 'left',
triggerZoneDimensions: {