@@ -189,7 +189,7 @@ export default function AddMount_page() {
189189 < div >
190190
191191 < h2 style = { { fontSize : '1.5rem' , marginBottom : '2rem' , marginLeft : '1.8rem' } } > { ! isEditMode ? t ( 'add_mount' ) : t ( 'edit_mount' ) } </ h2 >
192-
192+
193193 { /* 基础选项 - 始终显示 */ }
194194 < div style = { { marginBottom : showAllOptions ? '1rem' : '0' } } >
195195 < FormItem label = { t ( 'storage' ) } >
@@ -271,24 +271,23 @@ export default function AddMount_page() {
271271 < Button type = { cacheMode === 'minimal' ? 'primary' : 'secondary' } onClick = { ( ) => applyCachePreset ( 'minimal' ) } > { t ( 'preset_low_disk' ) } </ Button >
272272 < Button type = { cacheMode === 'off' ? 'primary' : 'secondary' } onClick = { ( ) => applyCachePreset ( 'off' ) } > { t ( 'preset_compatibility' ) } </ Button >
273273 </ Space >
274+ < Alert
275+ style = { { marginTop : '0.5rem' } }
276+ type = { cacheMode === 'full' ? 'warning' : 'info' }
277+ content = {
278+ cacheMode === 'full'
279+ ? t ( 'cache_mode_tip_full' )
280+ : cacheMode === 'off'
281+ ? t ( 'cache_mode_tip_off' )
282+ : cacheMode === 'minimal'
283+ ? t ( 'cache_mode_tip_minimal' )
284+ : t ( 'cache_mode_tip_writes' )
285+ }
286+ />
274287 </ FormItem >
288+
275289 </ >
276290 }
277- { ! showAllOptions && (
278- < Alert
279- style = { { marginTop : '0.5rem' } }
280- type = { cacheMode === 'full' ? 'warning' : 'info' }
281- content = {
282- cacheMode === 'full'
283- ? t ( 'cache_mode_tip_full' )
284- : cacheMode === 'off'
285- ? t ( 'cache_mode_tip_off' )
286- : cacheMode === 'minimal'
287- ? t ( 'cache_mode_tip_minimal' )
288- : t ( 'cache_mode_tip_writes' )
289- }
290- />
291- ) }
292291 { showAllOptions && isMacOS && (
293292 < FormItem label = { t ( 'mount_backend' ) } >
294293 < Select
@@ -333,7 +332,7 @@ export default function AddMount_page() {
333332 < Button disabled = { ! storageName || ! mountPath } onClick = { async ( ) => {
334333 // 编辑模式下获取原始路径
335334 const originalMountPath = isEditMode ? getURLSearchParam ( 'mountPath' ) : '' ;
336-
335+
337336 if ( ! isEditMode && getMountStorage ( mountPath ) ) {
338337 Notification . error ( {
339338 title : t ( 'error' ) ,
@@ -354,13 +353,13 @@ export default function AddMount_page() {
354353 }
355354
356355 mountPathTemp = formatPath ( mountPathTemp , isWindows )
357-
356+
358357 if ( isEditMode ) {
359- await editMountStorage ( {
360- storageName : storageName ! ,
361- mountPath : mountPathTemp ,
362- parameters : parameters ,
363- autoMount : autoMount
358+ await editMountStorage ( {
359+ storageName : storageName ! ,
360+ mountPath : mountPathTemp ,
361+ parameters : parameters ,
362+ autoMount : autoMount
364363 } , originalMountPath )
365364 } else {
366365 await addMountStorage ( storageName ! , mountPathTemp , parameters , autoMount )
0 commit comments