From 5bc73473d996c692350020d2d395a2dbc44a3e5c Mon Sep 17 00:00:00 2001 From: hanhu Date: Thu, 7 Jan 2021 17:37:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BE=A4=E8=81=8A?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=20-=20=E5=85=A8=E9=83=A8=E6=88=90=E5=91=98?= =?UTF-8?q?=E7=9A=84=E5=B1=95=E7=A4=BAUI=EF=BC=9B=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E6=9C=AA=E8=AF=BB=E6=A0=87=E8=AE=B0=E7=AB=96?= =?UTF-8?q?=E7=9B=B4=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- language/zh.json | 5 +- plugin/message/display/VideoBubble.tsx | 70 +++++-- plugin/setting/AllMembers.tsx | 89 ++++++++- plugin/setting/AvatarList.tsx | 1 + plugin/setting/GroupData.tsx | 63 +++++++ plugin/setting/GroupName.tsx | 25 ++- plugin/setting/index.ts | 7 +- standard/component/AvatarList.tsx | 5 +- standard/component/MessageBubble.tsx | 1 + standard/component/image/showMore@3x.png | Bin 0 -> 1974 bytes standard/index.ts | 1 + standard/model/external.ts | 3 +- standard/model/group.ts | 4 + standard/page/ChatDetail.tsx | 36 ++-- standard/page/ChatSetting.tsx | 7 - standard/page/GroupNameEdit.tsx | 223 +++++++++++++++++++++++ standard/page/image/showMore@3x.png | Bin 0 -> 1974 bytes standard/page/index.ts | 2 + standard/pagekey.ts | 1 + standard/typings/Component.ts | 2 + standard/typings/Delegate.ts | 5 +- standard/typings/Message.ts | 2 +- 22 files changed, 500 insertions(+), 52 deletions(-) create mode 100644 plugin/setting/GroupData.tsx create mode 100644 standard/component/image/showMore@3x.png create mode 100644 standard/page/GroupNameEdit.tsx create mode 100644 standard/page/image/showMore@3x.png diff --git a/language/zh.json b/language/zh.json index a6ead73..b951b05 100644 --- a/language/zh.json +++ b/language/zh.json @@ -25,7 +25,7 @@ "IMPageChooseUserSelectFromOrg": "按部门选同事", "IMPageChooseUserAll": "所有人", "IMSettingAddGroupMember": "添加群成员", - "IMSettingAllMembers": "全体成员({{length}})", + "IMSettingAllMembers": "查看全体群成员({{length}})", "IMSettingAllowInvite": "允许添加成员", "IMSettingAvoid": "消息免打扰", "IMSettingChooseGroupMember": "选择群成员", @@ -47,5 +47,6 @@ "IMSettingTransferOwnerAction": "转交", "IMToastError": "{{action}}失败", "IMToastMessageNotSupport": "当前版本暂不支持该消息", - "IMToastSuccess": "{{action}}成功" + "IMToastSuccess": "{{action}}成功", + "IMSettingGroupDataInfo": "资料" } diff --git a/plugin/message/display/VideoBubble.tsx b/plugin/message/display/VideoBubble.tsx index 50c0a8d..9c1bb3b 100644 --- a/plugin/message/display/VideoBubble.tsx +++ b/plugin/message/display/VideoBubble.tsx @@ -1,6 +1,5 @@ import React from 'react'; -import {Platform, Text, ActivityIndicator, Image, StyleSheet, View} from "react-native"; - +import {ActivityIndicator, Image, Platform, StyleSheet, Text, View} from "react-native"; import Video from 'react-native-video'; import {Typings} from '../../../standard'; import OSSManager from 'core/oss/OSSManager'; @@ -15,6 +14,12 @@ export type Props = Typings.Action.Display.Params; export interface State { paused: boolean; downloadReady: boolean; + displaySize?: Size; +} + +class Size { + width: number; + height: number; } export default class extends React.PureComponent { @@ -26,16 +31,18 @@ export default class extends React.PureComponent { }; private remotePath: string; private localPath: string; - private maxWidth: number; private playableDuration: any; private displayPath: string; + private maxDisplaySize: number; + private size: Size; constructor(props: Props) { super(props); - const {message: {data: {localPath, remotePath, playableDuration}}, maxWidth} = props; + const {message: {data: {localPath, remotePath, playableDuration, size}}, maxWidth} = props; this.remotePath = remotePath; this.localPath = localPath; - this.maxWidth = maxWidth; + this.maxDisplaySize = maxWidth * 0.6; + this.size = size; this.playableDuration = playableDuration; } @@ -49,13 +56,11 @@ export default class extends React.PureComponent { } _renderContent() { - const width = this.maxWidth; - const height = this.maxWidth * 0.75; let content; if (this.isAndroid) { content = ( @@ -65,7 +70,7 @@ export default class extends React.PureComponent {