ZIP-tiedostonimi lyhennetty max 3 sanaan

This commit is contained in:
Jaakko Vanhala
2026-04-12 16:07:46 +03:00
parent 8ee997cb56
commit c1a5f8aff5

View File

@@ -96,7 +96,7 @@ import Settings from "../components/Settings.astro";
</div>
<!-- ===== APP (piilotettu kunnes pipeline käynnistyy) ===== -->
<div id="app" class="container" style="display:none">
<div id="app" class="container">
<div style="display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px">
<div>
<h1 style="margin-bottom:0"><span style="color:#ff6b00">Kipinä</span> Agentic Studio</h1>
@@ -156,8 +156,8 @@ import Settings from "../components/Settings.astro";
// === Landing → App siirtymä ===
function startProject(task) {
if (!task || !task.trim()) return;
document.getElementById('landing').style.display = 'none';
document.getElementById('app').style.display = 'block';
document.getElementById('landing').classList.add('hidden');
document.getElementById('app').classList.add('active');
// Käynnistä pipeline suoraan termExec:n kautta
setTimeout(() => {
if (typeof termExec === 'function') termExec(`kpn project "${task.trim()}"`);
@@ -165,8 +165,8 @@ import Settings from "../components/Settings.astro";
}
window.showLanding = function() {
document.getElementById('app').style.display = 'none';
document.getElementById('landing').style.display = '';
document.getElementById('app').classList.remove('active');
document.getElementById('landing').classList.remove('hidden');
};
// Landing-napit
@@ -1421,7 +1421,7 @@ OUTPUT FORMAT:
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = (name || 'projekti').replace(/[^a-z0-9_-]/gi, '_') + '.zip';
a.download = (name || 'projekti').split(/[\s,;:]+/).slice(0, 3).join('-').replace(/[^a-z0-9-]/gi, '').toLowerCase() + '.zip';
a.click();
URL.revokeObjectURL(url);
};