Small changes to RSS widget and MediaRequest

This commit is contained in:
ajnart
2023-10-25 14:08:27 +02:00
parent c6a1992a87
commit ac3771ad7b
3 changed files with 6 additions and 13 deletions

View File

@@ -13,8 +13,6 @@
} }
}, },
"noRequests": "No requests found. Please ensure that you've configured your apps correctly.", "noRequests": "No requests found. Please ensure that you've configured your apps correctly.",
"pending": "There are {{countPendingApproval}} requests waiting for approval.",
"nonePending": "There are currently no pending approvals. You're good to go!",
"state": { "state": {
"approved": "Approved", "approved": "Approved",
"pendingApproval": "Pending approval", "pendingApproval": "Pending approval",

View File

@@ -139,11 +139,6 @@ function MediaRequestListTile({ widget }: MediaRequestListWidgetProps) {
return ( return (
<ScrollArea h="100%"> <ScrollArea h="100%">
<Stack> <Stack>
{countPendingApproval > 0 ? (
<Text>{t('pending', { countPendingApproval })}</Text>
) : (
<Text>{t('nonePending')}</Text>
)}
{sortedData.map((item, index) => ( {sortedData.map((item, index) => (
<Card radius="md" withBorder key={index}> <Card radius="md" withBorder key={index}>
<Flex wrap="wrap" justify="space-between" gap="md"> <Flex wrap="wrap" justify="space-between" gap="md">

View File

@@ -30,7 +30,7 @@ const definition = defineWidget({
options: { options: {
rssFeedUrl: { rssFeedUrl: {
type: 'multiple-text', type: 'multiple-text',
defaultValue: [], defaultValue: ['https://noted.lol/rss'],
}, },
refreshInterval: { refreshInterval: {
type: 'slider', type: 'slider',
@@ -92,7 +92,7 @@ function RssTile({ widget }: RssTileProps) {
} }
} }
if (!data || isLoading) { if (isLoading) {
return ( return (
<Center h="100%"> <Center h="100%">
<Loader /> <Loader />
@@ -100,12 +100,12 @@ function RssTile({ widget }: RssTileProps) {
); );
} }
if (data.length < 1 || !data[0].feed || isError) { if (!data || data.length < 1 || !data[0].feed || isError) {
return ( return (
<Center h="100%"> <Center h="100%">
<Stack align="center"> <Stack align="center">
<IconRss size={40} strokeWidth={1} /> <IconRss size={25} strokeWidth={1} />
<Title order={6}>{t('descriptor.card.errors.general.title')}</Title> <Title order={5}>{t('descriptor.card.errors.general.title')}</Title>
<Text align="center">{t('descriptor.card.errors.general.text')}</Text> <Text align="center">{t('descriptor.card.errors.general.text')}</Text>
</Stack> </Stack>
<RefetchButton refetch={refetch} isFetching={isFetching} /> <RefetchButton refetch={refetch} isFetching={isFetching} />
@@ -246,7 +246,7 @@ const useStyles = createStyles(({ colorScheme, colors, radius, spacing }) => ({
position: 'absolute', position: 'absolute',
width: '100%', width: '100%',
height: '100%', height: '100%',
filter: colorScheme === 'dark' ? 'blur(30px)' : 'blur(15px)', filter: colorScheme === 'dark' ? 'blur(5px)' : 'blur(5px)',
transform: 'scaleX(-1)', transform: 'scaleX(-1)',
opacity: colorScheme === 'dark' ? 0.3 : 0.2, opacity: colorScheme === 'dark' ? 0.3 : 0.2,
transition: 'ease-in-out 0.2s', transition: 'ease-in-out 0.2s',