mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-28 00:52:20 +00:00
update NoteDetail design
This commit is contained in:
@@ -32,6 +32,9 @@
|
||||
background-color transparent
|
||||
border none
|
||||
color $ui-inactive-text-color
|
||||
transition 0.15s
|
||||
&:active, &:active:hover
|
||||
color $ui-active-color
|
||||
&:hover
|
||||
color $ui-text-color
|
||||
.control-button-tooltip
|
||||
@@ -67,11 +70,24 @@
|
||||
cursor pointer
|
||||
transition background-color 0.15s
|
||||
&:hover
|
||||
background-color alpha($ui-active-color, 10%)
|
||||
background-color alpha($ui-active-color, 20%)
|
||||
&:active
|
||||
background-color $ui-active-color
|
||||
color white
|
||||
.item-title
|
||||
.item-title-empty
|
||||
.item-title-icon
|
||||
.item-bottom-tagIcon
|
||||
.item-bottom-tagList-empty
|
||||
.item-bottom-time
|
||||
color white
|
||||
.item-bottom-tagList-item
|
||||
background-color transparent
|
||||
color white
|
||||
|
||||
.item--active
|
||||
@extend .item
|
||||
background-color alpha($ui-active-color, 100%)
|
||||
background-color $ui-active-color
|
||||
color white
|
||||
.item-title
|
||||
.item-title-empty
|
||||
@@ -84,7 +100,7 @@
|
||||
background-color transparent
|
||||
color white
|
||||
&:hover
|
||||
background-color alpha($ui-active-color, 100%)
|
||||
background-color $ui-active-color
|
||||
|
||||
.item-border
|
||||
absolute top bottom left right
|
||||
@@ -174,7 +190,7 @@ body[data-theme="dark"]
|
||||
.item-bottom-tagList-empty
|
||||
color white
|
||||
&:hover
|
||||
background-color alpha($ui-active-color, 100%)
|
||||
background-color $ui-active-color
|
||||
|
||||
.item-title
|
||||
color $ui-dark-text-color
|
||||
|
||||
@@ -81,13 +81,14 @@ class NoteList extends React.Component {
|
||||
}
|
||||
|
||||
// Auto scroll
|
||||
if (_.isString(location.query.key) && prevProps.location.query.key !== location.query.key) {
|
||||
if (_.isString(location.query.key) && prevProps.location.query.key === location.query.key) {
|
||||
let targetIndex = _.findIndex(this.notes, (note) => {
|
||||
return note != null && note.storage + '-' + note.key === location.query.key
|
||||
})
|
||||
if (targetIndex > -1) {
|
||||
let list = this.refs.list
|
||||
let item = list.childNodes[targetIndex]
|
||||
|
||||
if (item == null) return false
|
||||
|
||||
let overflowBelow = item.offsetTop + item.clientHeight - list.clientHeight - list.scrollTop > 0
|
||||
|
||||
Reference in New Issue
Block a user