pinokiod 5.1.36 → 5.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/git.js +3 -0
- package/package.json +1 -1
- package/server/public/style.css +2 -2
- package/server/views/app.ejs +4 -2
- package/server/views/checkpoints.ejs +16 -3
package/kernel/git.js
CHANGED
|
@@ -580,6 +580,9 @@ class Git {
|
|
|
580
580
|
if (idx < 0) return { ok: false, error: "not_found" }
|
|
581
581
|
const record = entry.checkpoints[idx]
|
|
582
582
|
entry.checkpoints.splice(idx, 1)
|
|
583
|
+
if (entry.checkpoints.length === 0) {
|
|
584
|
+
delete apps[remoteKey]
|
|
585
|
+
}
|
|
583
586
|
await this.saveManifest()
|
|
584
587
|
const hash = record && record.hash ? String(record.hash) : null
|
|
585
588
|
let fileDeleted = false
|
package/package.json
CHANGED
package/server/public/style.css
CHANGED
|
@@ -3025,11 +3025,11 @@ header.navheader .header-drag-handle::before {
|
|
|
3025
3025
|
height: 18px;
|
|
3026
3026
|
border-radius: 3px;
|
|
3027
3027
|
opacity: 0.45;
|
|
3028
|
-
background-image: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.
|
|
3028
|
+
background-image: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0 1px, transparent 1px 4px);
|
|
3029
3029
|
transition: opacity 0.2s ease;
|
|
3030
3030
|
}
|
|
3031
3031
|
body.dark header.navheader .header-drag-handle::before {
|
|
3032
|
-
background-image: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.
|
|
3032
|
+
background-image: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 0 1px, transparent 1px 4px);
|
|
3033
3033
|
opacity: 0.35;
|
|
3034
3034
|
}
|
|
3035
3035
|
header.navheader.minimized .header-drag-handle {
|
package/server/views/app.ejs
CHANGED
|
@@ -1277,6 +1277,8 @@ body.dark .disk-usage {
|
|
|
1277
1277
|
color: white;
|
|
1278
1278
|
}
|
|
1279
1279
|
.disk-usage {
|
|
1280
|
+
display: block;
|
|
1281
|
+
cursor: pointer;
|
|
1280
1282
|
border-right: 1px solid rgba(0,0,0,0.1);
|
|
1281
1283
|
font-weight: bold;
|
|
1282
1284
|
color: black;
|
|
@@ -3482,6 +3484,7 @@ body.dark .snapshot-footer-input input {
|
|
|
3482
3484
|
<div><%=config.title%></div>
|
|
3483
3485
|
<% } %>
|
|
3484
3486
|
</div>
|
|
3487
|
+
<span class="disk-usage tab-metric__value" data-path="/" data-filepath="<%=path%>">--</span>
|
|
3485
3488
|
<div class='m n system' data-type="n">
|
|
3486
3489
|
<%if (type==='browse') { %>
|
|
3487
3490
|
<a id='devtab' data-mode="refresh" target="<%=dev_link%>" href="<%=dev_link%>" class="btn frame-link selected" data-index="10">
|
|
@@ -3551,7 +3554,6 @@ body.dark .snapshot-footer-input input {
|
|
|
3551
3554
|
</div>
|
|
3552
3555
|
</div>
|
|
3553
3556
|
-->
|
|
3554
|
-
<span class="disk-usage tab-metric__value" data-path="/">--</span>
|
|
3555
3557
|
<div class='fs-status-dropdown fs-open-explorer'>
|
|
3556
3558
|
<button class='fs-status-btn' data-filepath="<%=path%>" type='button'>
|
|
3557
3559
|
<span class='fs-status-label'>
|
|
@@ -3608,7 +3610,7 @@ body.dark .snapshot-footer-input input {
|
|
|
3608
3610
|
</div>
|
|
3609
3611
|
</div>
|
|
3610
3612
|
-->
|
|
3611
|
-
<span class="disk-usage tab-metric__value" data-path="/">--</span>
|
|
3613
|
+
<span class="disk-usage tab-metric__value" data-path="/" data-filepath="<%=path%>">--</span>
|
|
3612
3614
|
<div class='fs-status-dropdown fs-open-explorer'>
|
|
3613
3615
|
<button class='fs-status-btn' data-filepath="<%=path%>" type='button'>
|
|
3614
3616
|
<span class='fs-status-label'>
|
|
@@ -762,12 +762,13 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
762
762
|
latestRow.remove()
|
|
763
763
|
} else {
|
|
764
764
|
const span = latestRow.querySelector("span")
|
|
765
|
-
if (span) span.textContent = `Latest checkpoint: ${new Date(snapshots[0].id).toLocaleString()}`
|
|
765
|
+
if (span) span.textContent = `Latest checkpoint: ${new Date(Number(snapshots[0].id)).toLocaleString()}`
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
|
|
770
770
|
const handleDelete = async (snapshotId, btn) => {
|
|
771
|
+
let closeAfterDelete = false
|
|
771
772
|
const idStr = snapshotId != null ? String(snapshotId).trim() : ""
|
|
772
773
|
if (!idStr || idStr === "latest") return
|
|
773
774
|
const installed = installedBySnapshot[idStr] || []
|
|
@@ -815,7 +816,16 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
815
816
|
if (installedBySnapshot && Object.prototype.hasOwnProperty.call(installedBySnapshot, idStr)) {
|
|
816
817
|
delete installedBySnapshot[idStr]
|
|
817
818
|
}
|
|
818
|
-
|
|
819
|
+
const remaining = Array.isArray(item.snapshots) ? item.snapshots.length : 0
|
|
820
|
+
if (remaining === 0) {
|
|
821
|
+
const row = document.querySelector(`.backup-row[data-remote-key="${item.remoteKey}"]`)
|
|
822
|
+
if (row) row.remove()
|
|
823
|
+
const idx = items.findIndex((entry) => entry && entry.remoteKey === item.remoteKey)
|
|
824
|
+
if (idx >= 0) items.splice(idx, 1)
|
|
825
|
+
closeAfterDelete = true
|
|
826
|
+
} else {
|
|
827
|
+
updateItemRow(item)
|
|
828
|
+
}
|
|
819
829
|
} else {
|
|
820
830
|
const msg = payload && payload.error ? payload.error : "Delete failed"
|
|
821
831
|
Swal.fire({ icon: "error", title: "Error", text: msg })
|
|
@@ -828,6 +838,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
828
838
|
btn.textContent = "Delete"
|
|
829
839
|
}
|
|
830
840
|
setLoading(false)
|
|
841
|
+
if (closeAfterDelete) {
|
|
842
|
+
try { Swal.close() } catch (_) {}
|
|
843
|
+
}
|
|
831
844
|
}
|
|
832
845
|
}
|
|
833
846
|
|
|
@@ -1098,7 +1111,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
1098
1111
|
<% const latest = item.snapshots[0]; %>
|
|
1099
1112
|
<div class="description backup-meta">
|
|
1100
1113
|
<i class="fa-regular fa-clock"></i>
|
|
1101
|
-
<span>Latest checkpoint: <%= new Date(latest.id).toLocaleString() %></span>
|
|
1114
|
+
<span>Latest checkpoint: <%= new Date(Number(latest.id)).toLocaleString() %></span>
|
|
1102
1115
|
</div>
|
|
1103
1116
|
<% } %>
|
|
1104
1117
|
</div>
|