mirror of
https://github.com/outline/outline.git
synced 2026-11-22 05:51:43 +03:00
1 parent
8d5b9b6ac4
commit
cd84ca2fa6
2 files changed
+17
-1
No files matched your search
@@ -25,6 +25,21 @@ export const changeToLightTheme = createAction({
|
||||
perform: ({ stores }) => stores.ui.setTheme(Theme.Light),
|
||||
});
|
||||
|
||||
export const toggleTheme = createAction({
|
||||
name: ({ t }) => t("Toggle theme"),
|
||||
analyticsName: "Change theme",
|
||||
iconInContextMenu: false,
|
||||
icon: ({ stores }) =>
|
||||
stores.ui.resolvedTheme === "light" ? <MoonIcon /> : <SunIcon />,
|
||||
keywords: "theme light day",
|
||||
section: SettingsSection,
|
||||
shortcut: ["Meta+Shift+l"],
|
||||
perform: ({ stores }) =>
|
||||
stores.ui.setTheme(
|
||||
stores.ui.resolvedTheme === "light" ? Theme.Dark : Theme.Light
|
||||
),
|
||||
});
|
||||
|
||||
export const changeToSystemTheme = createAction({
|
||||
name: ({ t }) => t("System"),
|
||||
analyticsName: "Change to system theme",
|
||||
@@ -47,4 +62,4 @@ export const changeTheme = createActionWithChildren({
|
||||
children: [changeToLightTheme, changeToDarkTheme, changeToSystemTheme],
|
||||
});
|
||||
|
||||
export const rootSettingsActions = [changeTheme];
|
||||
export const rootSettingsActions = [changeTheme, toggleTheme];
|
||||
@@ -147,6 +147,7 @@
|
||||
"Download revision": "Download revision",
|
||||
"Dark": "Dark",
|
||||
"Light": "Light",
|
||||
"Toggle theme": "Toggle theme",
|
||||
"System": "System",
|
||||
"Appearance": "Appearance",
|
||||
"Change theme": "Change theme",
|
||||
|
||||
Reference in new issue
Block a user