mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): improve no loaded loras UI
This commit is contained in:
parent
e09c07a97d
commit
a901a37433
@ -1,4 +1,4 @@
|
|||||||
import { Text } from '@chakra-ui/react';
|
import { Flex, Text } from '@chakra-ui/react';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { stateSelector } from 'app/store/store';
|
import { stateSelector } from 'app/store/store';
|
||||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||||
@ -61,6 +61,16 @@ const ParamLoraSelect = () => {
|
|||||||
[dispatch, lorasQueryData?.entities]
|
[dispatch, lorasQueryData?.entities]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (lorasQueryData?.ids.length === 0) {
|
||||||
|
return (
|
||||||
|
<Flex sx={{ justifyContent: 'center', p: 2 }}>
|
||||||
|
<Text sx={{ fontSize: 'sm', color: 'base.500', _dark: 'base.700' }}>
|
||||||
|
No LoRAs Loaded
|
||||||
|
</Text>
|
||||||
|
</Flex>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IAIMantineMultiSelect
|
<IAIMantineMultiSelect
|
||||||
placeholder={data.length === 0 ? 'All LoRAs added' : 'Add LoRA'}
|
placeholder={data.length === 0 ? 'All LoRAs added' : 'Add LoRA'}
|
||||||
|
Loading…
Reference in New Issue
Block a user