cherry-studio/src/main/services
beyondkmp a33a234f36 feat: add zoom factor setting and localization support (#5665)
* feat: add zoom factor setting and localization support

- Introduced App_SetZoomFactor IPC channel for managing zoom levels.
- Implemented zoom factor functionality in the main IPC handler.
- Added setZoomFactor method in the settings store and corresponding UI in DisplaySettings.
- Included localization for zoom settings in English and Chinese.

* add i18n

* recover file

* delete code

* fix: update zoom factor handling to apply to all windows

- Modified the IPC handler for App_SetZoomFactor to set the zoom factor for all non-destroyed windows instead of just the main window.

* add getzoomfactor api

* feat: synchronize zoom factor with Redux state on app initialization

- Added functionality to fetch the zoom factor from the main process and dispatch it to the Redux store during app initialization.
- Removed redundant zoom factor fetching logic from DisplaySettings component.

* feat: enhance zoom factor management with IPC updates

- Added a new IPC channel for zoom factor updates to notify all renderer processes.
- Introduced a constant for predefined zoom levels to streamline zoom adjustments.
- Updated the zoom handling logic to utilize the new zoom levels and ensure smooth transitions.
- Implemented a listener in the preload script to handle zoom factor updates from the main process.
- Refactored the app initialization to include real-time updates for the zoom factor in the Redux state.

* feat: integrate zoom options into DisplaySettings component

- Added ZOOM_OPTIONS constant to generate structured options for Ant Design Select from predefined zoom levels.
- Refactored DisplaySettings to utilize ZOOM_OPTIONS, removing redundant zoom option definitions.
- Simplified the zoom factor fetching logic in useAppInit for better readability and efficiency.

* refactor: streamline zoom factor handling and remove unused IPC channel

- Removed the App_GetZoomFactor IPC channel as it was no longer needed.
- Updated zoom factor handling to directly set and notify the main window of changes.
- Simplified the logic for setting the zoom factor in the WindowService and ShortcutService.
- Adjusted the useAppInit hook to utilize the new zoom factor management approach.

* refactor: improve zoom factor handling in WindowService and useAppInit hook

- Simplified the zoom factor setting in WindowService by directly using the config manager.
- Updated useAppInit to ensure the zoom factor is set correctly on initialization, enhancing responsiveness to changes.
2025-05-08 07:18:43 +08:00
..
mcp/oauth fix: remove redundant local variables (#5654) 2025-05-04 19:56:56 +08:00
urlschema feat: Add MCP server installation via URL protocol (#5351) 2025-04-26 11:09:58 +08:00
AppUpdater.ts fix(AppUpdater): update condition for checking available updates (#5417) 2025-04-27 22:22:31 +08:00
AxiosProxy.ts refactor(AxiosProxy): improve proxy handling and initialization logic 2025-04-21 11:26:13 +08:00
BackupManager.ts fix the issue of webdav local backup file storage (#5643) 2025-05-04 13:16:06 +08:00
CacheService.ts feat: add gemini files support 2025-01-07 16:49:11 +08:00
ConfigManager.ts refactor: simplify custom CSS functionality by store sync (#5596) 2025-05-02 15:19:47 +08:00
ContextMenu.ts refactor(WindowService): improve context menu setup (#5589) 2025-05-04 11:04:56 +08:00
CopilotService.ts feat: integrate AxiosProxy for HTTP requests in rerankers and Copilot… (#4858) 2025-04-15 18:42:31 +08:00
ExportService.ts fix: remove redundant local variables (#5654) 2025-05-04 19:56:56 +08:00
FileService.ts chore: remove useless code 2025-03-28 09:24:54 +08:00
FileStorage.ts fix(Anthropic): add base64 file handling to IPC and file management (#5595) 2025-05-02 22:30:34 +08:00
GeminiService.ts fix: remove redundant local variables (#5654) 2025-05-04 19:56:56 +08:00
KnowledgeService.ts lint: fix eslint error 2025-04-05 10:52:45 +08:00
MCPService.ts fix: failed to connect OAuth MCP server (#5709) 2025-05-08 00:32:51 +08:00
NutstoreService.ts fix: remove redundant local variables (#5654) 2025-05-04 19:56:56 +08:00
ObsidianVaultService.ts feat: 优化导出obsidian,自动选择库路径,不再需要手动配置 (#3854) 2025-03-25 21:31:22 +08:00
ProtocolClient.ts feat: Implement deep linking for AppImage on Linux (#5360) 2025-04-26 11:19:53 +08:00
ProxyManager.ts fix: remove redundant local variables (#5654) 2025-05-04 19:56:56 +08:00
ReduxService.ts lint: fix eslint error 2025-04-05 10:52:45 +08:00
RemoteStorage.ts feat: Add OpenDAL based Remote Storage class (#2700) 2025-05-08 03:09:40 +08:00
SearchService.ts fix: remove redundant local variables (#5654) 2025-05-04 19:56:56 +08:00
ShortcutService.ts feat: add zoom factor setting and localization support (#5665) 2025-05-08 07:18:43 +08:00
StoreSyncService.ts fix(StoreSyncService): set flag bug when register IPC handler (#5715) 2025-05-07 10:52:51 +08:00
TrayService.ts feat: add a startup switch for quick assistant 2025-01-19 19:22:25 +08:00
WebDav.ts feat: 优化webdav备份文件恢复管理功能 (#4699) 2025-04-13 21:52:16 +08:00
WebviewService.ts feat: open popup url in external browser (#4446) 2025-04-25 09:45:54 +08:00
WindowService.ts refactor(WindowService, ThemeProvider): streamline title bar style and theme toggling logic (#5633) 2025-05-04 13:19:56 +08:00