1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

Interface Improved

This commit is contained in:
gregueiras
2018-11-29 11:58:36 +00:00
parent 0f8c627474
commit 36b97fc6a2
2 changed files with 55 additions and 13 deletions

View File

@@ -7,9 +7,11 @@
justify-content: center justify-content: center
position relative position relative
margin-bottom: 2em margin-bottom: 2em
margin-left 2em
.box-minmax .box-minmax
width 608px width 608px
height 45px
display flex display flex
justify-content space-between justify-content space-between
font-size $tab--button-font-size font-size $tab--button-font-size
@@ -18,6 +20,7 @@
margin-top 18px margin-top 18px
padding-right 10px padding-right 10px
padding-left 10px padding-left 10px
padding-top 8px
position relative position relative
border $ui-borderColor border $ui-borderColor
border-radius 5px border-radius 5px
@@ -29,6 +32,8 @@ div[id^="secondRow"]
left 0; left 0;
top 0; top 0;
margin-bottom -42px; margin-bottom -42px;
.rs-label
margin-left -20px
div[id^="firstRow"] div[id^="firstRow"]
position absolute; position absolute;
@@ -36,6 +41,14 @@ div[id^="firstRow"]
left 0; left 0;
top 0; top 0;
margin-bottom -25px; margin-bottom -25px;
.rs-range
&::-webkit-slider-thumb
margin-top: 0px
transform: rotate(180deg)
.rs-label
margin-bottom -85px
margin-top 85px
.rs-range .rs-range
margin-top: 29px margin-top: 29px
@@ -51,18 +64,23 @@ div[id^="firstRow"]
background: $ui-backgroundColor background: $ui-backgroundColor
border-radius: 0px border-radius: 0px
border: 0px solid #010101 border: 0px solid #010101
cursor none
&::-webkit-slider-thumb &::-webkit-slider-thumb
box-shadow: none box-shadow: none
border: 0px solid $ui-borderColor border: 1px solid $ui-borderColor
box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.25) box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.25)
height: 42px height: 32px
width: 22px width: 32px
border-radius: 22px border-radius: 22px
background: $ui-backgroundColor background: $ui-text-color
cursor: pointer cursor: pointer
-webkit-appearance: none -webkit-appearance: none
margin-top: -20px margin-top: -20px
border-color: $ui-text-color
height 32px
border-top-left-radius: 10%
border-top-right-radius: 10%
.rs-label .rs-label
position: relative position: relative
@@ -76,8 +94,10 @@ div[id^="firstRow"]
border: none border: none
margin-bottom: -5px margin-bottom: -5px
margin-top: -10px margin-top: -10px
width: 0px clear:both;
margin-left: 0px float:left;
height 17px
margin-left: -25px
left: attr(value) left: attr(value)
color: $ui-text-color color: $ui-text-color
font-style: normal font-style: normal
@@ -256,7 +276,10 @@ body[data-theme="dark"]
.box-minmax, .rs-range, .rs-label .box-minmax, .rs-range, .rs-label
colorDarkControl() colorDarkControl()
.rs-range
&::-webkit-slider-thumb
colorDarkControl()
background $ui-dark-text-color
body[data-theme="solarized-dark"] body[data-theme="solarized-dark"]
.root .root
@@ -286,6 +309,10 @@ body[data-theme="solarized-dark"]
colorSolarizedDarkControl() colorSolarizedDarkControl()
.box-minmax, .rs-range, .rs-label .box-minmax, .rs-range, .rs-label
colorSolarizedDarkControl() colorSolarizedDarkControl()
.rs-range
&::-webkit-slider-thumb
colorSolarizedDarkControl()
background $ui-solarized-dark-text-color
body[data-theme="monokai"] body[data-theme="monokai"]
.root .root
@@ -315,7 +342,11 @@ body[data-theme="monokai"]
colorMonokaiControl() colorMonokaiControl()
.box-minmax, .rs-range, .rs-label .box-minmax, .rs-range, .rs-label
colorMonokaiControl() colorMonokaiControl()
.rs-range
&::-webkit-slider-thumb
colorMonokaiControl()
background $ui-monokai-text-color
body[data-theme="dracula"] body[data-theme="dracula"]
.root .root
color $ui-dracula-text-color color $ui-dracula-text-color
@@ -343,4 +374,8 @@ body[data-theme="dracula"]
select, .group-section-control-input select, .group-section-control-input
colorDraculaControl() colorDraculaControl()
.box-minmax, .rs-range, .rs-label .box-minmax, .rs-range, .rs-label
colorDraculaControl() colorDraculaControl()
.rs-range
&::-webkit-slider-thumb
colorDraculaControl()
background $ui-dracula-text-color

View File

@@ -196,10 +196,17 @@ class UiTab extends React.Component {
const rangeSlider = document.getElementById(sliderID) const rangeSlider = document.getElementById(sliderID)
const rangeBullet = document.getElementById(bulletID) const rangeBullet = document.getElementById(bulletID)
let order
if (number === 1) {
order = 'Start:'
} else {
order = 'End:'
}
if (rangeSlider && rangeBullet) { if (rangeSlider && rangeBullet) {
rangeBullet.innerHTML = this.formatTime(rangeSlider.value) rangeBullet.innerHTML = `${order}${this.formatTime(rangeSlider.value)}`
const bulletPosition = (rangeSlider.value / rangeSlider.max) const bulletPosition = (rangeSlider.value / rangeSlider.max)
rangeBullet.style.left = (bulletPosition * 578) + 'px' rangeBullet.style.left = (bulletPosition * 574) + 6 * (1 - bulletPosition) + 'px'
} }
if (e) { if (e) {
@@ -277,12 +284,12 @@ class UiTab extends React.Component {
<div styleName='group-section'> <div styleName='group-section'>
<div styleName='container'> <div styleName='container'>
<div styleName='range-slider' id='firstRow'> <div styleName='range-slider' id='firstRow'>
<span id='rs-bullet-1' styleName='rs-label'>{this.formatTime(config.ui.scheduleStart)}</span> <span id='rs-bullet-1' styleName='rs-label'>{`Start: ${this.formatTime(config.ui.scheduleStart)}`}</span>
<input id='rs-range-line-1' styleName='rs-range' type='range' value={config.ui.scheduleStart} min='0' max='1440' step='5' ref='scheduleStart' <input id='rs-range-line-1' styleName='rs-range' type='range' value={config.ui.scheduleStart} min='0' max='1440' step='5' ref='scheduleStart'
onChange={(e) => this.handleSlider(e, 1)} /> onChange={(e) => this.handleSlider(e, 1)} />
</div> </div>
<div styleName='range-slider' id='secondRow'> <div styleName='range-slider' id='secondRow'>
<span id='rs-bullet-2' styleName='rs-label'>{this.formatTime(config.ui.scheduleEnd)}</span> <span id='rs-bullet-2' styleName='rs-label'>{`End: ${this.formatTime(config.ui.scheduleEnd)}`}</span>
<input id='rs-range-line-2' styleName='rs-range' type='range' value={config.ui.scheduleEnd} min='0' max='1440' step='5' ref='scheduleEnd' <input id='rs-range-line-2' styleName='rs-range' type='range' value={config.ui.scheduleEnd} min='0' max='1440' step='5' ref='scheduleEnd'
onChange={(e) => this.handleSlider(e, 2)} /> onChange={(e) => this.handleSlider(e, 2)} />
</div> </div>