1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-11-15 03:50:11 +01:00

refactor: run formatter

This commit is contained in:
Elias Schneider 2024-10-23 15:48:55 +02:00
parent acbff6e129
commit 446f9dd209
No known key found for this signature in database
GPG Key ID: 07E623B294202B6C
3 changed files with 12 additions and 9 deletions

View File

@ -274,7 +274,10 @@ export class AuthService {
URL.canParse(configuration.end_session_endpoint)
) {
const redirectURI = new URL(configuration.end_session_endpoint);
redirectURI.searchParams.append("post_logout_redirect_uri", this.config.get("general.appUrl"));
redirectURI.searchParams.append(
"post_logout_redirect_uri",
this.config.get("general.appUrl"),
);
redirectURI.searchParams.append("id_token_hint", idTokenHint);
redirectURI.searchParams.append(
"client_id",

View File

@ -43,7 +43,7 @@ function App({ Component, pageProps }: AppProps) {
const [route, setRoute] = useState<string>(pageProps.route);
const [configVariables, setConfigVariables] = useState<Config[]>(
pageProps.configVariables
pageProps.configVariables,
);
useEffect(() => {
@ -53,7 +53,7 @@ function App({ Component, pageProps }: AppProps) {
useEffect(() => {
const interval = setInterval(
async () => await authService.refreshAccessToken(),
2 * 60 * 1000 // 2 minutes
2 * 60 * 1000, // 2 minutes
);
return () => clearInterval(interval);
@ -180,7 +180,7 @@ App.getInitialProps = async ({ ctx }: { ctx: GetServerSidePropsContext }) => {
pageProps.route = ctx.req.url;
const requestLanguage = i18nUtil.getLanguageFromAcceptHeader(
ctx.req.headers["accept-language"]
ctx.req.headers["accept-language"],
);
pageProps.language = ctx.req.cookies["language"] ?? requestLanguage;

View File

@ -37,7 +37,7 @@ const Share = ({ shareId }: { shareId: string }) => {
modals,
t("share.error.visitor-limit-exceeded.title"),
t("share.error.visitor-limit-exceeded.description"),
"go-home"
"go-home",
);
} else if (error == "share_password_required") {
showEnterPasswordModal(modals, getShareToken);
@ -61,21 +61,21 @@ const Share = ({ shareId }: { shareId: string }) => {
modals,
t("share.error.removed.title"),
e.response.data.message,
"go-home"
"go-home",
);
} else {
showErrorModal(
modals,
t("share.error.not-found.title"),
t("share.error.not-found.description"),
"go-home"
"go-home",
);
}
} else if (e.response.status == 403 && error == "private_share") {
showErrorModal(
modals,
t("share.error.access-denied.title"),
t("share.error.access-denied.description")
t("share.error.access-denied.description"),
);
} else if (error == "share_password_required") {
showEnterPasswordModal(modals, getShareToken);
@ -86,7 +86,7 @@ const Share = ({ shareId }: { shareId: string }) => {
modals,
t("common.error"),
t("common.error.unknown"),
"go-home"
"go-home",
);
}
});