Skip to content

Commit 5da908c

Browse files
committed
modfiy: change style for note list
1 parent fcce1d4 commit 5da908c

2 files changed

Lines changed: 29 additions & 31 deletions

File tree

browser/main/NoteList/NoteList.styl

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
$control-height = 30px
2+
13
.root
24
absolute left bottom
35
top $topBar-height - 1
6+
background-color $ui-noteList-backgroundColor
47

58
.control
69
absolute top left right
710
user-select none
8-
height 30px
11+
height $control-height
912
font-size 12px
1013
line-height 25px
1114
display flex
@@ -58,15 +61,15 @@
5861

5962
.list
6063
absolute left right bottom
61-
top 24px
64+
top $control-height
6265
overflow auto
6366

6467
.item
6568
position relative
66-
border-bottom $ui-border
67-
padding 2px 5px
69+
padding 20px 25px
6870
user-select none
6971
cursor pointer
72+
background-color $ui-noteList-backgroundColor
7073
transition background-color 0.15s
7174
&:hover
7275
background-color alpha($ui-active-color, 20%)
@@ -109,10 +112,11 @@
109112
transition 0.15s
110113

111114
.item-title
112-
height 24px
115+
font-size 14px
116+
height 40px
113117
box-sizing border-box
114118
line-height 24px
115-
padding 0
119+
padding 10px 0
116120
overflow ellipsis
117121
color $ui-text-color
118122

@@ -126,6 +130,8 @@
126130
color $ui-inactive-text-color
127131

128132
.item-bottom
133+
position relative
134+
bottom 0px
129135
margin-top 2px
130136
height 20px
131137
font-size 12px
@@ -145,17 +151,15 @@
145151
line-height 20px
146152

147153
.item-bottom-tagList-item
148-
margin 0 4px
149-
padding 0 4px
154+
font-size 12px
155+
margin-right 8px
156+
padding 0 10px
150157
height 20px
151158
box-sizing border-box
152-
border-radius 3px
159+
border-radius 20px
153160
vertical-align middle
154-
border-style solid
155-
border-color $ui-button--focus-borderColor
156-
border-width 0 0 0 3px
157-
background-color $ui-backgroundColor
158-
color $ui-text-color
161+
background-color $ui-tag-backgroundColor
162+
color #FFFFFF
159163

160164
.item-bottom-tagList-empty
161165
color $ui-inactive-text-color
@@ -165,16 +169,16 @@
165169

166170
.item-bottom-time
167171
color $ui-inactive-text-color
168-
margin-left 5px
169-
font-size 10px
172+
font-size 12px
170173

171174
body[data-theme="dark"]
172175
.root
173176
border-color $ui-dark-borderColor
174-
background-color $ui-dark-backgroundColor
177+
background-color $ui-dark-noteList-backgroundColor
175178

176179
.item
177180
border-color $ui-dark-borderColor
181+
background-color $ui-dark-noteList-backgroundColor
178182
&:hover
179183
background-color alpha($ui-active-color, 20%)
180184

@@ -204,8 +208,7 @@ body[data-theme="dark"]
204208
color $ui-dark-button-color
205209

206210
.item-bottom-tagList-item
207-
border-color $ui-dark-button--focus-borderColor
208-
background-color $ui-dark-button--hover-backgroundColor
211+
background-color $ui-dark-tag-backgroundColor
209212
color $ui-dark-text-color
210213

211214
.item-bottom-tagList-empty

browser/main/NoteList/index.js

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,13 @@ class NoteList extends React.Component {
336336
onClick={(e) => this.handleNoteClick(e, note.storage + '-' + note.key)}
337337
onContextMenu={(e) => this.handleNoteContextMenu(e, note.storage + '-' + note.key)}
338338
>
339+
{config.listStyle === 'DEFAULT' &&
340+
<div styleName='item-bottom-time'>
341+
{moment(config.sortBy === 'CREATED_AT' ? note.createdAt : note.updatedAt).fromNow()}
342+
</div>
343+
}
344+
339345
<div styleName='item-title'>
340-
{note.type === 'SNIPPET_NOTE'
341-
? <i styleName='item-title-icon' className='fa fa-fw fa-code'/>
342-
: <i styleName='item-title-icon' className='fa fa-fw fa-file-text-o'/>
343-
}
344346
{note.title.trim().length > 0
345347
? note.title
346348
: <span styleName='item-title-empty'>Empty</span>
@@ -349,19 +351,12 @@ class NoteList extends React.Component {
349351

350352
{config.listStyle === 'DEFAULT' &&
351353
<div styleName='item-bottom'>
352-
<i styleName='item-bottom-tagIcon'
353-
className='fa fa-tags fa-fw'
354-
/>
355354
<div styleName='item-bottom-tagList'>
356355
{tagElements.length > 0
357356
? tagElements
358-
: <span styleName='item-bottom-tagList-empty'>Not tagged yet</span>
357+
: ''
359358
}
360359
</div>
361-
362-
<div styleName='item-bottom-time'>
363-
{moment(config.sortBy === 'CREATED_AT' ? note.createdAt : note.updatedAt).fromNow()}
364-
</div>
365360
</div>
366361
}
367362
</div>

0 commit comments

Comments
 (0)