mirror of
https://github.com/discourse/discourse.git
synced 2026-07-29 23:58:12 -05:00
DEV: Replace save-button partial with a component (#9066)
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { or } from "@ember/object/computed";
|
||||
import Component from "@ember/component";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ["controls"],
|
||||
|
||||
buttonDisabled: or("model.isSaving", "saveDisabled"),
|
||||
|
||||
@discourseComputed("model.isSaving")
|
||||
savingText(saving) {
|
||||
return saving ? "saving" : "save";
|
||||
}
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
{{d-button action=action disabled=buttonDisabled label=savingText class="btn-primary save-changes"}}
|
||||
{{yield}}
|
||||
<div class='save-messages'>
|
||||
{{#if saved}}
|
||||
<div class='saved'>{{i18n 'saved'}}</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user