mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix toolcool color picker some more
This commit is contained in:
@ -168,7 +168,9 @@ export class SettingsUi {
|
|||||||
});
|
});
|
||||||
let initialColorChange = true;
|
let initialColorChange = true;
|
||||||
this.color = this.dom.querySelector('#qr--color');
|
this.color = this.dom.querySelector('#qr--color');
|
||||||
|
this.color.color = this.currentQrSet?.color ?? 'transparent';
|
||||||
this.color.addEventListener('change', (evt)=>{
|
this.color.addEventListener('change', (evt)=>{
|
||||||
|
if (!this.dom.closest('body')) return;
|
||||||
const qrs = this.currentQrSet;
|
const qrs = this.currentQrSet;
|
||||||
if (initialColorChange) {
|
if (initialColorChange) {
|
||||||
initialColorChange = false;
|
initialColorChange = false;
|
||||||
@ -182,7 +184,6 @@ export class SettingsUi {
|
|||||||
this.dom.querySelector('#qr--colorClear').addEventListener('click', (evt)=>{
|
this.dom.querySelector('#qr--colorClear').addEventListener('click', (evt)=>{
|
||||||
const qrs = this.currentQrSet;
|
const qrs = this.currentQrSet;
|
||||||
this.color.color = 'transparent';
|
this.color.color = 'transparent';
|
||||||
qrs.color = 'transparent';
|
|
||||||
qrs.save();
|
qrs.save();
|
||||||
this.currentQrSet.updateColor();
|
this.currentQrSet.updateColor();
|
||||||
});
|
});
|
||||||
@ -200,7 +201,7 @@ export class SettingsUi {
|
|||||||
this.disableSend.checked = this.currentQrSet.disableSend;
|
this.disableSend.checked = this.currentQrSet.disableSend;
|
||||||
this.placeBeforeInput.checked = this.currentQrSet.placeBeforeInput;
|
this.placeBeforeInput.checked = this.currentQrSet.placeBeforeInput;
|
||||||
this.injectInput.checked = this.currentQrSet.injectInput;
|
this.injectInput.checked = this.currentQrSet.injectInput;
|
||||||
// this.color.color = this.currentQrSet.color ?? 'transparent';
|
this.color.color = this.currentQrSet.color ?? 'transparent';
|
||||||
this.onlyBorderColor.checked = this.currentQrSet.onlyBorderColor;
|
this.onlyBorderColor.checked = this.currentQrSet.onlyBorderColor;
|
||||||
this.qrList.innerHTML = '';
|
this.qrList.innerHTML = '';
|
||||||
const qrsDom = this.currentQrSet.renderSettings();
|
const qrsDom = this.currentQrSet.renderSettings();
|
||||||
|
Reference in New Issue
Block a user