Download app/renderer/start.js from Devseis/Ora: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/spaces/Devseis/Ora/resolve/main/app/renderer/start.js
- Command line
-
hf download hf://spaces/Devseis/Ora/app/renderer/start.js
-
curl -L -o start.js https://huggingface.co/spaces/Devseis/Ora/resolve/main/app/renderer/start.js
1.24 kB
| ; | |
| /* global $, S, plan, planSlot, loadPlan, applyBrand, refreshOnline, showView, renderPicCount, renderStarters, renderDemoBar, aiOn, askCloudflare */ | |
| // Starts Ora: state from main, the online accounts, the sidebar's plan chip, then the plan itself. | |
| // the sidebar's plan chip: brand colour and name (or the demo), opens the plan file dialog | |
| function renderPlanChip() { | |
| const b = (plan && plan.brand) || {}; | |
| $('planName').textContent = b.name || 'Your plan'; | |
| $('planDot').style.background = (b.colors || [])[0] || 'var(--muted)'; | |
| $('demoTag').hidden = planSlot() !== 'demo'; | |
| } | |
| $('planChip').addEventListener('click', () => { renderStarters(); $('planFileNote').textContent = ''; $('fileDlg').showModal(); }); | |
| $('fileClose').addEventListener('click', () => $('fileDlg').close()); | |
| (async () => { | |
| try { S = { ...S, ...(await window.ora.state()) }; } catch (e) { console.error(e); } | |
| $('version').textContent = S.version ? `v${S.version}` : ''; | |
| renderPicCount(); | |
| await refreshOnline(); | |
| await loadPlan(); | |
| applyBrand(); | |
| renderDemoBar(); | |
| showView('plan'); | |
| // every start without Cloudflare: the setup page (it can be skipped) | |
| if (!aiOn()) askCloudflare(null, 'Set up Ora'); | |
| })(); | |