From 0183edd45074d1a505252eb21aa536d44a8fec15 Mon Sep 17 00:00:00 2001 From: MystiPanda Date: Sat, 6 Jul 2024 00:45:21 +0800 Subject: [PATCH] fix: style --- .../profile/groups-editor-viewer.tsx | 63 +++++++++++++------ .../profile/proxies-editor-viewer.tsx | 3 +- 2 files changed, 47 insertions(+), 19 deletions(-) diff --git a/src/components/profile/groups-editor-viewer.tsx b/src/components/profile/groups-editor-viewer.tsx index cdc7833..8f6557d 100644 --- a/src/components/profile/groups-editor-viewer.tsx +++ b/src/components/profile/groups-editor-viewer.tsx @@ -65,6 +65,9 @@ export const GroupsEditorViewer = (props: Props) => { defaultValues: { type: "select", name: "", + interval: 300, + timeout: 5000, + "max-failed-times": 5, lazy: true, }, }); @@ -313,7 +316,7 @@ export const GroupsEditorViewer = (props: Props) => { { @@ -353,7 +357,7 @@ export const GroupsEditorViewer = (props: Props) => { @@ -367,7 +371,9 @@ export const GroupsEditorViewer = (props: Props) => { value && field.onChange(value)} @@ -384,7 +390,7 @@ export const GroupsEditorViewer = (props: Props) => { value && field.onChange(value)} @@ -403,7 +409,7 @@ export const GroupsEditorViewer = (props: Props) => { @@ -419,7 +425,7 @@ export const GroupsEditorViewer = (props: Props) => { autoComplete="off" type="number" size="small" - sx={{ minWidth: "240px" }} + sx={{ width: "calc(100% - 150px)" }} onChange={(e) => { field.onChange(parseInt(e.target.value)); }} @@ -437,7 +443,7 @@ export const GroupsEditorViewer = (props: Props) => { autoComplete="off" type="number" size="small" - sx={{ minWidth: "240px" }} + sx={{ width: "calc(100% - 150px)" }} onChange={(e) => { field.onChange(parseInt(e.target.value)); }} @@ -455,7 +461,7 @@ export const GroupsEditorViewer = (props: Props) => { autoComplete="off" type="number" size="small" - sx={{ minWidth: "240px" }} + sx={{ width: "calc(100% - 150px)" }} onChange={(e) => { field.onChange(parseInt(e.target.value)); }} @@ -472,7 +478,7 @@ export const GroupsEditorViewer = (props: Props) => { @@ -488,7 +494,7 @@ export const GroupsEditorViewer = (props: Props) => { autoComplete="off" type="number" size="small" - sx={{ minWidth: "240px" }} + sx={{ width: "calc(100% - 150px)" }} onChange={(e) => { field.onChange(parseInt(e.target.value)); }} @@ -505,7 +511,7 @@ export const GroupsEditorViewer = (props: Props) => { @@ -520,7 +526,7 @@ export const GroupsEditorViewer = (props: Props) => { @@ -532,11 +538,32 @@ export const GroupsEditorViewer = (props: Props) => { render={({ field }) => ( - { + field.onChange(value.join("|")); + }} + renderInput={(params) => } /> )} @@ -551,7 +578,7 @@ export const GroupsEditorViewer = (props: Props) => { autoComplete="off" type="number" size="small" - sx={{ minWidth: "240px" }} + sx={{ width: "calc(100% - 150px)" }} onChange={(e) => { field.onChange(parseInt(e.target.value)); }} diff --git a/src/components/profile/proxies-editor-viewer.tsx b/src/components/profile/proxies-editor-viewer.tsx index c6333b9..070144b 100644 --- a/src/components/profile/proxies-editor-viewer.tsx +++ b/src/components/profile/proxies-editor-viewer.tsx @@ -227,7 +227,8 @@ export const ProxiesEditorViewer = (props: Props) => { autoComplete="off" placeholder={t("Use newlines for multiple uri")} fullWidth - minRows={8} + rows={9} + sx={{ height: "100px" }} multiline size="small" onChange={(e) => setProxyUri(e.target.value)}