mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
fix: replace onClick with onPress in NextUI button components
This commit is contained in:
parent
7c8661ec0b
commit
4b7ab042f3
@ -31,7 +31,7 @@ const CollapseInput: React.FC<CollapseInputProps> = (props) => {
|
|||||||
<FaSearch title={title} />
|
<FaSearch title={title} />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
onClick={(e) => {
|
onPress={(e) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
inputRef.current?.focus()
|
inputRef.current?.focus()
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -263,7 +263,7 @@ const MihomoConfig: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
color="warning"
|
color="warning"
|
||||||
onClick={() => setPauseSSIDInput(pauseSSIDInput.filter((_, i) => i !== index))}
|
onPress={() => setPauseSSIDInput(pauseSSIDInput.filter((_, i) => i !== index))}
|
||||||
>
|
>
|
||||||
<MdDeleteForever className="text-lg" />
|
<MdDeleteForever className="text-lg" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -52,7 +52,7 @@ const WebdavRestoreModal: React.FC<Props> = (props) => {
|
|||||||
color="warning"
|
color="warning"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
className="ml-2"
|
className="ml-2"
|
||||||
onClick={async () => {
|
onPress={async () => {
|
||||||
try {
|
try {
|
||||||
await webdavDelete(filename)
|
await webdavDelete(filename)
|
||||||
setFilenames(filenames.filter((name) => name !== filename))
|
setFilenames(filenames.filter((name) => name !== filename))
|
||||||
|
|||||||
@ -95,7 +95,7 @@ const DNS: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
color="warning"
|
color="warning"
|
||||||
onClick={() => handleListChange(type, '', index)}
|
onPress={() => handleListChange(type, '', index)}
|
||||||
>
|
>
|
||||||
<MdDeleteForever className="text-lg" />
|
<MdDeleteForever className="text-lg" />
|
||||||
</Button>
|
</Button>
|
||||||
@ -294,7 +294,7 @@ const DNS: React.FC = () => {
|
|||||||
color="warning"
|
color="warning"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
className="ml-2"
|
className="ml-2"
|
||||||
onClick={() => handleSubkeyChange('nameserverPolicy', '', '', index)}
|
onPress={() => handleSubkeyChange('nameserverPolicy', '', '', index)}
|
||||||
>
|
>
|
||||||
<MdDeleteForever className="text-lg" />
|
<MdDeleteForever className="text-lg" />
|
||||||
</Button>
|
</Button>
|
||||||
@ -360,7 +360,7 @@ const DNS: React.FC = () => {
|
|||||||
color="warning"
|
color="warning"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
className="ml-2"
|
className="ml-2"
|
||||||
onClick={() => handleSubkeyChange('hosts', '', '', index)}
|
onPress={() => handleSubkeyChange('hosts', '', '', index)}
|
||||||
>
|
>
|
||||||
<MdDeleteForever className="text-lg" />
|
<MdDeleteForever className="text-lg" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -405,7 +405,7 @@ const Mihomo: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
color="warning"
|
color="warning"
|
||||||
onClick={() =>
|
onPress={() =>
|
||||||
setLanAllowedIpsInput(lanAllowedIpsInput.filter((_, i) => i !== index))
|
setLanAllowedIpsInput(lanAllowedIpsInput.filter((_, i) => i !== index))
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@ -455,7 +455,7 @@ const Mihomo: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
color="warning"
|
color="warning"
|
||||||
onClick={() =>
|
onPress={() =>
|
||||||
setLanDisallowedIpsInput(
|
setLanDisallowedIpsInput(
|
||||||
lanDisallowedIpsInput.filter((_, i) => i !== index)
|
lanDisallowedIpsInput.filter((_, i) => i !== index)
|
||||||
)
|
)
|
||||||
@ -533,7 +533,7 @@ const Mihomo: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
color="warning"
|
color="warning"
|
||||||
onClick={() =>
|
onPress={() =>
|
||||||
setAuthenticationInput(authenticationInput.filter((_, i) => i !== index))
|
setAuthenticationInput(authenticationInput.filter((_, i) => i !== index))
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@ -585,7 +585,7 @@ const Mihomo: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
color="warning"
|
color="warning"
|
||||||
onClick={() =>
|
onPress={() =>
|
||||||
setSkipAuthPrefixesInput(
|
setSkipAuthPrefixesInput(
|
||||||
skipAuthPrefixesInput.filter((_, i) => i !== index)
|
skipAuthPrefixesInput.filter((_, i) => i !== index)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -107,7 +107,7 @@ const Sniffer: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
color="warning"
|
color="warning"
|
||||||
onClick={() => handleListChange(type, '', index)}
|
onPress={() => handleListChange(type, '', index)}
|
||||||
>
|
>
|
||||||
<MdDeleteForever className="text-lg" />
|
<MdDeleteForever className="text-lg" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -195,7 +195,7 @@ const Sysproxy: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
color="warning"
|
color="warning"
|
||||||
onClick={() => handleBypassChange('', index)}
|
onPress={() => handleBypassChange('', index)}
|
||||||
>
|
>
|
||||||
<MdDeleteForever className="text-lg" />
|
<MdDeleteForever className="text-lg" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -274,7 +274,7 @@ const Tun: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
color="warning"
|
color="warning"
|
||||||
onClick={() => handleExcludeAddressChange('', index)}
|
onPress={() => handleExcludeAddressChange('', index)}
|
||||||
>
|
>
|
||||||
<MdDeleteForever className="text-lg" />
|
<MdDeleteForever className="text-lg" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user