Made saving settings a bit less of a pain
This commit is contained in:
parent
2e6d33bc79
commit
50b16b0893
@ -16,7 +16,7 @@ var ExtensionConf = {
|
|||||||
// Any more and we don't adjust ar.
|
// Any more and we don't adjust ar.
|
||||||
allowedArVariance: 0.075, // amount by which old ar can differ from the new (1 = 100%)
|
allowedArVariance: 0.075, // amount by which old ar can differ from the new (1 = 100%)
|
||||||
timers: { // autodetection frequency
|
timers: { // autodetection frequency
|
||||||
playing: 666, // while playing
|
playing: 333, // while playing
|
||||||
paused: 3000, // while paused
|
paused: 3000, // while paused
|
||||||
error: 3000, // after error
|
error: 3000, // after error
|
||||||
minimumTimeout: 5,
|
minimumTimeout: 5,
|
||||||
|
@ -535,6 +535,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row button-box sticky-bottom">
|
||||||
|
<Button label="Cancel"
|
||||||
|
@click.native="cancel()"
|
||||||
|
>
|
||||||
|
</Button>
|
||||||
|
<Button label="Save settings"
|
||||||
|
@click.native="saveManual()"
|
||||||
|
>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -604,6 +615,22 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.sensitivity = this.getSensitivity();
|
this.sensitivity = this.getSensitivity();
|
||||||
|
},
|
||||||
|
saveManual(){
|
||||||
|
this.settings.save();
|
||||||
|
// this.parsedSettings = JSON.stringify(this.settings.active, null, 2);
|
||||||
|
// this.lastSettings = JSON.parse(JSON.stringify(this.settings.active));
|
||||||
|
const ths = this;
|
||||||
|
this.$nextTick( () => {
|
||||||
|
ths.parsedSettings = JSON.stringify(ths.lastSettings, null, 2)
|
||||||
|
ths.lastSettings = JSON.parse(JSON.stringify(ths.settings.active))
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancel(){
|
||||||
|
this.parsedSettings = '';
|
||||||
|
this.settings.rollback();
|
||||||
|
const ths = this;
|
||||||
|
this.$nextTick( () => ths.parsedSettings = JSON.stringify(ths.lastSettings, null, 2) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
contenteditable="true"
|
contenteditable="true"
|
||||||
@input="updateSettings"
|
@input="updateSettings"
|
||||||
>{{parsedSettings}}</div>
|
>{{parsedSettings}}</div>
|
||||||
<div class="flex flex-row button-box">
|
|
||||||
|
|
||||||
|
<div class="flex flex-row button-box sticky-bottom">
|
||||||
<Button label="Cancel"
|
<Button label="Cancel"
|
||||||
@click.native="cancel()"
|
@click.native="cancel()"
|
||||||
>
|
>
|
||||||
|
@ -307,3 +307,11 @@ small {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-top: -4px;
|
margin-top: -4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sticky-bottom {
|
||||||
|
width: 100%;
|
||||||
|
position: sticky;
|
||||||
|
// position: fixed;
|
||||||
|
bottom: 0px;
|
||||||
|
background-color: rgba($background-primary, 0.7);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user