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:
parent
acbff6e129
commit
446f9dd209
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user