mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Save server url when switching between register and login pages
This commit is contained in:
parent
a2a3134523
commit
7c5de3c131
@ -22,6 +22,7 @@ import { forwardRef, ReactNode } from "react";
|
|||||||
import { Platform, Pressable, TextProps, View, PressableProps, Linking } from "react-native";
|
import { Platform, Pressable, TextProps, View, PressableProps, Linking } from "react-native";
|
||||||
import { TextLink, useLink } from "solito/link";
|
import { TextLink, useLink } from "solito/link";
|
||||||
import { useTheme, useYoshiki } from "yoshiki/native";
|
import { useTheme, useYoshiki } from "yoshiki/native";
|
||||||
|
import type { UrlObject } from "url";
|
||||||
import { alpha } from "./themes";
|
import { alpha } from "./themes";
|
||||||
|
|
||||||
export const A = ({
|
export const A = ({
|
||||||
@ -31,7 +32,7 @@ export const A = ({
|
|||||||
target,
|
target,
|
||||||
...props
|
...props
|
||||||
}: TextProps & {
|
}: TextProps & {
|
||||||
href?: string | null;
|
href?: string | UrlObject | null;
|
||||||
target?: string;
|
target?: string;
|
||||||
replace?: boolean;
|
replace?: boolean;
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
|
1
front/packages/primitives/src/types.d.ts
vendored
1
front/packages/primitives/src/types.d.ts
vendored
@ -34,7 +34,6 @@ declare module "react-native" {
|
|||||||
transitionDuration?: string;
|
transitionDuration?: string;
|
||||||
}
|
}
|
||||||
interface TextProps {
|
interface TextProps {
|
||||||
href?: string;
|
|
||||||
hrefAttrs?: {
|
hrefAttrs?: {
|
||||||
rel?: "noreferrer";
|
rel?: "noreferrer";
|
||||||
target?: string;
|
target?: string;
|
||||||
|
@ -87,7 +87,8 @@ export const LoginPage: QueryPage<{ apiUrl?: string; error?: string }> = ({
|
|||||||
/>
|
/>
|
||||||
<P>
|
<P>
|
||||||
<Trans i18nKey="login.or-register">
|
<Trans i18nKey="login.or-register">
|
||||||
Don’t have an account? <A href="/register">Register</A>.
|
Don’t have an account? <A href={{ pathname: "/register", query: { apiUrl } }}>Register</A>
|
||||||
|
.
|
||||||
</Trans>
|
</Trans>
|
||||||
</P>
|
</P>
|
||||||
</FormPage>
|
</FormPage>
|
||||||
|
@ -98,7 +98,7 @@ export const RegisterPage: QueryPage<{ apiUrl?: string }> = ({ apiUrl }) => {
|
|||||||
/>
|
/>
|
||||||
<P>
|
<P>
|
||||||
<Trans i18nKey="login.or-login">
|
<Trans i18nKey="login.or-login">
|
||||||
Have an account already? <A href="/login">Log in</A>.
|
Have an account already? <A href={{ pathname: "/login", query: { apiUrl } }}>Log in</A>.
|
||||||
</Trans>
|
</Trans>
|
||||||
</P>
|
</P>
|
||||||
</FormPage>
|
</FormPage>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user