fix: style

This commit is contained in:
MystiPanda 2024-07-06 00:45:21 +08:00
parent 2f640a946e
commit 0183edd450
No known key found for this signature in database
2 changed files with 47 additions and 19 deletions

View File

@ -65,6 +65,9 @@ export const GroupsEditorViewer = (props: Props) => {
defaultValues: { defaultValues: {
type: "select", type: "select",
name: "", name: "",
interval: 300,
timeout: 5000,
"max-failed-times": 5,
lazy: true, lazy: true,
}, },
}); });
@ -313,7 +316,7 @@ export const GroupsEditorViewer = (props: Props) => {
<ListItemText primary={t("Group Type")} /> <ListItemText primary={t("Group Type")} />
<Autocomplete <Autocomplete
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
options={[ options={[
"select", "select",
"url-test", "url-test",
@ -337,8 +340,9 @@ export const GroupsEditorViewer = (props: Props) => {
<TextField <TextField
autoComplete="off" autoComplete="off"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
{...field} {...field}
error={field.value === ""}
required={true} required={true}
/> />
</Item> </Item>
@ -353,7 +357,7 @@ export const GroupsEditorViewer = (props: Props) => {
<TextField <TextField
autoComplete="off" autoComplete="off"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
{...field} {...field}
/> />
</Item> </Item>
@ -367,7 +371,9 @@ export const GroupsEditorViewer = (props: Props) => {
<ListItemText primary={t("Use Proxies")} /> <ListItemText primary={t("Use Proxies")} />
<Autocomplete <Autocomplete
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{
width: "calc(100% - 150px)",
}}
multiple multiple
options={proxyPolicyList} options={proxyPolicyList}
onChange={(_, value) => value && field.onChange(value)} onChange={(_, value) => value && field.onChange(value)}
@ -384,7 +390,7 @@ export const GroupsEditorViewer = (props: Props) => {
<ListItemText primary={t("Use Provider")} /> <ListItemText primary={t("Use Provider")} />
<Autocomplete <Autocomplete
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
multiple multiple
options={proxyProviderList} options={proxyProviderList}
onChange={(_, value) => value && field.onChange(value)} onChange={(_, value) => value && field.onChange(value)}
@ -403,7 +409,7 @@ export const GroupsEditorViewer = (props: Props) => {
<TextField <TextField
autoComplete="off" autoComplete="off"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
{...field} {...field}
/> />
</Item> </Item>
@ -419,7 +425,7 @@ export const GroupsEditorViewer = (props: Props) => {
autoComplete="off" autoComplete="off"
type="number" type="number"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
onChange={(e) => { onChange={(e) => {
field.onChange(parseInt(e.target.value)); field.onChange(parseInt(e.target.value));
}} }}
@ -437,7 +443,7 @@ export const GroupsEditorViewer = (props: Props) => {
autoComplete="off" autoComplete="off"
type="number" type="number"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
onChange={(e) => { onChange={(e) => {
field.onChange(parseInt(e.target.value)); field.onChange(parseInt(e.target.value));
}} }}
@ -455,7 +461,7 @@ export const GroupsEditorViewer = (props: Props) => {
autoComplete="off" autoComplete="off"
type="number" type="number"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
onChange={(e) => { onChange={(e) => {
field.onChange(parseInt(e.target.value)); field.onChange(parseInt(e.target.value));
}} }}
@ -472,7 +478,7 @@ export const GroupsEditorViewer = (props: Props) => {
<TextField <TextField
autoComplete="off" autoComplete="off"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
{...field} {...field}
/> />
</Item> </Item>
@ -488,7 +494,7 @@ export const GroupsEditorViewer = (props: Props) => {
autoComplete="off" autoComplete="off"
type="number" type="number"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
onChange={(e) => { onChange={(e) => {
field.onChange(parseInt(e.target.value)); field.onChange(parseInt(e.target.value));
}} }}
@ -505,7 +511,7 @@ export const GroupsEditorViewer = (props: Props) => {
<TextField <TextField
autoComplete="off" autoComplete="off"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
{...field} {...field}
/> />
</Item> </Item>
@ -520,7 +526,7 @@ export const GroupsEditorViewer = (props: Props) => {
<TextField <TextField
autoComplete="off" autoComplete="off"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
{...field} {...field}
/> />
</Item> </Item>
@ -532,11 +538,32 @@ export const GroupsEditorViewer = (props: Props) => {
render={({ field }) => ( render={({ field }) => (
<Item> <Item>
<ListItemText primary={t("Exclude Type")} /> <ListItemText primary={t("Exclude Type")} />
<TextField <Autocomplete
autoComplete="off" multiple
options={[
"ss",
"ssr",
"direct",
"dns",
"snell",
"http",
"trojan",
"hysteria",
"hysteria2",
"tuic",
"wireguard",
"ssh",
"socks5",
"vmess",
"vless",
]}
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
{...field} value={field.value?.split("|")}
onChange={(_, value) => {
field.onChange(value.join("|"));
}}
renderInput={(params) => <TextField {...params} />}
/> />
</Item> </Item>
)} )}
@ -551,7 +578,7 @@ export const GroupsEditorViewer = (props: Props) => {
autoComplete="off" autoComplete="off"
type="number" type="number"
size="small" size="small"
sx={{ minWidth: "240px" }} sx={{ width: "calc(100% - 150px)" }}
onChange={(e) => { onChange={(e) => {
field.onChange(parseInt(e.target.value)); field.onChange(parseInt(e.target.value));
}} }}

View File

@ -227,7 +227,8 @@ export const ProxiesEditorViewer = (props: Props) => {
autoComplete="off" autoComplete="off"
placeholder={t("Use newlines for multiple uri")} placeholder={t("Use newlines for multiple uri")}
fullWidth fullWidth
minRows={8} rows={9}
sx={{ height: "100px" }}
multiline multiline
size="small" size="small"
onChange={(e) => setProxyUri(e.target.value)} onChange={(e) => setProxyUri(e.target.value)}