Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

chore: enable back shortcut setting zoom in/out

Faisal Amirf7e7c0d246a4
diff --git a/web-app/src/routes/settings/shortcuts.tsx b/web-app/src/routes/settings/shortcuts.tsx
index 9cbe44f41..1bad0cb2c 100644
--- a/web-app/src/routes/settings/shortcuts.tsx
+++ b/web-app/src/routes/settings/shortcuts.tsx
@@ -4,11 +4,7 @@ import SettingsMenu from '@/containers/SettingsMenu'
import HeaderPage from '@/containers/HeaderPage'
import { Card, CardItem } from '@/containers/Card'
import { useTranslation } from '@/i18n/react-i18next-compat'
-import {
- ShortcutAction,
- PlatformShortcuts,
- type ShortcutSpec,
-} from '@/lib/shortcuts'
+import { ShortcutAction, PlatformShortcuts, type ShortcutSpec } from '@/lib/shortcuts'
import { PlatformMetaKey } from '@/containers/PlatformMetaKey'
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -28,9 +24,7 @@ function ShortcutLabel({ action, className = '' }: ShortcutLabelProps) {
const spec = PlatformShortcuts[action]
return (
- <div
- className={`flex items-center justify-center px-3 py-1 bg-main-view-fg/5 rounded-md ${className}`}
- >
+ <div className={`flex items-center justify-center px-3 py-1 bg-main-view-fg/5 rounded-md ${className}`}>
<span className="font-medium">
<ShortcutKeys spec={spec} />
</span>
@@ -109,9 +103,17 @@ function Shortcuts() {
<CardItem
title={t('settings:shortcuts.toggleSidebar')}
description={t('settings:shortcuts.toggleSidebarDesc')}
- actions={
- <ShortcutLabel action={ShortcutAction.TOGGLE_SIDEBAR} />
- }
+ actions={<ShortcutLabel action={ShortcutAction.TOGGLE_SIDEBAR} />}
+ />
+ <CardItem
+ title={t('settings:shortcuts.zoomIn')}
+ description={t('settings:shortcuts.zoomInDesc')}
+ actions={<ShortcutLabel action={ShortcutAction.ZOOM_IN} />}
+ />
+ <CardItem
+ title={t('settings:shortcuts.zoomOut')}
+ description={t('settings:shortcuts.zoomOutDesc')}
+ actions={<ShortcutLabel action={ShortcutAction.ZOOM_OUT} />}
/>
</Card>
@@ -146,9 +148,7 @@ function Shortcuts() {
<CardItem
title={t('settings:shortcuts.goToSettings')}
description={t('settings:shortcuts.goToSettingsDesc')}
- actions={
- <ShortcutLabel action={ShortcutAction.GO_TO_SETTINGS} />
- }
+ actions={<ShortcutLabel action={ShortcutAction.GO_TO_SETTINGS} />}
/>
</Card>
</div>