mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 22:16:17 +08:00
a8a76198b1
Use imports instead.
33 lines
584 B
JavaScript
33 lines
584 B
JavaScript
import Component from "@ember/component";
|
|
import computed from "ember-addons/ember-computed-decorators";
|
|
|
|
export default Component.extend({
|
|
classNames: ["embed-setting"],
|
|
|
|
@computed("field")
|
|
inputId(field) {
|
|
return field.dasherize();
|
|
},
|
|
|
|
@computed("field")
|
|
translationKey(field) {
|
|
return `admin.embedding.${field}`;
|
|
},
|
|
|
|
@computed("type")
|
|
isCheckbox(type) {
|
|
return type === "checkbox";
|
|
},
|
|
|
|
@computed("value")
|
|
checked: {
|
|
get(value) {
|
|
return !!value;
|
|
},
|
|
set(value) {
|
|
this.set("value", value);
|
|
return value;
|
|
}
|
|
}
|
|
});
|