mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix the image tune menu toggle state in the block editor interface (#23510)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com> Co-authored-by: Hannes Küttner <kuettner.hannes@gmail.com>
This commit is contained in:
5
.changeset/rare-pumpkins-decide.md
Normal file
5
.changeset/rare-pumpkins-decide.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@directus/app': patch
|
||||
---
|
||||
|
||||
Fixed the image tune menu toggle state indication in the block editor interface
|
||||
@@ -179,7 +179,7 @@ export class ImageTool extends BaseImageTool {
|
||||
bus.emit({ type: 'open-url', payload: this.data.file.fileURL });
|
||||
},
|
||||
},
|
||||
...ImageTool.tunes,
|
||||
...BaseImageTool.tunes,
|
||||
];
|
||||
|
||||
const wrapperElement = document.createElement('div');
|
||||
@@ -201,6 +201,10 @@ export class ImageTool extends BaseImageTool {
|
||||
titleElement.innerHTML = tune.title;
|
||||
tuneElement.appendChild(titleElement);
|
||||
|
||||
if (tune.toggle && tune.name && this._data[tune.name]) {
|
||||
tuneElement.classList.add('ce-popover-item--active');
|
||||
}
|
||||
|
||||
if (tune.onActivate) tuneElement.addEventListener('click', tune.onActivate);
|
||||
else if (tune.toggle)
|
||||
tuneElement.addEventListener('click', () => {
|
||||
|
||||
@@ -159,4 +159,5 @@
|
||||
- FatumaA
|
||||
- HZooly
|
||||
- simboonlong
|
||||
- HeikoMueller
|
||||
- janpio
|
||||
|
||||
Reference in New Issue
Block a user