setSidebarOpen(false)}
+ pendingRequestsCount={requestResponse?.pending ?? 0}
+ openIssuesCount={issueResponse?.open ?? 0}
+ revalidateIssueCount={() => revalidateIssueCount()}
+ revalidateRequestsCount={() => revalidateRequestsCount()}
+ />
-
+ revalidateIssueCount()}
+ revalidateRequestsCount={() => revalidateRequestsCount()}
+ />
diff --git a/src/components/Login/LocalLogin.tsx b/src/components/Login/LocalLogin.tsx
index 2372bc7f0..74bc1e393 100644
--- a/src/components/Login/LocalLogin.tsx
+++ b/src/components/Login/LocalLogin.tsx
@@ -114,6 +114,9 @@ const LocalLogin = ({ revalidate }: LocalLoginProps) => {
autoComplete="current-password"
data-testid="password"
className="!bg-gray-700/80 placeholder:text-gray-400"
+ data-1pignore="false"
+ data-lpignore="false"
+ data-bwignore="false"
/>
diff --git a/src/components/RequestBlock/index.tsx b/src/components/RequestBlock/index.tsx
index b63a24dd6..7c7494de8 100644
--- a/src/components/RequestBlock/index.tsx
+++ b/src/components/RequestBlock/index.tsx
@@ -20,6 +20,7 @@ import type { MediaRequest } from '@server/entity/MediaRequest';
import Link from 'next/link';
import { useState } from 'react';
import { useIntl } from 'react-intl';
+import { mutate } from 'swr';
const messages = defineMessages('components.RequestBlock', {
seasons: '{seasonCount, plural, one {Season} other {Seasons}}',
@@ -59,6 +60,7 @@ const RequestBlock = ({ request, onUpdate }: RequestBlockProps) => {
if (onUpdate) {
onUpdate();
+ mutate('/api/v1/request/count');
}
setIsUpdating(false);
};
@@ -72,6 +74,7 @@ const RequestBlock = ({ request, onUpdate }: RequestBlockProps) => {
if (onUpdate) {
onUpdate();
+ mutate('/api/v1/request/count');
}
setIsUpdating(false);
diff --git a/src/components/RequestButton/index.tsx b/src/components/RequestButton/index.tsx
index cbe04fe3d..957a33904 100644
--- a/src/components/RequestButton/index.tsx
+++ b/src/components/RequestButton/index.tsx
@@ -15,6 +15,7 @@ import type Media from '@server/entity/Media';
import type { MediaRequest } from '@server/entity/MediaRequest';
import { useMemo, useState } from 'react';
import { useIntl } from 'react-intl';
+import { mutate } from 'swr';
const messages = defineMessages('components.RequestButton', {
viewrequest: 'View Request',
@@ -101,6 +102,7 @@ const RequestButton = ({
if (data) {
onUpdate();
+ mutate('/api/v1/request/count');
}
};
@@ -123,6 +125,7 @@ const RequestButton = ({
);
onUpdate();
+ mutate('/api/v1/request/count');
};
const buttons: ButtonOption[] = [];
diff --git a/src/components/RequestCard/index.tsx b/src/components/RequestCard/index.tsx
index f909d6171..e936d98e1 100644
--- a/src/components/RequestCard/index.tsx
+++ b/src/components/RequestCard/index.tsx
@@ -80,6 +80,7 @@ const RequestCardError = ({ requestData }: RequestCardErrorProps) => {
if (!res.ok) throw new Error();
mutate('/api/v1/media?filter=allavailable&take=20&sort=mediaAdded');
mutate('/api/v1/request?filter=all&take=10&sort=modified&skip=0');
+ mutate('/api/v1/request/count');
};
return (
@@ -271,6 +272,7 @@ const RequestCard = ({ request, onTitleData }: RequestCardProps) => {
if (data) {
revalidate();
+ mutate('/api/v1/request/count');
}
};
@@ -280,6 +282,7 @@ const RequestCard = ({ request, onTitleData }: RequestCardProps) => {
});
if (!res.ok) throw new Error();
mutate('/api/v1/request?filter=all&take=10&sort=modified&skip=0');
+ mutate('/api/v1/request/count');
};
const retryRequest = async () => {
diff --git a/src/components/RequestList/RequestItem/index.tsx b/src/components/RequestList/RequestItem/index.tsx
index 3d64941ed..5e764ecbb 100644
--- a/src/components/RequestList/RequestItem/index.tsx
+++ b/src/components/RequestList/RequestItem/index.tsx
@@ -27,7 +27,7 @@ import { useState } from 'react';
import { useInView } from 'react-intersection-observer';
import { FormattedRelativeTime, useIntl } from 'react-intl';
import { useToasts } from 'react-toast-notifications';
-import useSWR from 'swr';
+import useSWR, { mutate } from 'swr';
const messages = defineMessages('components.RequestList.RequestItem', {
seasons: '{seasonCount, plural, one {Season} other {Seasons}}',
@@ -69,6 +69,7 @@ const RequestItemError = ({
});
if (!res.ok) throw new Error();
revalidateList();
+ mutate('/api/v1/request/count');
};
const { mediaUrl: plexUrl, mediaUrl4k: plexUrl4k } = useDeepLinks({
@@ -334,6 +335,7 @@ const RequestItem = ({ request, revalidateList }: RequestItemProps) => {
if (data) {
revalidate();
+ mutate('/api/v1/request/count');
}
};
@@ -344,6 +346,7 @@ const RequestItem = ({ request, revalidateList }: RequestItemProps) => {
if (!res.ok) throw new Error();
revalidateList();
+ mutate('/api/v1/request/count');
};
const deleteMediaFile = async () => {
diff --git a/src/components/RequestModal/CollectionRequestModal.tsx b/src/components/RequestModal/CollectionRequestModal.tsx
index 4dd795241..0f83bea72 100644
--- a/src/components/RequestModal/CollectionRequestModal.tsx
+++ b/src/components/RequestModal/CollectionRequestModal.tsx
@@ -16,7 +16,7 @@ import type { Collection } from '@server/models/Collection';
import { useCallback, useEffect, useState } from 'react';
import { useIntl } from 'react-intl';
import { useToasts } from 'react-toast-notifications';
-import useSWR from 'swr';
+import useSWR, { mutate } from 'swr';
const messages = defineMessages('components.RequestModal', {
requestadmin: 'This request will be approved automatically.',
@@ -220,6 +220,7 @@ const CollectionRequestModal = ({
? MediaStatus.UNKNOWN
: MediaStatus.PARTIALLY_AVAILABLE
);
+ mutate('/api/v1/request/count');
}
addToast(
@@ -239,7 +240,16 @@ const CollectionRequestModal = ({
} finally {
setIsUpdating(false);
}
- }, [requestOverrides, data, onComplete, addToast, intl, selectedParts, is4k]);
+ }, [
+ requestOverrides,
+ data?.parts,
+ data?.name,
+ onComplete,
+ addToast,
+ intl,
+ selectedParts,
+ is4k,
+ ]);
const hasAutoApprove = hasPermission(
[
diff --git a/src/components/RequestModal/MovieRequestModal.tsx b/src/components/RequestModal/MovieRequestModal.tsx
index 85af7aef4..756385861 100644
--- a/src/components/RequestModal/MovieRequestModal.tsx
+++ b/src/components/RequestModal/MovieRequestModal.tsx
@@ -104,6 +104,7 @@ const MovieRequestModal = ({
if (!res.ok) throw new Error();
const mediaRequest: MediaRequest = await res.json();
mutate('/api/v1/request?filter=all&take=10&sort=modified&skip=0');
+ mutate('/api/v1/request/count');
if (mediaRequest) {
if (onComplete) {
@@ -138,7 +139,16 @@ const MovieRequestModal = ({
} finally {
setIsUpdating(false);
}
- }, [data, onComplete, addToast, requestOverrides, hasPermission, intl, is4k]);
+ }, [
+ requestOverrides,
+ data?.id,
+ data?.title,
+ is4k,
+ onComplete,
+ addToast,
+ intl,
+ hasPermission,
+ ]);
const cancelRequest = async () => {
setIsUpdating(true);
@@ -150,6 +160,7 @@ const MovieRequestModal = ({
if (!res.ok) throw new Error();
mutate('/api/v1/request?filter=all&take=10&sort=modified&skip=0');
+ mutate('/api/v1/request/count');
if (res.status === 204) {
if (onComplete) {
@@ -197,6 +208,7 @@ const MovieRequestModal = ({
if (!res.ok) throw new Error();
}
mutate('/api/v1/request?filter=all&take=10&sort=modified&skip=0');
+ mutate('/api/v1/request/count');
addToast(
diff --git a/src/components/RequestModal/TvRequestModal.tsx b/src/components/RequestModal/TvRequestModal.tsx
index 7480578da..0ef1afd1a 100644
--- a/src/components/RequestModal/TvRequestModal.tsx
+++ b/src/components/RequestModal/TvRequestModal.tsx
@@ -106,6 +106,7 @@ const TvRequestModal = ({
if (onUpdating) {
onUpdating(true);
+ mutate('/api/v1/request/count');
}
try {
@@ -141,6 +142,7 @@ const TvRequestModal = ({
if (!res.ok) throw new Error();
}
mutate('/api/v1/request?filter=all&take=10&sort=modified&skip=0');
+ mutate('/api/v1/request/count');
addToast(
@@ -189,6 +191,7 @@ const TvRequestModal = ({
if (onUpdating) {
onUpdating(true);
+ mutate('/api/v1/request/count');
}
try {
diff --git a/src/components/Settings/Notifications/NotificationsDiscord.tsx b/src/components/Settings/Notifications/NotificationsDiscord.tsx
index 82ac68403..d34edb649 100644
--- a/src/components/Settings/Notifications/NotificationsDiscord.tsx
+++ b/src/components/Settings/Notifications/NotificationsDiscord.tsx
@@ -238,6 +238,10 @@ const NotificationsDiscord = () => {
name="botUsername"
type="text"
placeholder={settings.currentSettings.applicationTitle}
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>
{errors.botUsername &&
diff --git a/src/components/Settings/Notifications/NotificationsEmail.tsx b/src/components/Settings/Notifications/NotificationsEmail.tsx
index fdb292d32..6daff08d7 100644
--- a/src/components/Settings/Notifications/NotificationsEmail.tsx
+++ b/src/components/Settings/Notifications/NotificationsEmail.tsx
@@ -104,7 +104,7 @@ const NotificationsEmail = () => {
otherwise: Yup.string().nullable(),
})
.matches(
- /-----BEGIN PGP PRIVATE KEY BLOCK-----.+-----END PGP PRIVATE KEY BLOCK-----/s,
+ /-----BEGIN PGP PRIVATE KEY BLOCK-----.+-----END PGP PRIVATE KEY BLOCK-----/,
intl.formatMessage(messages.validationPgpPrivateKey)
),
pgpPassword: Yup.string().when('pgpPrivateKey', {
@@ -295,6 +295,10 @@ const NotificationsEmail = () => {
name="emailFrom"
type="text"
inputMode="email"
+ autoComplete="off"
+ data-1pignore="true"
+ data-lpignore="true"
+ data-bwignore="true"
/>