Skip to content

Commit

Permalink
Refactor AI events #3757
Browse files Browse the repository at this point in the history
  • Loading branch information
edloidas authored and ashklianko committed Oct 22, 2024
1 parent e5edcf4 commit 00bbec2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {ClassHelper} from '../../ClassHelper';
import {Event} from '../../event/Event';

export class EnonicAiContentOperatorOpenDialogEvent
export class AiContentOperatorOpenDialogEvent
extends Event {

private readonly sourceDataPath?: string;
Expand All @@ -16,11 +16,11 @@ export class EnonicAiContentOperatorOpenDialogEvent
return this.sourceDataPath;
}

static on(handler: (event: EnonicAiContentOperatorOpenDialogEvent) => void) {
static on(handler: (event: AiContentOperatorOpenDialogEvent) => void) {
Event.bind(ClassHelper.getFullName(this), handler);
}

static un(handler?: (event: EnonicAiContentOperatorOpenDialogEvent) => void) {
static un(handler?: (event: AiContentOperatorOpenDialogEvent) => void) {
Event.unbind(ClassHelper.getFullName(this), handler);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {DivEl} from '../../dom/DivEl';
import {Button} from '../../ui/button/Button';
import {i18n} from '../../util/Messages';
import {AiHelperState} from '../AiHelperState';
import {EnonicAiContentOperatorOpenDialogEvent} from '../event/EnonicAiContentOperatorOpenDialogEvent';
import {AiContentOperatorOpenDialogEvent} from '../event/AiContentOperatorOpenDialogEvent';

export class AiActionButton
extends DivEl {
Expand Down Expand Up @@ -48,7 +48,7 @@ export class AiActionButton
protected initListeners(): void {
this.button.onClicked(() => {
if (this.dataPath) {
new EnonicAiContentOperatorOpenDialogEvent(this.dataPath).fire();
new AiContentOperatorOpenDialogEvent(this.dataPath).fire();
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
&-loader {
box-sizing: border-box;
position: absolute;
border: 2px dotted @admin-dark-gray-border;
border: 2px solid #966eb9;
border-radius: 50%;
width: 20px;
height: 20px;
animation: spin 3s linear infinite;
animation: spin 1.2s linear infinite;
}

@keyframes spin {
Expand Down Expand Up @@ -116,7 +116,7 @@

&.processing {
.ai-button-container-loader {
border-color: #550072;
border-top-color: #550072;
}

.ai-icon::before {
Expand Down

0 comments on commit 00bbec2

Please sign in to comment.