mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-11 22:00:59 +00:00
fix(finalmask): treat sudoku customTables as array of tables
customTables is the plural array form of customTable, so default it to [""] and edit it with a tags Select instead of binding a text Input to an array value.
This commit is contained in:
@@ -29,7 +29,7 @@ function defaultTcpMaskSettings(type: string): Record<string, unknown> {
|
|||||||
return { packets: '1-3', length: '', delay: '', maxSplit: '' };
|
return { packets: '1-3', length: '', delay: '', maxSplit: '' };
|
||||||
case 'sudoku':
|
case 'sudoku':
|
||||||
return {
|
return {
|
||||||
password: '', ascii: '', customTable: '', customTables: '',
|
password: '', ascii: '', customTable: '', customTables: [''],
|
||||||
paddingMin: 0, paddingMax: 0,
|
paddingMin: 0, paddingMax: 0,
|
||||||
};
|
};
|
||||||
case 'header-custom':
|
case 'header-custom':
|
||||||
@@ -228,7 +228,9 @@ function TcpMaskItem({
|
|||||||
<Form.Item label="Password" name={[fieldName, 'settings', 'password']}><Input /></Form.Item>
|
<Form.Item label="Password" name={[fieldName, 'settings', 'password']}><Input /></Form.Item>
|
||||||
<Form.Item label="ASCII" name={[fieldName, 'settings', 'ascii']}><Input /></Form.Item>
|
<Form.Item label="ASCII" name={[fieldName, 'settings', 'ascii']}><Input /></Form.Item>
|
||||||
<Form.Item label="Custom Table" name={[fieldName, 'settings', 'customTable']}><Input /></Form.Item>
|
<Form.Item label="Custom Table" name={[fieldName, 'settings', 'customTable']}><Input /></Form.Item>
|
||||||
<Form.Item label="Custom Tables" name={[fieldName, 'settings', 'customTables']}><Input /></Form.Item>
|
<Form.Item label="Custom Tables" name={[fieldName, 'settings', 'customTables']}>
|
||||||
|
<Select mode="tags" style={{ width: '100%' }} tokenSeparators={[',']} />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item label="Padding Min" name={[fieldName, 'settings', 'paddingMin']}>
|
<Form.Item label="Padding Min" name={[fieldName, 'settings', 'paddingMin']}>
|
||||||
<InputNumber min={0} />
|
<InputNumber min={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
Reference in New Issue
Block a user