diff --git a/CHANGELOG.md b/CHANGELOG.md
index c3a5e4178..3a23938c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
### Client
- Enhance: Bull DashboardでRelationship Queueの状態も確認できるように
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/751)
+- Enhance: ドライブでソートができるように
### Server
-
diff --git a/packages/frontend/src/components/MkDrive.vue b/packages/frontend/src/components/MkDrive.vue
index 23883a44e..05f335481 100644
--- a/packages/frontend/src/components/MkDrive.vue
+++ b/packages/frontend/src/components/MkDrive.vue
@@ -30,6 +30,16 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ folder.name }}
+
+
+
+
+
+
+
+
+
+
entries.some((entry) => entry.isIntersecting) && !fetching.value && moreFiles.value && fetchMoreFiles(),
);
+const sortModeSelect = ref('+createdAt');
+
watch(folder, () => emit('cd', folder.value));
+watch(sortModeSelect, () => {
+ fetch();
+});
function onStreamDriveFileCreated(file: Misskey.entities.DriveFile) {
addFile(file, true);
@@ -558,6 +574,7 @@ async function fetch() {
folderId: folder.value ? folder.value.id : null,
type: props.type,
limit: filesMax + 1,
+ sort: sortModeSelect.value,
}).then(fetchedFiles => {
if (fetchedFiles.length === filesMax + 1) {
moreFiles.value = true;
@@ -607,6 +624,7 @@ function fetchMoreFiles() {
type: props.type,
untilId: files.value.at(-1)?.id,
limit: max + 1,
+ sort: sortModeSelect.value,
}).then(files => {
if (files.length === max + 1) {
moreFiles.value = true;
@@ -760,11 +778,16 @@ onBeforeUnmount(() => {
}
}
-.navMenu {
+.navSort {
+ display: inline-block;
margin-left: auto;
padding: 0 12px;
}
+.navMenu {
+ padding: 0 12px;
+}
+
.main {
flex: 1;
overflow: auto;