dockerize and fix relative URLs for /slideshow path prefix
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<body>
|
||||
<h1>Booru Slideshow</h1>
|
||||
|
||||
<form id="tag-form" method="get" action="/">
|
||||
<form id="tag-form" method="get" action="">
|
||||
<input type="text" name="tags" id="tag-input" placeholder="e.g. swimsuit blonde_hair" value="{{ tag_query }}" />
|
||||
<button type="submit">Search</button>
|
||||
<select name="_site" id="site-select">
|
||||
@@ -94,7 +94,7 @@
|
||||
const site = document.getElementById('site-select').value;
|
||||
const form = document.createElement('form');
|
||||
form.method = 'post';
|
||||
form.action = '/download';
|
||||
form.action = 'download';
|
||||
[['tags', tags], ['site', site]].forEach(([k, v]) => {
|
||||
const inp = document.createElement('input');
|
||||
inp.type = 'hidden'; inp.name = k; inp.value = v;
|
||||
@@ -110,14 +110,14 @@
|
||||
const bar = document.getElementById('progress-bar');
|
||||
const label = document.getElementById('progress-label');
|
||||
box.style.display = 'block';
|
||||
const es = new EventSource(`/download/progress/${job_id}`);
|
||||
const es = new EventSource(`download/progress/${job_id}`);
|
||||
es.onmessage = (e) => {
|
||||
const d = JSON.parse(e.data);
|
||||
if (d.error) { label.textContent = 'Error: ' + d.error; es.close(); return; }
|
||||
const pct = d.total > 0 ? Math.round(d.done / d.total * 100) : 0;
|
||||
bar.style.width = pct + '%';
|
||||
if (d.finished) {
|
||||
label.innerHTML = `Done! ${d.done} images. <a href="/?tags={{ tag_query }}" style="color:#8b8">Refresh</a>`;
|
||||
label.innerHTML = `Done! ${d.done} images. <a href="?tags={{ tag_query }}" style="color:#8b8">Refresh</a>`;
|
||||
es.close();
|
||||
} else {
|
||||
label.textContent = d.total > 0 ? `${d.done} / ${d.total}` : 'Fetching post list...';
|
||||
|
||||
Reference in New Issue
Block a user