1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-06-13 00:41:59 +03:00

added additional color settings into UI

Adds new options in the customization section of the settings to change the shelf, book, chapter, page, and draft colors.
This commit is contained in:
James Geiger
2019-10-17 13:46:18 -05:00
parent ae19658b50
commit e6fe299c4f
7 changed files with 132 additions and 6 deletions

View File

@ -0,0 +1,18 @@
class SettingColorPicker {
constructor(elem) {
this.elem = elem;
this.colorInput = elem.querySelector('input[type=color]');
this.resetButton = elem.querySelector('[setting-color-picker-reset]');
this.defaultButton = elem.querySelector('[setting-color-picker-default]');
this.resetButton.addEventListener('click', event => {
this.colorInput.value = this.colorInput.dataset.current;
});
this.defaultButton.addEventListener('click', event => {
this.colorInput.value = this.colorInput.dataset.default;
});
}
}
export default SettingColorPicker;