@@ -91,7 +91,11 @@ function DialogContent({ dialog }: { dialog: any }) {
91
91
if ( Array . isArray ( dialog . dialogs ) ) {
92
92
dialogs = dialog . dialogs
93
93
} else if ( typeof dialog . dialogs === 'string' ) {
94
- dialogs = [ dialog . dialogs ]
94
+ if ( dialog . dialogs . startsWith ( '#' ) ) {
95
+ dialogs = [ 'dialog_1' , 'dialog_2' , 'dialog_3' ]
96
+ } else {
97
+ dialogs = [ dialog . dialogs ]
98
+ }
95
99
}
96
100
return < ColumnsGrid columns = { dialog . columns ?? 2 } >
97
101
{ dialogs . map ( ( d : any ) => {
@@ -121,6 +125,15 @@ function DialogContent({ dialog }: { dialog: any }) {
121
125
</ >
122
126
}
123
127
128
+ if ( type === 'server_links' ) {
129
+ const links = [ 'Server link 1' , 'Server link 2' , 'Server link 3' ]
130
+ return < ColumnsGrid columns = { dialog . columns ?? 2 } >
131
+ { links . map ( ( text : string ) => {
132
+ return < Button label = { text } width = { dialog . button_width ?? 150 } />
133
+ } ) }
134
+ </ ColumnsGrid >
135
+ }
136
+
124
137
if ( type === 'simple_input_form' ) {
125
138
return < >
126
139
{ dialog . inputs ?. map ( ( i : any ) => < InputControl input = { i } /> ) }
@@ -150,7 +163,7 @@ function DialogFooter({ dialog }: { dialog: any }) {
150
163
151
164
if ( type === 'notice' ) {
152
165
return < div style = { `display: flex; gap: ${ px ( 8 ) } ; justify-content: center;` } >
153
- < Button label = { dialog . action ?. label } width = { dialog . action ?. width ?? 150 } />
166
+ < Button label = { dialog . action ?. label ?? { translate : 'gui.ok' } } width = { dialog . action ?. width ?? 150 } />
154
167
</ div >
155
168
}
156
169
@@ -206,7 +219,7 @@ function InputControl({ input }: { input: any }) {
206
219
207
220
if ( type === 'number_range' ) {
208
221
// TODO: use label_format
209
- const label = { translate : 'options.generic_value' , with : [ input . label , input . start ?? 0 ] }
222
+ const label = { translate : 'options.generic_value' , with : [ input . label ?? '' , input . start ?? 0 ] }
210
223
return < div class = "dialog-slider" style = { `width: ${ px ( input . width ?? 200 ) } ; height: ${ px ( 20 ) } ;` } >
211
224
< div class = "dialog-slider-track" > </ div >
212
225
< div class = "dialog-slider-handle" > </ div >
0 commit comments