UX: Hide suggest edit button in fast edit when triggering from AI (#364)
This commit is contained in:
parent
19a2949914
commit
ba09582d7c
|
@ -24,11 +24,7 @@ export default class AiEditSuggestionButton extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
get disabled() {
|
get disabled() {
|
||||||
return (
|
return this.loading || this.suggestion?.length > 0;
|
||||||
this.loading ||
|
|
||||||
this.suggestion?.length > 0 ||
|
|
||||||
this.args.outletArgs.newValue
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadMode() {
|
async loadMode() {
|
||||||
|
@ -68,13 +64,15 @@ export default class AiEditSuggestionButton extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DButton
|
{{#unless @outletArgs.newValue}}
|
||||||
class="btn-small btn-ai-suggest-edit"
|
<DButton
|
||||||
@action={{this.suggest}}
|
class="btn-small btn-ai-suggest-edit"
|
||||||
@icon="discourse-sparkles"
|
@action={{this.suggest}}
|
||||||
@label="discourse_ai.ai_helper.fast_edit.suggest_button"
|
@icon="discourse-sparkles"
|
||||||
@isLoading={{this.loading}}
|
@label="discourse_ai.ai_helper.fast_edit.suggest_button"
|
||||||
@disabled={{this.disabled}}
|
@isLoading={{this.loading}}
|
||||||
/>
|
@disabled={{this.disabled}}
|
||||||
|
/>
|
||||||
|
{{/unless}}
|
||||||
</template>
|
</template>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue