Skip to content

Commit 547ae5f

Browse files
committed
show last job status
1 parent a5bc566 commit 547ae5f

3 files changed

Lines changed: 27 additions & 10 deletions

File tree

src/server/public/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,9 @@ function initializeForm() {
513513

514514
// Show confirmation modal
515515
function showConfirmation(result) {
516+
// Save job ID to localStorage
517+
localStorage.setItem('lastJobId', result.jobId)
518+
516519
const modal = document.getElementById('confirmationModal')
517520
const details = document.getElementById('confirmationDetails')
518521
const statusLink = document.getElementById('statusLink')

src/server/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<img src="./assets/icon.svg" alt="LiaScript" />
1414
</a>
1515
<ul class="navbar-menu">
16-
<li><a href="/" class="navbar-link active">Home</a></li>
16+
<li><a href="/" class="navbar-link active">Startseite</a></li>
1717
<li><a href="/status.html" class="navbar-link">Status</a></li>
1818
</ul>
1919
</div>

src/server/public/status.html

Lines changed: 23 additions & 9 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 {
@@ -57,7 +57,7 @@
5757
<img src="./assets/icon.svg" alt="LiaScript" />
5858
</a>
5959
<ul class="navbar-menu">
60-
<li><a href="/" class="navbar-link">Home</a></li>
60+
<li><a href="/" class="navbar-link">Startseite</a></li>
6161
<li><a href="/status.html" class="navbar-link active">Status</a></li>
6262
</ul>
6363
</div>
@@ -85,22 +85,36 @@ <h1>Export Status</h1>
8585
</main>
8686

8787
<footer>
88-
<p>&copy; 2025 LiaScript Export Server</p>
88+
<p>&copy; 2026 LiaScript Exporter</p>
8989
</footer>
9090
</div>
9191

9292
<script>
9393
const urlParams = new URLSearchParams(window.location.search)
94-
const jobId = urlParams.get('jobId')
94+
let jobId = urlParams.get('jobId')
9595
let refreshInterval
9696

97-
if (!jobId) {
98-
document.getElementById('statusContent').innerHTML = `
99-
<p class="error-message">Keine Job-ID angegeben.</p>
100-
`
101-
} else {
97+
if (jobId) {
10298
loadStatus()
10399
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+
}
104118
}
105119

106120
async function loadStatus() {

0 commit comments

Comments
 (0)