1- document . getElementById ( 'sec-notif' ) . style . transform = 'scale(0)'
1+ // document.getElementById('sec-notif').style.transform = 'scale(0)'
22
33try {
44 console . log ( localStorage . getItem ( "colormode" ) )
@@ -15,22 +15,28 @@ function colormode(pref){
1515 localStorage . setItem ( "colormode" , "dark" )
1616 document . getElementById ( 'filter' ) . style . opacity = '70%'
1717 document . getElementById ( 'menu1' ) . style . backgroundColor = 'black'
18- document . getElementById ( 'sec-notif' ) . style . backgroundColor = 'black'
18+ // document.getElementById('sec-notif').style.backgroundColor = 'black'
1919 document . getElementById ( 'warn-multichoice' ) . style . backgroundColor = 'black'
2020 document . getElementById ( 'warn-recursive' ) . style . backgroundColor = 'black'
21- document . getElementById ( 'menu1' ) . style . color = 'white'
21+ document . querySelectorAll ( 'h4' ) . forEach ( ( elems ) => {
22+ elems . style . color = 'white'
23+ } )
24+ document . querySelectorAll ( 'h5' ) . forEach ( ( elems ) => {
25+ elems . style . color = 'white'
26+ } )
2227 document . getElementById ( 'warn-multichoice' ) . style . color = 'white'
2328 document . getElementById ( 'warn-recursive' ) . style . color = 'white'
24- document . getElementById ( 'btn-select' ) . style . color = 'white'
29+ document . getElementById ( 'warn-multichoice' ) . classList . add ( 'scrl-bar-drk-mode' )
30+ //document.getElementById('btn-select').style.color = 'white'
2531 for ( i = 0 ; i < document . getElementsByClassName ( 'choice-rec' ) . length ; i ++ ) {
2632 document . getElementsByClassName ( 'choice-rec' ) [ i ] . style . color = 'white'
2733 document . getElementsByClassName ( 'choice-rec' ) [ i ] . style . backgroundColor = 'black'
2834 }
2935 document . getElementsByClassName ( 'gg-dark-mode' ) [ 0 ] . style . backgroundColor = 'black'
30- document . getElementById ( 'sec-notif' ) . style . color = 'white'
31- document . querySelector ( '.security-notification input' ) . style . color = 'white'
32- document . querySelector ( '.security-notification input' ) . style . backgroundColor = 'black'
33- document . querySelector ( '.security-notification input' ) . style . borderColor = 'white' ;
36+ // document.getElementById('sec-notif').style.color = 'white'
37+ // document.querySelector('.security-notification input').style.color = 'white'
38+ // document.querySelector('.security-notification input').style.backgroundColor = 'black'
39+ // document.querySelector('.security-notification input').style.borderColor = 'white';
3440 document . getElementById ( 'sub-select1' ) . style . backgroundColor = 'black'
3541 document . getElementById ( 'sub-select1' ) . style . borderColor = 'white'
3642 document . getElementById ( 'sel-txt' ) . style . color = 'white' ;
@@ -49,24 +55,51 @@ function colormode(pref){
4955 document . getElementById ( 'error' ) . style . color = 'white'
5056 document . getElementById ( 'success' ) . style . color = 'white' ;
5157 document . getElementById ( "notification" ) . style . backgroundColor = 'black' ;
58+
59+ document . querySelector ( '.dropzone' ) . style . backgroundColor = 'black' ;
60+ document . querySelector ( '.dropzone' ) . style . color = 'white' ;
61+ document . querySelectorAll ( '.dz-image' ) . forEach ( ( elem ) => {
62+ elem . classList . add ( 'invert' ) ;
63+ } )
64+
65+ document . querySelectorAll ( '.dz-details' ) . forEach ( ( elem ) => {
66+ elem . classList . add ( 'invert' )
67+ } )
5268
5369 } else if ( pref === 'light' ) {
5470 localStorage . setItem ( "colormode" , "light" )
5571 document . getElementById ( 'filter' ) . style . opacity = '5%'
5672 document . getElementById ( 'menu1' ) . style . backgroundColor = 'white'
57- document . getElementById ( 'sec-notif' ) . style . backgroundColor = 'white'
73+ // document.getElementById('sec-notif').style.backgroundColor = 'white'
5874 document . getElementById ( 'warn-multichoice' ) . style . backgroundColor = 'white'
5975 document . getElementById ( 'warn-recursive' ) . style . backgroundColor = 'white'
60- document . getElementById ( 'menu1' ) . style . color = 'black'
76+ document . querySelectorAll ( 'h4' ) . forEach ( ( elems ) => {
77+ elems . style . color = 'black'
78+ } )
79+ document . querySelectorAll ( 'h5' ) . forEach ( ( elems ) => {
80+ elems . style . color = 'black'
81+ } )
6182 document . getElementById ( 'warn-multichoice' ) . style . color = 'black'
6283 document . getElementById ( 'warn-recursive' ) . style . color = 'black'
63- document . getElementById ( 'btn-select' ) . style . color = 'black'
84+ document . getElementById ( 'warn-multichoice' ) . classList . remove ( 'scrl-bar-drk-mode' )
85+ //document.getElementById('btn-select').style.color = 'black'
86+ document . querySelector ( '.dropzone' ) . style . backgroundColor = 'white' ;
87+ document . querySelector ( '.dropzone' ) . style . color = 'black' ;
88+ document . querySelectorAll ( '.dz-image' ) . forEach ( ( elem ) => {
89+ elem . classList . remove ( 'invert' ) ;
90+ } )
91+
92+ document . querySelectorAll ( '.dz-details' ) . forEach ( ( elem ) => {
93+ elem . classList . remove ( 'invert' )
94+ } )
95+
96+ //document.querySelector('.dz-details').style.backgroundColor = 'black'
6497 for ( i = 0 ; i < document . getElementsByClassName ( 'choice-rec' ) . length ; i ++ ) {
6598 document . getElementsByClassName ( 'choice-rec' ) [ i ] . style . color = 'black'
6699 document . getElementsByClassName ( 'choice-rec' ) [ i ] . style . backgroundColor = 'white'
67100 }
68101 document . getElementsByClassName ( 'gg-dark-mode' ) [ 0 ] . style . backgroundColor = null
69- document . getElementById ( 'sec-notif' ) . style . color = 'black' ;
102+ // document.getElementById('sec-notif').style.color = 'black';
70103 document . getElementById ( 'top-bar' ) . classList . remove ( 'invert' ) ;
71104 try {
72105 document . querySelector ( '.multiselect-wrapper' ) . classList . remove ( 'invert' ) ;
@@ -86,23 +119,24 @@ function colormode(pref){
86119 document . getElementById ( 'error' ) . style . color = 'black'
87120 document . getElementById ( 'success' ) . style . color = 'black' ;
88121 document . getElementById ( "notification" ) . style . backgroundColor = 'white' ;
89- document . querySelector ( '.security-notification input' ) . style . color = 'black'
90- document . querySelector ( '.security-notification input' ) . style . backgroundColor = 'white'
91- document . querySelector ( '.security-notification input' ) . style . borderColor = 'black' ;
122+ // document.querySelector('.security-notification input').style.color = 'black'
123+ // document.querySelector('.security-notification input').style.backgroundColor = 'white'
124+ // document.querySelector('.security-notification input').style.borderColor = 'black';
92125 }
93126}
94127
95128function handler ( value ) {
96129 if ( ! value ) {
97130 document . getElementById ( 'sec-notif' ) . style . visibility = 'visible'
98- document . getElementById ( 'sec-notif' ) . style . transform = 'scale(1)'
99- document . getElementsByClassName ( 'btn-select' ) [ 0 ] . children [ 0 ] . innerHTML = 'Folder selected' }
131+ //document.getElementById('sec-notif').style.transform = 'scale(1)'
132+ //document.getElementsByClassName('btn-select')[0].children[0].innerHTML = 'Folder selected'
133+ }
100134 else {
101- var path = document . getElementById ( 'full-path' ) . value
102- document . getElementById ( 'path-ph' ) . innerHTML = path
103- document . getElementById ( 'sec-notif' ) . style . transform = 'scale(0)'
135+ // var path = document.getElementById('full-path').value
136+ // document.getElementById('path-ph').innerHTML = path
137+ // document.getElementById('sec-notif').style.transform = 'scale(0)'
104138
105- var metadata = { "data" : path }
139+ var metadata = { "data" : value }
106140
107141 fetch ( `http://localhost:8000/request?METADATA=${ JSON . stringify ( metadata ) } ` , {
108142 method : 'GET' ,
@@ -114,10 +148,10 @@ function handler(value){
114148 switch ( response . status ) {
115149 case 220 : {
116150 console . log ( 'path was not valid' )
117- document . getElementsByClassName ( 'btn-select' ) [ 0 ] . children [ 0 ] . innerHTML = 'No Folder selected'
118- document . getElementById ( 'path-ph' ) . innerHTML = null ;
119- document . getElementById ( 'sec-notif' ) . style . transform = 'scale(0)'
120- document . getElementById ( 'sec-notif' ) . style . visibility = 'hidden'
151+ // document.getElementsByClassName('btn-select')[0].children[0].innerHTML = 'No Folder selected'
152+ // document.getElementById('path-ph').innerHTML = null;
153+ // document.getElementById('sec-notif').style.transform = 'scale(0)'
154+ // document.getElementById('sec-notif').style.visibility = 'hidden'
121155 document . getElementById ( 'notification' ) . style . display = 'block' ;
122156 document . getElementById ( 'err-path' ) . style . display = 'block' ;
123157 document . getElementById ( 'notification' ) . style . opacity = '100%' ;
@@ -132,11 +166,18 @@ function handler(value){
132166 } break ;
133167 case 205 : {
134168 console . log ( 'path was valid' )
169+ success ( )
170+ setTimeout ( ( ) => {
171+ document . querySelector ( 'body' ) . classList . add ( 'blur' )
172+ setTimeout ( ( ) => {
173+ window . location . reload ( )
174+ } , 600 )
175+ } , 500 )
135176 } break ;
136177 case 201 : {
137178 $ . getJSON ( 'http://localhost:8000/request' , ( data ) => {
138179 const folders = JSON . parse ( data . message )
139- // console.log(folders)
180+ console . log ( folders )
140181 folders . forEach ( ( str ) => {
141182 var strchoice = document . createElement ( 'option' )
142183 strchoice . text = str
0 commit comments