From 6e767af26209a417828a398669fd054453bc5e83 Mon Sep 17 00:00:00 2001 From: yezhiyi9670 Date: Sun, 23 Jul 2023 12:29:46 +0800 Subject: [PATCH] Add ability to export json --- src/renderer/appbar/appbar.tsx | 2 + src/renderer/appbar/button.tsx | 3 +- src/renderer/dialog/hint/entries.tsx | 8 ++++ src/renderer/i18n/lang/zh_cn.ts | 18 ++++++++- src/renderer/index.tsx | 37 +++++++++++++++++-- .../integrated-editor/IntegratedEditor.tsx | 22 +++++++++-- src/util/prefs/entries.ts | 7 +++- version-number.json | 4 +- 8 files changed, 88 insertions(+), 13 deletions(-) diff --git a/src/renderer/appbar/appbar.tsx b/src/renderer/appbar/appbar.tsx index e0d460a..bf654d7 100644 --- a/src/renderer/appbar/appbar.tsx +++ b/src/renderer/appbar/appbar.tsx @@ -25,6 +25,7 @@ const useStyles = createUseStyles({ interface AppBarProps { onItemClick: (key: string) => void + onItemRightClick: (key: string) => void } export function AppBar(props: AppBarProps) { const classes = useStyles() @@ -36,6 +37,7 @@ export function AppBar(props: AppBarProps) { itemKey={entry.key} icon={entry.icon} onClick={() => {props.onItemClick(entry.key)}} + onRightClick={() => {props.onItemRightClick(entry.key)}} /> } diff --git a/src/renderer/appbar/button.tsx b/src/renderer/appbar/button.tsx index 3b5e9ce..f395bbf 100644 --- a/src/renderer/appbar/button.tsx +++ b/src/renderer/appbar/button.tsx @@ -32,12 +32,13 @@ interface AppBarButtonProps { itemKey: string icon: React.ReactNode onClick?: () => void + onRightClick?: () => void } export function AppBarButton(props: AppBarButtonProps) { const classes = useStyles() const LNG = useI18n() - return