Skip to content

Commit 749b4a1

Browse files
committed
Fix tab & message display
1 parent fe689b2 commit 749b4a1

File tree

6 files changed

+31
-14
lines changed

6 files changed

+31
-14
lines changed

www/app/messages/messageTile.html

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="item item-text-wrap">
1+
<div class="item item-text-wrap message-item">
22
<a class="item-author positive button-link"
33
ui-sref="app.user({loginname: message.author.loginname})">
44
<img class="avatar"
@@ -8,21 +8,26 @@
88
<span class="item-note"
99
am-time-ago="::message.reply.create_at"></span>
1010
</a>
11-
<span ng-switch="message.type">
11+
<span ng-switch="message.type" class="text-note">
1212
<span ng-switch-when="reply">
1313
回复了你的话题
14-
<a href
15-
ui-sref="app.topic({topicId: message.topic.id})">
16-
{{::message.topic.title}}
17-
</a>
14+
<p>
15+
<a href
16+
class="button-link positive"
17+
ui-sref="app.replies({topicId: message.topic.id})">
18+
{{::message.topic.title}}
19+
</a>
20+
</p>
1821
</span>
1922
<span ng-switch-default>
2023
在回复中@了你
21-
<a href
22-
class="button-link positive"
23-
ui-sref="app.replies({topicId: message.topic.id})">
24-
{{::message.topic.title}}
25-
</a>
24+
<p>
25+
<a href
26+
class="button-link positive"
27+
ui-sref="app.replies({topicId: message.topic.id})">
28+
{{::message.topic.title}}
29+
</a>
30+
</p>
2631
</span>
2732
</span>
2833
</div>

www/app/messages/messages.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242

4343
<!-- 标记为已读的按钮 -->
4444
<button class="button-float button button-stable icon icon-done-all"
45+
ng-if="hasnot_read_messages.length"
4546
ng-click="markAsRead()"></button>
4647
</ion-view>

www/app/scss/_main.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ textarea {
7878
padding-left: 28px;
7979
}
8080
}
81+
.message-item {
82+
.avatar {
83+
height: 22px;
84+
width: 22px;
85+
}
86+
p {
87+
padding-left: 28px;
88+
margin-top: 5px;
89+
}
90+
}
8191
.user-item-body {
8292
p {
8393
margin-top: 0;

www/app/topics/topics.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</ion-refresher>
2626

2727
<!-- 主题列表,user页面也会用到 -->
28-
<topics-list topics="topics"></topics-list>
28+
<topics-list topics="topics" selected-tab='selectedTab'></topics-list>
2929

3030
<!-- 滚动加载更多 -->
3131
<ion-infinite-scroll on-infinite="loadMore()"

www/app/topics/topicsList.directive.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ angular.module('ionic-nodeclub')
55
templateUrl: 'app/topics/topicsList.html'
66
scope:
77
topics: '='
8+
selectedTab: '='

www/app/topics/topicsList.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ <h2>{{topic.title}}</h2>
1111
<span class="label label-positive"
1212
ng-if="topic.top">置顶</span>
1313
<span class="label label-positive"
14-
ng-if="selectedTab == 'all' && topic.good && !topic.top">精华</span>
14+
ng-if="topic.good && !topic.top">精华</span>
1515
<span class="label label-default"
16-
ng-if="selectedTab == 'all' && !topic.top && !topic.good">{{topic.tab | tabLabel}}</span>
16+
ng-if="!topic.top && !topic.good">{{topic.tab | tabLabel}}</span>
1717
{{topic.author.loginname}}
1818
<span class="item-note"
1919
am-time-ago="topic.last_reply_at">

0 commit comments

Comments
 (0)