mirror of https://github.com/zulip/zulip.git
ts migration: Convert `dark_theme.js` to `dark_theme.ts`.
Add `void` type annotation to the return type of functions. The rest of the file is not modified.
This commit is contained in:
parent
7effa717fd
commit
de420f68a4
|
@ -76,7 +76,7 @@ EXEMPT_FILES = make_set(
|
||||||
"web/src/copy_and_paste.js",
|
"web/src/copy_and_paste.js",
|
||||||
"web/src/csrf.ts",
|
"web/src/csrf.ts",
|
||||||
"web/src/css_variables.js",
|
"web/src/css_variables.js",
|
||||||
"web/src/dark_theme.js",
|
"web/src/dark_theme.ts",
|
||||||
"web/src/debug.ts",
|
"web/src/debug.ts",
|
||||||
"web/src/deprecated_feature_notice.js",
|
"web/src/deprecated_feature_notice.js",
|
||||||
"web/src/desktop_integration.js",
|
"web/src/desktop_integration.js",
|
||||||
|
|
|
@ -3,7 +3,7 @@ import $ from "jquery";
|
||||||
import {localstorage} from "./localstorage";
|
import {localstorage} from "./localstorage";
|
||||||
import {page_params} from "./page_params";
|
import {page_params} from "./page_params";
|
||||||
|
|
||||||
export function enable() {
|
export function enable(): void {
|
||||||
$(":root").removeClass("color-scheme-automatic").addClass("dark-theme");
|
$(":root").removeClass("color-scheme-automatic").addClass("dark-theme");
|
||||||
|
|
||||||
if (page_params.is_spectator) {
|
if (page_params.is_spectator) {
|
||||||
|
@ -12,7 +12,7 @@ export function enable() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function disable() {
|
export function disable(): void {
|
||||||
$(":root").removeClass("color-scheme-automatic").removeClass("dark-theme");
|
$(":root").removeClass("color-scheme-automatic").removeClass("dark-theme");
|
||||||
|
|
||||||
if (page_params.is_spectator) {
|
if (page_params.is_spectator) {
|
||||||
|
@ -21,6 +21,6 @@ export function disable() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function default_preference_checker() {
|
export function default_preference_checker(): void {
|
||||||
$(":root").removeClass("dark-theme").addClass("color-scheme-automatic");
|
$(":root").removeClass("dark-theme").addClass("color-scheme-automatic");
|
||||||
}
|
}
|
Loading…
Reference in New Issue