Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-30 04:30:29 +01:00
44 Zeilen
999 B
JavaScript
44 Zeilen
999 B
JavaScript
import {
|
|
default as computed,
|
|
observes,
|
|
} from "discourse-common/utils/decorators";
|
|
import EmberObject from "@ember/object";
|
|
import Component from "@ember/component";
|
|
import { inject as service } from "@ember/service";
|
|
|
|
export default Component.extend({
|
|
showPreview: false,
|
|
composer: service(),
|
|
classNameBindings: [
|
|
":wizard-field-composer",
|
|
"showPreview:show-preview:hide-preview",
|
|
],
|
|
|
|
didInsertElement() {
|
|
this.set("composer.reply", this.get("field.value") || "");
|
|
},
|
|
|
|
@observes("composer.reply")
|
|
setField() {
|
|
this.set("field.value", this.get("composer.reply"));
|
|
},
|
|
|
|
@computed("showPreview")
|
|
togglePreviewLabel(showPreview) {
|
|
return showPreview
|
|
? "wizard_composer.hide_preview"
|
|
: "wizard_composer.show_preview";
|
|
},
|
|
|
|
actions: {
|
|
togglePreview() {
|
|
this.toggleProperty("showPreview");
|
|
},
|
|
|
|
groupsMentioned() {},
|
|
afterRefresh() {},
|
|
cannotSeeMention() {},
|
|
importQuote() {},
|
|
showUploadSelector() {},
|
|
},
|
|
});
|