@makolabs/ripple 0.0.1-dev.62 → 0.0.1-dev.64
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.
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
if (sortState.column === 'default' && sortState.direction === 'default') {
|
|
275
275
|
// Sort folders alphabetically (A-Z)
|
|
276
276
|
const sortedFolders = [...folders].sort((a, b) => a.name.localeCompare(b.name));
|
|
277
|
-
|
|
277
|
+
|
|
278
278
|
// Sort files by date (newest first)
|
|
279
279
|
const sortedFiles = [...files].sort((a, b) => {
|
|
280
280
|
// Use createdAt if available, otherwise fallback to lastModified
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
const bTime = b.createdAt ? b.createdAt.getTime() : b.lastModified.getTime();
|
|
283
283
|
return bTime - aTime; // Descending order (newest first)
|
|
284
284
|
});
|
|
285
|
-
|
|
285
|
+
|
|
286
286
|
// Return folders first, then files
|
|
287
287
|
return [...sortedFolders, ...sortedFiles];
|
|
288
288
|
}
|
|
@@ -610,13 +610,30 @@
|
|
|
610
610
|
{#snippet NameCell(file: FileItem)}
|
|
611
611
|
<div class="flex items-center gap-2">
|
|
612
612
|
{#if file.isFolder}
|
|
613
|
-
<svg
|
|
614
|
-
|
|
613
|
+
<svg
|
|
614
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
615
|
+
width="1"
|
|
616
|
+
height="1"
|
|
617
|
+
viewBox="0 0 24 24"
|
|
618
|
+
class="text-amber-500"
|
|
619
|
+
>
|
|
620
|
+
<path
|
|
621
|
+
fill="currentColor"
|
|
622
|
+
d="M3.5 6.25V8h4.629a.75.75 0 0 0 .53-.22l1.53-1.53l-1.53-1.53a.75.75 0 0 0-.53-.22H5.25A1.75 1.75 0 0 0 3.5 6.25m-1.5 0A3.25 3.25 0 0 1 5.25 3h2.879a2.25 2.25 0 0 1 1.59.659L11.562 5.5h7.189A3.25 3.25 0 0 1 22 8.75v9A3.25 3.25 0 0 1 18.75 21H5.25A3.25 3.25 0 0 1 2 17.75zM3.5 9.5v8.25c0 .966.784 1.75 1.75 1.75h13.5a1.75 1.75 0 0 0 1.75-1.75v-9A1.75 1.75 0 0 0 18.75 7h-7.19L9.72 8.841a2.25 2.25 0 0 1-1.591.659z"
|
|
623
|
+
/>
|
|
615
624
|
</svg>
|
|
616
625
|
{:else}
|
|
617
|
-
<svg
|
|
618
|
-
|
|
619
|
-
|
|
626
|
+
<svg
|
|
627
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
628
|
+
width="16"
|
|
629
|
+
height="16"
|
|
630
|
+
viewBox="0 0 24 24"
|
|
631
|
+
class="text-blue-500"
|
|
632
|
+
>
|
|
633
|
+
<path
|
|
634
|
+
fill="currentColor"
|
|
635
|
+
d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9.828a2 2 0 0 0-.586-1.414l-5.828-5.828A2 2 0 0 0 12.172 2zm-.5 2a.5.5 0 0 1 .5-.5h6V8a2 2 0 0 0 2 2h4.5v10a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5zm11.88 4.5H14a.5.5 0 0 1-.5-.5V4.62z"
|
|
636
|
+
/>
|
|
620
637
|
</svg>
|
|
621
638
|
{/if}
|
|
622
639
|
<span class="font-medium">{file.name}</span>
|
|
@@ -803,4 +820,4 @@
|
|
|
803
820
|
navToFileFolder
|
|
804
821
|
})}
|
|
805
822
|
{/if}
|
|
806
|
-
</div>
|
|
823
|
+
</div>
|