-
-
-
-
-
Login/Signup is disabled or the server is down/under maintenance.
-
-
-
-
-
- login
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/index.html b/frontend/src/index.html
index c4ea32a36413..26f1c442e032 100644
--- a/frontend/src/index.html
+++ b/frontend/src/index.html
@@ -37,7 +37,9 @@
diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss
index b74444aebaae..7e047a112b5c 100644
--- a/frontend/src/styles/index.scss
+++ b/frontend/src/styles/index.scss
@@ -17,9 +17,9 @@
@layer custom-styles {
@import "buttons", "404", "ads", "account", "animations", "caret",
- "commandline", "core", "fonts", "inputs", "keymap", "login", "monkey",
- "popups", "scroll", "settings", "account-settings", "test", "loading",
- "friends", "media-queries";
+ "commandline", "core", "fonts", "inputs", "keymap", "monkey", "popups",
+ "scroll", "settings", "account-settings", "test", "loading", "friends",
+ "media-queries";
.chartCanvas {
width: 100% !important;
diff --git a/frontend/src/styles/login.scss b/frontend/src/styles/login.scss
deleted file mode 100644
index 6395672c210f..000000000000
--- a/frontend/src/styles/login.scss
+++ /dev/null
@@ -1,79 +0,0 @@
-.pageLogin {
- display: flex;
- grid-auto-flow: column;
- gap: 1rem;
- justify-content: space-around;
- align-items: center;
- height: 100%;
-
- .side {
- display: grid;
- gap: 0.5rem;
- justify-content: center;
- grid-template-columns: 1fr;
-
- input[type="email"],
- input[type="password"],
- input[type="text"] {
- width: 17rem;
- }
-
- .title {
- display: inline-flex;
- align-items: baseline;
- color: var(--sub-color);
- i {
- margin-right: 0.5em;
- }
- }
-
- &.login {
- #forgotPasswordButton {
- // height: 0;
- font-size: 0.75rem;
- // margin-left: -0.5em;
- justify-content: right;
- }
-
- .providers {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 1rem;
- }
-
- .orWithLine {
- // height: 2.25rem;
- display: grid;
- grid-template-columns: 1fr auto 1fr;
- align-items: center;
- gap: 1rem;
- .line {
- background: var(--sub-alt-color);
- width: 100%;
- height: 0.25em;
- border-radius: var(--roundness);
- }
- }
- .checkbox {
- height: 1.5rem;
- align-items: center;
- }
- }
- }
-
- form {
- display: grid;
- gap: 0.5rem;
- width: 100%;
- }
-
- .preloader {
- position: fixed;
- left: 50%;
- top: 50%;
- font-size: 2rem;
- transform: translate(-50%, -50%);
- color: var(--main-color);
- transition: 0.25s;
- }
-}
diff --git a/frontend/src/styles/tailwind.css b/frontend/src/styles/tailwind.css
index 42a8040255cd..68ae21a5ea8d 100644
--- a/frontend/src/styles/tailwind.css
+++ b/frontend/src/styles/tailwind.css
@@ -91,3 +91,14 @@
padding: 0;
}
}
+
+@layer utilities {
+ .autofill-fix:-webkit-autofill,
+ .autofill-fix:-webkit-autofill:hover,
+ .autofill-fix:-webkit-autofill:focus {
+ @apply border-none font-(--font) caret-(--text-color) font-[inherit];
+ outline: 0.15em solid var(--main-color);
+ -webkit-text-fill-color: var(--text-color);
+ -webkit-box-shadow: 0 0 0 1000000px var(--sub-alt-color) inset;
+ }
+}
diff --git a/frontend/src/ts/auth.tsx b/frontend/src/ts/auth.tsx
index e0dcd87ee26f..5cabc32d4adf 100644
--- a/frontend/src/ts/auth.tsx
+++ b/frontend/src/ts/auth.tsx
@@ -34,6 +34,15 @@ import {
} from "./stores/notifications";
import { createErrorMessage } from "./utils/error";
+export type AuthResult =
+ | {
+ success: true;
+ }
+ | {
+ success: false;
+ message: string;
+ };
+
export const gmailProvider = new GoogleAuthProvider();
export const githubProvider = new GithubAuthProvider();
@@ -156,15 +165,7 @@ export async function signIn(
email: string,
password: string,
rememberMe: boolean,
-): Promise<
- | {
- success: true;
- }
- | {
- success: false;
- message: string;
- }
-> {
+): Promise
{
if (!isAuthAvailable()) {
return { success: false, message: "Authentication uninitialized" };
}
@@ -182,15 +183,7 @@ export async function signIn(
async function signInWithProvider(
provider: AuthProvider,
rememberMe: boolean,
-): Promise<
- | {
- success: true;
- }
- | {
- success: false;
- message: string;
- }
-> {
+): Promise {
if (!isAuthAvailable()) {
return { success: false, message: "Authentication uninitialized" };
}
@@ -198,35 +191,20 @@ async function signInWithProvider(
const { error } = await tryCatch(signInWithPopup(provider, rememberMe));
if (error !== null) {
- if (error.message !== "") {
- showErrorNotification(error.message);
- }
return { success: false, message: error.message };
}
return { success: true };
}
-export async function signInWithGoogle(rememberMe: boolean): Promise<
- | {
- success: true;
- }
- | {
- success: false;
- message: string;
- }
-> {
+export async function signInWithGoogle(
+ rememberMe: boolean,
+): Promise {
return signInWithProvider(gmailProvider, rememberMe);
}
-export async function signInWithGitHub(rememberMe: boolean): Promise<
- | {
- success: true;
- }
- | {
- success: false;
- message: string;
- }
-> {
+export async function signInWithGitHub(
+ rememberMe: boolean,
+): Promise {
return signInWithProvider(githubProvider, rememberMe);
}
@@ -275,15 +253,7 @@ export async function signUp(
name: string,
email: string,
password: string,
-): Promise<
- | {
- success: true;
- }
- | {
- success: false;
- message: string;
- }
-> {
+): Promise {
if (!isAuthAvailable()) {
return { success: false, message: "Authentication uninitialized" };
}
diff --git a/frontend/src/ts/components/common/Balloon.tsx b/frontend/src/ts/components/common/Balloon.tsx
index 50d65efec039..8c122238950b 100644
--- a/frontend/src/ts/components/common/Balloon.tsx
+++ b/frontend/src/ts/components/common/Balloon.tsx
@@ -18,21 +18,20 @@ type Props = ParentProps &
};
export function buildBalloonHtmlProperties(
- props: BalloonProps | undefined,
+ options: BalloonProps | undefined,
): Record {
- // oxlint-disable-next-line solid/reactivity just a util - consumer is responsible for reactivity
- if (props === undefined || props.text === undefined || props.text === "") {
+ if (
+ options === undefined ||
+ options.text === undefined ||
+ options.text === ""
+ ) {
return {};
}
return {
- // oxlint-disable-next-line solid/reactivity just a util - consumer is responsible for reactivity
- "aria-label": props.text,
- // oxlint-disable-next-line solid/reactivity
- "data-balloon-pos": props.position ?? "up",
- // oxlint-disable-next-line solid/reactivity
- ...(props.break ? { "data-balloon-break": "" } : {}),
- // oxlint-disable-next-line solid/reactivity
- ...(props.length ? { "data-balloon-length": props.length } : {}),
+ "aria-label": options.text,
+ "data-balloon-pos": options.position ?? "up",
+ ...(options.break ? { "data-balloon-break": "" } : {}),
+ ...(options.length ? { "data-balloon-length": options.length } : {}),
};
}
diff --git a/frontend/src/ts/components/common/Button.tsx b/frontend/src/ts/components/common/Button.tsx
index 03c7aebb0725..545a4209a990 100644
--- a/frontend/src/ts/components/common/Button.tsx
+++ b/frontend/src/ts/components/common/Button.tsx
@@ -14,13 +14,15 @@ type BaseProps = {
balloon?: BalloonProps;
"router-link"?: true;
onClick?: () => void;
+ type?: HTMLButtonElement["type"];
onMouseEnter?: () => void;
onMouseLeave?: () => void;
dataset?: Record;
active?: boolean;
};
-type ButtonProps = BaseProps & {
+export type ButtonProps = BaseProps & {
+ type?: "button" | "submit" | "reset";
href?: never;
sameTarget?: true;
disabled?: boolean;
@@ -30,6 +32,7 @@ type AnchorProps = BaseProps & {
href: string;
// onClick?: never;
disabled?: never;
+ type?: never;
};
export function Button(props: ButtonProps | AnchorProps): JSXElement {
@@ -107,7 +110,8 @@ export function Button(props: ButtonProps | AnchorProps): JSXElement {
}
else={
+ }
+ else={
+