DEV: Add experimental json_scheme site setting type (#12226)

This commit is contained in:
Penar Musaraj
2021-03-01 09:15:17 -05:00
committed by GitHub
parent bfa3e24e48
commit 6809cccd88
18 changed files with 411 additions and 3 deletions
@@ -0,0 +1,20 @@
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);
});
},
});