Tint bulk edit button when bulk edit state is select

This commit is contained in:
artisticMink 2023-10-30 19:33:18 +01:00
parent 778eb2be0e
commit 27bc93936f
2 changed files with 10 additions and 0 deletions

View File

@ -61,3 +61,7 @@
#character_context_menu li:hover {
background-color: var(--SmartThemeBotMesBlurTintColor);
}
#bulkEditButton.bulk_edit_overlay_active {
color: var(--golden);
}

View File

@ -347,12 +347,14 @@ class BulkEditOverlay {
this.#enableClickEventsForCharacters();
this.clearSelectedCharacters();
this.disableContextMenu();
this.#disableBulkEditButtonHighlight();
CharacterContextMenu.hide();
break;
case CharacterGroupOverlayState.select:
this.container.classList.add(BulkEditOverlay.selectModeClass);
this.#disableClickEventsForCharacters();
this.enableContextMenu();
this.#enableBulkEditButtonHighlight();
break;
}
@ -365,6 +367,10 @@ class BulkEditOverlay {
#disableClickEventsForCharacters = () => [...this.container.getElementsByClassName(BulkEditOverlay.characterClass)]
.forEach(element => element.addEventListener('click', this.toggleCharacterSelected));
#enableBulkEditButtonHighlight = () => document.getElementById('bulkEditButton').classList.add('bulk_edit_overlay_active');
#disableBulkEditButtonHighlight = () => document.getElementById('bulkEditButton').classList.remove('bulk_edit_overlay_active');
toggleCharacterSelected = event => {
event.stopPropagation();