generator: stop editing of Auto variant early to avoid console errors #445

This commit is contained in:
Sören Weber 2023-02-05 11:40:47 +01:00
parent a046b9300f
commit bc135b4b4c
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -352,6 +352,12 @@ var variants = {
changeColor: function( c, without_prompt ){
var with_prompt = !(without_prompt || false);
if( this.getVariant() == 'auto' ){
if( with_prompt ){
alert( 'The Auto variant can not be changed. Please select the light/dark variant directly to make changes' );
}
return;
}
var read_style = this.findLoadedStylesheet( 'custom-variant-style' );
var write_style = this.findLoadedStylesheet( 'variant-style' );