521 lines
30 KiB
HTML
521 lines
30 KiB
HTML
<!DOCTYPE html>
|
|||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||
|
|
<meta name="theme-color" content="#030305">
|
||
|
|
<meta name="color-scheme" content="dark">
|
||
|
|
<title>Host It Now · Enterprise Cloud Vault & Edge Relay</title>
|
||
|
|
|
||
|
|
<!-- Google Fonts: Inter & JetBrains Mono -->
|
||
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||
|
|
|
||
|
|
<!-- Font Awesome -->
|
||
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||
|
|
|
||
|
|
<!-- QRCode.js -->
|
||
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
|
||
|
|
|
||
|
|
<!-- Styles -->
|
||
|
|
<link rel="stylesheet" href="/styles.css?v=3.0">
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<!-- Ambient Obsidian Background Mesh -->
|
||
|
|
<div class="ambient-mesh"></div>
|
||
|
|
|
||
|
|
<div class="app-root">
|
||
|
|
<!-- ═══════════════════════════════════════════════════════════
|
||
|
|
ENTERPRISE TOP APPLICATION HEADER
|
||
|
|
═══════════════════════════════════════════════════════════ -->
|
||
|
|
<header class="hin-header">
|
||
|
|
<div class="header-left">
|
||
|
|
<div class="brand-badge">
|
||
|
|
<div class="brand-icon">
|
||
|
|
<i class="fa-solid fa-cloud-arrow-up"></i>
|
||
|
|
</div>
|
||
|
|
<div class="brand-text">
|
||
|
|
<h1>Host It Now</h1>
|
||
|
|
<span>Enterprise Cloud Vault & Edge Relay</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="header-center">
|
||
|
|
<!-- Global Metrics Strip -->
|
||
|
|
<div class="header-metrics">
|
||
|
|
<div class="metric-pill" title="Total active hosting sessions">
|
||
|
|
<i class="fa-solid fa-layer-group text-cyan"></i>
|
||
|
|
<span class="metric-label">Sessions:</span>
|
||
|
|
<span class="metric-val" id="metric-total-sessions">0</span>
|
||
|
|
</div>
|
||
|
|
<div class="metric-pill" title="Total hosted files across active session">
|
||
|
|
<i class="fa-solid fa-images text-purple"></i>
|
||
|
|
<span class="metric-label">Files:</span>
|
||
|
|
<span class="metric-val" id="metric-total-files">0</span>
|
||
|
|
</div>
|
||
|
|
<div class="metric-pill" title="Total requests served">
|
||
|
|
<i class="fa-solid fa-bolt text-amber"></i>
|
||
|
|
<span class="metric-label">Requests:</span>
|
||
|
|
<span class="metric-val" id="metric-total-reqs">0</span>
|
||
|
|
</div>
|
||
|
|
<div class="metric-pill" title="Total bandwidth transferred">
|
||
|
|
<i class="fa-solid fa-arrow-right-arrow-left text-green"></i>
|
||
|
|
<span class="metric-label">Bandwidth:</span>
|
||
|
|
<span class="metric-val" id="metric-total-bytes">0 MB</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="header-right">
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="openTelemetryModal()" title="View live server traffic and access telemetry">
|
||
|
|
<i class="fa-solid fa-chart-line text-cyan"></i> Telemetry
|
||
|
|
</button>
|
||
|
|
<a href="/radheradhe/" target="_blank" class="btn btn-secondary btn-sm" title="Open administrator dashboard">
|
||
|
|
<i class="fa-solid fa-shield-halved text-purple"></i> Admin
|
||
|
|
</a>
|
||
|
|
</div>
|
||
|
|
</header>
|
||
|
|
|
||
|
|
<!-- ═══════════════════════════════════════════════════════════
|
||
|
|
SESSION GOVERNANCE & SWITCHER RAIL
|
||
|
|
═══════════════════════════════════════════════════════════ -->
|
||
|
|
<section class="session-governance-strip">
|
||
|
|
<div class="session-rail-left">
|
||
|
|
<span class="rail-title"><i class="fa-solid fa-server"></i> Active Sessions</span>
|
||
|
|
<div class="session-tabs-rail" id="sessionTabsRail">
|
||
|
|
<!-- Populated dynamically by app.js -->
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="session-rail-actions">
|
||
|
|
<button class="btn btn-cyan btn-sm" onclick="openNewSessionModal()" title="Create a new hosting session">
|
||
|
|
<i class="fa-solid fa-plus"></i> New Session
|
||
|
|
</button>
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="openGovernanceModal()" title="Configure time limit and session governance">
|
||
|
|
<i class="fa-solid fa-clock"></i> Governance
|
||
|
|
</button>
|
||
|
|
<button class="btn btn-danger btn-sm" onclick="deleteCurrentSession()" title="Delete active session and free resources">
|
||
|
|
<i class="fa-solid fa-trash-can"></i>
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
|
||
|
|
<!-- ═══════════════════════════════════════════════════════════
|
||
|
|
PUBLIC LIVE LINK & TUNNEL HUD
|
||
|
|
═══════════════════════════════════════════════════════════ -->
|
||
|
|
<section class="live-tunnel-card" id="livePanel">
|
||
|
|
<div class="tunnel-header">
|
||
|
|
<div class="tunnel-info">
|
||
|
|
<div class="tunnel-status-badge badge-offline" id="liveBadge">
|
||
|
|
<span class="status-dot"></span>
|
||
|
|
<span id="liveStatusText">Offline</span>
|
||
|
|
</div>
|
||
|
|
<div class="tunnel-governance-pill" id="tunnelGovernancePill" title="Session time limit countdown">
|
||
|
|
<i class="fa-solid fa-hourglass-half"></i>
|
||
|
|
<span id="sessionTtlText">Unlimited (Enterprise)</span>
|
||
|
|
</div>
|
||
|
|
<div class="tunnel-mode-pill" id="sessionModePill">
|
||
|
|
<i class="fa-solid fa-cloud"></i>
|
||
|
|
<span id="sessionModeText">Server Vault</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="tunnel-controls">
|
||
|
|
<div id="liveSpinner" class="tunnel-spinner hidden">
|
||
|
|
<i class="fa-solid fa-circle-notch fa-spin"></i> Initializing Gateway…
|
||
|
|
</div>
|
||
|
|
<button id="btnGoLive" class="btn btn-green btn-sm" onclick="startTunnel()">
|
||
|
|
<i class="fa-solid fa-satellite-dish"></i> Go Live (Public Tunnel)
|
||
|
|
</button>
|
||
|
|
<button id="btnStopLive" class="btn btn-danger btn-sm hidden" onclick="stopTunnel()">
|
||
|
|
<i class="fa-solid fa-power-off"></i> Stop Tunnel
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="liveUrlRow" class="tunnel-url-row hidden">
|
||
|
|
<div class="url-input-box">
|
||
|
|
<i class="fa-solid fa-link text-cyan"></i>
|
||
|
|
<span class="url-text" id="liveUrlText"></span>
|
||
|
|
</div>
|
||
|
|
<div class="url-actions">
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="copyLiveUrl()" title="Copy live URL to clipboard">
|
||
|
|
<i class="fa-solid fa-copy"></i> Copy
|
||
|
|
</button>
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="openQrModal('Public Session Link', document.getElementById('liveUrlText').textContent)" title="Display QR Code for mobile scanning">
|
||
|
|
<i class="fa-solid fa-qrcode"></i> QR
|
||
|
|
</button>
|
||
|
|
<a id="liveOpenBtn" href="#" target="_blank" class="btn btn-secondary btn-sm" title="Open live URL in new tab">
|
||
|
|
<i class="fa-solid fa-arrow-up-right-from-square"></i> Open
|
||
|
|
</a>
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="regenerateTunnel()" title="Regenerate tunnel URL">
|
||
|
|
<i class="fa-solid fa-rotate"></i>
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
|
||
|
|
<!-- ═══════════════════════════════════════════════════════════
|
||
|
|
CONTENT INGESTION & HOSTING MODES
|
||
|
|
═══════════════════════════════════════════════════════════ -->
|
||
|
|
<section class="ingest-card">
|
||
|
|
<!-- Mode Selector Tabs -->
|
||
|
|
<div class="ingest-tabs">
|
||
|
|
<button class="ingest-tab active" data-tab="vault" onclick="switchIngestMode('vault')">
|
||
|
|
<i class="fa-solid fa-cloud-arrow-up"></i>
|
||
|
|
<div class="tab-meta">
|
||
|
|
<strong>Server Background Vault</strong>
|
||
|
|
<span>Persistent 24/7 hosting · Survives browser close</span>
|
||
|
|
</div>
|
||
|
|
</button>
|
||
|
|
<button class="ingest-tab" data-tab="path" onclick="switchIngestMode('path')">
|
||
|
|
<i class="fa-solid fa-hard-drive"></i>
|
||
|
|
<div class="tab-meta">
|
||
|
|
<strong>Host Server Directory</strong>
|
||
|
|
<span>Map any existing filesystem path on host</span>
|
||
|
|
</div>
|
||
|
|
</button>
|
||
|
|
<button class="ingest-tab" data-tab="relay" onclick="switchIngestMode('relay')">
|
||
|
|
<i class="fa-solid fa-tower-broadcast"></i>
|
||
|
|
<div class="tab-meta">
|
||
|
|
<strong>Browser Relay (P2P Memory)</strong>
|
||
|
|
<span>Direct client stream · Zero disk footprint</span>
|
||
|
|
</div>
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Ingest Body: Mode 1 - Server Background Vault -->
|
||
|
|
<div class="ingest-content" id="mode-content-vault">
|
||
|
|
<input type="file" id="vaultFolderInput" webkitdirectory directory multiple style="display:none" onchange="handleVaultUpload(event, 'folder')">
|
||
|
|
<input type="file" id="vaultFileInput" multiple style="display:none" onchange="handleVaultUpload(event, 'file')">
|
||
|
|
<input type="file" id="vaultZipInput" accept=".zip" style="display:none" onchange="handleZipUpload(event)">
|
||
|
|
|
||
|
|
<div class="vault-dropzone" id="vaultDropzone">
|
||
|
|
<div class="dropzone-icon">
|
||
|
|
<i class="fa-solid fa-cloud-arrow-up"></i>
|
||
|
|
</div>
|
||
|
|
<div class="dropzone-text">
|
||
|
|
<h3>Drop Images, Folders, or ZIP Archives to Host in Background</h3>
|
||
|
|
<p>Uploaded directly to the secure server vault so files remain online even if your browser is closed.</p>
|
||
|
|
</div>
|
||
|
|
<div class="dropzone-buttons">
|
||
|
|
<button class="btn btn-cyan btn-sm" onclick="document.getElementById('vaultFileInput').click()">
|
||
|
|
<i class="fa-solid fa-file-arrow-up"></i> Upload Files
|
||
|
|
</button>
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="document.getElementById('vaultFolderInput').click()">
|
||
|
|
<i class="fa-solid fa-folder-plus"></i> Upload Folder
|
||
|
|
</button>
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="document.getElementById('vaultZipInput').click()" title="Automatically unpacks all contents into session">
|
||
|
|
<i class="fa-solid fa-file-zipper"></i> Upload .ZIP Archive
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="upload-progress-container hidden" id="uploadProgressBox">
|
||
|
|
<div class="progress-info">
|
||
|
|
<span id="uploadStatusText">Uploading files to server vault...</span>
|
||
|
|
<span id="uploadPercentText" class="font-mono">0%</span>
|
||
|
|
</div>
|
||
|
|
<div class="progress-bar-bg">
|
||
|
|
<div class="progress-bar-fill" id="uploadProgressBar"></div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Ingest Body: Mode 2 - Host Server Directory -->
|
||
|
|
<div class="ingest-content hidden" id="mode-content-path">
|
||
|
|
<div class="path-input-group">
|
||
|
|
<div class="input-wrapper">
|
||
|
|
<i class="fa-solid fa-folder text-cyan"></i>
|
||
|
|
<input type="text" class="text-input" id="pathInput" placeholder="Enter absolute server directory path — e.g. /home/user/images or /var/www/assets">
|
||
|
|
</div>
|
||
|
|
<button class="btn btn-cyan" onclick="setFolderPath()">
|
||
|
|
<i class="fa-solid fa-map-pin"></i> Map Directory
|
||
|
|
</button>
|
||
|
|
<button class="btn btn-secondary" onclick="openServerDirModal()" title="Explore server filesystem visually">
|
||
|
|
<i class="fa-solid fa-folder-tree"></i> Browse Server
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
<p class="input-hint"><i class="fa-solid fa-shield-halved"></i> Directly mounts an existing directory from the server filesystem with zero upload delay.</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Ingest Body: Mode 3 - Browser Relay (P2P) -->
|
||
|
|
<div class="ingest-content hidden" id="mode-content-relay">
|
||
|
|
<input type="file" id="relayFolderInput" webkitdirectory directory multiple style="display:none" onchange="handleRelaySelect(event, 'folder')">
|
||
|
|
<input type="file" id="relayFileInput" multiple style="display:none" onchange="handleRelaySelect(event, 'file')">
|
||
|
|
|
||
|
|
<div class="relay-action-grid">
|
||
|
|
<button class="relay-card-btn" onclick="document.getElementById('relayFolderInput').click()">
|
||
|
|
<i class="fa-solid fa-folder-open text-purple"></i>
|
||
|
|
<strong>Relay Folder from Device</strong>
|
||
|
|
<span>Stream entire folder tree from browser memory</span>
|
||
|
|
</button>
|
||
|
|
<button class="relay-card-btn" onclick="document.getElementById('relayFileInput').click()">
|
||
|
|
<i class="fa-solid fa-images text-cyan"></i>
|
||
|
|
<strong>Relay Files from Device</strong>
|
||
|
|
<span>Select individual images to stream directly</span>
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
<p class="input-hint"><i class="fa-solid fa-circle-info"></i> Browser Relay streams files on-demand via SSE memory without writing to server disk. Note: browser tab must remain open.</p>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Active Status Bar -->
|
||
|
|
<div class="hin-status-bar" id="statusBar">
|
||
|
|
<div class="status-left">
|
||
|
|
<i class="fa-solid fa-circle-check text-green" id="statusIcon"></i>
|
||
|
|
<span id="statusText">Session active</span>
|
||
|
|
</div>
|
||
|
|
<div class="status-right" id="statusDetails">
|
||
|
|
<span id="statusFileCountPill" class="meta-pill">0 files</span>
|
||
|
|
<span id="statusSizePill" class="meta-pill">0 MB</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
|
||
|
|
<!-- ═══════════════════════════════════════════════════════════
|
||
|
|
EXPLORER: SEARCH, FILTERS & BULK ACTIONS
|
||
|
|
═══════════════════════════════════════════════════════════ -->
|
||
|
|
<section class="explorer-card">
|
||
|
|
<div class="explorer-toolbar">
|
||
|
|
<div class="toolbar-search">
|
||
|
|
<i class="fa-solid fa-magnifying-glass"></i>
|
||
|
|
<input type="text" id="fileSearchInput" placeholder="Filter files by name, folder, or extension..." oninput="handleSearchFilter(this.value)">
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="toolbar-filter-chips">
|
||
|
|
<button class="filter-chip active" data-filter="all" onclick="setCategoryFilter('all')">All</button>
|
||
|
|
<button class="filter-chip" data-filter="images" onclick="setCategoryFilter('images')">Images</button>
|
||
|
|
<button class="filter-chip" data-filter="code" onclick="setCategoryFilter('code')">Code & JSON</button>
|
||
|
|
<button class="filter-chip" data-filter="docs" onclick="setCategoryFilter('docs')">Docs & Other</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="toolbar-bulk-actions">
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="openBatchExportModal()" title="Export all file URLs in multiple developer formats">
|
||
|
|
<i class="fa-solid fa-share-nodes text-cyan"></i> Copy All URLs
|
||
|
|
</button>
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="downloadSessionZip()" title="Download entire hosted session as a ZIP archive">
|
||
|
|
<i class="fa-solid fa-file-zipper text-purple"></i> Download ZIP
|
||
|
|
</button>
|
||
|
|
<div class="view-toggle">
|
||
|
|
<button class="view-btn active" id="btnViewGrid" onclick="setViewMode('grid')" title="Grid View"><i class="fa-solid fa-grip"></i></button>
|
||
|
|
<button class="view-btn" id="btnViewList" onclick="setViewMode('list')" title="List View"><i class="fa-solid fa-list"></i></button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Dynamic File Container -->
|
||
|
|
<div id="filesContainer" class="files-container grid-mode">
|
||
|
|
<!-- Populated dynamically by app.js -->
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- ═══════════════════════════════════════════════════════════
|
||
|
|
MODALS & DIALOGS
|
||
|
|
═══════════════════════════════════════════════════════════ -->
|
||
|
|
|
||
|
|
<!-- New Session & Governance Modal -->
|
||
|
|
<div class="modal-backdrop" id="sessionGovModal" style="display: none;">
|
||
|
|
<div class="modal-card">
|
||
|
|
<div class="modal-header">
|
||
|
|
<h3><i class="fa-solid fa-shield-halved text-cyan"></i> Session Governance & Time Limit</h3>
|
||
|
|
<button class="modal-close-btn" onclick="closeGovernanceModal()"><i class="fa-solid fa-xmark"></i></button>
|
||
|
|
</div>
|
||
|
|
<div class="modal-body">
|
||
|
|
<div class="form-group">
|
||
|
|
<label>Session Name</label>
|
||
|
|
<input type="text" id="govSessionName" class="text-input" placeholder="e.g. Product Demo Assets">
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<label>Hosting Mode</label>
|
||
|
|
<select id="govSessionMode" class="text-input">
|
||
|
|
<option value="server_background">Server Background Vault (Persistent 24/7)</option>
|
||
|
|
<option value="local_path">Local Server Directory Path</option>
|
||
|
|
<option value="relay">Browser Relay (P2P Memory)</option>
|
||
|
|
</select>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<label>Governance Time Limit (Auto-Expiration)</label>
|
||
|
|
<select id="govTimeLimitSel" class="text-input">
|
||
|
|
<option value="0">Unlimited (Enterprise Permanent)</option>
|
||
|
|
<option value="900">15 Minutes (Scratch Session)</option>
|
||
|
|
<option value="3600">1 Hour (Quick QA Test)</option>
|
||
|
|
<option value="14400">4 Hours (Standard Review)</option>
|
||
|
|
<option value="86400">24 Hours (Full Day Demo)</option>
|
||
|
|
<option value="604800">7 Days (Production Sprint)</option>
|
||
|
|
</select>
|
||
|
|
<span class="form-hint"><i class="fa-solid fa-hourglass-start"></i> When the time limit expires, the server automatically terminates the session and purges temporary files to free resources.</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="modal-footer">
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="closeGovernanceModal()">Cancel</button>
|
||
|
|
<button class="btn btn-cyan btn-sm" onclick="saveSessionGovernance()">Apply Settings</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- QR Code Scan Modal -->
|
||
|
|
<div class="modal-backdrop" id="qrModal" style="display: none;">
|
||
|
|
<div class="modal-card" style="max-width: 420px; text-align: center;">
|
||
|
|
<div class="modal-header">
|
||
|
|
<h3 id="qrModalTitle"><i class="fa-solid fa-qrcode text-cyan"></i> Scan QR Code</h3>
|
||
|
|
<button class="modal-close-btn" onclick="closeQrModal()"><i class="fa-solid fa-xmark"></i></button>
|
||
|
|
</div>
|
||
|
|
<div class="modal-body" style="display: flex; flex-direction: column; align-items: center; gap: 14px;">
|
||
|
|
<div class="qr-canvas-box" id="qrCodeContainer"></div>
|
||
|
|
<div class="url-input-box" style="width: 100%;">
|
||
|
|
<span class="url-text" id="qrUrlText" style="font-size: 11px;"></span>
|
||
|
|
</div>
|
||
|
|
<p style="font-size: 11.5px; color: var(--muted); margin: 0;">Scan with any smartphone or mobile camera to open this hosted asset directly.</p>
|
||
|
|
</div>
|
||
|
|
<div class="modal-footer" style="justify-content: center;">
|
||
|
|
<button class="btn btn-cyan btn-sm" onclick="copyText(document.getElementById('qrUrlText').textContent)">
|
||
|
|
<i class="fa-solid fa-copy"></i> Copy Link
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Media Fullscreen Lightbox Modal -->
|
||
|
|
<div class="modal-backdrop" id="lightboxModal" style="display: none;" onclick="closeLightbox(event)">
|
||
|
|
<div class="lightbox-card" onclick="event.stopPropagation()">
|
||
|
|
<div class="lightbox-header">
|
||
|
|
<span class="lightbox-title" id="lightboxTitle">Image Preview</span>
|
||
|
|
<div class="lightbox-actions">
|
||
|
|
<a id="lightboxDlBtn" href="#" download class="btn btn-secondary btn-sm"><i class="fa-solid fa-download"></i> Download</a>
|
||
|
|
<button class="modal-close-btn" onclick="closeLightbox()"><i class="fa-solid fa-xmark"></i></button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="lightbox-body">
|
||
|
|
<img id="lightboxImg" src="" alt="Fullscreen Preview">
|
||
|
|
</div>
|
||
|
|
<div class="lightbox-footer">
|
||
|
|
<span id="lightboxDims" class="font-mono">Dimensions: --</span>
|
||
|
|
<span id="lightboxSize" class="font-mono">Size: --</span>
|
||
|
|
<span id="lightboxUrl" class="font-mono" style="max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"></span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Code & JSON Viewer Modal -->
|
||
|
|
<div class="modal-backdrop" id="codeModal" style="display: none;">
|
||
|
|
<div class="modal-card" style="max-width: 760px;">
|
||
|
|
<div class="modal-header">
|
||
|
|
<h3 id="codeModalTitle"><i class="fa-solid fa-code text-cyan"></i> Document Viewer</h3>
|
||
|
|
<div style="display: flex; gap: 8px;">
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="copyCodeContent()"><i class="fa-solid fa-copy"></i> Copy Code</button>
|
||
|
|
<button class="modal-close-btn" onclick="closeCodeModal()"><i class="fa-solid fa-xmark"></i></button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="modal-body" style="padding: 0;">
|
||
|
|
<pre class="code-viewport" id="codeModalContent"></pre>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Server Directory Explorer Modal -->
|
||
|
|
<div class="modal-backdrop" id="serverDirModal" style="display: none;">
|
||
|
|
<div class="modal-card" style="max-width: 640px;">
|
||
|
|
<div class="modal-header">
|
||
|
|
<h3><i class="fa-solid fa-folder-tree text-cyan"></i> Server Filesystem Explorer</h3>
|
||
|
|
<button class="modal-close-btn" onclick="closeServerDirModal()"><i class="fa-solid fa-xmark"></i></button>
|
||
|
|
</div>
|
||
|
|
<div class="modal-body">
|
||
|
|
<div class="server-dir-breadcrumb">
|
||
|
|
<span id="serverDirCurrent">/</span>
|
||
|
|
</div>
|
||
|
|
<div class="server-dir-list" id="serverDirList">
|
||
|
|
<!-- Populated dynamically by app.js -->
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="modal-footer">
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="closeServerDirModal()">Cancel</button>
|
||
|
|
<button class="btn btn-cyan btn-sm" onclick="selectCurrentServerDir()">Select Directory</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Real-Time Telemetry & Traffic Modal -->
|
||
|
|
<div class="modal-backdrop" id="telemetryModal" style="display: none;">
|
||
|
|
<div class="modal-card" style="max-width: 820px;">
|
||
|
|
<div class="modal-header">
|
||
|
|
<h3><i class="fa-solid fa-chart-line text-cyan"></i> Live Telemetry & Access Traffic</h3>
|
||
|
|
<div style="display: flex; gap: 8px;">
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="refreshTelemetry()"><i class="fa-solid fa-rotate"></i> Refresh</button>
|
||
|
|
<button class="modal-close-btn" onclick="closeTelemetryModal()"><i class="fa-solid fa-xmark"></i></button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="modal-body">
|
||
|
|
<div class="telemetry-stats-row">
|
||
|
|
<div class="t-stat-card">
|
||
|
|
<span class="t-stat-val" id="t-reqs">0</span>
|
||
|
|
<span class="t-stat-label">Total HTTP Requests</span>
|
||
|
|
</div>
|
||
|
|
<div class="t-stat-card">
|
||
|
|
<span class="t-stat-val" id="t-bytes">0 MB</span>
|
||
|
|
<span class="t-stat-label">Bandwidth Transferred</span>
|
||
|
|
</div>
|
||
|
|
<div class="t-stat-card">
|
||
|
|
<span class="t-stat-val" id="t-active-time">Active</span>
|
||
|
|
<span class="t-stat-label">Last Ping</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="ps-section-title" style="margin-top: 14px; font-size: 12px; color: var(--text-2); text-transform: uppercase;">Recent Access Logs (Last 50 Requests)</div>
|
||
|
|
<div class="telemetry-log-table-wrap">
|
||
|
|
<table class="telemetry-table">
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>Time</th>
|
||
|
|
<th>Method</th>
|
||
|
|
<th>Path</th>
|
||
|
|
<th>Status</th>
|
||
|
|
<th>Bytes</th>
|
||
|
|
<th>Client IP</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody id="telemetryLogsBody">
|
||
|
|
<tr><td colspan="6" style="text-align:center; color: var(--muted); padding: 18px;">No traffic events recorded yet.</td></tr>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Batch URLs Export Modal -->
|
||
|
|
<div class="modal-backdrop" id="batchExportModal" style="display: none;">
|
||
|
|
<div class="modal-card" style="max-width: 700px;">
|
||
|
|
<div class="modal-header">
|
||
|
|
<h3><i class="fa-solid fa-share-nodes text-cyan"></i> Export All Hosted URLs</h3>
|
||
|
|
<button class="modal-close-btn" onclick="closeBatchExportModal()"><i class="fa-solid fa-xmark"></i></button>
|
||
|
|
</div>
|
||
|
|
<div class="modal-body">
|
||
|
|
<div class="batch-export-formats">
|
||
|
|
<button class="seg-pill active" onclick="switchExportFormat('raw')">Plain List</button>
|
||
|
|
<button class="seg-pill" onclick="switchExportFormat('json')">JSON Array</button>
|
||
|
|
<button class="seg-pill" onclick="switchExportFormat('markdown')">Markdown</button>
|
||
|
|
<button class="seg-pill" onclick="switchExportFormat('html')">HTML Img</button>
|
||
|
|
<button class="seg-pill" onclick="switchExportFormat('curl')">cURL Script</button>
|
||
|
|
</div>
|
||
|
|
<textarea id="batchExportTextarea" class="code-viewport" style="width: 100%; height: 240px; margin-top: 12px; font-size: 11.5px;" readonly></textarea>
|
||
|
|
</div>
|
||
|
|
<div class="modal-footer">
|
||
|
|
<button class="btn btn-secondary btn-sm" onclick="closeBatchExportModal()">Close</button>
|
||
|
|
<button class="btn btn-cyan btn-sm" onclick="copyBatchExportContent()"><i class="fa-solid fa-copy"></i> Copy to Clipboard</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Toast Notification Container -->
|
||
|
|
<div id="toast-container" class="toast-container"></div>
|
||
|
|
|
||
|
|
<!-- App Script -->
|
||
|
|
<script src="/app.js?v=3.0" defer></script>
|
||
|
|
</body>
|
||
|
|
</html>
|