chahuadev-hub / index.html
chahuadev's picture
finalize support page integration and link security
6e41605 verified
Raw History Blame Contribute Delete
15.1 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src https://fonts.gstatic.com; img-src 'self' data: https:; script-src 'self' 'unsafe-inline'; connect-src 'self' https://*.firebaseio.com https://*.firebasedatabase.app wss://*.firebaseio.com wss://*.firebasedatabase.app https://api.mymemory.translated.net https://registry.npmjs.org https://api.npmjs.org; frame-src 'self';">
<title>Chahuadev Hub</title>
<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@400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./web/hub.css">
</head>
<body>
<!-- APP UPDATE TOAST (top-right) -->
<div id="app-update-toast" class="hidden" role="alert" aria-live="polite">
<div class="toast-head">
<span class="toast-head-label">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2">
<polyline points="23 4 23 10 17 10"/><path d="M20.49 15a9 9 0 11-2.12-9.36L23 10"/>
</svg>
App Update Available
</span>
<button class="toast-close-btn" onclick="dismissUpdateToast()" title="Dismiss">X</button>
</div>
<div class="toast-ver" id="toast-ver"></div>
<div class="toast-notes" id="toast-notes"></div>
<div class="toast-actions">
<button class="toast-act-btn primary" id="toast-update-btn" onclick="applyAppUpdate()">Update Now</button>
<button class="toast-act-btn secondary" onclick="dismissUpdateToast()">Later</button>
</div>
</div>
<!-- TOP NAV -->
<nav id="topnav">
<div class="brand-box">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2">
<rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8M12 17v4"/>
</svg>
<span class="brand-name">CHAHUADEV HUB</span>
</div>
<div class="nav-sep"></div>
<button class="nav-tab active" id="tab-dashboard" onclick="switchPage('dashboard')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2">
<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/>
<rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>
</svg>
Home
</button>
<button class="nav-tab" id="tab-npm" onclick="switchPage('npm')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" stroke="none">
<path d="M0 0h24v24H0V0zm6.154 19.2V8.727h3.693v8.146h1.846V8.727h1.846v10.473H6.154zm9.232-10.473v8.146h1.846v-6.4h1.846v6.4h1.846V8.727H15.386z"/>
</svg>
npm
</button>
<button class="nav-tab" id="tab-repos" onclick="switchPage('repos')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2">
<circle cx="12" cy="8" r="4"/><path d="M9 15s-5 1-5 4v1h16v-1c0-3-5-4-5-4"/><path d="M15.5 9.5c.5-.8.5-2 0-3"/><path d="M8.5 6.5c-.5.8-.5 2 0 3"/>
</svg>
Hugging Face
</button>
<button class="nav-tab" id="tab-downloads" onclick="switchPage('downloads')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2">
<path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/>
<polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/>
</svg>
Downloads
</button>
<button class="nav-tab" id="tab-dev" onclick="switchPage('dev')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2">
<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>
</svg>
Dev
</button>
<button class="nav-tab" id="tab-support" onclick="switchPage('support')">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2">
<path d="M12 21s-7-4.35-7-10a4 4 0 0 1 7-2.65A4 4 0 0 1 19 11c0 5.65-7 10-7 10z"/>
</svg>
Support
</button>
<div class="nav-spacer"></div>
<button class="nav-action" onclick="doRefresh()">
<svg width="12" height="12" id="refresh-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2">
<polyline points="23 4 23 10 17 10"/>
<path d="M20.49 15a9 9 0 11-2.12-9.36L23 10"/>
</svg>
Refresh
</button>
</nav>
<!-- CONTENT -->
<div id="content-wrap">
<!-- DASHBOARD -->
<div class="page active" id="page-dashboard">
<!-- Mini website webview -->
<div class="dash-webview-wrap">
<iframe id="dash-webview" src="./web/index.html" sandbox="allow-scripts allow-same-origin" title="Chahuadev Profile"></iframe>
</div>
</div><!-- /dashboard -->
<!-- SUPPORT -->
<div class="page" id="page-support">
<div class="support-webview-wrap">
<iframe id="support-iframe" src="./web/support-the-project.html" sandbox="allow-scripts allow-same-origin" title="Support the Project"></iframe>
</div>
</div><!-- /support -->
<!-- REPOS -->
<div class="page" id="page-repos">
<div class="page-header repos-page-head">
<div>
<div class="page-eyebrow">Hugging Face</div>
</div>
<div class="repos-mini-dl" title="Total downloads">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2">
<path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/>
<polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/>
</svg>
<span class="repos-mini-dl-label">Total Downloads</span>
<span class="repos-mini-dl-value" id="dash-downloads"></span>
</div>
</div>
<div class="repos-layout">
<!-- Left: repo list -->
<div class="repos-left">
<div class="repos-left-hdr" id="repo-filters">
<button class="filter-chip active" onclick="setRepoFilter('all', this)">All</button>
<button class="filter-chip" onclick="setRepoFilter('dataset', this)">Datasets</button>
<button class="filter-chip" onclick="setRepoFilter('model', this)">Models</button>
<button class="filter-chip" onclick="setRepoFilter('space', this)">Spaces</button>
</div>
<div class="repos-list" id="repo-list">
<div class="loading-box">
<svg class="spin" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 12a9 9 0 11-6.219-8.56"/>
</svg>
Loading repos
</div>
</div>
</div>
<div class="repos-resizer" id="repos-resizer"></div>
<!-- Right: detail -->
<div class="repos-right">
<div class="detail-hdr">
<span class="detail-hdr-title" id="detail-repo-name">Select a repository</span>
<button class="detail-hdr-link" id="detail-hf-link" onclick="openRepoOnHF()" style="display:none">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"/>
<polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/>
</svg>
Open on HF
</button>
</div>
<div class="detail-tabs" id="detail-tabs" style="display:none">
<button class="detail-tab active" onclick="switchDetailTab('files', this)">Files</button>
<button class="detail-tab" onclick="switchDetailTab('commits', this)">Commits</button>
</div>
<div class="detail-body">
<div class="detail-panel active" id="detail-files">
<div class="empty-box">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path d="M22 19a2 2 0 01-2 2H4a2 2 0 01-2-2V5a2 2 0 012-2h5l2 3h9a2 2 0 012 2z"/>
</svg>
Select a repo to browse files
</div>
</div>
<div class="detail-panel" id="detail-commits">
<div class="empty-box">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<circle cx="12" cy="12" r="4"/>
<line x1="1.05" y1="12" x2="7" y2="12"/>
<line x1="17.01" y1="12" x2="22.96" y2="12"/>
</svg>
Select a repo to view commits
</div>
</div>
</div>
</div>
</div>
</div><!-- /repos -->
<!-- DOWNLOADS -->
<div class="page" id="page-downloads">
<div class="page-header">
<div>
<div class="page-eyebrow">Release Center</div>
<div class="page-title">Downloads</div>
<div class="page-sub">Official Chahuadev builds split by platform: Windows, Linux, macOS, and Apk.</div>
</div>
</div>
<div class="dl-ad-wrap" id="dl-ad-wrap">
<div class="dl-ad-bg" id="dl-ad-bg"></div>
<div class="dl-ad-content">
<div class="dl-ad-kicker" id="dl-ad-kicker">Featured Build</div>
<h3 class="dl-ad-title" id="dl-ad-title">Chahuadev App Releases</h3>
<p class="dl-ad-desc" id="dl-ad-desc">Official builds from catalog with quick install and update tracking.</p>
<div class="dl-ad-actions">
<button class="dl-ad-btn os" id="dl-ad-os-win" onclick="quickFilterDownloadsByOs('Windows')">Windows Download</button>
<button class="dl-ad-btn os" id="dl-ad-os-lin" onclick="quickFilterDownloadsByOs('Linux')">Linux Download</button>
<button class="dl-ad-btn os" id="dl-ad-os-mac" onclick="quickFilterDownloadsByOs('macOS')">macOS Download</button>
<button class="dl-ad-btn os" id="dl-ad-os-apk" onclick="quickFilterDownloadsByOs('Apk')">Apk Download</button>
</div>
</div>
<button class="dl-ad-arrow prev" onclick="stepDownloadSlide(-1)" aria-label="Previous slide">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><polyline points="15 18 9 12 15 6"/></svg>
</button>
<button class="dl-ad-arrow next" onclick="stepDownloadSlide(1)" aria-label="Next slide">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4"><polyline points="9 18 15 12 9 6"/></svg>
</button>
<div class="dl-ad-dots" id="dl-ad-dots"></div>
</div>
<div class="dl-channel-grid">
<button class="dl-channel active" id="os-Windows" onclick="setOsFilter('Windows', this)">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="8" height="8"/><rect x="13" y="3" width="8" height="8"/>
<rect x="3" y="13" width="8" height="8"/><rect x="13" y="13" width="8" height="8"/>
</svg>
Windows
<span class="os-chip-count" id="os-count-Windows">0</span>
</button>
<button class="dl-channel" id="os-Linux" onclick="setOsFilter('Linux', this)">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="8" r="3"/>
<path d="M8 16c0-2.2 1.8-4 4-4s4 1.8 4 4"/>
<path d="M4 20c0-2.2 1.8-4 4-4h8c2.2 0 4 1.8 4 4"/>
</svg>
Linux
<span class="os-chip-count" id="os-count-Linux">0</span>
</button>
<button class="dl-channel" id="os-macOS" onclick="setOsFilter('macOS', this)">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/>
<path d="M15 9c-1.5-1.5-4-1.5-5.5 0s-1.5 4 0 5.5"/>
</svg>
macOS
<span class="os-chip-count" id="os-count-macOS">0</span>
</button>
<button class="dl-channel" id="os-Apk" onclick="setOsFilter('Apk', this)">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="7" y="3" width="10" height="18" rx="2"/>
<line x1="11" y1="6" x2="13" y2="6"/>
</svg>
Apk
<span class="os-chip-count" id="os-count-Apk">0</span>
</button>
</div>
<div class="dl-grid" id="dl-grid">
<div class="loading-box">
<svg class="spin" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 12a9 9 0 11-6.219-8.56"/>
</svg>
Loading catalog
</div>
</div>
</div><!-- /downloads -->
<!-- NPM -->
<div class="page" id="page-npm">
<div class="page-header">
<div>
<div class="page-eyebrow">npm Registry</div>
<div class="page-title">npm Packages</div>
</div>
</div>
<div class="npm-topbar">
<input class="npm-search-input" id="npm-search" type="search" placeholder="Search packages" oninput="filterNpmPackages()">
<div class="npm-inline-stats">
<div class="npm-inline-stat">
<span class="label">Projects</span>
<span class="value" id="npm-stat-count"></span>
</div>
<div class="npm-inline-stat">
<span class="label">Downloads / mo</span>
<span class="value" id="npm-stat-dl"></span>
</div>
</div>
</div>
<div class="npm-layout">
<div class="npm-panel">
<div class="npm-panel-head">Projects</div>
<div class="npm-list" id="npm-list">
<div class="loading-box">Loading packages</div>
</div>
</div>
<div class="npm-panel">
<div class="npm-panel-head">Project Details</div>
<div class="npm-detail" id="npm-detail">
<div class="empty-box" style="padding:24px 10px">Select a package to view details</div>
</div>
</div>
</div>
</div><!-- /npm -->
<!-- DEV -->
<div class="page" id="page-dev">
<div class="page-header">
<div>
<div class="page-eyebrow">Development</div>
<div class="page-title">Dev Tools</div>
<div class="page-sub">Development utilities and debug info</div>
</div>
</div>
<div class="empty-box" style="margin-top:24px">Dev tools coming soon.</div>
</div><!-- /dev -->
</div><!-- /#content-wrap -->
<!-- STATUS BAR -->
<div id="statusbar">
<div class="status-dot" id="status-dot"></div>
<span id="status-text">Initializing</span>
</div>
<script src="./web/hub.js"></script>
</body>
</html>