Skip to content

Commit 43f3459

Browse files
committed
Fixed Drag & Drop
1 parent 3f7420a commit 43f3459

5 files changed

Lines changed: 91 additions & 106 deletions

File tree

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "To-Do",
4-
"version": "1.0",
4+
"version": "1.0.1",
55
"icons": {
66
"16": "assets/icons/16.png",
77
"32": "assets/icons/32.png",
@@ -23,4 +23,4 @@
2323
"permissions": [
2424
"storage"
2525
]
26-
}
26+
}

popup.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ function change(old_index, new_index) {
99
data = data[main.history[main.history.length - 1].storage_key];
1010
}
1111

12-
old_index2 = Number(document.querySelectorAll('.satus-main .satus-list li')[old_index].querySelector('*').dataset.key);
13-
new_index2 = Number(document.querySelectorAll('.satus-main .satus-list li')[new_index].querySelector('*').dataset.key);
12+
old_index2 = Number(document.querySelectorAll('.satus-main .satus-list li')[old_index].querySelector('button').dataset.key);
13+
new_index2 = Number(document.querySelectorAll('.satus-main .satus-list li')[new_index].querySelector('button').dataset.key);
1414

1515
clone = Object.assign(data[old_index2]);
1616

@@ -251,7 +251,8 @@ function create() {
251251
}
252252

253253
document.querySelector('.satus-dialog__scrim').click();
254-
}
254+
}
255+
255256
var Menu = {
256257
header: {
257258
type: 'header',

satus.css

Lines changed: 67 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
color: inherit;
1919
border: none;
2020
outline: none;
21-
background-color: var(--satus-theme-button, transparent);
21+
background-color: var(--satus-theme-button);
2222

2323
-webkit-tap-highlight-color: transparent;
2424
align-items: center;
@@ -37,13 +37,13 @@
3737
content: '';
3838

3939
opacity: 0;
40-
background-color: var(--satus-theme-button, #000);
40+
background-color: var(--satus-theme-ripple);
4141
}
4242

4343
.satus-button:focus::before,
4444
.satus-button:hover::before
4545
{
46-
opacity: .04;
46+
opacity: 1;
4747
}
4848

4949
.satus-button__icon
@@ -58,7 +58,7 @@
5858

5959
color: inherit;
6060

61-
fill: currentColor;
61+
fill: var(--satus-theme-primary);
6262
}
6363

6464
.satus-button__icon + .satus-button__label
@@ -86,7 +86,7 @@
8686
color: inherit;
8787
border: none;
8888
outline: none;
89-
background-color: var(--satus-theme-button, transparent);
89+
background-color: var(--satus-theme-button);
9090

9191
justify-content: space-between;
9292
-webkit-tap-highlight-color: transparent;
@@ -123,7 +123,7 @@
123123

124124
.satus-dialog--color-picker .satus-button:hover
125125
{
126-
background-color: rgba(0,0,0,.1);
126+
background-color: var(--satus-theme-ripple);
127127
}
128128

129129
.satus-dialog--color-picker .satus-button::before
@@ -134,7 +134,7 @@
134134
.satus-dialog--color-picker .satus-button svg
135135
{
136136
fill: transparent;
137-
stroke: currentColor;
137+
stroke: var(--satus-theme-primary);
138138
}
139139

140140
.satus-dialog--color-picker canvas
@@ -178,7 +178,7 @@
178178
opacity: 0;
179179
background: rgba(25,25,25,.2);
180180

181-
fill: var(--satus-theme-on-surface, #777);
181+
fill: var(--satus-theme-dialog-text);
182182
backdrop-filter: blur(8px);
183183
}
184184

@@ -200,9 +200,9 @@
200200
animation-delay: 20ms;
201201

202202
opacity: 0;
203-
color: var(--satus-theme-on-surface, #777);
203+
color: var(--satus-theme-dialog-text);
204204
border-radius: 6px;
205-
background-color: var(--satus-theme-surface, #f7f7f6);
205+
background-color: var(--satus-theme-dialog);
206206
box-shadow: inset 0 -1px 1px 1px rgba(0,0,0,.1), 0 2px 6px rgba(0, 0, 0, .15);
207207
}
208208

@@ -272,40 +272,6 @@
272272
}
273273
}
274274

275-
/*--------------------------------------------------------------
276-
>>> FOLDER
277-
--------------------------------------------------------------*/
278-
279-
.satus-folder
280-
{
281-
font-size: inherit;
282-
283-
display: flex;
284-
285-
box-sizing: border-box;
286-
width: 100%;
287-
height: 48px;
288-
margin: 0;
289-
padding: 0 16px;
290-
291-
cursor: pointer;
292-
293-
color: inherit;
294-
border: none;
295-
outline: none;
296-
background-color: var(--satus-theme-button, transparent);
297-
298-
-webkit-tap-highlight-color: transparent;
299-
align-items: center;
300-
-webkit-appearance: none;
301-
}
302-
303-
.satus-folder:focus,
304-
.satus-folder:hover
305-
{
306-
background-color: rgba(0,0,0,.04);
307-
}
308-
309275
/*--------------------------------------------------------------
310276
>>> HEADER
311277
--------------------------------------------------------------*/
@@ -322,11 +288,17 @@
322288
min-height: 58px;
323289
padding: 0 8px;
324290

325-
color: var(--satus-theme-on-surface, #777);
326-
background-color: var(--satus-theme-surface, #fff);
291+
color: var(--satus-theme-header-text);
292+
background-color: var(--satus-theme-header);
327293
box-shadow: 0 0 3px rgba(0,0,0,.1);
328294

329-
fill: var(--satus-theme-on-surface, #777);
295+
fill: var(--satus-theme-header-text);
296+
}
297+
298+
.satus-header .satus-text--title
299+
{
300+
font-size: 15px;
301+
font-weight: 400;
330302
}
331303

332304
/*--------------------------------------------------------------
@@ -364,10 +336,10 @@
364336
width: 100%;
365337
height: 100%;
366338

367-
color: var(--satus-theme-on-surface, #777);
368-
background-color: var(--satus-theme-surface, #f7f7f6);
339+
color: var(--satus-theme-main-text);
340+
background-color: var(--satus-theme-main);
369341

370-
fill: var(--satus-theme-on-surface, #777);
342+
fill: var(--satus-theme-main-text);
371343
}
372344

373345
.satus-main__container
@@ -384,7 +356,7 @@
384356

385357
transition: 250ms;
386358

387-
background-color: var(--satus-theme-surface, #f7f7f6);
359+
background-color: var(--satus-theme-main);
388360

389361
will-change: transform;
390362
}
@@ -520,12 +492,12 @@
520492

521493
content: '';
522494

523-
background-color: rgba(0,0,0,.2);
495+
background-color: var(--satus-theme-scrollbar);
524496
}
525497

526498
.satus-scrollbar__thumb:hover::after
527499
{
528-
background-color: rgba(0,0,0,.4);
500+
background-color: var(--satus-theme-scrollbar-focus);
529501
}
530502

531503
.satus-scrollbar.active .satus-scrollbar__thumb,
@@ -546,43 +518,19 @@
546518

547519
box-sizing: border-box;
548520

521+
background-color: var(--satus-theme-section);
522+
549523
align-items: center;
550524
flex: 1;
551-
}
525+
}
526+
552527
/*--------------------------------------------------------------
553528
>>> SELECT
554529
--------------------------------------------------------------*/
555530

556531
.satus-select
557532
{
558-
font-size: inherit;
559-
560-
position: relative;
561-
562-
display: flex;
563-
564-
width: 100%;
565-
height: 48px;
566-
margin: 0;
567-
padding: 0 16px;
568-
569-
text-align: left;
570-
571-
color: inherit;
572-
border: none;
573-
outline: none;
574-
background-color: transparent;
575-
576533
justify-content: space-between;
577-
-webkit-tap-highlight-color: transparent;
578-
align-items: center;
579-
-webkit-appearance: none;
580-
}
581-
582-
.satus-select:focus,
583-
.satus-select:hover
584-
{
585-
background-color: rgba(0,0,0,.04);
586534
}
587535

588536
.satus-select__value
@@ -663,7 +611,7 @@
663611

664612
.satus-shortcut:hover
665613
{
666-
background-color: rgba(0,0,0,.04);
614+
background-color: var(--satus-theme-ripple);
667615
}
668616

669617
.satus-shortcut > .label
@@ -895,12 +843,12 @@
895843
content: '';
896844

897845
opacity: 0;
898-
background-color: var(--satus-theme-button, #000);
846+
background-color: var(--satus-theme-button);
899847
}
900848

901849
.satus-slider:hover::before
902850
{
903-
opacity: .04;
851+
opacity: 1;
904852
}
905853

906854

@@ -963,7 +911,7 @@
963911
content: '';
964912

965913
opacity: .26;
966-
background-color: var(--satus-theme-primary, #54d2a3);
914+
background-color: var(--satus-theme-primary);
967915
}
968916

969917
.satus-slider__track
@@ -973,7 +921,7 @@
973921
width: 0;
974922
height: 100%;
975923

976-
background-color: var(--satus-theme-primary, #54d2a3);
924+
background-color: var(--satus-theme-primary);
977925

978926
will-change: width;
979927
}
@@ -993,7 +941,7 @@
993941
height: 12px;
994942

995943
border-radius: 50%;
996-
background-color: var(--satus-theme-primary, #54d2a3);
944+
background-color: var(--satus-theme-primary);
997945
box-shadow: 0 1px 5px rgba(0, 0, 0, .15);
998946
}
999947

@@ -1018,7 +966,7 @@
1018966

1019967
color: #fff;
1020968
border-radius: 4px;
1021-
background: rgba(0,0,0,.5);
969+
background: var(--satus-theme-ripple);
1022970
}
1023971

1024972
.satus-slider:hover .satus-slider__thumb::before,
@@ -1041,7 +989,7 @@
1041989

1042990
opacity: 0;
1043991
border-radius: 50%;
1044-
background-color: var(--satus-theme-primary, #54d2a3);
992+
background-color: var(--satus-theme-primary);
1045993
}
1046994

1047995
.satus-slider__range:focus + .satus-slider__container .satus-slider__ring
@@ -1079,7 +1027,7 @@
10791027

10801028
.satus-switch:hover
10811029
{
1082-
background-color: rgba(0,0,0,.04);
1030+
background-color: var(--satus-theme-ripple);
10831031
}
10841032

10851033
.satus-switch__input
@@ -1390,3 +1338,32 @@
13901338
outline: none;
13911339
background: unset;
13921340
}
1341+
1342+
/*-----------------------------------------------------------------------------
1343+
>>> THEMES
1344+
-------------------------------------------------------------------------------
1345+
1.0 Default
1346+
-----------------------------------------------------------------------------*/
1347+
1348+
html
1349+
{
1350+
--satus-theme-primary: #f6b465;
1351+
1352+
--satus-theme-dialog: #f7f7f6;
1353+
--satus-theme-dialog-text: #777;
1354+
1355+
--satus-theme-header: #fff;
1356+
--satus-theme-header-text: #777;
1357+
1358+
--satus-theme-main: #f7f7f6;
1359+
--satus-theme-main-text: #777;
1360+
1361+
--satus-theme-section: #fff;
1362+
1363+
--satus-theme-button: transparent;
1364+
1365+
--satus-theme-scrollbar: rgba(0, 0, 0, .2);
1366+
--satus-theme-scrollbar-focus: rgba(0, 0, 0, .4);
1367+
1368+
--satus-theme-ripple: rgba(0, 0, 0, .04);
1369+
}

0 commit comments

Comments
 (0)