mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-24 14:31:44 +01:00
fix: removes toSorted() for older browsers that do not support it (#2895)
This commit is contained in:
@@ -91,8 +91,8 @@ const { results } = useFuse(query, list, {
|
||||
});
|
||||
|
||||
const data = computed(() => {
|
||||
return results.value
|
||||
.toSorted((a, b) => {
|
||||
return [...results.value]
|
||||
.sort((a, b) => {
|
||||
if (a.score === b.score) {
|
||||
if (a.item.state === b.item.state) {
|
||||
return b.item.created - a.item.created;
|
||||
|
||||
@@ -39,15 +39,15 @@ const { container } = useContainerContext();
|
||||
|
||||
const nextContainer = computed(
|
||||
() =>
|
||||
containers.value
|
||||
.filter(
|
||||
[
|
||||
...containers.value.filter(
|
||||
(c) =>
|
||||
c.host === container.value.host &&
|
||||
c.created > logEntry.date &&
|
||||
c.name === container.value.name &&
|
||||
c.state === "running",
|
||||
)
|
||||
.toSorted((a, b) => +a.created - +b.created)[0],
|
||||
),
|
||||
].sort((a, b) => +a.created - +b.created)[0],
|
||||
);
|
||||
|
||||
function redirectNow() {
|
||||
|
||||
@@ -39,7 +39,7 @@ const { containers, ready } = storeToRefs(containerStore) as unknown as {
|
||||
ready: Ref<boolean>;
|
||||
};
|
||||
|
||||
const mostRecentContainers = $computed(() => containers.value.toSorted((a, b) => +b.created - +a.created));
|
||||
const mostRecentContainers = $computed(() => [...containers.value].sort((a, b) => +b.created - +a.created));
|
||||
const runningContainers = $computed(() => mostRecentContainers.filter((c) => c.state === "running"));
|
||||
|
||||
let totalCpu = $ref(0);
|
||||
|
||||
Reference in New Issue
Block a user