mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 18:33:08 +02:00
fix drive-cleaner
This commit is contained in:
parent
9a40a4e315
commit
78a3d78a7f
1 changed files with 5 additions and 5 deletions
|
@ -43,7 +43,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import tinycolor from 'tinycolor2';
|
import tinycolor from 'tinycolor2';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
|
@ -55,11 +55,11 @@ import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
import MkSelect from '@/components/MkSelect.vue';
|
import MkSelect from '@/components/MkSelect.vue';
|
||||||
import { getDriveFileMenu } from '@/scripts/get-drive-file-menu';
|
import { getDriveFileMenu } from '@/scripts/get-drive-file-menu';
|
||||||
|
|
||||||
let sortMode = '+size';
|
let sortMode = ref('+size');
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'drive/files' as const,
|
endpoint: 'drive/files' as const,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
params: { sort: sortMode },
|
params: computed(() => ({ sort: sortMode.value })),
|
||||||
};
|
};
|
||||||
|
|
||||||
const sortOptions = [
|
const sortOptions = [
|
||||||
|
@ -77,12 +77,12 @@ fetchDriveInfo();
|
||||||
watch(sortModeSelect, () => {
|
watch(sortModeSelect, () => {
|
||||||
switch (sortModeSelect.value) {
|
switch (sortModeSelect.value) {
|
||||||
case 'sizeDesc':
|
case 'sizeDesc':
|
||||||
sortMode = '+size';
|
sortMode.value = '+size';
|
||||||
fetchDriveInfo();
|
fetchDriveInfo();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'createdAtAsc':
|
case 'createdAtAsc':
|
||||||
sortMode = '-createdAt';
|
sortMode.value = '-createdAt';
|
||||||
fetchDriveInfo();
|
fetchDriveInfo();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue