chore(embedded): cut v0.0.17-beta
This commit is contained in:
parent
0959d57dc2
commit
94323ea356
8 changed files with 46 additions and 17 deletions
|
|
@ -2245,7 +2245,7 @@ td[data-field="trackingNumber"] {
|
|||
</svg>
|
||||
<div class="header-title-group">
|
||||
<span class="app-header__title">ZDDC Archive</span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · fox-berry-prism</span></span>
|
||||
</div>
|
||||
<button id="addDirectoryBtn" class="btn btn-primary">Add Local Directory</button>
|
||||
<button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh Data">⟳</button>
|
||||
|
|
|
|||
|
|
@ -947,7 +947,7 @@ body {
|
|||
</svg>
|
||||
<div class="header-title-group">
|
||||
<span class="app-header__title">ZDDC Browse</span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · fox-berry-prism</span></span>
|
||||
</div>
|
||||
<button id="addDirectoryBtn" class="btn btn-primary">Add Local Directory</button>
|
||||
<button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh listing" aria-label="Refresh listing">⟳</button>
|
||||
|
|
|
|||
|
|
@ -1464,7 +1464,7 @@ body.help-open .app-header {
|
|||
</svg>
|
||||
<div class="header-title-group">
|
||||
<span class="app-header__title">ZDDC Classifier</span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · fox-berry-prism</span></span>
|
||||
</div>
|
||||
<button id="addDirectoryBtn" class="btn btn-primary">Add Local Directory</button>
|
||||
<button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh and rescan directory" aria-label="Refresh" style="font-size:1.1rem;">⟳</button>
|
||||
|
|
|
|||
|
|
@ -988,7 +988,7 @@ body {
|
|||
</svg>
|
||||
<div class="header-title-group">
|
||||
<span class="app-header__title">ZDDC</span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · fox-berry-prism</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
|
|
|
|||
|
|
@ -1903,7 +1903,7 @@ body.help-open .app-header {
|
|||
</svg>
|
||||
<div class="header-title-group">
|
||||
<span class="app-header__title">ZDDC Markdown</span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · fox-berry-prism</span></span>
|
||||
</div>
|
||||
<button id="addDirectoryBtn" class="btn btn-primary" title="Add a local directory">Add Local Directory</button>
|
||||
<button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh directory" aria-label="Refresh">⟳</button>
|
||||
|
|
@ -4990,9 +4990,38 @@ async function readServerDirectory(dirUrl, parentNode, depth) {
|
|||
async function loadServerDirectory() {
|
||||
if (!(location.protocol === 'http:' || location.protocol === 'https:')) return;
|
||||
|
||||
// Compute the directory URL the file tree should be rooted at.
|
||||
//
|
||||
// <project>/working/ → root = <project>/working/
|
||||
// <project>/working/x/y/ → root = <project>/working/x/y/
|
||||
// <project>/working → root = <project>/working/ (no-slash
|
||||
// canonical-folder URL — the dispatcher
|
||||
// routes mdedit here directly without
|
||||
// a redirect, so we infer "directory"
|
||||
// from the absence of a `.` in the
|
||||
// last segment rather than stripping
|
||||
// back to the parent.)
|
||||
// <project>/x/y/mdedit.html → root = <project>/x/y/ (the leaf
|
||||
// segment IS a file; strip to parent.)
|
||||
//
|
||||
// The rule: if the last path segment contains a "." it's a file,
|
||||
// strip it; otherwise treat the whole path as the directory.
|
||||
let href = window.location.href.split('?')[0].split('#')[0];
|
||||
const lastSlash = href.lastIndexOf('/');
|
||||
const baseUrl = (lastSlash >= 0) ? href.substring(0, lastSlash + 1) : href + '/';
|
||||
let baseUrl;
|
||||
if (href.endsWith('/')) {
|
||||
baseUrl = href;
|
||||
} else {
|
||||
const lastSlash = href.lastIndexOf('/');
|
||||
const lastSeg = lastSlash >= 0 ? href.substring(lastSlash + 1) : href;
|
||||
if (lastSeg.indexOf('.') !== -1) {
|
||||
// Looks like a file (has an extension) — strip to parent.
|
||||
baseUrl = lastSlash >= 0 ? href.substring(0, lastSlash + 1) : href + '/';
|
||||
} else {
|
||||
// Looks like a directory — append the trailing slash so all
|
||||
// subsequent listing URLs are computed correctly.
|
||||
baseUrl = href + '/';
|
||||
}
|
||||
}
|
||||
|
||||
// Only enter server-source mode if the host actually serves JSON directory
|
||||
// listings (zddc-server / Caddy). On a plain static host the probe fails
|
||||
|
|
|
|||
|
|
@ -2263,7 +2263,7 @@ dialog.modal--narrow {
|
|||
</svg>
|
||||
<div class="header-title-group">
|
||||
<span class="app-header__title">ZDDC Transmittal</span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · fox-berry-prism</span></span>
|
||||
</div>
|
||||
<span id="no-js-notice" class="text-gray-400 text-xs italic">JavaScript not available</span>
|
||||
<!-- Publish split-button (Transmittal-specific primary action;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Generated by build.sh — do not edit. One <app>=<build label> per line.
|
||||
archive=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
|
||||
transmittal=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
|
||||
classifier=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
|
||||
mdedit=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
|
||||
landing=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
|
||||
form=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
|
||||
tables=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
|
||||
browse=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
|
||||
archive=v0.0.17-beta · 2026-05-10 · fox-berry-prism
|
||||
transmittal=v0.0.17-beta · 2026-05-10 · fox-berry-prism
|
||||
classifier=v0.0.17-beta · 2026-05-10 · fox-berry-prism
|
||||
mdedit=v0.0.17-beta · 2026-05-10 · fox-berry-prism
|
||||
landing=v0.0.17-beta · 2026-05-10 · fox-berry-prism
|
||||
form=v0.0.17-beta · 2026-05-10 · fox-berry-prism
|
||||
tables=v0.0.17-beta · 2026-05-10 · fox-berry-prism
|
||||
browse=v0.0.17-beta · 2026-05-10 · fox-berry-prism
|
||||
|
|
|
|||
|
|
@ -1070,7 +1070,7 @@ body.help-open .app-header {
|
|||
</svg>
|
||||
<div class="header-title-group">
|
||||
<span class="app-header__title" id="table-title">ZDDC Table</span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
|
||||
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · fox-berry-prism</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
|
|
|
|||
Loading…
Reference in a new issue