Compare commits
21 Commits
e06f653606
...
v0.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 0462a7b62e | |||
| 52660570c1 | |||
| 35f61313e0 | |||
| c470cfb576 | |||
| d96955deee | |||
| 85181f0be6 | |||
| d5ca7a8be1 | |||
| 476dc79e42 | |||
| bb6590fc5e | |||
| 899db3421b | |||
| caf01d6ada | |||
| bb366cb4cd | |||
| a2745ff2ee | |||
| 28cb656d94 | |||
| 3c44152fc6 | |||
| 397515edce | |||
| 980fced7e4 | |||
| bae5009ec4 | |||
| 233780617f | |||
| fd8fb21517 | |||
| c6cbe822e1 |
@@ -1301,14 +1301,12 @@ def object_versions(bucket_name: str, object_key: str):
|
||||
for v in resp.get("Versions", []):
|
||||
if v.get("Key") != object_key:
|
||||
continue
|
||||
if v.get("IsLatest", False):
|
||||
continue
|
||||
versions.append({
|
||||
"version_id": v.get("VersionId", ""),
|
||||
"last_modified": v["LastModified"].isoformat() if v.get("LastModified") else None,
|
||||
"size": v.get("Size", 0),
|
||||
"etag": v.get("ETag", "").strip('"'),
|
||||
"is_latest": False,
|
||||
"is_latest": v.get("IsLatest", False),
|
||||
})
|
||||
return jsonify({"versions": versions})
|
||||
except (ClientError, EndpointConnectionError, ConnectionClosedError) as exc:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
APP_VERSION = "0.3.1"
|
||||
APP_VERSION = "0.3.0"
|
||||
|
||||
|
||||
def get_version() -> str:
|
||||
|
||||
@@ -1537,7 +1537,7 @@
|
||||
|
||||
const confirmVersionRestore = (row, version, label = null, onConfirm) => {
|
||||
if (!version) return;
|
||||
const timestamp = (version.archived_at || version.last_modified) ? new Date(version.archived_at || version.last_modified).toLocaleString() : version.version_id;
|
||||
const timestamp = version.archived_at ? new Date(version.archived_at).toLocaleString() : version.version_id;
|
||||
const sizeLabel = formatBytes(Number(version.size) || 0);
|
||||
const reasonLabel = describeVersionReason(version.reason);
|
||||
const targetLabel = label || row?.dataset.key || 'this object';
|
||||
@@ -1610,7 +1610,7 @@
|
||||
|
||||
const latestCell = document.createElement('td');
|
||||
if (item.latest) {
|
||||
const ts = (item.latest.archived_at || item.latest.last_modified) ? new Date(item.latest.archived_at || item.latest.last_modified).toLocaleString() : item.latest.version_id;
|
||||
const ts = item.latest.archived_at ? new Date(item.latest.archived_at).toLocaleString() : item.latest.version_id;
|
||||
const sizeLabel = formatBytes(Number(item.latest.size) || 0);
|
||||
latestCell.innerHTML = `<div class="small">${ts}</div><div class="text-muted small">${sizeLabel} · ${describeVersionReason(item.latest.reason)}</div>`;
|
||||
} else {
|
||||
@@ -1785,7 +1785,7 @@
|
||||
badge.textContent = `#${versionNumber}`;
|
||||
const title = document.createElement('div');
|
||||
title.className = 'fw-semibold small';
|
||||
const timestamp = (entry.archived_at || entry.last_modified) ? new Date(entry.archived_at || entry.last_modified).toLocaleString() : entry.version_id;
|
||||
const timestamp = entry.archived_at ? new Date(entry.archived_at).toLocaleString() : entry.version_id;
|
||||
title.textContent = timestamp;
|
||||
heading.appendChild(badge);
|
||||
heading.appendChild(title);
|
||||
@@ -2816,16 +2816,7 @@
|
||||
uploadFileInput.value = '';
|
||||
}
|
||||
|
||||
const previousKey = activeRow?.dataset.key || null;
|
||||
loadObjects(false).then(() => {
|
||||
if (previousKey) {
|
||||
const newRow = document.querySelector(`[data-object-row][data-key="${CSS.escape(previousKey)}"]`);
|
||||
if (newRow) {
|
||||
selectRow(newRow);
|
||||
if (versioningEnabled) loadObjectVersions(newRow, { force: true });
|
||||
}
|
||||
}
|
||||
});
|
||||
loadObjects(false);
|
||||
|
||||
const successCount = uploadSuccessFiles.length;
|
||||
const errorCount = uploadErrorFiles.length;
|
||||
|
||||
Reference in New Issue
Block a user