Ora 0.3.5: Create menu fixes
Browse files- app/package.json +1 -1
- app/renderer/create-a.js +14 -4
- app/renderer/styles.css +2 -1
- index.html +1 -1
- worker/ora_worker.py +1 -1
app/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"name": "devseis-ora",
|
| 3 |
"productName": "Ora",
|
| 4 |
-
"version": "0.3.
|
| 5 |
"description": "Make videos from a prompt on your own computer with Wan2.1 1.3B and Wan2.2 5B.",
|
| 6 |
"author": {
|
| 7 |
"name": "Devseis",
|
|
|
|
| 1 |
{
|
| 2 |
"name": "devseis-ora",
|
| 3 |
"productName": "Ora",
|
| 4 |
+
"version": "0.3.5",
|
| 5 |
"description": "Make videos from a prompt on your own computer with Wan2.1 1.3B and Wan2.2 5B.",
|
| 6 |
"author": {
|
| 7 |
"name": "Devseis",
|
app/renderer/create-a.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
| 8 |
form.classList.add('create-a');
|
| 9 |
$('studio').classList.add('studio-a');
|
| 10 |
const fieldOf = id => $(id).closest('.field');
|
|
|
|
| 11 |
const el = (tag, cls, html) => { const e = document.createElement(tag); if (cls) e.className = cls; if (html != null) e.innerHTML = html; return e; };
|
| 12 |
|
| 13 |
// heading
|
|
@@ -62,9 +63,8 @@
|
|
| 62 |
const wrap = el('div', `ca-pill ${cls}`); wrap.dataset.key = key;
|
| 63 |
const b = el('button', 'pill-btn'); b.type = 'button'; b.innerHTML = `<span class="pv"></span><small>${title}</small>`;
|
| 64 |
const pop = el('div', 'ca-pop'); pop.hidden = true;
|
| 65 |
-
const h = el('div', 'ca-pop-h', title); pop.appendChild(h);
|
| 66 |
for (const n of nodes) if (n) pop.appendChild(n);
|
| 67 |
-
b.addEventListener('click', e => { e.stopPropagation(); const open = pop.hidden; for (const p of pops) p.hidden = true; pop.hidden = !open; });
|
| 68 |
pop.addEventListener('click', e => e.stopPropagation());
|
| 69 |
wrap.append(b, pop); row.appendChild(wrap); pops.push(pop);
|
| 70 |
return wrap;
|
|
@@ -74,7 +74,6 @@
|
|
| 74 |
ib.addEventListener('click', () => $('imgImprove').click());
|
| 75 |
improve.appendChild(ib); row.appendChild(improve);
|
| 76 |
|
| 77 |
-
const imageOnlyBox = $('imgShapeSeg').closest('.image-only'); // the old image settings group
|
| 78 |
pill('shape', 'shape', [fieldOf('shapeSeg'), fieldOf('imgShapeSeg')]);
|
| 79 |
pill('length', 'length', [fieldOf('lengthSeg')], 'video-only');
|
| 80 |
pill('style', 'style', [fieldOf('styleChips')]);
|
|
@@ -83,8 +82,19 @@
|
|
| 83 |
pill('design', 'design', [fieldOf('pLayoutSeg'), fieldOf('pFontSeg'), $('pAccent').closest('.field')], 'image-only');
|
| 84 |
const more = $('moreOpts'); more.open = true; more.classList.add('ca-more');
|
| 85 |
pill('more', 'more', [more]);
|
| 86 |
-
if (
|
| 87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
const go = el('div', 'ca-go'); go.append($('goBtn'), $('stopBtn')); row.appendChild(go);
|
| 89 |
// below the box: time and cost, and errors
|
| 90 |
const hint = el('div', 'ca-hint'); box.after(hint);
|
|
|
|
| 8 |
form.classList.add('create-a');
|
| 9 |
$('studio').classList.add('studio-a');
|
| 10 |
const fieldOf = id => $(id).closest('.field');
|
| 11 |
+
const oldImgGroup = $('imgShapeSeg').closest('.image-only'); // the old image settings group, emptied below
|
| 12 |
const el = (tag, cls, html) => { const e = document.createElement(tag); if (cls) e.className = cls; if (html != null) e.innerHTML = html; return e; };
|
| 13 |
|
| 14 |
// heading
|
|
|
|
| 63 |
const wrap = el('div', `ca-pill ${cls}`); wrap.dataset.key = key;
|
| 64 |
const b = el('button', 'pill-btn'); b.type = 'button'; b.innerHTML = `<span class="pv"></span><small>${title}</small>`;
|
| 65 |
const pop = el('div', 'ca-pop'); pop.hidden = true;
|
|
|
|
| 66 |
for (const n of nodes) if (n) pop.appendChild(n);
|
| 67 |
+
b.addEventListener('click', e => { e.stopPropagation(); const open = pop.hidden; for (const p of pops) p.hidden = true; pop.hidden = !open; if (open) placePop(b, pop); });
|
| 68 |
pop.addEventListener('click', e => e.stopPropagation());
|
| 69 |
wrap.append(b, pop); row.appendChild(wrap); pops.push(pop);
|
| 70 |
return wrap;
|
|
|
|
| 74 |
ib.addEventListener('click', () => $('imgImprove').click());
|
| 75 |
improve.appendChild(ib); row.appendChild(improve);
|
| 76 |
|
|
|
|
| 77 |
pill('shape', 'shape', [fieldOf('shapeSeg'), fieldOf('imgShapeSeg')]);
|
| 78 |
pill('length', 'length', [fieldOf('lengthSeg')], 'video-only');
|
| 79 |
pill('style', 'style', [fieldOf('styleChips')]);
|
|
|
|
| 82 |
pill('design', 'design', [fieldOf('pLayoutSeg'), fieldOf('pFontSeg'), $('pAccent').closest('.field')], 'image-only');
|
| 83 |
const more = $('moreOpts'); more.open = true; more.classList.add('ca-more');
|
| 84 |
pill('more', 'more', [more]);
|
| 85 |
+
if (oldImgGroup && !oldImgGroup.querySelector('.field')) oldImgGroup.classList.add('ca-hidden');
|
| 86 |
|
| 87 |
+
function placePop(b, pop) {
|
| 88 |
+
const r = b.getBoundingClientRect(), top = document.querySelector('header, .topbar, .top');
|
| 89 |
+
const roof = top ? top.getBoundingClientRect().bottom : 0;
|
| 90 |
+
const below = window.innerHeight - r.bottom - 16, above = r.top - roof - 16;
|
| 91 |
+
pop.style.maxHeight = ''; pop.style.top = ''; pop.style.bottom = '';
|
| 92 |
+
const need = pop.scrollHeight;
|
| 93 |
+
const up = need > below && above > below;
|
| 94 |
+
if (up) { pop.style.top = 'auto'; pop.style.bottom = 'calc(100% + 8px)'; }
|
| 95 |
+
pop.style.maxHeight = `${Math.max(160, up ? above : below)}px`;
|
| 96 |
+
}
|
| 97 |
+
window.addEventListener('resize', () => { for (const p of pops) p.hidden = true; });
|
| 98 |
const go = el('div', 'ca-go'); go.append($('goBtn'), $('stopBtn')); row.appendChild(go);
|
| 99 |
// below the box: time and cost, and errors
|
| 100 |
const hint = el('div', 'ca-hint'); box.after(hint);
|
app/renderer/styles.css
CHANGED
|
@@ -606,7 +606,7 @@ body { background-image: none; }
|
|
| 606 |
.pill-btn { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 7px 13px; font: 600 13px Inter, sans-serif; color: #3b3352; cursor: pointer; white-space: nowrap; }
|
| 607 |
.pill-btn:hover { border-color: #1c1530; }
|
| 608 |
.pill-btn small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
|
| 609 |
-
.ca-pop { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 360px; max-height: 60vh; overflow: auto; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; box-shadow: 0 24px 60px -24px rgba(28, 21, 48, .5); display: flex; flex-direction: column; gap: 12px; text-align: left; }
|
| 610 |
.ca-pop-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
|
| 611 |
.ca-pill[data-key="more"] .ca-pop { width: 420px; }
|
| 612 |
.ca-pill[data-key="more"] .ca-pop, .ca-pill[data-key="design"] .ca-pop { left: auto; right: 0; }
|
|
@@ -641,3 +641,4 @@ body { background-image: none; }
|
|
| 641 |
.change-what { display: inline-flex; width: auto; margin-top: 10px; align-self: flex-start; }
|
| 642 |
.change-what button { padding: 6px 16px; white-space: nowrap; }
|
| 643 |
.change-what[hidden], .cb-opts [hidden] { display: none !important; }
|
|
|
|
|
|
| 606 |
.pill-btn { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 7px 13px; font: 600 13px Inter, sans-serif; color: #3b3352; cursor: pointer; white-space: nowrap; }
|
| 607 |
.pill-btn:hover { border-color: #1c1530; }
|
| 608 |
.pill-btn small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
|
| 609 |
+
.ca-pop { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 360px; max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; box-shadow: 0 24px 60px -24px rgba(28, 21, 48, .5); display: flex; flex-direction: column; gap: 12px; text-align: left; }
|
| 610 |
.ca-pop-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
|
| 611 |
.ca-pill[data-key="more"] .ca-pop { width: 420px; }
|
| 612 |
.ca-pill[data-key="more"] .ca-pop, .ca-pill[data-key="design"] .ca-pop { left: auto; right: 0; }
|
|
|
|
| 641 |
.change-what { display: inline-flex; width: auto; margin-top: 10px; align-self: flex-start; }
|
| 642 |
.change-what button { padding: 6px 16px; white-space: nowrap; }
|
| 643 |
.change-what[hidden], .cb-opts [hidden] { display: none !important; }
|
| 644 |
+
.ca-pop .field > .label { margin-bottom: 6px; }
|
index.html
CHANGED
|
@@ -34,7 +34,7 @@
|
|
| 34 |
<!-- hero -->
|
| 35 |
<section class="hero">
|
| 36 |
<div class="hero-copy">
|
| 37 |
-
<a class="pill" href="#plan"><span class="dot"></span>New in 0.3.
|
| 38 |
<h1>Plan it. Make it. <em>Post it.</em></h1>
|
| 39 |
<p class="sub">One free app for your marketing: brand and audience, campaign and calendar, videos, posters and ads with music and voice-over, then captions and scheduled posts. Open AI models, on your own computer.</p>
|
| 40 |
<div class="hero-install" id="heroInstall">
|
|
|
|
| 34 |
<!-- hero -->
|
| 35 |
<section class="hero">
|
| 36 |
<div class="hero-copy">
|
| 37 |
+
<a class="pill" href="#plan"><span class="dot"></span>New in 0.3.5 · type to change posters, ads and pictures, and a simpler Create</a>
|
| 38 |
<h1>Plan it. Make it. <em>Post it.</em></h1>
|
| 39 |
<p class="sub">One free app for your marketing: brand and audience, campaign and calendar, videos, posters and ads with music and voice-over, then captions and scheduled posts. Open AI models, on your own computer.</p>
|
| 40 |
<div class="hero-install" id="heroInstall">
|
worker/ora_worker.py
CHANGED
|
@@ -12,7 +12,7 @@ only requests carrying that code's secret are accepted. Standard library only.
|
|
| 12 |
import argparse, base64, hashlib, json, os, re, secrets, shutil, subprocess, sys, tarfile, threading, time, urllib.request
|
| 13 |
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
| 14 |
|
| 15 |
-
VERSION = '0.3.
|
| 16 |
SITE = 'https://devseis-ora.static.hf.space'
|
| 17 |
RELEASES = 'https://huggingface.co/datasets/Devseis/ora-releases/resolve/main'
|
| 18 |
ENGINE_FILE = 'ora-engine-linux-cuda.tar.gz'
|
|
|
|
| 12 |
import argparse, base64, hashlib, json, os, re, secrets, shutil, subprocess, sys, tarfile, threading, time, urllib.request
|
| 13 |
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
| 14 |
|
| 15 |
+
VERSION = '0.3.5'
|
| 16 |
SITE = 'https://devseis-ora.static.hf.space'
|
| 17 |
RELEASES = 'https://huggingface.co/datasets/Devseis/ora-releases/resolve/main'
|
| 18 |
ENGINE_FILE = 'ora-engine-linux-cuda.tar.gz'
|