mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
With this implementation of the feature of the automatic theme detection, we make the following changes in the backend, frontend and documentation. This replaces the previous night_mode boolean with an enum, with the default value being to use the prefers-color-scheme feature of the operating system to determine which theme to use. Fixes: #14451. Co-authored-by: @kPerikou <44238834+kPerikou@users.noreply.github.com>
14 lines
386 B
JavaScript
14 lines
386 B
JavaScript
exports.enable = function () {
|
|
$("body").removeClass("color-scheme-automatic").addClass("night-mode");
|
|
};
|
|
|
|
exports.disable = function () {
|
|
$("body").removeClass("color-scheme-automatic").removeClass("night-mode");
|
|
};
|
|
|
|
exports.default_preference_checker = function () {
|
|
$("body").removeClass("night-mode").addClass("color-scheme-automatic");
|
|
};
|
|
|
|
window.night_mode = exports;
|