mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-13 02:26:36 +08:00
chore: format
This commit is contained in:
@@ -65,7 +65,9 @@ function mapOptionsToFields(
|
||||
|
||||
function validateFields(
|
||||
fields: RateLimitFields,
|
||||
t: (key: 'config.invalidConn' | 'config.invalidRate' | 'config.invalidReq') => string,
|
||||
t: (
|
||||
key: 'config.invalidConn' | 'config.invalidRate' | 'config.invalidReq',
|
||||
) => string,
|
||||
) {
|
||||
for (const key of [KEY_CONN_PER_SERVER, KEY_CONN_PER_IP] as const) {
|
||||
const raw = fields[key].trim();
|
||||
@@ -155,7 +157,9 @@ export function ConfigTab() {
|
||||
},
|
||||
onError: (error) => {
|
||||
setSaving(false);
|
||||
toast.error(error instanceof Error ? error.message : t('config.saveFailed'));
|
||||
toast.error(
|
||||
error instanceof Error ? error.message : t('config.saveFailed'),
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -76,7 +76,9 @@ function RateLimitsPageContent() {
|
||||
<div className='flex items-center gap-2'>
|
||||
<Gauge className='size-5 text-primary' />
|
||||
<div>
|
||||
<h1 className='text-2xl font-semibold tracking-tight'>{t('title')}</h1>
|
||||
<h1 className='text-2xl font-semibold tracking-tight'>
|
||||
{t('title')}
|
||||
</h1>
|
||||
<p className='text-sm text-muted-foreground'>{t('subtitle')}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -116,10 +118,7 @@ export default function RateLimitsPage() {
|
||||
<Suspense
|
||||
fallback={
|
||||
<div className='py-6 px-1'>
|
||||
<LoadingStateWithBorder
|
||||
icon={Gauge}
|
||||
description={t('loadingPage')}
|
||||
/>
|
||||
<LoadingStateWithBorder icon={Gauge} description={t('loadingPage')} />
|
||||
</div>
|
||||
}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user