Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

frontend: Rename "night-mode" class to "dark-theme".

Sahil Batra29dcbbb5489c
diff --git a/static/js/dark_theme.ts b/static/js/dark_theme.ts
index 2dc4f74feb7..4c1790d39ab 100644
--- a/static/js/dark_theme.ts
+++ b/static/js/dark_theme.ts
@@ -1,13 +1,13 @@
import $ from "jquery";
export function enable(): void {
- $("body").removeClass("color-scheme-automatic").addClass("night-mode");
+ $("body").removeClass("color-scheme-automatic").addClass("dark-theme");
}
export function disable(): void {
- $("body").removeClass("color-scheme-automatic").removeClass("night-mode");
+ $("body").removeClass("color-scheme-automatic").removeClass("dark-theme");
}
export function default_preference_checker(): void {
- $("body").removeClass("night-mode").addClass("color-scheme-automatic");
+ $("body").removeClass("dark-theme").addClass("color-scheme-automatic");
}
diff --git a/static/styles/dark_theme.css b/static/styles/dark_theme.css
index 80240b62a6b..dc96f64a1ac 100644
--- a/static/styles/dark_theme.css
+++ b/static/styles/dark_theme.css
@@ -1,6 +1,6 @@
@import "flatpickr/dist/themes/dark.css";
-body.night-mode {
+body.dark-theme {
/* the following block(s) are generated by the import statements.
See postcss.config.js for details.
*/
@@ -1143,13 +1143,13 @@ body.night-mode {
}
@supports (-moz-appearance: none) {
- body.night-mode #settings_page select {
+ body.dark-theme #settings_page select {
background-color: hsla(0, 0%, 0%, 0.2);
}
}
@media (prefers-color-scheme: dark) {
body.color-scheme-automatic {
- @extend body.night-mode;
+ @extend body.dark-theme;
}
}
diff --git a/templates/zerver/app/index.html b/templates/zerver/app/index.html
index 5273174f0bb..4b532c3f9fb 100644
--- a/templates/zerver/app/index.html
+++ b/templates/zerver/app/index.html
@@ -44,7 +44,7 @@
body.color-scheme-automatic #app-loading{
color: hsl(0, 0%, 20%);
}
- body.night-mode #app-loading {
+ body.dark-theme #app-loading {
background-color: hsl(212, 28%, 18%);
color: hsl(236, 33%, 90%);
}
diff --git a/templates/zerver/base.html b/templates/zerver/base.html
index bbace19bad3..d391078475f 100644
--- a/templates/zerver/base.html
+++ b/templates/zerver/base.html
@@ -39,7 +39,7 @@
{% endblock %}
</head>
- <body {% if color_scheme == 1 %} class="color-scheme-automatic" {% elif color_scheme == 2 %} class="night-mode" {% endif %}>
+ <body {% if color_scheme == 1 %} class="color-scheme-automatic" {% elif color_scheme == 2 %} class="dark-theme" {% endif %}>
{% block content %}
{% endblock %}