mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-04 14:11:22 +09:00
fix(ui): size the 2FA loading placeholder to its content
This commit is contained in:
1 parent
b3d543b583
commit
8702213609
2 files changed
+7
-2
No files matched your search
@@ -13,7 +13,7 @@ import { Badge } from '@/components/ui/badge';
|
||||
import InfoTip from '../InfoTip';
|
||||
import LockShieldIllustration from '../illustrations/LockShieldIllustration';
|
||||
import CopyField from '../CopyField';
|
||||
import EmptyState from '../EmptyState';
|
||||
import { Skeleton } from '../Skeleton';
|
||||
import { downloadBlob } from '@/utils/downloadBlob';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { formatDate, formatDateTime } from '@/utils/intl';
|
||||
@@ -324,7 +324,9 @@ Keep these codes in a safe place.`;
|
||||
</div>
|
||||
|
||||
{twoFALoading && !twoFAStatus ? (
|
||||
<EmptyState loading loadingVariant="form" loadingRows={2} size="compact" title={t('common.loading', 'Loading…')} />
|
||||
<div role="status" aria-busy="true" aria-label={t('common.loading', 'Loading…')}>
|
||||
<Skeleton variant="block" width={260} height={40} radius={8} />
|
||||
</div>
|
||||
) : twoFALoadError && !twoFAStatus ? (
|
||||
<ErrorState
|
||||
title={t('app.securitySettingsTab.couldntLoad2fa', "Couldn't load 2FA status.")}
|
||||
|
||||
@@ -158,6 +158,9 @@
|
||||
gap: $space-4;
|
||||
width: 100%;
|
||||
|
||||
// Some variants use >100% ragged widths; never let a bar exceed its container.
|
||||
.skeleton { max-width: 100%; }
|
||||
|
||||
// Pushes a trailing control to the right edge of a toolbar row.
|
||||
&__push { margin-left: auto; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user