diff --git a/src/controller/storage/allList.ts b/src/controller/storage/allList.ts index dff3366..18b2d22 100644 --- a/src/controller/storage/allList.ts +++ b/src/controller/storage/allList.ts @@ -12,7 +12,7 @@ async function updateStorageInfoList() { ...(await updateRcloneStorageInfoList()),) //移除不需要的存储 - const unneededStorages:string[]=['Virtual','Crypt','Alias'] + const unneededStorages:string[]=['Virtual','Crypt','Alias','SMB','FTP','WebDAV'] storageInfoList=storageInfoList.filter(item => !unneededStorages.includes(item.type)); //给存储排序 @@ -22,7 +22,7 @@ async function updateStorageInfoList() { { "text": "189", "weight": 4.5 }, { "text": "alist", "weight": 3.5 }, { "text": "aliyundrive", "weight": 5 }, - { "text": "baidunetdisk", "weight": 6 }, + { "text": "baidunetdisk", "weight": 5 }, { "text": "baiduphoto", "weight": 1 }, { "text": "cloudreve", "weight": 3 }, { "text": "feijipan", "weight": 2.5 }, diff --git a/src/controller/storage/storage.ts b/src/controller/storage/storage.ts index d45e113..4e7233f 100644 --- a/src/controller/storage/storage.ts +++ b/src/controller/storage/storage.ts @@ -13,12 +13,12 @@ import { nmConfig } from "../../services/config" //列举存储信息 async function reupStorage() { - const storageListTemp:StorageList[]=[] + const storageListTemp: StorageList[] = [] //rclone const dump = await rclone_api_post( '/config/dump', ) - + for (const storageName in dump) { storageListTemp.push({ framework: 'rclone', @@ -40,12 +40,12 @@ async function reupStorage() { alist: { id: storage.id, driverPath: storage.mount_path, - status:storage.status + status: storage.status } } }) } - + rcloneInfo.storageList = storageListTemp hooks.upStorage() @@ -80,7 +80,7 @@ async function delStorage(name: string) { //删除挂载 for (const mount of nmConfig.mount.lists) { - if (mount.storageName === storage?.name ) { + if (mount.storageName === storage?.name) { await delMountStorage(mount.mountPath) } } @@ -93,7 +93,7 @@ async function delStorage(name: string) { }) break; case 'alist': - await alist_api_post('/api/admin/storage/delete',undefined, { id: storage.other?.alist?.id }) + await alist_api_post('/api/admin/storage/delete', undefined, { id: storage.other?.alist?.id }) break; } reupStorage() @@ -310,8 +310,8 @@ const uploadFileRequest = (option: RequestOptions, storageName: string, path: st xhr.onerror = () => onError(xhr); - xhr.open('POST', `${rcloneInfo.endpoint.url}/operations/uploadfile?fs=${convertStoragePath(storageName,undefined,undefined,undefined,true)}&remote=${convertStoragePath(storageName,path,true,true,undefined)}`, true); - xhr.setRequestHeader('Authorization', `Bearer ${getRcloneApiHeaders().Authorization}`); + xhr.open('POST', `${rcloneInfo.endpoint.url}/operations/uploadfile?fs=${convertStoragePath(storageName, undefined, undefined, undefined, true)}&remote=${convertStoragePath(storageName, path, true, true, undefined)}`, true); + xhr.setRequestHeader('Authorization', getRcloneApiHeaders().Authorization); xhr.send(formData); }; diff --git a/src/page/mount/mount.tsx b/src/page/mount/mount.tsx index 5aa239a..ef03f7f 100644 --- a/src/page/mount/mount.tsx +++ b/src/page/mount/mount.tsx @@ -25,19 +25,28 @@ function Mount_page() { { title: t('storage_name'), dataIndex: 'storageName', + width:'11rem', + ellipsis: true, + render: (text) => { + return {text} + }, }, { title: t('mount_path'), dataIndex: 'mountPath_', + ellipsis: true, + }, { title: t('mount_status'), dataIndex: 'mounted', + width:'5.5rem', }, { title: t('actions'), dataIndex: 'actions', - align: 'right' + align: 'right', + width:'11rem' } ] @@ -98,10 +107,10 @@ function Mount_page() { const mounted = isMounted(item.mountPath) return { ...item, - mountPath_: <>{item.mountPath}{rcloneInfo.endpoint.isLocal&&osInfo.osType==='Windows_NT' &&mounted&& + mountPath_:
{item.mountPath}{rcloneInfo.endpoint.isLocal&&osInfo.osType==='Windows_NT' &&mounted&& }, + }} type='text' icon={}>}
, mounted: mounted ? t('mounted') : t('unmounted'), actions: { diff --git a/src/page/other/InputForm.tsx b/src/page/other/InputForm.tsx index 9dfa6bd..b52543e 100644 --- a/src/page/other/InputForm.tsx +++ b/src/page/other/InputForm.tsx @@ -224,7 +224,7 @@ function InputForm_module({ data, style, showAdvanced, footer, onChange, overwri formItems.push( {dataItem.required && '*'}{t(dataItem.label)}} + label={
{dataItem.required && '*'}{t(dataItem.label)}
} title={dataItem.description} field={dataItem.name} triggerPropName={dataItem.type === 'boolean' ? 'checked' : 'value'} diff --git a/src/page/transmit/transmit.tsx b/src/page/transmit/transmit.tsx index d91898d..d737964 100644 --- a/src/page/transmit/transmit.tsx +++ b/src/page/transmit/transmit.tsx @@ -81,11 +81,11 @@ function Transmit_page() { { transmitList.map((item, index) => { return - - +
+
- - +
+
{item.name} - - +
+
}) }