chore(i18n): update English and Turkish translations for "editProfile" and "unclaimedUser"
This commit is contained in:
+2
-1
@@ -408,7 +408,8 @@
|
||||
"noPromptsOwner": "You haven't created any prompts yet",
|
||||
"createFirstPrompt": "Create your first prompt",
|
||||
"upvotesReceived": "upvotes received",
|
||||
"editProfile": "Edit Profile"
|
||||
"editProfile": "Edit Profile",
|
||||
"unclaimedUser": "Unclaimed"
|
||||
},
|
||||
"subscription": {
|
||||
"subscribe": "Subscribe",
|
||||
|
||||
+2
-1
@@ -408,7 +408,8 @@
|
||||
"noPromptsOwner": "Henüz prompt oluşturmadınız",
|
||||
"createFirstPrompt": "İlk promptunuzu oluşturun",
|
||||
"upvotesReceived": "beğeni aldı",
|
||||
"editProfile": "Profili Düzenle"
|
||||
"editProfile": "Profili Düzenle",
|
||||
"unclaimedUser": "Sahipsiz"
|
||||
},
|
||||
"subscription": {
|
||||
"subscribe": "Abone Ol",
|
||||
|
||||
@@ -72,6 +72,7 @@ export default async function UserProfilePage({ params, searchParams }: UserProf
|
||||
id: true,
|
||||
name: true,
|
||||
username: true,
|
||||
email: true,
|
||||
avatar: true,
|
||||
role: true,
|
||||
createdAt: true,
|
||||
@@ -90,6 +91,7 @@ export default async function UserProfilePage({ params, searchParams }: UserProf
|
||||
const page = parseInt(pageParam || "1");
|
||||
const perPage = 12;
|
||||
const isOwner = session?.user?.id === user.id;
|
||||
const isUnclaimed = user.email?.endsWith("@unclaimed.prompts.chat") ?? false;
|
||||
|
||||
// Build where clause - show private prompts only if owner
|
||||
const where = {
|
||||
@@ -235,7 +237,14 @@ export default async function UserProfilePage({ params, searchParams }: UserProf
|
||||
<Badge variant="default" className="text-xs">Admin</Badge>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-muted-foreground text-sm mb-3">@{user.username}</p>
|
||||
<p className="text-muted-foreground text-sm mb-3 flex items-center gap-2">
|
||||
@{user.username}
|
||||
{isUnclaimed && (
|
||||
<Badge variant="outline" className="text-[10px] text-amber-600 border-amber-500/30 bg-amber-500/10">
|
||||
{t("unclaimedUser")}
|
||||
</Badge>
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
{isOwner && (
|
||||
<Button variant="outline" size="sm" asChild>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { getConfig } from "@/lib/config";
|
||||
|
||||
const registerSchema = z.object({
|
||||
name: z.string().min(2),
|
||||
username: z.string().min(3).regex(/^[a-zA-Z0-9_]+$/),
|
||||
username: z.string().min(1).regex(/^[a-zA-Z0-9_]+$/),
|
||||
email: z.string().email(),
|
||||
password: z.string().min(6),
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ const updateProfileSchema = z.object({
|
||||
name: z.string().min(1).max(100),
|
||||
username: z
|
||||
.string()
|
||||
.min(3)
|
||||
.min(1)
|
||||
.max(30)
|
||||
.regex(/^[a-zA-Z0-9_]+$/),
|
||||
avatar: z.string().url().optional().or(z.literal("")),
|
||||
|
||||
@@ -21,7 +21,7 @@ import { toast } from "sonner";
|
||||
|
||||
const registerSchema = z.object({
|
||||
name: z.string().min(2, "Name must be at least 2 characters"),
|
||||
username: z.string().min(3, "Username must be at least 3 characters").regex(/^[a-zA-Z0-9_]+$/, "Username can only contain letters, numbers, and underscores"),
|
||||
username: z.string().min(1, "Username is required").regex(/^[a-zA-Z0-9_]+$/, "Username can only contain letters, numbers, and underscores"),
|
||||
email: z.string().email("Invalid email address"),
|
||||
password: z.string().min(6, "Password must be at least 6 characters"),
|
||||
confirmPassword: z.string(),
|
||||
|
||||
@@ -13,6 +13,7 @@ import { prettifyJson } from "@/lib/format";
|
||||
import { PinButton } from "@/components/prompts/pin-button";
|
||||
import { RunPromptButton } from "@/components/prompts/run-prompt-button";
|
||||
import { VariableFillModal, hasVariables, renderContentWithVariables } from "@/components/prompts/variable-fill-modal";
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||
|
||||
export interface PromptCardProps {
|
||||
prompt: {
|
||||
@@ -205,7 +206,11 @@ export function PromptCard({ prompt, showPinButton = false, isPinned = false }:
|
||||
|
||||
{/* Footer */}
|
||||
<div className="flex items-center justify-between text-[11px] text-muted-foreground pt-2 border-t mt-auto">
|
||||
<Link href={`/@${prompt.author.username}`} className="hover:text-foreground">
|
||||
<Link href={`/@${prompt.author.username}`} className="hover:text-foreground flex items-center gap-1.5">
|
||||
<Avatar className="h-4 w-4">
|
||||
<AvatarImage src={prompt.author.avatar || undefined} alt={prompt.author.username} />
|
||||
<AvatarFallback className="text-[8px]">{prompt.author.username[0]?.toUpperCase()}</AvatarFallback>
|
||||
</Avatar>
|
||||
@{prompt.author.username}{prompt.contributorCount ? ` +${prompt.contributorCount}` : ""}
|
||||
</Link>
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -18,7 +18,7 @@ const profileSchema = z.object({
|
||||
name: z.string().min(1, "Name is required").max(100),
|
||||
username: z
|
||||
.string()
|
||||
.min(3, "Username must be at least 3 characters")
|
||||
.min(1, "Username is required")
|
||||
.max(30)
|
||||
.regex(/^[a-zA-Z0-9_]+$/, "Username can only contain letters, numbers, and underscores"),
|
||||
avatar: z.string().url().optional().or(z.literal("")),
|
||||
|
||||
Reference in New Issue
Block a user