@@ -11,7 +11,6 @@ import {
1111 useBulkAddGroupsToUsers ,
1212 useBulkRemoveUsersFromGroups ,
1313 useBulkReallocateWireguardPeerIps ,
14- XTLSFlows ,
1514 ShadowsocksMethods ,
1615 UserStatus ,
1716} from '@/service/api'
@@ -27,7 +26,7 @@ import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group'
2726import { Command , CommandEmpty , CommandGroup , CommandInput , CommandItem } from '@/components/ui/command'
2827import { useTranslation } from 'react-i18next'
2928import { toast } from 'sonner'
30- import { Settings , Group , User , Shield , CheckCircle , AlertTriangle , Plus , Minus , X , HardDrive , Calendar , Network , CheckCircle2 , ChevronLeft , ChevronRight , Eye , Loader2 } from 'lucide-react'
29+ import { Settings , Group , User , Shield , CheckCircle , AlertTriangle , Plus , Minus , X , HardDrive , Calendar , CheckCircle2 , ChevronLeft , ChevronRight , Eye , Loader2 } from 'lucide-react'
3130import { BulkExpiredDateFilters } from '@/features/bulk/components/bulk-expired-date-filters'
3231import { DecimalInput } from '@/components/common/decimal-input'
3332import { SelectorPanel } from '@/features/bulk/components/selector-panel'
@@ -57,7 +56,6 @@ export default function BulkFlow({ operationType }: BulkFlowProps) {
5756
5857 const [ currentStep , setCurrentStep ] = useState < 1 | 2 | 3 > ( 1 )
5958
60- const [ selectedFlow , setSelectedFlow ] = useState < XTLSFlows | 'none' | undefined > ( undefined )
6159 const [ selectedMethod , setSelectedMethod ] = useState < ShadowsocksMethods | undefined > ( undefined )
6260
6361 const [ dataLimit , setDataLimit ] = useState < number | undefined > ( undefined )
@@ -157,7 +155,7 @@ export default function BulkFlow({ operationType }: BulkFlowProps) {
157155 return true
158156 }
159157 if ( operationType === 'proxy' ) {
160- return selectedFlow || selectedMethod
158+ return selectedMethod
161159 }
162160 if ( operationType === 'groups' ) {
163161 return selectedGroups . length > 0
@@ -172,7 +170,7 @@ export default function BulkFlow({ operationType }: BulkFlowProps) {
172170 case 2 :
173171 switch ( operationType ) {
174172 case 'proxy' :
175- return selectedFlow || selectedMethod
173+ return selectedMethod
176174 case 'data' :
177175 return dataLimit !== undefined
178176 case 'expire' :
@@ -246,7 +244,6 @@ export default function BulkFlow({ operationType }: BulkFlowProps) {
246244 case 'proxy' :
247245 return {
248246 ...basePayload ,
249- flow : selectedFlow === 'none' ? ( '' as XTLSFlows ) : selectedFlow ,
250247 method : selectedMethod ,
251248 dry_run : false ,
252249 }
@@ -348,7 +345,6 @@ export default function BulkFlow({ operationType }: BulkFlowProps) {
348345 toast . success ( t ( 'operationSuccess' , { defaultValue : 'Operation successful!' } ) , { description } )
349346
350347 setCurrentStep ( 1 )
351- setSelectedFlow ( undefined )
352348 setSelectedMethod ( undefined )
353349 setDataLimit ( undefined )
354350 setExpireSeconds ( undefined )
@@ -386,7 +382,6 @@ export default function BulkFlow({ operationType }: BulkFlowProps) {
386382 case 'proxy' :
387383 return {
388384 ...basePayload ,
389- flow : selectedFlow === 'none' ? ( '' as XTLSFlows ) : selectedFlow ,
390385 method : selectedMethod ,
391386 dry_run : true ,
392387 }
@@ -541,28 +536,7 @@ export default function BulkFlow({ operationType }: BulkFlowProps) {
541536 < div className = "space-y-3 sm:space-y-4" >
542537 { operationType === 'proxy' && (
543538 < div className = "space-y-3 sm:space-y-4" >
544- < div className = "grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4" >
545- < div className = "space-y-2" >
546- < Label htmlFor = "flow" className = "flex items-center gap-1.5 text-sm font-medium" >
547- < Network className = "text-muted-foreground h-3.5 w-3.5" />
548- { t ( 'bulk.flowLabel' , { defaultValue : 'Flow' } ) }
549- </ Label >
550- < Select value = { selectedFlow || '' } onValueChange = { value => setSelectedFlow ( value as XTLSFlows | 'none' ) } >
551- < SelectTrigger >
552- < SelectValue placeholder = { t ( 'bulk.selectFlowPlaceholder' , { defaultValue : 'Select flow' } ) } />
553- </ SelectTrigger >
554- < SelectContent >
555- < SelectItem value = "none" > { t ( 'none' , { defaultValue : 'None' } ) } </ SelectItem >
556- { Object . values ( XTLSFlows )
557- . filter ( flow => flow !== '' )
558- . map ( flow => (
559- < SelectItem key = { flow } value = { flow } >
560- { flow }
561- </ SelectItem >
562- ) ) }
563- </ SelectContent >
564- </ Select >
565- </ div >
539+ < div className = "grid grid-cols-1 gap-3 sm:gap-4" >
566540 < div className = "space-y-2" >
567541 < Label htmlFor = "method" className = "flex items-center gap-1.5 text-sm font-medium" >
568542 < Settings className = "text-muted-foreground h-3.5 w-3.5" />
@@ -1019,7 +993,7 @@ export default function BulkFlow({ operationType }: BulkFlowProps) {
1019993 { operationType === 'proxy' && (
1020994 < div className = "flex items-center justify-between" >
1021995 < span className = "text-muted-foreground" > { t ( 'bulk.settings' , { defaultValue : 'Settings' } ) } :</ span >
1022- < span > { t ( 'bulk.flowMethod' , { flow : selectedFlow === 'none' || ! selectedFlow ? t ( 'none' ) : selectedFlow , method : selectedMethod || t ( 'none' ) } ) } </ span >
996+ < span > { selectedMethod || t ( 'none' ) } </ span >
1023997 </ div >
1024998 ) }
1025999
0 commit comments