project edit name change
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
|||||||
ChevronDown,
|
ChevronDown,
|
||||||
Clock3,
|
Clock3,
|
||||||
Moon,
|
Moon,
|
||||||
Pencil,
|
|
||||||
RotateCcw,
|
RotateCcw,
|
||||||
Save,
|
Save,
|
||||||
Sun,
|
Sun,
|
||||||
@@ -513,17 +512,6 @@ export function AppSidebar() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getPanelTitle = () => {
|
|
||||||
switch (activePanel) {
|
|
||||||
case "site":
|
|
||||||
return "Site";
|
|
||||||
case "settings":
|
|
||||||
return "Settings";
|
|
||||||
default:
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Sidebar className={cn("dark text-white ")} variant="floating">
|
<Sidebar className={cn("dark text-white ")} variant="floating">
|
||||||
<div className="flex h-full">
|
<div className="flex h-full">
|
||||||
@@ -547,15 +535,12 @@ export function AppSidebar() {
|
|||||||
className="w-full bg-transparent text-foreground outline-none border-b border-primary/50 focus:border-primary rounded-none px-0 py-0 m-0 h-7 font-semibold text-lg"
|
className="w-full bg-transparent text-foreground outline-none border-b border-primary/50 focus:border-primary rounded-none px-0 py-0 m-0 h-7 font-semibold text-lg"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div
|
<h1
|
||||||
className="flex items-center gap-2 group/title cursor-pointer w-full h-7 border-b border-transparent"
|
className="font-semibold text-lg truncate cursor-text w-full h-7 border-b border-transparent hover:border-border/50 transition-colors leading-7"
|
||||||
onClick={() => setIsEditingTitle(true)}
|
onClick={() => setIsEditingTitle(true)}
|
||||||
>
|
>
|
||||||
<h1 className="font-semibold text-lg truncate">
|
{activeProject?.name || "Untitled Project"}
|
||||||
{activeProject?.name || "Untitled Project"}
|
</h1>
|
||||||
</h1>
|
|
||||||
<Pencil className="w-3.5 h-3.5 opacity-0 group-hover/title:opacity-100 transition-opacity text-muted-foreground shrink-0" />
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className={cn("shrink-0 flex items-center gap-1 transition-all duration-200", isEditingTitle && "hidden")}>
|
<div className={cn("shrink-0 flex items-center gap-1 transition-all duration-200", isEditingTitle && "hidden")}>
|
||||||
@@ -569,14 +554,11 @@ export function AppSidebar() {
|
|||||||
onClick={() => runVersionAction("save")}
|
onClick={() => runVersionAction("save")}
|
||||||
disabled={isQuickSaveDisabled}
|
disabled={isQuickSaveDisabled}
|
||||||
className={cn(
|
className={cn(
|
||||||
"group/save-trigger relative inline-flex h-full min-w-0 items-center border-r border-border/50 px-1.5 text-[10px] transition-colors",
|
"group/save-trigger relative inline-flex h-full w-16 items-center border-r border-border/50 px-1.5 text-[10px] transition-colors",
|
||||||
isQuickSaveDisabled
|
isQuickSaveDisabled
|
||||||
? "cursor-not-allowed opacity-50"
|
? "cursor-not-allowed opacity-50"
|
||||||
: "hover:bg-black/30",
|
: "hover:bg-black/30",
|
||||||
)}
|
)}
|
||||||
style={{
|
|
||||||
width: "clamp(48px, calc(var(--sidebar-width) - 16.5rem), 80px)",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<span className="pointer-events-none inline-flex min-w-0 items-center gap-1 transition-opacity group-hover/save-trigger:opacity-0">
|
<span className="pointer-events-none inline-flex min-w-0 items-center gap-1 transition-opacity group-hover/save-trigger:opacity-0">
|
||||||
<Clock3 className="h-3 w-3 shrink-0 text-muted-foreground" />
|
<Clock3 className="h-3 w-3 shrink-0 text-muted-foreground" />
|
||||||
@@ -770,9 +752,6 @@ export function AppSidebar() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span className="text-[10px] font-medium text-muted-foreground uppercase tracking-wider">
|
|
||||||
{getPanelTitle()}
|
|
||||||
</span>
|
|
||||||
</SidebarHeader>
|
</SidebarHeader>
|
||||||
|
|
||||||
<SidebarContent
|
<SidebarContent
|
||||||
|
|||||||
Reference in New Issue
Block a user