mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-08-24 14:48:42 +08:00
Add dark mode
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
// List of settings related action types.
|
||||
export const POLL_INTERVAL_CHANGE = "POLL_INTERVAL_CHANGE";
|
||||
export const POLL_INTERVAL_CHANGE = 'POLL_INTERVAL_CHANGE';
|
||||
export const TOGGLE_DARK_THEME = 'TOGGLE_DARK_THEME';
|
||||
|
||||
interface PollIntervalChangeAction {
|
||||
type: typeof POLL_INTERVAL_CHANGE;
|
||||
value: number; // new poll interval value in seconds
|
||||
}
|
||||
|
||||
interface ToggleDarkThemeAction {
|
||||
type: typeof TOGGLE_DARK_THEME;
|
||||
}
|
||||
|
||||
// Union of all settings related action types.
|
||||
export type SettingsActionTypes = PollIntervalChangeAction;
|
||||
export type SettingsActionTypes = PollIntervalChangeAction | ToggleDarkThemeAction;
|
||||
|
||||
export function pollIntervalChange(value: number) {
|
||||
return {
|
||||
@@ -15,3 +20,10 @@ export function pollIntervalChange(value: number) {
|
||||
value,
|
||||
};
|
||||
}
|
||||
|
||||
export function toggleDarkTheme() {
|
||||
return {
|
||||
type: TOGGLE_DARK_THEME
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user