mirror of
https://github.com/discourse/discourse-signatures.git
synced 2025-12-15 03:13:30 +00:00
DEV: Fix linting (#21)
This commit is contained in:
parent
e5147551f0
commit
a4cfe14e81
@ -14,7 +14,9 @@ function attachSignature(api, siteSettings) {
|
|||||||
var enabled;
|
var enabled;
|
||||||
|
|
||||||
if (currentUser) {
|
if (currentUser) {
|
||||||
enabled = currentUser.get("custom_fields.see_signatures") ?? siteSettings.signatures_visible_by_default;
|
enabled =
|
||||||
|
currentUser.get("custom_fields.see_signatures") ??
|
||||||
|
siteSettings.signatures_visible_by_default;
|
||||||
} else {
|
} else {
|
||||||
enabled = siteSettings.signatures_visible_by_default;
|
enabled = siteSettings.signatures_visible_by_default;
|
||||||
}
|
}
|
||||||
@ -41,15 +43,18 @@ function attachSignature(api, siteSettings) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function addSetting(api, siteSettings) {
|
function addSetting(api) {
|
||||||
api.modifyClass("controller:preferences/profile", {
|
api.modifyClass("controller:preferences/profile", {
|
||||||
actions: {
|
actions: {
|
||||||
save() {
|
save() {
|
||||||
this.set("model.custom_fields.see_signatures", this.get("model.see_signatures"));
|
this.set(
|
||||||
this.get("saveAttrNames").push("custom_fields")
|
"model.custom_fields.see_signatures",
|
||||||
|
this.get("model.see_signatures")
|
||||||
|
);
|
||||||
|
this.get("saveAttrNames").push("custom_fields");
|
||||||
this._super();
|
this._super();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user