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