Skip to content

Commit

Permalink
fix: rule provider word break
Browse files Browse the repository at this point in the history
  • Loading branch information
Zephyruso authored and Zephyruso committed Sep 5, 2023
1 parent 949215b commit e6facf1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
5 changes: 1 addition & 4 deletions src/pages/Proxies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ export default () => {

const onSpeedTestClick = async (e: MouseEvent, name: string) => {
e.stopPropagation()
setSpeedTestingMap(
name,
async () => await latencyTestByProxyGroupName(name),
)
setSpeedTestingMap(name, () => latencyTestByProxyGroupName(name))
}

return (
Expand Down
11 changes: 4 additions & 7 deletions src/pages/ProxyProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,14 @@ export default () => {
useStringBooleanMap()
const [allProviderIsUpdating, setAllProviderIsUpdating] = createSignal(false)

const onHealthCheckClick = async (e: MouseEvent, name: string) => {
const onHealthCheckClick = (e: MouseEvent, name: string) => {
e.stopPropagation()
setHealthCheckingMap(
name,
async () => await healthCheckByProviderName(name),
)
setHealthCheckingMap(name, () => healthCheckByProviderName(name))
}

const onUpdateProviderClick = async (e: MouseEvent, name: string) => {
const onUpdateProviderClick = (e: MouseEvent, name: string) => {
e.stopPropagation()
setUpdateingMap(name, async () => await updateProviderByProviderName(name))
setUpdateingMap(name, () => updateProviderByProviderName(name))
}

const onUpdateAllProviderClick = async (e: MouseEvent) => {
Expand Down
10 changes: 5 additions & 5 deletions src/pages/Rules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default () => {
}

return (
<div class="flex w-full flex-row gap-4">
<div class="flex w-full gap-4">
<div class="flex-1">
<h1 class="pb-4 text-lg font-semibold">{t('rules')}</h1>

Expand Down Expand Up @@ -82,11 +82,11 @@ export default () => {
<For each={rulesProviders()}>
{(rulesProvider) => (
<div class="card card-bordered card-compact mb-2 bg-base-200 p-4">
<div class="flex h-6 items-center justify-between">
<span>
<div class="flex items-center justify-between">
<div class="break-all">
{rulesProvider.name} ({rulesProvider.ruleCount})
</span>
<div>
</div>
<div class="h-6">
<Button
class="btn-circle btn-sm mr-2"
onClick={(e) =>
Expand Down

0 comments on commit e6facf1

Please sign in to comment.