From 07005940dc45a1921d530e18c5c49efd0f4c4d61 Mon Sep 17 00:00:00 2001 From: Ross Bulat Date: Thu, 14 Nov 2024 19:02:21 +0700 Subject: [PATCH] feat: Support options refresh with Discord and Mail (#2331) --- packages/app/src/config/pages.ts | 2 +- packages/app/src/img/book.svg | 1 + packages/app/src/img/discord.svg | 6 ++ packages/app/src/img/discord_outline.svg | 1 + packages/app/src/img/envelope.svg | 1 + packages/app/src/img/mail.svg | 1 + packages/app/src/library/Modal/Title.tsx | 16 ++-- packages/app/src/library/SideMenu/Main.tsx | 24 ------ .../src/library/SideMenu/Primary/Wrappers.ts | 2 +- .../library/SideMenu/Secondary/Wrappers.ts | 14 ++-- packages/app/src/library/SideMenu/Wrapper.ts | 2 +- packages/app/src/library/SideMenu/index.tsx | 79 +++++++++++++------ packages/app/src/locale/cn/base.json | 1 + packages/app/src/locale/cn/modals.json | 3 + packages/app/src/locale/en/base.json | 1 + packages/app/src/locale/en/modals.json | 3 + .../app/src/modals/DiscordSupport/Wrapper.ts | 30 +++++++ .../app/src/modals/DiscordSupport/index.tsx | 32 ++++++++ .../app/src/modals/GoToFeedback/index.tsx | 39 --------- .../app/src/modals/MailSupport/Wrapper.ts | 30 +++++++ packages/app/src/modals/MailSupport/index.tsx | 25 ++++++ packages/app/src/overlay/index.tsx | 6 +- packages/consts/src/index.ts | 2 + 23 files changed, 216 insertions(+), 105 deletions(-) create mode 100644 packages/app/src/img/book.svg create mode 100644 packages/app/src/img/discord.svg create mode 100644 packages/app/src/img/discord_outline.svg create mode 100644 packages/app/src/img/envelope.svg create mode 100644 packages/app/src/img/mail.svg create mode 100644 packages/app/src/modals/DiscordSupport/Wrapper.ts create mode 100644 packages/app/src/modals/DiscordSupport/index.tsx delete mode 100644 packages/app/src/modals/GoToFeedback/index.tsx create mode 100644 packages/app/src/modals/MailSupport/Wrapper.ts create mode 100644 packages/app/src/modals/MailSupport/index.tsx diff --git a/packages/app/src/config/pages.ts b/packages/app/src/config/pages.ts index 92b76cd0f5..3107a6954e 100644 --- a/packages/app/src/config/pages.ts +++ b/packages/app/src/config/pages.ts @@ -27,7 +27,7 @@ export const PageCategories: PageCategoryItems = [ export const PagesConfig: PagesConfigItems = [ { - category: 1, + category: 2, key: 'overview', uri: `${BASE_URL}`, hash: '/overview', diff --git a/packages/app/src/img/book.svg b/packages/app/src/img/book.svg new file mode 100644 index 0000000000..3c7fc22791 --- /dev/null +++ b/packages/app/src/img/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/app/src/img/discord.svg b/packages/app/src/img/discord.svg new file mode 100644 index 0000000000..8bc82e87a5 --- /dev/null +++ b/packages/app/src/img/discord.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/app/src/img/discord_outline.svg b/packages/app/src/img/discord_outline.svg new file mode 100644 index 0000000000..0575b060af --- /dev/null +++ b/packages/app/src/img/discord_outline.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/app/src/img/envelope.svg b/packages/app/src/img/envelope.svg new file mode 100644 index 0000000000..835dc1f7c0 --- /dev/null +++ b/packages/app/src/img/envelope.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/app/src/img/mail.svg b/packages/app/src/img/mail.svg new file mode 100644 index 0000000000..7a5336bde6 --- /dev/null +++ b/packages/app/src/img/mail.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/app/src/library/Modal/Title.tsx b/packages/app/src/library/Modal/Title.tsx index 716e8dc627..0357a5ce84 100644 --- a/packages/app/src/library/Modal/Title.tsx +++ b/packages/app/src/library/Modal/Title.tsx @@ -13,7 +13,7 @@ import type { CSSProperties } from 'styled-components'; import { ButtonHelp } from 'ui-buttons'; interface TitleProps { - title: string; + title?: string; icon?: IconProp; Svg?: FunctionComponent>; fixed?: boolean; @@ -42,12 +42,14 @@ export const Title = ({
{graphic} -

- {title} - {helpKey ? ( - openHelp(helpKey)} /> - ) : null} -

+ {title && ( +

+ {title} + {helpKey ? ( + openHelp(helpKey)} /> + ) : null} +

+ )}