...
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-12-11 21:36:45 +08:00
parent 65aacc1582
commit b69e168558
41 changed files with 763 additions and 189 deletions

View File

@@ -1,5 +1,5 @@
import LightButton from "@/components/buttons/LightButton";
import Input from "@/components/Input";
import LightButton from "@/components/ui/buttons/LightButton";
import Input from "@/components/ui/Input";
import { X } from "lucide-react";
import { useRef } from "react";
import { useTranslations } from "next-intl";
@@ -83,13 +83,19 @@ export default function AddTextPairModal({
</div>
<div>
{t("locale1")}
<Input ref={input3Ref} className="w-full"
placeholder="en-US"></Input>
<Input
ref={input3Ref}
className="w-full"
placeholder="en-US"
></Input>
</div>
<div>
{t("locale2")}
<Input ref={input4Ref} className="w-full"
placeholder="zh-CN"></Input>
<Input
ref={input4Ref}
className="w-full"
placeholder="zh-CN"
></Input>
</div>
</div>
<LightButton onClick={handleAdd}>{t("add")}</LightButton>

View File

@@ -1,10 +1,10 @@
"use client";
import { ArrowLeft, Plus } from "lucide-react";
import { Center } from "@/components/Center";
import { Center } from "@/components/common/Center";
import { useEffect, useState } from "react";
import { redirect, useRouter } from "next/navigation";
import Container from "@/components/cards/Container";
import Container from "@/components/ui/Container";
import {
createPair,
deletePairById,
@@ -12,7 +12,7 @@ import {
} from "@/lib/server/services/pairService";
import AddTextPairModal from "./AddTextPairModal";
import TextPairCard from "./TextPairCard";
import LightButton from "@/components/buttons/LightButton";
import LightButton from "@/components/ui/buttons/LightButton";
import { useTranslations } from "next-intl";
export interface TextPair {

View File

@@ -1,5 +1,5 @@
import LightButton from "@/components/buttons/LightButton";
import Input from "@/components/Input";
import LightButton from "@/components/ui/buttons/LightButton";
import Input from "@/components/ui/Input";
import { X } from "lucide-react";
import { useRef } from "react";
import { PairUpdateInput } from "../../../../generated/prisma/models";

View File

@@ -16,7 +16,7 @@ export default async function FoldersPage({
if (!folder_id) {
redirect("/folders");
}
if (!session) redirect(`/login?redirect=/folders/${folder_id}`);
if (!session) redirect(`/auth?redirect=/folders/${folder_id}`);
if ((await getUserIdByFolderId(Number(folder_id))) !== session.user.id) {
return <p>{t("unauthorized")}</p>;
}