11import React from "react" ;
2- import { Button , Input , Message , Popconfirm , Select , Space } from "@arco-design/web-react" ;
2+ import { Input , Select , Space } from "@arco-design/web-react" ;
33import type { FileSystemType } from "@Packages/filesystem/factory" ;
44import FileSystemFactory from "@Packages/filesystem/factory" ;
55import { useTranslation } from "react-i18next" ;
6- import { ClearNetDiskToken , netDiskTypeMap } from "@Packages/filesystem/auth" ;
76
87const FileSystemParams : React . FC < {
98 preNode : React . ReactNode | string ;
@@ -22,7 +21,6 @@ const FileSystemParams: React.FC<{
2221} ) => {
2322 const fsParams = FileSystemFactory . params ( ) ;
2423 const { t } = useTranslation ( ) ;
25- const actionButtons = [ ...actionButton ] ;
2624
2725 const fileSystemList : {
2826 key : FileSystemType ;
@@ -50,31 +48,6 @@ const FileSystemParams: React.FC<{
5048 } ,
5149 ] ;
5250
53- const netDiskType = netDiskTypeMap [ fileSystemType ] ;
54-
55- if ( netDiskType ) {
56- const netDiskName = fileSystemList . find ( ( item ) => item . key === fileSystemType ) ?. name ;
57-
58- actionButtons . push (
59- < Popconfirm
60- key = "netdisk-unbind"
61- title = { t ( "netdisk_unbind_confirm" , { provider : netDiskName } ) }
62- onOk = { async ( ) => {
63- try {
64- await ClearNetDiskToken ( netDiskType ) ;
65- Message . success ( t ( "netdisk_unbind_success" , { provider : netDiskName } ) ! ) ;
66- } catch ( error ) {
67- Message . error ( `${ t ( "netdisk_unbind_error" , { provider : netDiskName } ) } : ${ String ( error ) } ` ) ;
68- }
69- } }
70- >
71- < Button type = "primary" status = "danger" >
72- { t ( "netdisk_unbind" , { provider : netDiskName } ) }
73- </ Button >
74- </ Popconfirm >
75- ) ;
76- }
77-
7851 return (
7952 < >
8053 < Space >
@@ -92,7 +65,7 @@ const FileSystemParams: React.FC<{
9265 </ Select . Option >
9366 ) ) }
9467 </ Select >
95- { actionButtons . map ( ( item ) => item ) }
68+ { actionButton . map ( ( item ) => item ) }
9669 </ Space >
9770 < Space
9871 style = { {
0 commit comments