mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FIX: Allow reverting theme/text settings from cookie back to default
This commit is contained in:
@ -719,11 +719,15 @@ const User = RestModel.extend({
|
||||
},
|
||||
|
||||
updateTextSizeCookie(newSize) {
|
||||
const seq = this.get("user_option.text_size_seq");
|
||||
$.cookie("text_size", `${newSize}|${seq}`, {
|
||||
path: "/",
|
||||
expires: 9999
|
||||
});
|
||||
if (newSize) {
|
||||
const seq = this.get("user_option.text_size_seq");
|
||||
$.cookie("text_size", `${newSize}|${seq}`, {
|
||||
path: "/",
|
||||
expires: 9999
|
||||
});
|
||||
} else {
|
||||
$.removeCookie("text_size", { path: "/", expires: 1 });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user