Spaces:
Running
Running
| class FileBrowser extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| .file-browser { | |
| background: rgba(15, 10, 31, 0.7); | |
| border: 1px solid rgba(110, 64, 201, 0.3); | |
| border-radius: 0.5rem; | |
| padding: 1.5rem; | |
| font-family: 'JetBrains Mono', monospace; | |
| color: rgba(255, 255, 255, 0.8); | |
| box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); | |
| backdrop-filter: blur(5px); | |
| max-height: 400px; | |
| overflow-y: auto; | |
| } | |
| .browser-header { | |
| display: flex; | |
| justify-content: space-between; | |
| margin-bottom: 1rem; | |
| padding-bottom: 0.5rem; | |
| border-bottom: 1px solid rgba(110, 64, 201, 0.2); | |
| } | |
| .browser-title { | |
| font-weight: bold; | |
| color: #6e40c9; | |
| } | |
| .refresh-btn { | |
| background: rgba(110, 64, 201, 0.2); | |
| color: #6e40c9; | |
| border: none; | |
| padding: 0.25rem 0.5rem; | |
| border-radius: 0.25rem; | |
| cursor: pointer; | |
| font-size: 0.8rem; | |
| } | |
| .file-list { | |
| list-style: none; | |
| padding: 0; | |
| margin: 0; | |
| } | |
| .file-item { | |
| padding: 0.5rem; | |
| border-radius: 0.25rem; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| margin-bottom: 0.25rem; | |
| } | |
| .file-item:hover { | |
| background: rgba(110, 64, 201, 0.1); | |
| } | |
| .file-icon { | |
| color: #6e40c9; | |
| } | |
| .file-name { | |
| flex-grow: 1; | |
| } | |
| .file-path { | |
| font-size: 0.8rem; | |
| color: rgba(255, 255, 255, 0.5); | |
| } | |
| .download-btn { | |
| background: transparent; | |
| border: none; | |
| color: #6e40c9; | |
| cursor: pointer; | |
| } | |
| </style> | |
| <div class="file-browser"> | |
| <div class="browser-header"> | |
| <div class="browser-title">File Browser</div> | |
| <button class="refresh-btn"> | |
| <i data-feather="refresh-cw"></i> Refresh | |
| </button> | |
| </div> | |
| <ul class="file-list"> | |
| <li class="file-item"> | |
| <i data-feather="file-text" class="file-icon"></i> | |
| <div class="file-name">telegram_session</div> | |
| <div class="file-path">/home/user/.telegram/tdata</div> | |
| <button class="download-btn"> | |
| <i data-feather="download"></i> | |
| </button> | |
| </li> | |
| <li class="file-item"> | |
| <i data-feather="file-text" class="file-icon"></i> | |
| <div class="file-name">discord_tokens</div> | |
| <div class="file-path">/home/user/.config/discord/Local Storage</div> | |
| <button class="download-btn"> | |
| <i data-feather="download"></i> | |
| </button> | |
| </li> | |
| <li class="file-item"> | |
| <i data-feather="folder" class="file-icon"></i> | |
| <div class="file-name">tdata</div> | |
| <div class="file-path">/home/user/.TelegramDesktop/tdata</div> | |
| <button class="download-btn"> | |
| <i data-feather="download"></i> | |
| </button> | |
| </li> | |
| <li class="file-item"> | |
| <i data-feather="key" class="file-icon"></i> | |
| <div class="file-name">discord_token.txt</div> | |
| <div class="file-path">/home/user/.config/discord/tokens</div> | |
| <button class="download-btn"> | |
| <i data-feather="download"></i> | |
| </button> | |
| </li> | |
| </ul> | |
| </div> | |
| `; | |
| } | |
| } | |
| customElements.define('file-browser', FileBrowser); |