mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-02-01 15:20:49 +01:00
feat: enhance loading states with dynamic messages in FormatPage and RegexPage components
This commit is contained in:
@@ -14,11 +14,24 @@ import ImportModal from '@ui/ImportModal';
|
|||||||
import {importFormats} from '@api/import';
|
import {importFormats} from '@api/import';
|
||||||
import DataBar from '@ui/DataBar/DataBar';
|
import DataBar from '@ui/DataBar/DataBar';
|
||||||
|
|
||||||
|
const loadingMessages = [
|
||||||
|
'Formatting the formatters...',
|
||||||
|
'Teaching formats to behave...',
|
||||||
|
'Convincing formats to follow rules...',
|
||||||
|
'Organizing chaos into patterns...',
|
||||||
|
'Making formats look pretty...',
|
||||||
|
'Polishing the quality filters...'
|
||||||
|
];
|
||||||
|
|
||||||
const LoadingState = () => (
|
const LoadingState = () => (
|
||||||
<div className='w-full min-h-[70vh] flex flex-col items-center justify-center'>
|
<div className='w-full min-h-[70vh] flex flex-col items-center justify-center'>
|
||||||
<Loader className='w-8 h-8 animate-spin text-blue-500 mb-4' />
|
<Loader className='w-8 h-8 animate-spin text-blue-500 mb-4' />
|
||||||
<p className='text-lg font-medium text-gray-300'>
|
<p className='text-lg font-medium text-gray-300'>
|
||||||
Loading custom formats...
|
{
|
||||||
|
loadingMessages[
|
||||||
|
Math.floor(Math.random() * loadingMessages.length)
|
||||||
|
]
|
||||||
|
}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,11 +9,24 @@ import {useKeyboardShortcut} from '@hooks/useKeyboardShortcut';
|
|||||||
import MassActionsBar from '@ui/MassActionsBar';
|
import MassActionsBar from '@ui/MassActionsBar';
|
||||||
import DataBar from '@ui/DataBar/DataBar';
|
import DataBar from '@ui/DataBar/DataBar';
|
||||||
|
|
||||||
|
const loadingMessages = [
|
||||||
|
'Matching all the patterns...',
|
||||||
|
'Capturing your groups...',
|
||||||
|
'Escaping special characters...',
|
||||||
|
'Untangling regular expressions...',
|
||||||
|
'Looking behind and ahead...',
|
||||||
|
'Validating the validators...'
|
||||||
|
];
|
||||||
|
|
||||||
const LoadingState = () => (
|
const LoadingState = () => (
|
||||||
<div className='w-full min-h-[70vh] flex flex-col items-center justify-center'>
|
<div className='w-full min-h-[70vh] flex flex-col items-center justify-center'>
|
||||||
<Loader className='w-8 h-8 animate-spin text-blue-500 mb-4' />
|
<Loader className='w-8 h-8 animate-spin text-blue-500 mb-4' />
|
||||||
<p className='text-lg font-medium text-gray-300'>
|
<p className='text-lg font-medium text-gray-300'>
|
||||||
Loading regex patterns...
|
{
|
||||||
|
loadingMessages[
|
||||||
|
Math.floor(Math.random() * loadingMessages.length)
|
||||||
|
]
|
||||||
|
}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user