diff --git a/vue/components.d.ts b/vue/components.d.ts index f0896d7..30167a9 100644 --- a/vue/components.d.ts +++ b/vue/components.d.ts @@ -17,8 +17,10 @@ declare module '@vue/runtime-core' { AFormItem: typeof import('ant-design-vue/es')['FormItem'] AInput: typeof import('ant-design-vue/es')['Input'] AInputNumber: typeof import('ant-design-vue/es')['InputNumber'] + AInputSearch: typeof import('ant-design-vue/es')['InputSearch'] AMenu: typeof import('ant-design-vue/es')['Menu'] AMenuItem: typeof import('ant-design-vue/es')['MenuItem'] + AModal: typeof import('ant-design-vue/es')['Modal'] AProgress: typeof import('ant-design-vue/es')['Progress'] ASelect: typeof import('ant-design-vue/es')['Select'] ASkeleton: typeof import('ant-design-vue/es')['Skeleton'] diff --git a/vue/src/fileTransfer/fileSort.ts b/vue/src/fileTransfer/fileSort.ts index 316c6b5..2ddc00a 100644 --- a/vue/src/fileTransfer/fileSort.ts +++ b/vue/src/fileTransfer/fileSort.ts @@ -60,6 +60,6 @@ export const sortFiles = (files: FileList, method: SortMethod) => { throw new Error(`Invalid sort method: ${method}`) } } - return files.slice().sort((a, b) => compare(a, b) || compareByType(a, b)) + return files.slice().sort((a, b) => compareByType(a, b) || compare(a, b)) } diff --git a/vue/src/fileTransfer/folderNavigator.vue b/vue/src/fileTransfer/folderNavigator.vue new file mode 100644 index 0000000..ad36070 --- /dev/null +++ b/vue/src/fileTransfer/folderNavigator.vue @@ -0,0 +1,19 @@ + + diff --git a/vue/src/fileTransfer/stackView.vue b/vue/src/fileTransfer/stackView.vue index 37c78ac..101e453 100644 --- a/vue/src/fileTransfer/stackView.vue +++ b/vue/src/fileTransfer/stackView.vue @@ -12,6 +12,7 @@ import NProgress from 'multi-nprogress' import 'multi-nprogress/nprogress.css' import type Progress from 'nprogress' import { Modal } from 'ant-design-vue' +import FolderNavigator from './folderNavigator.vue' const np = ref() const el = ref() @@ -26,6 +27,7 @@ const stack = ref([]) const global = useGlobalStore() const currPage = computed(() => last(stack.value)) const multiSelectedIdxs = ref([] as number[]) +const currLocation = computed(() => path.join(...getBasePath())) useWatchDocument('click', () => multiSelectedIdxs.value = []) useWatchDocument('blur', () => multiSelectedIdxs.value = []) @@ -56,7 +58,9 @@ onMounted(async () => { const getBasePath = () => stack.value.map((v) => v.curr).slice(global.conf?.is_win && props.target === 'local' ? 1 : 0) -const copyLocation = () => copy2clipboard(path.join(...getBasePath())) + + +const copyLocation = () => copy2clipboard(currLocation.value) const openNext = async (file: FileNodeInfo) => { if (file.type !== 'dir') { @@ -198,28 +202,34 @@ const onFileDragStart = (e: DragEvent, idx: number) => {