mirror of
https://github.com/discourse/discourse.git
synced 2025-06-23 03:51:43 +08:00
Rename .js.es6
to .js
in the admin application
This commit is contained in:
32
app/assets/javascripts/admin/components/embedding-setting.js
Normal file
32
app/assets/javascripts/admin/components/embedding-setting.js
Normal file
@ -0,0 +1,32 @@
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import Component from "@ember/component";
|
||||
|
||||
export default Component.extend({
|
||||
classNames: ["embed-setting"],
|
||||
|
||||
@discourseComputed("field")
|
||||
inputId(field) {
|
||||
return field.dasherize();
|
||||
},
|
||||
|
||||
@discourseComputed("field")
|
||||
translationKey(field) {
|
||||
return `admin.embedding.${field}`;
|
||||
},
|
||||
|
||||
@discourseComputed("type")
|
||||
isCheckbox(type) {
|
||||
return type === "checkbox";
|
||||
},
|
||||
|
||||
@discourseComputed("value")
|
||||
checked: {
|
||||
get(value) {
|
||||
return !!value;
|
||||
},
|
||||
set(value) {
|
||||
this.set("value", value);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user