mirror of
https://github.com/discourse/discourse.git
synced 2024-12-20 18:06:09 +08:00
21 lines
518 B
JavaScript
21 lines
518 B
JavaScript
|
import { action } from "@ember/object";
|
||
|
import Component from "@ember/component";
|
||
|
import showModal from "discourse/lib/show-modal";
|
||
|
|
||
|
export default Component.extend({
|
||
|
@action
|
||
|
launchJsonEditorModal() {
|
||
|
const schemaModal = showModal("json-schema-editor", {
|
||
|
model: {
|
||
|
value: this.value,
|
||
|
settingName: this.setting.setting,
|
||
|
jsonSchema: this.setting.json_schema,
|
||
|
},
|
||
|
});
|
||
|
|
||
|
schemaModal.set("onClose", () => {
|
||
|
this.set("value", schemaModal.model.value);
|
||
|
});
|
||
|
},
|
||
|
});
|