downloadPageFolder.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <title>{{hostname}} File Share</title>
  7. <link rel="stylesheet" href="script/skeleton/offline.css">
  8. <link rel="stylesheet" href="script/skeleton/normalize.css">
  9. <link rel="stylesheet" href="script/skeleton/skeleton.css">
  10. <script type="application/javascript" src="script/jquery.min.js"></script>
  11. <style>
  12. body{
  13. padding-bottom: 100px;
  14. }
  15. .bar{
  16. height: 12px;
  17. background-color: #1a1a1a;
  18. width: 100%;
  19. }
  20. .footer{
  21. position: fixed;
  22. bottom: 0px;
  23. height: 50px;
  24. width: 100%;
  25. background-color: #1a1a1a;
  26. padding: 20px;
  27. color: white;
  28. }
  29. </style>
  30. </head>
  31. <body>
  32. <div class="bar"></div>
  33. <br>
  34. <div class="container">
  35. <h5>{{hostname}} File Sharing</h5>
  36. <h3>{{filename}}</h3>
  37. <div class="row">
  38. <div class="one-half column">
  39. <table class="u-full-width">
  40. <thead>
  41. <tr>
  42. <th>Property</th>
  43. <th>Value</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <tr>
  48. <td>MIME Type</td>
  49. <td>{{mime}}</td>
  50. </tr>
  51. <tr>
  52. <td>Folder Size</td>
  53. <td>{{size}}</td>
  54. </tr>
  55. <tr>
  56. <td>File Counts</td>
  57. <td>{{filecount}}</td>
  58. </tr>
  59. <tr>
  60. <td>Last Modification Time</td>
  61. <td>{{modtime}}</td>
  62. </tr>
  63. </tbody>
  64. </table>
  65. <a href="{{downloadurl}}"><button class="button-primary">Download</button></a>
  66. <p style="font-size: 80%;"><b>Depending on folder size, zipping might take a while to complete.</b></p>
  67. <br>
  68. <p>Request File ID: {{reqid}}</p>
  69. <p>Request Timestamp: {{reqtime}}</p>
  70. </div>
  71. <div class="one-half column" id="filelistWrapper" style="overflow-y: auto; padding-right: 5px;">
  72. <table class="u-full-width">
  73. <thead>
  74. <tr>
  75. <th>Filename</th>
  76. <th>Type</th>
  77. <th>Size</th>
  78. </tr>
  79. </thead>
  80. <tbody id="folderList">
  81. </table>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="footer">
  86. <div class="container">
  87. Cloud File Sharing Interface, Powered by <a style="color: white;" href="http://arozos.com">arozos</a>
  88. </div>
  89. </div>
  90. <script>
  91. var rootFileList = {{filelist}};
  92. renderFileList(rootFileList);
  93. function renderFileList(filelist){
  94. $("#folderList").html("");
  95. filelist.forEach(file => {
  96. var filetype = "File";
  97. if (file.IsDir == true){
  98. filetype = "Folder";
  99. }
  100. $("#folderList").append(`<tr>
  101. <td>${file.Filename}</td>
  102. <td>${filetype}</td>
  103. <td>${file.Filesize}</td>
  104. </tr>`);
  105. });
  106. }
  107. resizeDOMElement();
  108. function resizeDOMElement(){
  109. $("#filelistWrapper").css({
  110. height: window.innerHeight - 300,
  111. })
  112. }
  113. $(window).on("resize", function(){
  114. resizeDOMElement();
  115. })
  116. </script>
  117. </body>
  118. </html>