fix: rule provider word break

This commit is contained in:
Zephyruso 2023-09-05 19:48:28 +08:00
parent 949215bb8e
commit e6facf1175
3 changed files with 10 additions and 16 deletions

View File

@ -37,10 +37,7 @@ export default () => {
const onSpeedTestClick = async (e: MouseEvent, name: string) => { const onSpeedTestClick = async (e: MouseEvent, name: string) => {
e.stopPropagation() e.stopPropagation()
setSpeedTestingMap( setSpeedTestingMap(name, () => latencyTestByProxyGroupName(name))
name,
async () => await latencyTestByProxyGroupName(name),
)
} }
return ( return (

View File

@ -34,17 +34,14 @@ export default () => {
useStringBooleanMap() useStringBooleanMap()
const [allProviderIsUpdating, setAllProviderIsUpdating] = createSignal(false) const [allProviderIsUpdating, setAllProviderIsUpdating] = createSignal(false)
const onHealthCheckClick = async (e: MouseEvent, name: string) => { const onHealthCheckClick = (e: MouseEvent, name: string) => {
e.stopPropagation() e.stopPropagation()
setHealthCheckingMap( setHealthCheckingMap(name, () => healthCheckByProviderName(name))
name,
async () => await healthCheckByProviderName(name),
)
} }
const onUpdateProviderClick = async (e: MouseEvent, name: string) => { const onUpdateProviderClick = (e: MouseEvent, name: string) => {
e.stopPropagation() e.stopPropagation()
setUpdateingMap(name, async () => await updateProviderByProviderName(name)) setUpdateingMap(name, () => updateProviderByProviderName(name))
} }
const onUpdateAllProviderClick = async (e: MouseEvent) => { const onUpdateAllProviderClick = async (e: MouseEvent) => {

View File

@ -40,7 +40,7 @@ export default () => {
} }
return ( return (
<div class="flex w-full flex-row gap-4"> <div class="flex w-full gap-4">
<div class="flex-1"> <div class="flex-1">
<h1 class="pb-4 text-lg font-semibold">{t('rules')}</h1> <h1 class="pb-4 text-lg font-semibold">{t('rules')}</h1>
@ -82,11 +82,11 @@ export default () => {
<For each={rulesProviders()}> <For each={rulesProviders()}>
{(rulesProvider) => ( {(rulesProvider) => (
<div class="card card-bordered card-compact mb-2 bg-base-200 p-4"> <div class="card card-bordered card-compact mb-2 bg-base-200 p-4">
<div class="flex h-6 items-center justify-between"> <div class="flex items-center justify-between">
<span> <div class="break-all">
{rulesProvider.name} ({rulesProvider.ruleCount}) {rulesProvider.name} ({rulesProvider.ruleCount})
</span> </div>
<div> <div class="h-6">
<Button <Button
class="btn-circle btn-sm mr-2" class="btn-circle btn-sm mr-2"
onClick={(e) => onClick={(e) =>