Skip to content

Commit 36b97fc

Browse files
committed
Interface Improved
1 parent 0f8c627 commit 36b97fc

File tree

2 files changed

+55
-13
lines changed

2 files changed

+55
-13
lines changed

browser/main/modals/PreferencesModal/ConfigTab.styl

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
justify-content: center
88
position relative
99
margin-bottom: 2em
10+
margin-left 2em
1011

1112
.box-minmax
1213
width 608px
14+
height 45px
1315
display flex
1416
justify-content space-between
1517
font-size $tab--button-font-size
@@ -18,6 +20,7 @@
1820
margin-top 18px
1921
padding-right 10px
2022
padding-left 10px
23+
padding-top 8px
2124
position relative
2225
border $ui-borderColor
2326
border-radius 5px
@@ -29,13 +32,23 @@ div[id^="secondRow"]
2932
left 0;
3033
top 0;
3134
margin-bottom -42px;
35+
.rs-label
36+
margin-left -20px
3237

3338
div[id^="firstRow"]
3439
position absolute;
3540
z-index 2;
3641
left 0;
3742
top 0;
3843
margin-bottom -25px;
44+
.rs-range
45+
&::-webkit-slider-thumb
46+
margin-top: 0px
47+
transform: rotate(180deg)
48+
.rs-label
49+
margin-bottom -85px
50+
margin-top 85px
51+
3952

4053
.rs-range
4154
margin-top: 29px
@@ -51,18 +64,23 @@ div[id^="firstRow"]
5164
background: $ui-backgroundColor
5265
border-radius: 0px
5366
border: 0px solid #010101
67+
cursor none
5468

5569
&::-webkit-slider-thumb
5670
box-shadow: none
57-
border: 0px solid $ui-borderColor
71+
border: 1px solid $ui-borderColor
5872
box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.25)
59-
height: 42px
60-
width: 22px
73+
height: 32px
74+
width: 32px
6175
border-radius: 22px
62-
background: $ui-backgroundColor
76+
background: $ui-text-color
6377
cursor: pointer
6478
-webkit-appearance: none
6579
margin-top: -20px
80+
border-color: $ui-text-color
81+
height 32px
82+
border-top-left-radius: 10%
83+
border-top-right-radius: 10%
6684

6785
.rs-label
6886
position: relative
@@ -76,8 +94,10 @@ div[id^="firstRow"]
7694
border: none
7795
margin-bottom: -5px
7896
margin-top: -10px
79-
width: 0px
80-
margin-left: 0px
97+
clear:both;
98+
float:left;
99+
height 17px
100+
margin-left: -25px
81101
left: attr(value)
82102
color: $ui-text-color
83103
font-style: normal
@@ -256,7 +276,10 @@ body[data-theme="dark"]
256276

257277
.box-minmax, .rs-range, .rs-label
258278
colorDarkControl()
259-
279+
.rs-range
280+
&::-webkit-slider-thumb
281+
colorDarkControl()
282+
background $ui-dark-text-color
260283

261284
body[data-theme="solarized-dark"]
262285
.root
@@ -286,6 +309,10 @@ body[data-theme="solarized-dark"]
286309
colorSolarizedDarkControl()
287310
.box-minmax, .rs-range, .rs-label
288311
colorSolarizedDarkControl()
312+
.rs-range
313+
&::-webkit-slider-thumb
314+
colorSolarizedDarkControl()
315+
background $ui-solarized-dark-text-color
289316

290317
body[data-theme="monokai"]
291318
.root
@@ -315,7 +342,11 @@ body[data-theme="monokai"]
315342
colorMonokaiControl()
316343
.box-minmax, .rs-range, .rs-label
317344
colorMonokaiControl()
318-
345+
.rs-range
346+
&::-webkit-slider-thumb
347+
colorMonokaiControl()
348+
background $ui-monokai-text-color
349+
319350
body[data-theme="dracula"]
320351
.root
321352
color $ui-dracula-text-color
@@ -343,4 +374,8 @@ body[data-theme="dracula"]
343374
select, .group-section-control-input
344375
colorDraculaControl()
345376
.box-minmax, .rs-range, .rs-label
346-
colorDraculaControl()
377+
colorDraculaControl()
378+
.rs-range
379+
&::-webkit-slider-thumb
380+
colorDraculaControl()
381+
background $ui-dracula-text-color

browser/main/modals/PreferencesModal/UiTab.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,17 @@ class UiTab extends React.Component {
196196
const rangeSlider = document.getElementById(sliderID)
197197
const rangeBullet = document.getElementById(bulletID)
198198

199+
let order
200+
if (number === 1) {
201+
order = 'Start:'
202+
} else {
203+
order = 'End:'
204+
}
205+
199206
if (rangeSlider && rangeBullet) {
200-
rangeBullet.innerHTML = this.formatTime(rangeSlider.value)
207+
rangeBullet.innerHTML = `${order}${this.formatTime(rangeSlider.value)}`
201208
const bulletPosition = (rangeSlider.value / rangeSlider.max)
202-
rangeBullet.style.left = (bulletPosition * 578) + 'px'
209+
rangeBullet.style.left = (bulletPosition * 574) + 6 * (1 - bulletPosition) + 'px'
203210
}
204211

205212
if (e) {
@@ -277,12 +284,12 @@ class UiTab extends React.Component {
277284
<div styleName='group-section'>
278285
<div styleName='container'>
279286
<div styleName='range-slider' id='firstRow'>
280-
<span id='rs-bullet-1' styleName='rs-label'>{this.formatTime(config.ui.scheduleStart)}</span>
287+
<span id='rs-bullet-1' styleName='rs-label'>{`Start: ${this.formatTime(config.ui.scheduleStart)}`}</span>
281288
<input id='rs-range-line-1' styleName='rs-range' type='range' value={config.ui.scheduleStart} min='0' max='1440' step='5' ref='scheduleStart'
282289
onChange={(e) => this.handleSlider(e, 1)} />
283290
</div>
284291
<div styleName='range-slider' id='secondRow'>
285-
<span id='rs-bullet-2' styleName='rs-label'>{this.formatTime(config.ui.scheduleEnd)}</span>
292+
<span id='rs-bullet-2' styleName='rs-label'>{`End: ${this.formatTime(config.ui.scheduleEnd)}`}</span>
286293
<input id='rs-range-line-2' styleName='rs-range' type='range' value={config.ui.scheduleEnd} min='0' max='1440' step='5' ref='scheduleEnd'
287294
onChange={(e) => this.handleSlider(e, 2)} />
288295
</div>

0 commit comments

Comments
 (0)