mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 20:24:27 -04:00
Create shell.nix
This commit is contained in:
parent
ea986917af
commit
d67bd62393
@ -17,6 +17,7 @@ services:
|
|||||||
- postgres
|
- postgres
|
||||||
volumes:
|
volumes:
|
||||||
- kyoo:/var/lib/kyoo
|
- kyoo:/var/lib/kyoo
|
||||||
|
- ./cache:/var/lib/kyoo/cached
|
||||||
- ./video:/video
|
- ./video:/video
|
||||||
front:
|
front:
|
||||||
build: ./front
|
build: ./front
|
||||||
|
@ -24,6 +24,7 @@ import { useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Platform } from "react-native";
|
import { Platform } from "react-native";
|
||||||
import { Trans } from "react-i18next";
|
import { Trans } from "react-i18next";
|
||||||
|
import { useRouter } from 'solito/router'
|
||||||
import { percent, px, useYoshiki } from "yoshiki/native";
|
import { percent, px, useYoshiki } from "yoshiki/native";
|
||||||
import { DefaultLayout } from "../layout";
|
import { DefaultLayout } from "../layout";
|
||||||
import { FormPage } from "./form";
|
import { FormPage } from "./form";
|
||||||
@ -34,6 +35,7 @@ export const LoginPage: QueryPage = () => {
|
|||||||
const [password, setPassword] = useState("");
|
const [password, setPassword] = useState("");
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { css } = useYoshiki();
|
const { css } = useYoshiki();
|
||||||
|
|
||||||
@ -64,6 +66,7 @@ export const LoginPage: QueryPage = () => {
|
|||||||
onPress={async () => {
|
onPress={async () => {
|
||||||
const error = await loginFunc("login", {username, password});
|
const error = await loginFunc("login", {username, password});
|
||||||
setError(error);
|
setError(error);
|
||||||
|
if (!error) router.push("/");
|
||||||
}}
|
}}
|
||||||
{...css({
|
{...css({
|
||||||
m: ts(1),
|
m: ts(1),
|
||||||
|
@ -24,6 +24,7 @@ import { useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Platform } from "react-native";
|
import { Platform } from "react-native";
|
||||||
import { Trans } from "react-i18next";
|
import { Trans } from "react-i18next";
|
||||||
|
import { useRouter } from 'solito/router'
|
||||||
import { percent, px, useYoshiki } from "yoshiki/native";
|
import { percent, px, useYoshiki } from "yoshiki/native";
|
||||||
import { DefaultLayout } from "../layout";
|
import { DefaultLayout } from "../layout";
|
||||||
import { FormPage } from "./form";
|
import { FormPage } from "./form";
|
||||||
@ -36,6 +37,7 @@ export const RegisterPage: QueryPage = () => {
|
|||||||
const [confirm, setConfirm] = useState("");
|
const [confirm, setConfirm] = useState("");
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { css } = useYoshiki();
|
const { css } = useYoshiki();
|
||||||
|
|
||||||
@ -79,6 +81,7 @@ export const RegisterPage: QueryPage = () => {
|
|||||||
onPress={async () => {
|
onPress={async () => {
|
||||||
const error = await loginFunc("register", { email, username, password });
|
const error = await loginFunc("register", { email, username, password });
|
||||||
setError(error);
|
setError(error);
|
||||||
|
if (!error) router.push("/");
|
||||||
}}
|
}}
|
||||||
{...css({
|
{...css({
|
||||||
m: ts(1),
|
m: ts(1),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user