Small changes to RSS widget and MediaRequest
This commit is contained in:
@@ -13,8 +13,6 @@
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"approved": "Approved",
|
||||
"pendingApproval": "Pending approval",
|
||||
|
||||
@@ -139,11 +139,6 @@ function MediaRequestListTile({ widget }: MediaRequestListWidgetProps) {
|
||||
return (
|
||||
<ScrollArea h="100%">
|
||||
<Stack>
|
||||
{countPendingApproval > 0 ? (
|
||||
<Text>{t('pending', { countPendingApproval })}</Text>
|
||||
) : (
|
||||
<Text>{t('nonePending')}</Text>
|
||||
)}
|
||||
{sortedData.map((item, index) => (
|
||||
<Card radius="md" withBorder key={index}>
|
||||
<Flex wrap="wrap" justify="space-between" gap="md">
|
||||
|
||||
@@ -30,7 +30,7 @@ const definition = defineWidget({
|
||||
options: {
|
||||
rssFeedUrl: {
|
||||
type: 'multiple-text',
|
||||
defaultValue: [],
|
||||
defaultValue: ['https://noted.lol/rss'],
|
||||
},
|
||||
refreshInterval: {
|
||||
type: 'slider',
|
||||
@@ -92,7 +92,7 @@ function RssTile({ widget }: RssTileProps) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!data || isLoading) {
|
||||
if (isLoading) {
|
||||
return (
|
||||
<Center h="100%">
|
||||
<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 (
|
||||
<Center h="100%">
|
||||
<Stack align="center">
|
||||
<IconRss size={40} strokeWidth={1} />
|
||||
<Title order={6}>{t('descriptor.card.errors.general.title')}</Title>
|
||||
<IconRss size={25} strokeWidth={1} />
|
||||
<Title order={5}>{t('descriptor.card.errors.general.title')}</Title>
|
||||
<Text align="center">{t('descriptor.card.errors.general.text')}</Text>
|
||||
</Stack>
|
||||
<RefetchButton refetch={refetch} isFetching={isFetching} />
|
||||
@@ -246,7 +246,7 @@ const useStyles = createStyles(({ colorScheme, colors, radius, spacing }) => ({
|
||||
position: 'absolute',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
filter: colorScheme === 'dark' ? 'blur(30px)' : 'blur(15px)',
|
||||
filter: colorScheme === 'dark' ? 'blur(5px)' : 'blur(5px)',
|
||||
transform: 'scaleX(-1)',
|
||||
opacity: colorScheme === 'dark' ? 0.3 : 0.2,
|
||||
transition: 'ease-in-out 0.2s',
|
||||
|
||||
Reference in New Issue
Block a user