Skip to content

Commit 13791a3

Browse files
committed
[UI] add addGroup to home page
1 parent fecb9d9 commit 13791a3

File tree

8 files changed

+16
-11
lines changed

8 files changed

+16
-11
lines changed

lib/apps/chat/detail.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class _ChatDetailState extends State<ChatDetail> {
204204
),
205205
SizedBox(height: 6.0),
206206
Text(friend.isClosed
207-
? lang.unfriended
207+
? lang.closed
208208
: session.onlineLang(lang),
209209
style: TextStyle(
210210
color: color.onPrimary.withOpacity(0.5),

lib/apps/chat/list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class ListChat extends StatelessWidget {
110110
if (this.friend.isClosed)
111111
Container(
112112
margin: const EdgeInsets.only(left: 15.0, right: 20.0),
113-
child: Text(lang.unfriended,
113+
child: Text(lang.closed,
114114
style: TextStyle(color: color.primary, fontSize: 12.0),
115115
),
116116
)

lib/apps/group_chat/add.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class _GroupAddPageState extends State<GroupAddPage> {
221221
length: 2,
222222
child: Scaffold(
223223
appBar: AppBar(
224-
title: Text(lang.addFriend),
224+
title: Text(lang.groupChatAdd),
225225
leading: isDesktop
226226
? IconButton(
227227
onPressed: () {

lib/apps/group_chat/list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class ListChat extends StatelessWidget {
109109
if (group.isClosed)
110110
Container(
111111
margin: const EdgeInsets.only(left: 15.0, right: 20.0),
112-
child: Text(lang.unfriended,
112+
child: Text(lang.closed,
113113
style: TextStyle(color: color.primary, fontSize: 12.0),
114114
),
115115
)

lib/l10n/localizations.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ abstract class AppLocalizations {
133133
String fromContactCard(String name);
134134
String get setTop;
135135
String get cancelTop;
136-
String get unfriended;
137136
String get unfriend;
138137
String get waitingRecord;
139138

lib/l10n/localizations_en.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@ class AppLocalizationsEn extends AppLocalizations {
181181
@override
182182
String get cancelTop => 'Cancal';
183183
@override
184-
String get unfriended => 'Unfriended';
185-
@override
186184
String get unfriend => 'Unfriend';
187185
@override
188186
String get waitingRecord => 'Waiting to record';
@@ -263,7 +261,7 @@ class AppLocalizationsEn extends AppLocalizations {
263261
@override
264262
String get groupChats => 'Groups';
265263
@override
266-
String get groupChatAdd => 'Add Group Chat';
264+
String get groupChatAdd => 'Add Group';
267265
@override
268266
String get groupChatIntro => 'Multiple group chats';
269267
@override

lib/l10n/localizations_zh.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@ class AppLocalizationsZh extends AppLocalizations {
181181
@override
182182
String get cancelTop => '取消首页';
183183
@override
184-
String get unfriended => '已解除好友';
185-
@override
186184
String get unfriend => '解除好友';
187185
@override
188186
String get waitingRecord => '等待录音';

lib/pages/home.dart

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import 'package:esse/apps/file/list.dart';
3434
import 'package:esse/apps/service/list.dart';
3535
import 'package:esse/apps/service/add.dart';
3636
import 'package:esse/apps/assistant/page.dart';
37+
import 'package:esse/apps/group_chat/add.dart';
3738
import 'package:esse/apps/group_chat/list.dart';
3839
import 'package:esse/apps/group_chat/detail.dart';
3940
import 'package:esse/apps/group_chat/provider.dart';
@@ -162,6 +163,14 @@ class _HomeListState extends State<HomeList> {
162163
Navigator.push(context, MaterialPageRoute(builder: (_) => widget));
163164
}
164165
} else if (value == 2) {
166+
final widget = GroupAddPage();
167+
if (isDesktop) {
168+
provider.updateActivedWidget(widget);
169+
} else {
170+
setState(() {});
171+
Navigator.push(context, MaterialPageRoute(builder: (_) => widget));
172+
}
173+
} else if (value == 3) {
165174
showShadowDialog(
166175
context,
167176
Icons.info,
@@ -179,7 +188,8 @@ class _HomeListState extends State<HomeList> {
179188
_menuItem(0, Icons.qr_code_scanner_rounded, lang.scan),
180189
_menuItem(1, Icons.person_add_rounded, lang.addFriend,
181190
provider.systemAppFriendAddNew),
182-
_menuItem(2, Icons.qr_code_rounded, lang.myQrcode),
191+
_menuItem(2, Icons.group_add_rounded, lang.groupChatAdd),
192+
_menuItem(3, Icons.qr_code_rounded, lang.myQrcode),
183193
];
184194
},
185195
),

0 commit comments

Comments
 (0)