accounts/SignIn: various visual improvement
This commit is contained in:
parent
a7bca9bd67
commit
771de51228
2 changed files with 32 additions and 11 deletions
27
src/accounts/SignIn.css
Normal file
27
src/accounts/SignIn.css
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import { createRestAPIClient } from "masto";
|
||||||
import { getOrRegisterApp } from "./stores";
|
import { getOrRegisterApp } from "./stores";
|
||||||
import { useSearchParams } from "@solidjs/router";
|
import { useSearchParams } from "@solidjs/router";
|
||||||
import { $settings } from "../settings/stores";
|
import { $settings } from "../settings/stores";
|
||||||
|
import "./SignIn.css";
|
||||||
|
|
||||||
type ErrorParams = {
|
type ErrorParams = {
|
||||||
error: string;
|
error: string;
|
||||||
|
@ -36,13 +37,6 @@ const SignIn: Component = () => {
|
||||||
const [targetSiteTitle, setTargetSiteTitle] = createSignal("");
|
const [targetSiteTitle, setTargetSiteTitle] = createSignal("");
|
||||||
|
|
||||||
useDocumentTitle("Sign In");
|
useDocumentTitle("Sign In");
|
||||||
css`
|
|
||||||
form {
|
|
||||||
display: flex;
|
|
||||||
flex-flow: column;
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const serverUrl = () => {
|
const serverUrl = () => {
|
||||||
const url = rawServerUrl();
|
const url = rawServerUrl();
|
||||||
|
@ -121,19 +115,19 @@ const SignIn: Component = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={cards.layoutCentered}>
|
<main class="SignIn">
|
||||||
<Show when={params.error || params.errorDescription}>
|
<Show when={params.error || params.errorDescription}>
|
||||||
<div class={cards.card} style={{ "margin-bottom": "20px" }}>
|
<div class={cards.card} style={{ "margin-bottom": "20px" }}>
|
||||||
<p>Authorization is failed.</p>
|
<p>Authorization is failed.</p>
|
||||||
<p>{params.errorDescription}</p>
|
<p>{params.errorDescription}</p>
|
||||||
<p>
|
<p>
|
||||||
Please try again later. If the problem persist, you can seek for
|
Please try again later. If the problem persists, you can ask for
|
||||||
help from the server administrator.
|
help from the server administrator.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<div
|
<div
|
||||||
class={/*once*/ cards.card}
|
class={`${cards.card} key-content`}
|
||||||
aria-busy={currentState() !== "inactive" ? "true" : "false"}
|
aria-busy={currentState() !== "inactive" ? "true" : "false"}
|
||||||
aria-describedby={
|
aria-describedby={
|
||||||
currentState() !== "inactive" ? progressId : undefined
|
currentState() !== "inactive" ? progressId : undefined
|
||||||
|
@ -169,7 +163,7 @@ const SignIn: Component = () => {
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</main>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue