diff --git a/src/accounts/SignIn.css b/src/accounts/SignIn.css deleted file mode 100644 index 11f467a..0000000 --- a/src/accounts/SignIn.css +++ /dev/null @@ -1,27 +0,0 @@ -.SignIn { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - width: 448px; - - @media (max-width: 600px) { - & { - position: static; - height: 100vh; - width: 100%; - transform: none; - overflow: auto; - } - } - - >.key-content { - height: 100%; - - >form { - display: flex; - flex-flow: column; - gap: 16px; - } - } -} \ No newline at end of file diff --git a/src/accounts/SignIn.tsx b/src/accounts/SignIn.tsx index 628e490..c8699d2 100644 --- a/src/accounts/SignIn.tsx +++ b/src/accounts/SignIn.tsx @@ -18,7 +18,6 @@ import { createRestAPIClient } from "masto"; import { getOrRegisterApp } from "./stores"; import { useSearchParams } from "@solidjs/router"; import { $settings } from "../settings/stores"; -import "./SignIn.css"; type ErrorParams = { error: string; @@ -37,6 +36,13 @@ const SignIn: Component = () => { const [targetSiteTitle, setTargetSiteTitle] = createSignal(""); useDocumentTitle("Sign In"); + css` + form { + display: flex; + flex-flow: column; + gap: 16px; + } + `; const serverUrl = () => { const url = rawServerUrl(); @@ -115,19 +121,19 @@ const SignIn: Component = () => { }; return ( -
+

Authorization is failed.

{params.errorDescription}

- Please try again later. If the problem persists, you can ask for + Please try again later. If the problem persist, you can seek for help from the server administrator.

{
-
+ ); }; diff --git a/src/platform/StackedRouter.tsx b/src/platform/StackedRouter.tsx index df3d522..f79da9a 100644 --- a/src/platform/StackedRouter.tsx +++ b/src/platform/StackedRouter.tsx @@ -1,4 +1,5 @@ import { + Router, type RouterProps, type StaticRouterProps, createRouter, @@ -15,6 +16,9 @@ import { useContext, onCleanup, type Accessor, + children, + createSignal, + createRoot, } from "solid-js"; import { createStore, unwrap } from "solid-js/store"; import "./StackedRouter.css"; @@ -574,11 +578,7 @@ const StackedRouter: Component = (oprops) => { createRenderEffect(() => untrack(() => { if (stack.length === 0) { - const parts = [window.location.pathname] as string[]; - if (window.location.search) { - parts.push(window.location.search); - } - pushFrame(parts.join(""), { + pushFrame(window.location.pathname, { replace: "all", }); } diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index f783e7a..188a61d 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -163,7 +163,7 @@ const Settings: Component = () => { }>, () => import(`./i18n/generic.json`), ); - const { pop, push } = useNavigator(); + const { pop } = useNavigator(); const settings$ = useStore($settings); const { needRefresh } = useServiceWorker(); const dateFnLocale = useDateFnLocale(); @@ -172,10 +172,6 @@ const Settings: Component = () => { const doSignOut = (acct: Account) => { signOut((a) => a.site === acct.site && a.accessToken === acct.accessToken); - - if (profiles().length == 0) { - push("/accounts/sign-in", { replace: "all" }); - } }; css`