Skip to content

Commit fb6fea8

Browse files
committed
修改用户页面样式
增加用户加入github时间显示
1 parent 5b46cb0 commit fb6fea8

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

VERSION.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
* webview点击跳转。
1616
* markdown htmlview 表格。
1717

18+
19+
* 文件列表的左上角访问按键问题
20+
* 用户到github的时间
21+
* 提示其他异常,从通知进去issue
22+
1823
### 1.0.5(进行中)
1924
* fix分享问题。
2025

lib/common/style/GSYStyle.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ class GSYStrings {
285285
static const String user_focus = "已关注";
286286
static const String user_un_focus = "关注";
287287
static const String user_focus_no_support = "不支持关注组织。";
288+
static const String user_create_at = "创建于:";
288289

289290
static const String repos_tab_readme = "详情";
290291
static const String repos_tab_info = "动态";

lib/page/RepositoryDetailPage.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ class _RepositoryDetailPageState extends State<RepositoryDetailPage> {
6363
if (result != null && result.result) {
6464
setState(() {
6565
reposDetailInfoPageControl.repository = result.data;
66-
print("==========================");
67-
print(result.data.htmlUrl);
6866
titleOptionControl.url = reposDetailInfoPageControl.repository.htmlUrl;
6967
});
7068
}

lib/widget/UserHeader.dart

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:gsy_github_app_flutter/common/model/User.dart';
33
import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart';
4+
import 'package:gsy_github_app_flutter/common/utils/CommonUtils.dart';
45
import 'package:gsy_github_app_flutter/common/utils/NavigatorUtils.dart';
56
import 'package:gsy_github_app_flutter/widget/GSYCardItem.dart';
67
import 'package:gsy_github_app_flutter/widget/GSYIConText.dart';
@@ -47,11 +48,16 @@ class UserHeaderItem extends StatelessWidget {
4748
if (notifyColor == null) {
4849
return Container();
4950
}
50-
return new IconButton(
51-
icon: new Icon(
52-
GSYICons.USER_NOTIFY,
53-
color: color,
54-
size: 18.0,
51+
return new RawMaterialButton(
52+
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
53+
padding: const EdgeInsets.only(top: 0.0, right: 5.0, left: 5.0),
54+
constraints: const BoxConstraints(minWidth: 0.0, minHeight: 0.0),
55+
child: new ClipOval(
56+
child: new Icon(
57+
GSYICons.USER_NOTIFY,
58+
color: color,
59+
size: 18.0,
60+
),
5561
),
5662
onPressed: () {
5763
NavigatorUtils.goNotifyPage(context).then((res) {
@@ -145,12 +151,14 @@ class UserHeaderItem extends StatelessWidget {
145151
///用户描述
146152
new Container(
147153
child: new Text(
148-
userInfo.bio == null ? GSYStrings.nothing_now : userInfo.bio,
154+
userInfo.bio == null
155+
? GSYStrings.user_create_at + CommonUtils.getDateStr(userInfo.created_at)
156+
: userInfo.bio + "\n" + GSYStrings.user_create_at + CommonUtils.getDateStr(userInfo.created_at),
149157
style: GSYConstant.subLightSmallText,
150158
),
151159
margin: new EdgeInsets.only(top: 6.0, bottom: 2.0),
152160
alignment: Alignment.topLeft),
153-
new Padding(padding: EdgeInsets.all(10.0)),
161+
new Padding(padding: EdgeInsets.only(bottom: 5.0)),
154162
new Divider(
155163
color: Color(GSYColors.subLightTextColor),
156164
),

0 commit comments

Comments
 (0)