11//document.getElementById('sec-notif').style.transform = 'scale(0)'
2+ document . getElementById ( 'menu1' ) . classList . add ( 'fade' )
3+ document . getElementById ( 'refresh-btn' ) . classList . add ( 'fade' )
4+ document . getElementById ( 'warn-multichoice' ) . classList . add ( 'fade' )
5+ document . getElementById ( 'warn-recursive' ) . classList . add ( 'fade' )
6+ //document.getElementById('refresh').classList.remove('fade')
27
38try {
4- console . log ( localStorage . getItem ( "colormode" ) )
59 colormode ( localStorage . getItem ( "colormode" ) )
610} catch ( e ) { colormode ( "light" ) }
711
@@ -27,17 +31,12 @@ function colormode(pref){
2731 document . getElementById ( 'warn-multichoice' ) . style . color = 'white'
2832 document . getElementById ( 'warn-recursive' ) . style . color = 'white'
2933 document . getElementById ( 'warn-multichoice' ) . classList . add ( 'scrl-bar-drk-mode' )
30- //document.getElementById('btn-select').style.color = 'white'
34+
3135 for ( i = 0 ; i < document . getElementsByClassName ( 'choice-rec' ) . length ; i ++ ) {
3236 document . getElementsByClassName ( 'choice-rec' ) [ i ] . style . color = 'white'
33- document . getElementsByClassName ( 'choice-rec' ) [ i ] . style . backgroundColor = 'black'
3437 }
3538 document . getElementsByClassName ( 'gg-dark-mode' ) [ 0 ] . style . backgroundColor = 'black'
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';
40- document . getElementById ( 'sub-select1' ) . style . backgroundColor = 'black'
39+ document . getElementById ( 'sub-select1' ) . style . backgroundColor = 'black'
4140 document . getElementById ( 'sub-select1' ) . style . borderColor = 'white'
4241 document . getElementById ( 'sel-txt' ) . style . color = 'white' ;
4342 try {
@@ -96,7 +95,6 @@ function colormode(pref){
9695 //document.querySelector('.dz-details').style.backgroundColor = 'black'
9796 for ( i = 0 ; i < document . getElementsByClassName ( 'choice-rec' ) . length ; i ++ ) {
9897 document . getElementsByClassName ( 'choice-rec' ) [ i ] . style . color = 'black'
99- document . getElementsByClassName ( 'choice-rec' ) [ i ] . style . backgroundColor = 'white'
10098 }
10199 document . getElementsByClassName ( 'gg-dark-mode' ) [ 0 ] . style . backgroundColor = null
102100 //document.getElementById('sec-notif').style.color = 'black';
@@ -147,11 +145,6 @@ function handler(value){
147145 . then ( response => {
148146 switch ( response . status ) {
149147 case 220 : {
150- console . log ( 'path was not valid' )
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'
155148 document . getElementById ( 'notification' ) . style . display = 'block' ;
156149 document . getElementById ( 'err-path' ) . style . display = 'block' ;
157150 document . getElementById ( 'notification' ) . style . opacity = '100%' ;
@@ -165,26 +158,26 @@ function handler(value){
165158 } , 2000 )
166159 } break ;
167160 case 205 : {
168- console . log ( 'path was valid' )
169161 success ( )
170162 setTimeout ( ( ) => {
171- document . querySelector ( 'body ') . classList . add ( 'blur' )
163+ document . getElementById ( 'main ') . classList . add ( 'blur' )
172164 setTimeout ( ( ) => {
173- window . location . reload ( )
165+ document . getElementById ( 'refresh' ) . style . display = 'block'
166+ document . getElementById ( 'refresh' ) . classList . remove ( 'fade' )
174167 } , 600 )
175168 } , 500 )
176169 } break ;
177170 case 201 : {
178171 $ . getJSON ( 'http://localhost:8000/request' , ( data ) => {
179172 const folders = JSON . parse ( data . message )
180- console . log ( folders )
181173 folders . forEach ( ( str ) => {
182174 var strchoice = document . createElement ( 'option' )
183175 strchoice . text = str
184176 strchoice . value = str
185177 document . getElementById ( 'Multidirselect' ) . add ( strchoice )
186178 } )
187179 document . multiselect ( '#Multidirselect' ) ;
180+ colormode ( localStorage . getItem ( "colormode" ) )
188181 document . getElementById ( 'menu1' ) . style . display = 'none'
189182 document . getElementById ( 'warn-multichoice' ) . style . display = 'block'
190183 } )
@@ -202,29 +195,26 @@ function Multidirres(){
202195 choices . push ( document . querySelector ( '.Multidirselect' ) . children [ i ] . value )
203196 }
204197 }
205- console . log ( choices )
206198 fetch ( `http://localhost:8000/multichoice?METADATA=${ JSON . stringify ( { "data" : choices } ) } ` , {
207199 method : 'GET' ,
208200 headers : {
209201 'Content-Type' : 'application/json' ,
210202 }
211203 } )
212- . then ( ( res ) => {
213- console . log ( res )
214-
204+ . then ( ( res ) => {
215205 switch ( res . status ) {
216206 case 205 : {
217- console . log ( 'PATH IS RECURSVE' )
218207 document . getElementById ( 'warn-multichoice' ) . style . display = 'none'
219208 document . getElementById ( 'warn-recursive' ) . style . display = 'block'
220209 } break ;
221210
222211 case 201 : {
223212 success ( )
224213 setTimeout ( ( ) => {
225- document . querySelector ( 'body ') . classList . add ( 'blur' )
214+ document . getElementById ( 'main ') . classList . add ( 'blur' )
226215 setTimeout ( ( ) => {
227- window . location . reload ( )
216+ document . getElementById ( 'refresh' ) . style . display = 'block'
217+ document . getElementById ( 'refresh' ) . classList . remove ( 'fade' )
228218 } , 600 )
229219 } , 500 )
230220
@@ -247,9 +237,10 @@ function recursivech(choice){
247237 if ( res . status === 200 ) {
248238 success ( ) ;
249239 setTimeout ( ( ) => {
250- document . querySelector ( 'body ') . classList . add ( 'blur' )
240+ document . getElementById ( 'main ') . classList . add ( 'blur' )
251241 setTimeout ( ( ) => {
252- window . location . reload ( )
242+ document . getElementById ( 'refresh' ) . style . display = 'block'
243+ document . getElementById ( 'refresh' ) . classList . remove ( 'fade' )
253244 } , 600 )
254245 } , 500 )
255246 } else {
0 commit comments