Spaces:
Running
Running
add permissions - Initial Deployment
Browse files- README.md +6 -4
- index.html +448 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: green
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: renee2-0
|
| 3 |
+
emoji: 🐳
|
| 4 |
colorFrom: green
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,448 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>Project File Explorer</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
.file-icon {
|
| 11 |
+
width: 18px;
|
| 12 |
+
height: 18px;
|
| 13 |
+
margin-right: 8px;
|
| 14 |
+
display: inline-block;
|
| 15 |
+
}
|
| 16 |
+
.folder-item:hover {
|
| 17 |
+
background-color: #f3f4f6;
|
| 18 |
+
}
|
| 19 |
+
.file-item:hover {
|
| 20 |
+
background-color: #f3f4f6;
|
| 21 |
+
}
|
| 22 |
+
.directory-container {
|
| 23 |
+
transition: all 0.3s ease;
|
| 24 |
+
}
|
| 25 |
+
.directory-container.collapsed .directory-children {
|
| 26 |
+
display: none;
|
| 27 |
+
}
|
| 28 |
+
.directory-container.collapsed .toggle-icon {
|
| 29 |
+
transform: rotate(-90deg);
|
| 30 |
+
}
|
| 31 |
+
.toggle-icon {
|
| 32 |
+
transition: transform 0.3s ease;
|
| 33 |
+
}
|
| 34 |
+
#context-menu {
|
| 35 |
+
transition: opacity 0.1s ease;
|
| 36 |
+
}
|
| 37 |
+
.context-menu-item {
|
| 38 |
+
transition: background-color 0.2s ease;
|
| 39 |
+
}
|
| 40 |
+
</style>
|
| 41 |
+
</head>
|
| 42 |
+
<body class="bg-gray-50 font-sans">
|
| 43 |
+
<div class="container mx-auto p-4 md:p-8 max-w-4xl">
|
| 44 |
+
<div class="bg-white rounded-lg shadow-md overflow-hidden">
|
| 45 |
+
<div class="bg-blue-600 px-6 py-4 flex items-center">
|
| 46 |
+
<i class="fas fa-folder-open text-white mr-3 text-xl"></i>
|
| 47 |
+
<h1 class="text-white font-semibold text-xl">Project File Explorer</h1>
|
| 48 |
+
<div class="ml-auto flex space-x-2">
|
| 49 |
+
<button class="bg-blue-700 hover:bg-blue-800 text-white p-2 rounded-full">
|
| 50 |
+
<i class="fas fa-search"></i>
|
| 51 |
+
</button>
|
| 52 |
+
<button class="bg-blue-700 hover:bg-blue-800 text-white p-2 rounded-full">
|
| 53 |
+
<i class="fas fa-cog"></i>
|
| 54 |
+
</button>
|
| 55 |
+
</div>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="p-4 border-b">
|
| 59 |
+
<div class="flex items-center text-sm text-gray-600">
|
| 60 |
+
<span class="text-blue-600">Renee/</span>
|
| 61 |
+
<span class="mx-1">></span>
|
| 62 |
+
<span>Project Root</span>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
+
|
| 66 |
+
<div class="p-4">
|
| 67 |
+
<div class="directory-container">
|
| 68 |
+
<div class="folder-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 69 |
+
<div class="toggle-icon mr-2 text-gray-500">
|
| 70 |
+
<i class="fas fa-chevron-down"></i>
|
| 71 |
+
</div>
|
| 72 |
+
<i class="fas fa-folder text-blue-500 mr-2"></i>
|
| 73 |
+
<span class="font-medium">Renee/</span>
|
| 74 |
+
<span class="ml-auto text-xs text-gray-500">Project Root</span>
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
<div class="directory-children pl-6">
|
| 78 |
+
<!-- Root level files -->
|
| 79 |
+
<div class="file-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 80 |
+
<div class="file-icon">
|
| 81 |
+
<i class="fas fa-file-code text-blue-400"></i>
|
| 82 |
+
</div>
|
| 83 |
+
<span>Dockerfile</span>
|
| 84 |
+
<span class="ml-auto text-xs text-gray-500">Multi-stage build definition</span>
|
| 85 |
+
</div>
|
| 86 |
+
|
| 87 |
+
<div class="file-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 88 |
+
<div class="file-icon">
|
| 89 |
+
<i class="fas fa-file-alt text-gray-400"></i>
|
| 90 |
+
</div>
|
| 91 |
+
<span>.dockerignore</span>
|
| 92 |
+
<span class="ml-auto text-xs text-gray-500">Files to exclude from Docker context</span>
|
| 93 |
+
</div>
|
| 94 |
+
|
| 95 |
+
<div class="file-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 96 |
+
<div class="file-icon">
|
| 97 |
+
<i class="fas fa-file-alt text-yellow-500"></i>
|
| 98 |
+
</div>
|
| 99 |
+
<span>requirements.txt</span>
|
| 100 |
+
<span class="ml-auto text-xs text-gray-500">Python dependencies</span>
|
| 101 |
+
</div>
|
| 102 |
+
|
| 103 |
+
<div class="file-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 104 |
+
<div class="file-icon">
|
| 105 |
+
<i class="fas fa-file-code text-green-500"></i>
|
| 106 |
+
</div>
|
| 107 |
+
<span>build_and_run.sh</span>
|
| 108 |
+
<span class="ml-auto text-xs text-gray-500">Bash script to build/run/verify container</span>
|
| 109 |
+
</div>
|
| 110 |
+
|
| 111 |
+
<!-- Directories -->
|
| 112 |
+
<div class="directory-container">
|
| 113 |
+
<div class="folder-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 114 |
+
<div class="toggle-icon mr-2 text-gray-500">
|
| 115 |
+
<i class="fas fa-chevron-down"></i>
|
| 116 |
+
</div>
|
| 117 |
+
<i class="fas fa-folder text-blue-500 mr-2"></i>
|
| 118 |
+
<span>src/</span>
|
| 119 |
+
<span class="ml-auto text-xs text-gray-500">Application Source Code</span>
|
| 120 |
+
</div>
|
| 121 |
+
|
| 122 |
+
<div class="directory-children pl-6">
|
| 123 |
+
<div class="directory-container">
|
| 124 |
+
<div class="folder-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 125 |
+
<div class="toggle-icon mr-2 text-gray-500">
|
| 126 |
+
<i class="fas fa-chevron-down"></i>
|
| 127 |
+
</div>
|
| 128 |
+
<i class="fas fa-folder text-blue-500 mr-2"></i>
|
| 129 |
+
<span>app/</span>
|
| 130 |
+
</div>
|
| 131 |
+
|
| 132 |
+
<div class="directory-children pl-6">
|
| 133 |
+
<div class="file-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 134 |
+
<div class="file-icon">
|
| 135 |
+
<i class="fas fa-file-code text-purple-500"></i>
|
| 136 |
+
</div>
|
| 137 |
+
<span>server.py</span>
|
| 138 |
+
<span class="ml-auto text-xs text-gray-500">Python web server</span>
|
| 139 |
+
</div>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
</div>
|
| 144 |
+
|
| 145 |
+
<div class="directory-container">
|
| 146 |
+
<div class="folder-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 147 |
+
<div class="toggle-icon mr-2 text-gray-500">
|
| 148 |
+
<i class="fas fa-chevron-down"></i>
|
| 149 |
+
</div>
|
| 150 |
+
<i class="fas fa-folder text-blue-500 mr-2"></i>
|
| 151 |
+
<span>scripts/</span>
|
| 152 |
+
<span class="ml-auto text-xs text-gray-500">Utility Scripts for the Host System</span>
|
| 153 |
+
</div>
|
| 154 |
+
|
| 155 |
+
<div class="directory-children pl-6">
|
| 156 |
+
<div class="file-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 157 |
+
<div class="file-icon">
|
| 158 |
+
<i class="fas fa-file-code text-green-500"></i>
|
| 159 |
+
</div>
|
| 160 |
+
<span>system_status.sh</span>
|
| 161 |
+
</div>
|
| 162 |
+
|
| 163 |
+
<div class="file-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 164 |
+
<div class="file-icon">
|
| 165 |
+
<i class="fas fa-file-code text-green-500"></i>
|
| 166 |
+
</div>
|
| 167 |
+
<span>update_system.sh</span>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
+
<div class="directory-container">
|
| 173 |
+
<div class="folder-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 174 |
+
<div class="toggle-icon mr-2 text-gray-500">
|
| 175 |
+
<i class="fas fa-chevron-down"></i>
|
| 176 |
+
</div>
|
| 177 |
+
<i class="fas fa-folder text-blue-500 mr-2"></i>
|
| 178 |
+
<span>etc/</span>
|
| 179 |
+
<span class="ml-auto text-xs text-gray-500">Configuration Files</span>
|
| 180 |
+
</div>
|
| 181 |
+
|
| 182 |
+
<div class="directory-children pl-6">
|
| 183 |
+
<div class="directory-container">
|
| 184 |
+
<div class="folder-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 185 |
+
<div class="toggle-icon mr-2 text-gray-500">
|
| 186 |
+
<i class="fas fa-chevron-down"></i>
|
| 187 |
+
</div>
|
| 188 |
+
<i class="fas fa-folder text-blue-500 mr-2"></i>
|
| 189 |
+
<span>config/</span>
|
| 190 |
+
</div>
|
| 191 |
+
|
| 192 |
+
<div class="directory-children pl-6">
|
| 193 |
+
<div class="file-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 194 |
+
<div class="file-icon">
|
| 195 |
+
<i class="fas fa-file-alt text-orange-500"></i>
|
| 196 |
+
</div>
|
| 197 |
+
<span>system.conf</span>
|
| 198 |
+
</div>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
</div>
|
| 203 |
+
|
| 204 |
+
<div class="file-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 205 |
+
<div class="file-icon">
|
| 206 |
+
<i class="fas fa-file-alt text-red-500"></i>
|
| 207 |
+
</div>
|
| 208 |
+
<span>README.md</span>
|
| 209 |
+
<span class="ml-auto text-xs text-gray-500">Project documentation</span>
|
| 210 |
+
</div>
|
| 211 |
+
|
| 212 |
+
<div class="file-item flex items-center py-2 px-3 rounded cursor-pointer">
|
| 213 |
+
<div class="file-icon">
|
| 214 |
+
<i class="fas fa-file-alt text-orange-500"></i>
|
| 215 |
+
</div>
|
| 216 |
+
<span>pineapple_os_phase1.md</span>
|
| 217 |
+
<span class="ml-auto text-xs text-gray-500">Pineapple Micro OS System Directory Brainstorming</span>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
|
| 223 |
+
<div class="bg-gray-50 px-6 py-3 border-t flex justify-between items-center">
|
| 224 |
+
<div class="text-sm text-gray-600">
|
| 225 |
+
<span>9 files, 4 directories</span>
|
| 226 |
+
</div>
|
| 227 |
+
<div class="flex space-x-2">
|
| 228 |
+
<button class="text-gray-500 hover:text-gray-700">
|
| 229 |
+
<i class="fas fa-sync-alt"></i>
|
| 230 |
+
</button>
|
| 231 |
+
<button class="text-gray-500 hover:text-gray-700">
|
| 232 |
+
<i class="fas fa-expand"></i>
|
| 233 |
+
</button>
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
</div>
|
| 237 |
+
|
| 238 |
+
<div class="mt-6 bg-white rounded-lg shadow-md overflow-hidden">
|
| 239 |
+
<div class="bg-gray-100 px-6 py-3 border-b flex items-center">
|
| 240 |
+
<i class="fas fa-info-circle text-blue-500 mr-2"></i>
|
| 241 |
+
<h2 class="font-medium">File Information</h2>
|
| 242 |
+
</div>
|
| 243 |
+
<div class="p-4">
|
| 244 |
+
<div id="file-info-content" class="text-sm text-gray-700">
|
| 245 |
+
<p class="text-center text-gray-500 py-8">Select a file or directory to view details</p>
|
| 246 |
+
</div>
|
| 247 |
+
</div>
|
| 248 |
+
</div>
|
| 249 |
+
</div>
|
| 250 |
+
|
| 251 |
+
<!-- Context Menu -->
|
| 252 |
+
<div id="context-menu" class="hidden absolute bg-white shadow-lg rounded-md border border-gray-200 w-48 z-50">
|
| 253 |
+
<div class="py-1">
|
| 254 |
+
<a href="#" class="context-menu-item block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Open</a>
|
| 255 |
+
<a href="#" class="context-menu-item block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Download</a>
|
| 256 |
+
<a href="#" class="context-menu-item block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Rename</a>
|
| 257 |
+
<a href="#" class="context-menu-item block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Delete</a>
|
| 258 |
+
<div class="border-t border-gray-200"></div>
|
| 259 |
+
<a href="#" class="context-menu-item block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Properties</a>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
|
| 263 |
+
<script>
|
| 264 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 265 |
+
// Toggle directory collapse/expand
|
| 266 |
+
const toggleIcons = document.querySelectorAll('.toggle-icon');
|
| 267 |
+
toggleIcons.forEach(icon => {
|
| 268 |
+
icon.addEventListener('click', function(e) {
|
| 269 |
+
e.stopPropagation();
|
| 270 |
+
const container = this.closest('.directory-container');
|
| 271 |
+
container.classList.toggle('collapsed');
|
| 272 |
+
});
|
| 273 |
+
});
|
| 274 |
+
|
| 275 |
+
// Handle folder item clicks (propagate to toggle icon)
|
| 276 |
+
const folderItems = document.querySelectorAll('.folder-item');
|
| 277 |
+
folderItems.forEach(item => {
|
| 278 |
+
item.addEventListener('click', function(e) {
|
| 279 |
+
if (e.target === this) {
|
| 280 |
+
const toggleIcon = this.querySelector('.toggle-icon');
|
| 281 |
+
if (toggleIcon) {
|
| 282 |
+
toggleIcon.click();
|
| 283 |
+
}
|
| 284 |
+
}
|
| 285 |
+
});
|
| 286 |
+
});
|
| 287 |
+
|
| 288 |
+
// Handle file selection
|
| 289 |
+
const fileItems = document.querySelectorAll('.file-item, .folder-item');
|
| 290 |
+
const fileInfoContent = document.getElementById('file-info-content');
|
| 291 |
+
|
| 292 |
+
fileItems.forEach(item => {
|
| 293 |
+
item.addEventListener('click', function() {
|
| 294 |
+
// Remove active class from all items
|
| 295 |
+
fileItems.forEach(i => i.classList.remove('bg-blue-50', 'border', 'border-blue-200'));
|
| 296 |
+
|
| 297 |
+
// Add active class to clicked item
|
| 298 |
+
this.classList.add('bg-blue-50', 'border', 'border-blue-200');
|
| 299 |
+
|
| 300 |
+
// Update file info panel
|
| 301 |
+
const fileName = this.querySelector('span:not(.text-xs)').textContent;
|
| 302 |
+
const fileDescription = this.querySelector('.text-xs')?.textContent || 'No description available';
|
| 303 |
+
|
| 304 |
+
fileInfoContent.innerHTML = `
|
| 305 |
+
<div class="mb-4">
|
| 306 |
+
<h3 class="font-medium text-lg mb-1">${fileName}</h3>
|
| 307 |
+
<p class="text-gray-600">${fileDescription}</p>
|
| 308 |
+
</div>
|
| 309 |
+
<div class="grid grid-cols-2 gap-4 text-sm">
|
| 310 |
+
<div>
|
| 311 |
+
<p class="text-gray-500">Type</p>
|
| 312 |
+
<p>${this.classList.contains('folder-item') ? 'Directory' : 'File'}</p>
|
| 313 |
+
</div>
|
| 314 |
+
<div>
|
| 315 |
+
<p class="text-gray-500">Size</p>
|
| 316 |
+
<p>${Math.floor(Math.random() * 1024)} KB</p>
|
| 317 |
+
</div>
|
| 318 |
+
<div>
|
| 319 |
+
<p class="text-gray-500">Created</p>
|
| 320 |
+
<p>${new Date().toLocaleDateString()}</p>
|
| 321 |
+
</div>
|
| 322 |
+
<div>
|
| 323 |
+
<p class="text-gray-500">Modified</p>
|
| 324 |
+
<p>${new Date().toLocaleDateString()}</p>
|
| 325 |
+
</div>
|
| 326 |
+
<div>
|
| 327 |
+
<p class="text-gray-500">Permissions</p>
|
| 328 |
+
<p>${generateRandomPermissions(this.classList.contains('folder-item'))}</p>
|
| 329 |
+
</div>
|
| 330 |
+
<div>
|
| 331 |
+
<p class="text-gray-500">Owner</p>
|
| 332 |
+
<p>renee</p>
|
| 333 |
+
</div>
|
| 334 |
+
</div>
|
| 335 |
+
<div class="mt-4 pt-4 border-t">
|
| 336 |
+
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm">
|
| 337 |
+
<i class="fas fa-download mr-2"></i> Download
|
| 338 |
+
</button>
|
| 339 |
+
<button class="ml-2 bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-2 rounded-md text-sm">
|
| 340 |
+
<i class="fas fa-edit mr-2"></i> Edit
|
| 341 |
+
</button>
|
| 342 |
+
</div>
|
| 343 |
+
`;
|
| 344 |
+
});
|
| 345 |
+
});
|
| 346 |
+
|
| 347 |
+
// Collapse all directories by default
|
| 348 |
+
document.querySelectorAll('.directory-container').forEach(container => {
|
| 349 |
+
if (!container.classList.contains('collapsed')) {
|
| 350 |
+
container.classList.add('collapsed');
|
| 351 |
+
}
|
| 352 |
+
});
|
| 353 |
+
|
| 354 |
+
// Expand the root directory
|
| 355 |
+
document.querySelector('.directory-container').classList.remove('collapsed');
|
| 356 |
+
|
| 357 |
+
// Context menu handling
|
| 358 |
+
const contextMenu = document.getElementById('context-menu');
|
| 359 |
+
let selectedItem = null;
|
| 360 |
+
|
| 361 |
+
document.addEventListener('contextmenu', function(e) {
|
| 362 |
+
const fileItem = e.target.closest('.file-item, .folder-item');
|
| 363 |
+
if (fileItem) {
|
| 364 |
+
e.preventDefault();
|
| 365 |
+
selectedItem = fileItem;
|
| 366 |
+
|
| 367 |
+
// Position the context menu
|
| 368 |
+
contextMenu.style.left = `${e.pageX}px`;
|
| 369 |
+
contextMenu.style.top = `${e.pageY}px`;
|
| 370 |
+
contextMenu.classList.remove('hidden');
|
| 371 |
+
}
|
| 372 |
+
});
|
| 373 |
+
|
| 374 |
+
// Close context menu when clicking elsewhere
|
| 375 |
+
document.addEventListener('click', function() {
|
| 376 |
+
contextMenu.classList.add('hidden');
|
| 377 |
+
});
|
| 378 |
+
|
| 379 |
+
// Context menu actions
|
| 380 |
+
document.querySelectorAll('.context-menu-item').forEach(item => {
|
| 381 |
+
item.addEventListener('click', function(e) {
|
| 382 |
+
e.preventDefault();
|
| 383 |
+
const action = this.textContent.toLowerCase();
|
| 384 |
+
handleFileAction(action, selectedItem);
|
| 385 |
+
contextMenu.classList.add('hidden');
|
| 386 |
+
});
|
| 387 |
+
});
|
| 388 |
+
|
| 389 |
+
function handleFileAction(action, item) {
|
| 390 |
+
const fileName = item.querySelector('span:not(.text-xs)').textContent;
|
| 391 |
+
const isFolder = item.classList.contains('folder-item');
|
| 392 |
+
|
| 393 |
+
switch(action) {
|
| 394 |
+
case 'open':
|
| 395 |
+
if (isFolder) {
|
| 396 |
+
const toggleIcon = item.querySelector('.toggle-icon');
|
| 397 |
+
if (toggleIcon) toggleIcon.click();
|
| 398 |
+
} else {
|
| 399 |
+
alert(`Opening file: ${fileName}`);
|
| 400 |
+
}
|
| 401 |
+
break;
|
| 402 |
+
case 'download':
|
| 403 |
+
alert(`Downloading: ${fileName}`);
|
| 404 |
+
break;
|
| 405 |
+
case 'rename':
|
| 406 |
+
const newName = prompt('Enter new name:', fileName);
|
| 407 |
+
if (newName) {
|
| 408 |
+
item.querySelector('span:not(.text-xs)').textContent = newName;
|
| 409 |
+
}
|
| 410 |
+
break;
|
| 411 |
+
case 'delete':
|
| 412 |
+
if (confirm(`Are you sure you want to delete ${fileName}?`)) {
|
| 413 |
+
item.remove();
|
| 414 |
+
updateFileCount();
|
| 415 |
+
}
|
| 416 |
+
break;
|
| 417 |
+
case 'properties':
|
| 418 |
+
alert(`Properties for: ${fileName}\nType: ${isFolder ? 'Folder' : 'File'}`);
|
| 419 |
+
break;
|
| 420 |
+
}
|
| 421 |
+
}
|
| 422 |
+
|
| 423 |
+
function updateFileCount() {
|
| 424 |
+
const fileCount = document.querySelectorAll('.file-item').length;
|
| 425 |
+
const dirCount = document.querySelectorAll('.folder-item').length - 1; // subtract root
|
| 426 |
+
const countElement = document.querySelector('.bg-gray-50 .text-sm span');
|
| 427 |
+
countElement.textContent = `${fileCount} files, ${dirCount} directories`;
|
| 428 |
+
}
|
| 429 |
+
|
| 430 |
+
function generateRandomPermissions(isDirectory) {
|
| 431 |
+
const types = ['r', 'w', 'x'];
|
| 432 |
+
let permissions = isDirectory ? 'd' : '-';
|
| 433 |
+
|
| 434 |
+
// Generate owner, group, others permissions
|
| 435 |
+
for (let i = 0; i < 3; i++) {
|
| 436 |
+
let perm = '';
|
| 437 |
+
for (let j = 0; j < 3; j++) {
|
| 438 |
+
perm += Math.random() > 0.3 ? types[j] : '-';
|
| 439 |
+
}
|
| 440 |
+
permissions += perm;
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
return permissions;
|
| 444 |
+
}
|
| 445 |
+
});
|
| 446 |
+
</script>
|
| 447 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=CheekyCheek/renee2-0" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 448 |
+
</html>
|