Skip to content

Commit 0845813

Browse files
committed
keep file on tab switch
1 parent 547ae5f commit 0845813

6 files changed

Lines changed: 307 additions & 101 deletions

File tree

dist/server/public/app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ function initializeTabs() {
8989
document.getElementById('gitUrl').removeAttribute('required')
9090
} else {
9191
document.getElementById('gitUrl').setAttribute('required', 'required')
92-
selectedFiles = []
93-
updateFileList()
9492
}
9593
})
9694
})
@@ -513,6 +511,9 @@ function initializeForm() {
513511

514512
// Show confirmation modal
515513
function showConfirmation(result) {
514+
// Save job ID to localStorage
515+
localStorage.setItem('lastJobId', result.jobId)
516+
516517
const modal = document.getElementById('confirmationModal')
517518
const details = document.getElementById('confirmationDetails')
518519
const statusLink = document.getElementById('statusLink')

dist/server/public/assets/icon.svg

Lines changed: 82 additions & 0 deletions
Loading

dist/server/public/index.html

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,25 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>LiaScript Export Server</title>
6+
<title>LiaScript Exporter</title>
77
<link rel="stylesheet" href="/styles.css" />
88
</head>
99
<body>
10+
<nav class="navbar">
11+
<div class="navbar-container">
12+
<a href="/" class="navbar-brand">
13+
<img src="./assets/icon.svg" alt="LiaScript" />
14+
</a>
15+
<ul class="navbar-menu">
16+
<li><a href="/" class="navbar-link active">Startseite</a></li>
17+
<li><a href="/status.html" class="navbar-link">Status</a></li>
18+
</ul>
19+
</div>
20+
</nav>
21+
1022
<div class="container">
1123
<header>
12-
<h1>LiaScript Export Server</h1>
24+
<h1>LiaScript Exporter</h1>
1325
<p class="subtitle">
1426
Erstellen Sie Exporte für verschiedene LMS und Formate
1527
</p>
@@ -148,6 +160,7 @@ <h2>2. Export-Ziel</h2>
148160
data-description="E-Learning-Standard für Lernmanagementsysteme. Weit verbreitet, aber älter. Geeignet für ältere LMS-Plattformen. <a href='https://de.wikipedia.org/wiki/Sharable_Content_Object_Reference_Model' target='_blank'>Mehr erfahren</a>"
149161
/>
150162
<div class="preset-content">
163+
<div class="format-icon">📚</div>
151164
<h3>SCORM 1.2</h3>
152165
<p>Legacy Standard</p>
153166
</div>
@@ -161,6 +174,7 @@ <h3>SCORM 1.2</h3>
161174
data-description="Moderne Version des SCORM-Standards mit erweiterten Funktionen für Lernpfade und Bewertungen. Empfohlen für aktuelle LMS-Systeme. <a href='https://de.wikipedia.org/wiki/Sharable_Content_Object_Reference_Model' target='_blank'>Mehr erfahren</a>"
162175
/>
163176
<div class="preset-content">
177+
<div class="format-icon">📦</div>
164178
<h3>SCORM 2004</h3>
165179
<p>Modern Standard</p>
166180
</div>
@@ -174,6 +188,7 @@ <h3>SCORM 2004</h3>
174188
data-description="IMS Content Packaging für Austausch von Lerninhalten zwischen verschiedenen Plattformen. Standard für plattformübergreifende Kompatibilität. <a href='https://en.wikipedia.org/wiki/IMS_Content_Packaging' target='_blank'>Mehr erfahren</a>"
175189
/>
176190
<div class="preset-content">
191+
<div class="format-icon">🔄</div>
177192
<h3>IMS</h3>
178193
<p>Content Package</p>
179194
</div>
@@ -187,6 +202,7 @@ <h3>IMS</h3>
187202
data-description="Eigenständige HTML-Website zum Hosten auf beliebigen Webservern. Funktioniert offline und online. Perfekt für eigenes Hosting."
188203
/>
189204
<div class="preset-content">
205+
<div class="format-icon">🌐</div>
190206
<h3>Web</h3>
191207
<p>Standalone</p>
192208
</div>
@@ -200,6 +216,7 @@ <h3>Web</h3>
200216
data-description="Portables Dokumentenformat zum Drucken und Archivieren. Ideal für statische Inhalte und Offline-Lektüre. <a href='https://de.wikipedia.org/wiki/Portable_Document_Format' target='_blank'>Mehr erfahren</a>"
201217
/>
202218
<div class="preset-content">
219+
<div class="format-icon">📄</div>
203220
<h3>PDF</h3>
204221
<p>Dokument</p>
205222
</div>
@@ -213,6 +230,7 @@ <h3>PDF</h3>
213230
data-description="Android-App-Paket (APK) für Installation auf Android-Geräten. Ermöglicht Offline-Zugriff und native App-Erfahrung."
214231
/>
215232
<div class="preset-content">
233+
<div class="format-icon">🤖</div>
216234
<h3>Android</h3>
217235
<p>App Package</p>
218236
</div>
@@ -226,6 +244,7 @@ <h3>Android</h3>
226244
data-description="Strukturiertes Datenformat für programmatische Weiterverarbeitung und API-Integration. Perfekt für Entwickler und automatisierte Workflows. <a href='https://de.wikipedia.org/wiki/JavaScript_Object_Notation' target='_blank'>Mehr erfahren</a>"
227245
/>
228246
<div class="preset-content">
247+
<div class="format-icon">{ }</div>
229248
<h3>JSON</h3>
230249
<p>Data Export</p>
231250
</div>
@@ -239,6 +258,7 @@ <h3>JSON</h3>
239258
data-description="Offenes E-Book-Format für E-Reader und mobile Geräte. Unterstützt reflowable Layouts und ist kompatibel mit den meisten E-Readern. <a href='https://de.wikipedia.org/wiki/EPUB' target='_blank'>Mehr erfahren</a>"
240259
/>
241260
<div class="preset-content">
261+
<div class="format-icon">📖</div>
242262
<h3>EPUB</h3>
243263
<p>E-Book</p>
244264
</div>
@@ -252,6 +272,7 @@ <h3>EPUB</h3>
252272
data-description="Resource Description Framework für strukturierte Metadaten und Linked Data. Für semantische Web-Anwendungen und Metadaten-Export. <a href='https://de.wikipedia.org/wiki/Resource_Description_Framework' target='_blank'>Mehr erfahren</a>"
253273
/>
254274
<div class="preset-content">
275+
<div class="format-icon">🔗</div>
255276
<h3>RDF</h3>
256277
<p>Metadaten</p>
257278
</div>
@@ -265,6 +286,7 @@ <h3>RDF</h3>
265286
data-description="Experience API (xAPI) für Learning Analytics und detailliertes Tracking von Lernaktivitäten. Ermöglicht erweiterte Auswertungen über einen Learning Record Store (LRS). <a href='https://de.wikipedia.org/wiki/Experience_API' target='_blank'>Mehr erfahren</a>"
266287
/>
267288
<div class="preset-content">
289+
<div class="format-icon">📊</div>
268290
<h3>xAPI</h3>
269291
<p>Learning Analytics</p>
270292
</div>
@@ -1043,7 +1065,7 @@ <h2>Export gestartet</h2>
10431065
</main>
10441066

10451067
<footer>
1046-
<p>&copy; 2025 LiaScript Export Server</p>
1068+
<p>&copy; 2026 LiaScript Exporter</p>
10471069
</footer>
10481070
</div>
10491071

dist/server/public/status.html

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Export Status - LiaScript Export Server</title>
6+
<title>Export Status - LiaScript Exporter</title>
77
<link rel="stylesheet" href="/styles.css" />
88
<style>
99
.status-badge {
@@ -51,6 +51,18 @@
5151
</style>
5252
</head>
5353
<body>
54+
<nav class="navbar">
55+
<div class="navbar-container">
56+
<a href="/" class="navbar-brand">
57+
<img src="./assets/icon.svg" alt="LiaScript" />
58+
</a>
59+
<ul class="navbar-menu">
60+
<li><a href="/" class="navbar-link">Startseite</a></li>
61+
<li><a href="/status.html" class="navbar-link active">Status</a></li>
62+
</ul>
63+
</div>
64+
</nav>
65+
5466
<div class="container">
5567
<header>
5668
<h1>Export Status</h1>
@@ -73,22 +85,36 @@ <h1>Export Status</h1>
7385
</main>
7486

7587
<footer>
76-
<p>&copy; 2025 LiaScript Export Server</p>
88+
<p>&copy; 2026 LiaScript Exporter</p>
7789
</footer>
7890
</div>
7991

8092
<script>
8193
const urlParams = new URLSearchParams(window.location.search)
82-
const jobId = urlParams.get('jobId')
94+
let jobId = urlParams.get('jobId')
8395
let refreshInterval
8496

85-
if (!jobId) {
86-
document.getElementById('statusContent').innerHTML = `
87-
<p class="error-message">Keine Job-ID angegeben.</p>
88-
`
89-
} else {
97+
if (jobId) {
9098
loadStatus()
9199
refreshInterval = setInterval(loadStatus, 3000)
100+
} else {
101+
// Try to get the last job ID from localStorage
102+
const lastJobId = localStorage.getItem('lastJobId')
103+
if (lastJobId) {
104+
jobId = lastJobId
105+
window.history.replaceState({}, '', `/status.html?jobId=${jobId}`)
106+
loadStatus()
107+
refreshInterval = setInterval(loadStatus, 3000)
108+
} else {
109+
// No job found
110+
document.getElementById('statusContent').innerHTML = `
111+
<div style="text-align: center; padding: 3rem 1rem;">
112+
<p style="color: var(--text-muted); margin-bottom: 1rem;">Kein Export gefunden.</p>
113+
<p style="color: var(--text-muted); font-size: 0.9rem;">Starten Sie einen neuen Export auf der Startseite.</p>
114+
</div>
115+
`
116+
document.querySelector('.refresh-info').style.display = 'none'
117+
}
92118
}
93119

94120
async function loadStatus() {

0 commit comments

Comments
 (0)