Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor AI events #3757 #3759

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading