From ed107d17bf5d9d54b8fdd5245e618395fbee1600 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Fri, 18 Feb 2022 16:16:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E7=BE=A4?= =?UTF-8?q?=E7=BB=84=E5=90=8D=E9=99=90=E5=88=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=BE=A4=E7=BB=84=E5=90=8D=E7=9A=84=E5=AE=B9=E5=BF=8D=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/i18n/langs/en-US/translation.json | 1 - shared/i18n/langs/zh-CN/translation.json | 1 - web/plugins/com.msgbyte.webview/src/index.tsx | 2 +- web/src/components/FullModal/Field.tsx | 46 ++++++++++--------- web/src/components/SectionHeader.tsx | 1 + web/src/components/modals/CreateGroup.tsx | 3 +- .../components/modals/GroupDetail/Summary.tsx | 2 +- 7 files changed, 30 insertions(+), 26 deletions(-) diff --git a/shared/i18n/langs/en-US/translation.json b/shared/i18n/langs/en-US/translation.json index 7e7865f5..f2fedd98 100644 --- a/shared/i18n/langs/en-US/translation.json +++ b/shared/i18n/langs/en-US/translation.json @@ -98,7 +98,6 @@ "k8abdba5c": "Has been sent", "k8acbe00": "Current service available", "k8b501189": "Service Status", - "k8bca9ffb": "Group Name", "k8caee957": "Invite friends to converse", "k8dc86b13": "Pin", "k8f6dfd40": "Current members", diff --git a/shared/i18n/langs/zh-CN/translation.json b/shared/i18n/langs/zh-CN/translation.json index ab890563..e71b08f2 100644 --- a/shared/i18n/langs/zh-CN/translation.json +++ b/shared/i18n/langs/zh-CN/translation.json @@ -98,7 +98,6 @@ "k8abdba5c": "已发送", "k8acbe00": "当前服务可用", "k8b501189": "服务状态", - "k8bca9ffb": "群组名", "k8caee957": "邀请好友加入会话", "k8dc86b13": "Pin", "k8f6dfd40": "当前成员数", diff --git a/web/plugins/com.msgbyte.webview/src/index.tsx b/web/plugins/com.msgbyte.webview/src/index.tsx index 0776c20b..4902f247 100644 --- a/web/plugins/com.msgbyte.webview/src/index.tsx +++ b/web/plugins/com.msgbyte.webview/src/index.tsx @@ -20,7 +20,7 @@ const GroupWebPanelRender: React.FC<{ panelInfo: any }> = (props) => { }; regGroupPanel({ - name: `${PLUGIN_NAME}/grouppanel`, + name: `${PLUGIN_NAME}/webpanel`, label: Translate.webpanel, provider: PLUGIN_NAME, extraFormMeta: [{ type: 'text', name: 'url', label: '网址' }], diff --git a/web/src/components/FullModal/Field.tsx b/web/src/components/FullModal/Field.tsx index e8950214..d137feed 100644 --- a/web/src/components/FullModal/Field.tsx +++ b/web/src/components/FullModal/Field.tsx @@ -77,28 +77,32 @@ const FullModalFieldEditor: React.FC = React.memo( const EditorComponent = props.renderEditor; return ( - - {isEditing && !_isNil(EditorComponent) ? ( - - ) : ( - {props.content ?? props.value} - )} - - {!isEditing ? ( - - - - ) : ( - <> - - - - - +
+
+ {isEditing && !_isNil(EditorComponent) ? ( + + ) : ( + {props.content ?? props.value} + )} +
+ +
+ {!isEditing ? ( + + - - )} - + ) : ( + + + + + + + + + )} +
+
); } ); diff --git a/web/src/components/SectionHeader.tsx b/web/src/components/SectionHeader.tsx index c1d28215..ac1a244c 100644 --- a/web/src/components/SectionHeader.tsx +++ b/web/src/components/SectionHeader.tsx @@ -14,6 +14,7 @@ export const SectionHeader: React.FC = React.memo(
{React.isValidElement(props.menu) ? ( {
- {/* TODO: update avatar */} + {/* TODO: upload avatar */}
@@ -146,6 +146,7 @@ export const ModalCreateGroup: React.FC = React.memo(() => { setName(e.target.value)} /> diff --git a/web/src/components/modals/GroupDetail/Summary.tsx b/web/src/components/modals/GroupDetail/Summary.tsx index ecdae87f..8392bb02 100644 --- a/web/src/components/modals/GroupDetail/Summary.tsx +++ b/web/src/components/modals/GroupDetail/Summary.tsx @@ -58,7 +58,7 @@ export const GroupSummary: React.FC<{