44 < title > Network file manager</ title >
55
66 < link rel ="stylesheet " type ="text/css " href ="./assets/css/main.css ">
7- < meta name ="viewport " content ="width=device-width, initial-scale=1.0, user-scalable=no, target-densityDpi=device-dpi ">
7+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0, target-densityDpi=device-dpi ">
88 < script type ="text/javascript " src ="/socket.io/socket.io.js "> </ script >
9- < script type ="text/javascript " src ="./assets/js/jquery.min.js "> </ script >
10- < script type ="text/javascript " src ="./assets/js/jszip.min.js "> </ script >
11- < script type ="text/javascript " src ="./assets/js/FileSaver.min.js "> </ script >
9+ < script type ="text/javascript " src ="./assets/js/lib/ jquery.min.js "> </ script >
10+ < script type ="text/javascript " src ="./assets/js/lib/ jszip.min.js "> </ script >
11+ < script type ="text/javascript " src ="./assets/js/lib/ FileSaver.min.js "> </ script >
1212
1313 < script >
1414 const socket = io ( ) ;
@@ -24,7 +24,7 @@ <h1 id="headerText">Network file manager</h1>
2424 < div id ="userIpAddr " class ="headerContainer " style ="display: none; ">
2525 < h6 > Your IPv4: < span id ="ipv4 "> 192.168.1.9</ span > </ h6 >
2626 </ div >
27- < form id ="register " class ="profileField ">
27+ < form id ="register " class ="profileField " onsubmit =" ()=>{return false;} " >
2828 < input type ="text " name ="userName " id ="userName " placeholder =" Enter your name / ID ">
2929 < button onclick ="registerUser(); "> Register</ button >
3030 </ form >
@@ -34,48 +34,19 @@ <h3 name="profileName" id="profileName"></h3>
3434 < button onclick ="changeUser(); "> Change</ button >
3535 </ div >
3636 </ div >
37+
3738 < nav class ="nav ">
3839 < li > < a onclick ="redirect('/'); "> < button > < i class ="fa-regular fa-pen-to-square "> </ i > Workspace</ button > </ a > </ li >
39- < li > < a onclick ="redirect('/sent'); "> < button > < i class ="fa-solid fa-paper-plane "> </ i > Send</ button > </ a > </ li >
40+ < li > < a onclick ="redirect('/sent'); "> < button > < i class ="fa-solid fa-paper-plane "> </ i > Send</ i > </ button > </ a > </ li >
4041 < li > < a onclick ="redirect('/history'); "> < button active > < i class ="fa-solid fa-clock-rotate-left "> </ i > History</ button > </ a > </ li >
4142 </ nav >
4243
43- < section id ="history ">
44-
45- </ section >
46-
47- < script >
48- function print ( data ) {
49- document . getElementById ( "history" ) . innerHTML = data ;
50- }
51-
52- fetch ( window . location + "get-history" )
53- . then ( ( data ) => data . body )
54- . then ( ( data ) => {
55- data . getReader ( ) . read ( ) . then ( ( { done, value} ) => {
56- value = new TextDecoder ( ) . decode ( value ) ;
57- console . log ( value ) ;
58- console . log ( JSON . parse ( value ) ) ;
59- print ( value ) ;
60- } )
61- } ) ;
62-
63- ( function ( ) {
64- var head = document . getElementsByTagName ( "head" ) [ 0 ] ;
65- var link = document . createElement ( "link" ) ;
66- link . setAttribute ( "rel" , "stylesheet" ) ;
67- link . setAttribute ( "type" , "text/css" ) ;
68- link . setAttribute ( "href" , "./assets/css/history.css" ) ;
69- link . setAttribute ( "name" , "css" ) ;
44+ < div id ="history ">
7045
71- document . getElementsByName ( "css" ) . forEach ( ( node ) => node . remove ( ) ) ;
72-
73- head . append ( link ) ;
74-
75- updateUser ( window . sessionStorage . getItem ( "username" ) ) ;
76- } ) ( ) ;
77- </ script >
46+ </ div >
7847
7948 <!-- PAGE SPECIFIC SCRIPTS-->
49+ < script src ="./assets/js/history.js " defer > </ script >
50+
8051</ body >
8152</ html >
0 commit comments