mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-15 03:30:29 +03:00
* Add Auto theme that uses browser's preferred color scheme This will use dark mode automatically if the browser requests it. * fixup! Add Auto theme that uses browser's preferred color scheme * Use a toggle to use system theme
32 lines
725 B
JavaScript
32 lines
725 B
JavaScript
import appDispatcher from '../dispatcher';
|
|
import cons from '../state/cons';
|
|
|
|
export function toggleSystemTheme() {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.settings.TOGGLE_SYSTEM_THEME,
|
|
});
|
|
}
|
|
|
|
export function toggleMarkdown() {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.settings.TOGGLE_MARKDOWN,
|
|
});
|
|
}
|
|
|
|
export function togglePeopleDrawer() {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.settings.TOGGLE_PEOPLE_DRAWER,
|
|
});
|
|
}
|
|
|
|
export function toggleMembershipEvents() {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.settings.TOGGLE_MEMBERSHIP_EVENT,
|
|
});
|
|
}
|
|
|
|
export function toggleNickAvatarEvents() {
|
|
appDispatcher.dispatch({
|
|
type: cons.actions.settings.TOGGLE_NICKAVATAR_EVENT,
|
|
});
|
|
}
|