История: сортировка групп по дате — новые фотографии вверху
This commit is contained in:
@@ -698,12 +698,14 @@ function renderHistory() {
|
|||||||
empty.hidden = historyVersions.length > 0;
|
empty.hidden = historyVersions.length > 0;
|
||||||
|
|
||||||
const childrenMap = buildChildrenMap(historyVersions);
|
const childrenMap = buildChildrenMap(historyVersions);
|
||||||
const roots = historyVersions.filter(
|
const roots = historyVersions
|
||||||
(version) =>
|
.filter(
|
||||||
version.kind === "original" ||
|
(version) =>
|
||||||
!version.parentId ||
|
version.kind === "original" ||
|
||||||
!childrenMap.has(version.parentId)
|
!version.parentId ||
|
||||||
);
|
!childrenMap.has(version.parentId)
|
||||||
|
)
|
||||||
|
.sort((a, b) => String(b.createdAt || "").localeCompare(String(a.createdAt || "")));
|
||||||
|
|
||||||
rebuildReferenceSelect();
|
rebuildReferenceSelect();
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
rel="icon"
|
rel="icon"
|
||||||
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='16' fill='%23202321'/%3E%3Ctext x='32' y='45' font-size='38' font-weight='bold' text-anchor='middle' fill='%23ffffff' font-family='sans-serif'%3E%D0%9A%3C/text%3E%3C/svg%3E"
|
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='16' fill='%23202321'/%3E%3Ctext x='32' y='45' font-size='38' font-weight='bold' text-anchor='middle' fill='%23ffffff' font-family='sans-serif'%3E%D0%9A%3C/text%3E%3C/svg%3E"
|
||||||
>
|
>
|
||||||
<link rel="stylesheet" href="/style.css?v=11">
|
<link rel="stylesheet" href="/style.css?v=12">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header class="topbar">
|
<header class="topbar">
|
||||||
@@ -294,6 +294,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
<script src="/app.js?v=11" defer></script>
|
<script src="/app.js?v=12" defer></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user