BlueGit

timfa filemanager

Files

filemanager / public / index.html

index.html

index.html 9.4 KiB Download Raw
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 <title>File Manager</title>
7 <link rel="stylesheet" href="style.css" />
8</head>
9<body>
10
11<!-- =====================================================================
12 LOGIN / SETUP OVERLAY
13====================================================================== -->
14<div id="auth-overlay" class="overlay hidden">
15 <div class="auth-card">
16 <h1 id="auth-title">Sign In</h1>
17 <p id="auth-subtitle" class="auth-subtitle hidden">
18 No accounts exist yet. Create the first admin account.
19 </p>
20 <form id="auth-form" autocomplete="off">
21 <label>
22 Username
23 <input id="auth-username" type="text" autocomplete="off" required />
24 </label>
25 <label>
26 Password
27 <input id="auth-password" type="password" autocomplete="new-password" required />
28 </label>
29 <p id="auth-error" class="error hidden"></p>
30 <button type="submit" id="auth-submit">Sign In</button>
31 </form>
32 </div>
33</div>
34
35<!-- =====================================================================
36 MAIN APP SHELL
37====================================================================== -->
38<div id="app" class="hidden">
39
40 <!-- TOP BAR -->
41 <header id="topbar">
42 <div id="breadcrumb-wrap">
43 <nav id="breadcrumb" aria-label="Breadcrumb"></nav>
44 </div>
45 <div id="topbar-actions">
46 <button id="btn-refresh" class="icon-btn" title="Refresh page" aria-label="Refresh page">
47 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
48 stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
49 <polyline points="23 4 23 10 17 10"/>
50 <polyline points="1 20 1 14 7 14"/>
51 <path d="M3.51 9a9 9 0 0 1 14.13-3.36L23 10M1 14l5.36 4.36A9 9 0 0 0 20.49 15"/>
52 </svg>
53 Refresh
54 </button>
55
56 <button id="btn-upload" class="icon-btn" title="Upload files" aria-label="Upload files">
57 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
58 stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
59 <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
60 <polyline points="17 8 12 3 7 8"/>
61 <line x1="12" y1="3" x2="12" y2="15"/>
62 </svg>
63 Upload
64 </button>
65 <input id="file-input" type="file" multiple class="hidden" aria-hidden="true" />
66 <input id="folder-input" type="file" webkitdirectory directory multiple class="hidden" aria-hidden="true" />
67
68 <button id="btn-upload-folder" class="icon-btn" title="Upload folder" aria-label="Upload folder">
69 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
70 stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
71 <path d="M3 7a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
72 <path d="M12 11v6"/>
73 <path d="M9 14h6"/>
74 </svg>
75 Folder
76 </button>
77
78 <button id="btn-new-folder" class="icon-btn" title="Create new folder" aria-label="Create new folder">
79 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
80 stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
81 <path d="M3 7a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
82 <path d="M12 11v6"/>
83 <path d="M9 14h6"/>
84 </svg>
85 New Folder
86 </button>
87
88 <button id="btn-admin" class="icon-btn hidden" title="Admin panel" aria-label="Admin panel">
89 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
90 stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
91 <circle cx="12" cy="8" r="4"/>
92 <path d="M6 20v-2a6 6 0 0 1 12 0v2"/>
93 </svg>
94 Admin
95 </button>
96
97 <button id="btn-logout" class="icon-btn" title="Sign out" aria-label="Sign out">
98 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
99 stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
100 <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>
101 <polyline points="16 17 21 12 16 7"/>
102 <line x1="21" y1="12" x2="9" y2="12"/>
103 </svg>
104 Sign out
105 </button>
106 </div>
107 </header>
108
109 <!-- MAIN CONTENT AREA -->
110 <main id="main-content">
111 <p id="folder-stats" class="muted hidden"></p>
112
113 <!-- Drop zone hint shown when dragging files over the main area -->
114 <div id="drop-overlay" class="hidden">
115 <span>Drop files here to upload</span>
116 </div>
117
118 <!-- File / folder grid -->
119 <div id="file-grid"></div>
120
121 <!-- Empty directory notice -->
122 <p id="empty-notice" class="hidden muted">This folder is empty.</p>
123
124 </main>
125
126 <!-- SIDEBAR -->
127 <aside id="sidebar" class="hidden">
128 <button id="sidebar-close" aria-label="Close sidebar">✕</button>
129 <div id="sidebar-icon"></div>
130 <h2 id="sidebar-name"></h2>
131 <dl id="sidebar-meta"></dl>
132 <div id="sidebar-actions"></div>
133 </aside>
134
135</div>
136
137<!-- =====================================================================
138 ADMIN MODAL
139====================================================================== -->
140<div id="admin-modal" class="modal-overlay hidden">
141 <div class="modal">
142 <button class="modal-close" id="admin-modal-close" aria-label="Close admin panel">✕</button>
143 <h2>Admin Panel</h2>
144
145 <section>
146 <h3>Configured Paths</h3>
147 <div id="admin-paths"></div>
148 <div class="path-add-row">
149 <input id="admin-new-path" type="text" placeholder="/mnt/ssd/media" />
150 <button id="admin-add-path">Add</button>
151 </div>
152 <button id="admin-save-paths" class="primary">Save paths</button>
153 </section>
154
155 <section>
156 <h3>Users</h3>
157 <div id="admin-users-list"></div>
158 <button id="admin-new-user-btn" class="primary">+ New user</button>
159 </section>
160
161 <section>
162 <h3>Server</h3>
163 <button id="admin-shutdown-btn" class="danger">Shut down server</button>
164 </section>
165 </div>
166</div>
167
168<!-- NEW / EDIT USER MODAL -->
169<div id="user-modal" class="modal-overlay hidden">
170 <div class="modal">
171 <button class="modal-close" id="user-modal-close" aria-label="Close">✕</button>
172 <h2 id="user-modal-title">New User</h2>
173 <form id="user-form">
174 <label>Username<input id="user-username" type="text" required /></label>
175 <label id="user-password-label">
176 Password<input id="user-password" type="password" placeholder="Min 8 characters" />
177 </label>
178 <label class="checkbox-label">
179 <input id="user-is-admin" type="checkbox" />
180 Admin privileges
181 </label>
182 <div id="user-permissions"></div>
183 <p id="user-error" class="error hidden"></p>
184 <button type="submit" class="primary">Save</button>
185 </form>
186 </div>
187</div>
188
189<!-- RENAME MODAL -->
190<div id="rename-modal" class="modal-overlay hidden">
191 <div class="modal small">
192 <button class="modal-close" id="rename-modal-close" aria-label="Close">✕</button>
193 <h2>Rename</h2>
194 <form id="rename-form">
195 <label>New name<input id="rename-input" type="text" required /></label>
196 <p id="rename-error" class="error hidden"></p>
197 <button type="submit" class="primary">Rename</button>
198 </form>
199 </div>
200</div>
201
202<!-- CONFIRM MODAL -->
203<div id="confirm-modal" class="modal-overlay hidden" role="dialog" aria-modal="true" aria-labelledby="confirm-modal-title">
204 <div class="modal small">
205 <h2 id="confirm-modal-title"></h2>
206 <p id="confirm-modal-message" class="dialog-message"></p>
207 <div class="dialog-actions">
208 <button id="confirm-modal-cancel">Cancel</button>
209 <button id="confirm-modal-ok" class="primary">OK</button>
210 </div>
211 </div>
212</div>
213
214<!-- PROMPT MODAL -->
215<div id="prompt-modal" class="modal-overlay hidden" role="dialog" aria-modal="true" aria-labelledby="prompt-modal-title">
216 <div class="modal small">
217 <h2 id="prompt-modal-title"></h2>
218 <p id="prompt-modal-message" class="dialog-message"></p>
219 <form id="prompt-modal-form">
220 <label id="prompt-modal-label"><input id="prompt-modal-input" type="text" /></label>
221 <p id="prompt-modal-error" class="error hidden"></p>
222 <div class="dialog-actions">
223 <button type="button" id="prompt-modal-cancel">Cancel</button>
224 <button type="submit" class="primary">OK</button>
225 </div>
226 </form>
227 </div>
228</div>
229
230<!-- OVERWRITE MODAL -->
231<div id="overwrite-modal" class="modal-overlay hidden" role="dialog" aria-modal="true" aria-labelledby="overwrite-modal-title">
232 <div class="modal small">
233 <h2 id="overwrite-modal-title">File already exists</h2>
234 <p class="dialog-message">
235 <strong id="overwrite-modal-filename"></strong> already exists in the destination folder.
236 What would you like to do?
237 </p>
238 <div class="dialog-actions dialog-actions--overwrite">
239 <button id="overwrite-modal-skip-all">Skip all</button>
240 <button id="overwrite-modal-no">Skip</button>
241 <button id="overwrite-modal-all" class="primary">Overwrite all</button>
242 <button id="overwrite-modal-yes" class="primary">Overwrite</button>
243 </div>
244 </div>
245</div>
246
247<!-- TOAST -->
248<div id="toast" aria-live="assertive" aria-atomic="true"></div>
249
250<script src="app.js"></script>
251</body>
252</html>