@@ -318,7 +318,7 @@ function App() {
318
318
< Divider />
319
319
< List sx = { { paddingX : 3 , paddingY : 2 } } >
320
320
< ListItem disablePadding = { true } >
321
- < ListItemText primary = { '网络服务设定 ' } secondary = { '配置 Lagrange.OneBot 暴露在网络中的服务 ' } />
321
+ < ListItemText primary = { '服务设定 ' } secondary = { '有关 Lagrange.OneBot 网络服务的设定 ' } />
322
322
</ ListItem >
323
323
< ListItem disablePadding = { true } >
324
324
< Button onClick = { ( ) => {
@@ -333,14 +333,14 @@ function App() {
333
333
} ,
334
334
} ) ;
335
335
} ) ;
336
- } } > 增加 HTTP 实现 </ Button >
336
+ } } > 新建 HTTP 服务 </ Button >
337
337
< Button onClick = { ( ) => {
338
338
setImpls ( draft => {
339
339
draft . push ( {
340
340
key : nextImplKey . current ++ ,
341
341
config : {
342
342
'Type' : 'HttpPost' ,
343
- 'Host' : '127.0.0.1' , // 可以填写前缀协议, 例如 `https://`
343
+ 'Host' : '127.0.0.1' ,
344
344
'Port' : 8082 ,
345
345
'Suffix' : '/' ,
346
346
'HeartBeatInterval' : 5000 ,
@@ -350,7 +350,7 @@ function App() {
350
350
} ,
351
351
} ) ;
352
352
} ) ;
353
- } } > 增加 HTTP Post 实现 </ Button >
353
+ } } > 新建 HTTP Post 服务 </ Button >
354
354
< Button onClick = { ( ) => {
355
355
setImpls ( draft => {
356
356
draft . push ( {
@@ -365,7 +365,7 @@ function App() {
365
365
} ,
366
366
} ) ;
367
367
} ) ;
368
- } } > 增加 WebSocket 实现 </ Button >
368
+ } } > 新建 WebSocket 服务 </ Button >
369
369
< Button onClick = { ( ) => {
370
370
setImpls ( draft => {
371
371
draft . push ( {
@@ -381,14 +381,17 @@ function App() {
381
381
} ,
382
382
} ) ;
383
383
} ) ;
384
- } } > 增加反向 WebSocket 实现 </ Button >
384
+ } } > 新建反向 WebSocket 服务 </ Button >
385
385
</ ListItem >
386
386
{
387
387
impls . map ( ( { key, config } , index ) => {
388
388
if ( config . Type === 'ReverseWebSocket' ) {
389
389
return < List key = { key } sx = { { padding : 2 , marginY : 1 } } >
390
390
< ListItem disablePadding = { true } >
391
- < ListItemText primary = { '反向 WebSocket 实现' } secondary = { `${ config . Host } ${ config . Suffix } ` } />
391
+ < ListItemText
392
+ primary = { '反向 WebSocket 服务' }
393
+ secondary = { `主动连接位于 ws://${ config . Host } ${ config . Suffix } 的 WebSocket 服务` }
394
+ />
392
395
< Button onClick = { ( ) => setImpls ( draft => {
393
396
draft . splice ( index , 1 ) ;
394
397
} ) } > 移除</ Button >
@@ -463,7 +466,8 @@ function App() {
463
466
} else if ( config . Type === 'ForwardWebSocket' ) {
464
467
return < List key = { key } sx = { { padding : 2 , marginY : 1 } } >
465
468
< ListItem disablePadding = { true } >
466
- < ListItemText primary = { '正向 WebSocket 实现' } secondary = { `${ config . Host } :${ config . Port } ` } />
469
+ < ListItemText primary = { '正向 WebSocket 服务' }
470
+ secondary = { `在 ${ config . Port } 端口监听 WebSocket 连接` } />
467
471
< Button onClick = { ( ) => setImpls ( draft => {
468
472
draft . splice ( index , 1 ) ;
469
473
} ) } > 移除</ Button >
@@ -525,8 +529,10 @@ function App() {
525
529
} else if ( config . Type === 'HttpPost' ) {
526
530
return < List key = { key } sx = { { padding : 2 , marginY : 1 } } >
527
531
< ListItem disablePadding = { true } >
528
- < ListItemText primary = { 'HTTP Post 实现' }
529
- secondary = { `${ config . Host } :${ config . Port } ${ config . Suffix } ` } />
532
+ < ListItemText primary = { 'HTTP Post 服务' }
533
+ secondary = { `向地址 ${
534
+ config . Host . startsWith ( 'https://' ) ? config . Host : `http://${ config . Host } `
535
+ } :${ config . Port } ${ config . Suffix } 通过 Post 上报事件`} />
530
536
< Button onClick = { ( ) => setImpls ( draft => {
531
537
draft . splice ( index , 1 ) ;
532
538
} ) } > 移除</ Button >
@@ -612,7 +618,8 @@ function App() {
612
618
} else { // Http
613
619
return < List key = { key } sx = { { padding : 2 , marginY : 1 } } >
614
620
< ListItem disablePadding = { true } >
615
- < ListItemText primary = { 'HTTP 实现' } secondary = { `${ config . Host } :${ config . Port } ` } />
621
+ < ListItemText primary = { 'HTTP 服务' }
622
+ secondary = { `在 ${ config . Port } 端口监听 HTTP 连接` } />
616
623
< Button onClick = { ( ) => setImpls ( draft => {
617
624
draft . splice ( index , 1 ) ;
618
625
} ) } > 移除</ Button >
0 commit comments