Fix copies
This commit is contained in:
parent
cb5b292e74
commit
5965e2423b
4 changed files with 89 additions and 87 deletions
|
|
@ -488,7 +488,7 @@ export function MainNavigation({ isCollapsed }: { isCollapsed: boolean }) {
|
|||
Plan Freemium
|
||||
</p>
|
||||
<p className="text-xs mt-0.5 text-blue-700 dark:text-blue-300">
|
||||
Débloquez des tablos illimités en passant au plan Starter.
|
||||
Passer au plan Starter pour profiter de tablos illimités.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -218,12 +218,12 @@ export function SubscriptionCard() {
|
|||
<Button
|
||||
onClick={() =>
|
||||
createCheckout({
|
||||
priceId: STANDARD_MONTHLY_PRICE_ID,
|
||||
priceId,
|
||||
successUrl: `${window.location.origin}/settings?success=true`,
|
||||
cancelUrl: `${window.location.origin}/settings?canceled=true`,
|
||||
})
|
||||
}
|
||||
disabled={checkoutPending || !STANDARD_MONTHLY_PRICE_ID}
|
||||
disabled={checkoutPending || !priceId}
|
||||
className="w-full gap-2 bg-gradient-to-r from-purple-500 to-blue-500 hover:from-purple-600 hover:to-blue-600"
|
||||
>
|
||||
{checkoutPending ? (
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ vi.mock("../hooks/tablos", () => ({
|
|||
useDeleteTablo: () => ({
|
||||
mutate: vi.fn(),
|
||||
}),
|
||||
useCanCreateTablo: () => true,
|
||||
}));
|
||||
|
||||
vi.mock("../hooks/tabloData", () => ({
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ import { Text, TypographyH3, TypographyMuted } from "@xtablo/ui/components/typog
|
|||
import {
|
||||
CheckCircle2,
|
||||
Clock,
|
||||
Eye,
|
||||
LayoutGrid,
|
||||
List,
|
||||
ListTodo,
|
||||
MessageSquare,
|
||||
Plus,
|
||||
Shield,
|
||||
Trash2,
|
||||
|
|
@ -98,17 +98,12 @@ export const TabloPage = () => {
|
|||
|
||||
const menuItems = [
|
||||
{
|
||||
name: "Conversations",
|
||||
name: "Discussions",
|
||||
action: (tabloId: string) => navigate(`/chat/${tabloId}`),
|
||||
},
|
||||
{
|
||||
name: "Planning",
|
||||
action: (tabloId: string) => navigate(`/planning/${tabloId}`),
|
||||
},
|
||||
{
|
||||
name: "Notes",
|
||||
action: (tabloId: string) => navigate(`/tablo/${tabloId}/notes`),
|
||||
isDisabled: true,
|
||||
name: "Membres",
|
||||
action: (tabloId: string) => navigate(`/tablos/${tabloId}?section=members`),
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -357,22 +352,6 @@ export const TabloPage = () => {
|
|||
</div>
|
||||
)}
|
||||
|
||||
{/* Trash Icon - Only show for admins */}
|
||||
{isAdmin && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon-sm"
|
||||
className="absolute top-2 right-2 p-1.5 rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-200 z-10 text-red-600 hover:text-red-700 hover:bg-red-50 border-red-200"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleDeleteTablo(tablo.id);
|
||||
}}
|
||||
title={t("pages:tablo.contextMenu.delete")}
|
||||
>
|
||||
<Trash2 className="w-4 h-4" />
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{/* Read-only indicator for non-admins */}
|
||||
{!isAdmin && (
|
||||
<div className="absolute top-2 right-2 p-1.5 bg-muted text-muted-foreground rounded-full opacity-80">
|
||||
|
|
@ -383,7 +362,7 @@ export const TabloPage = () => {
|
|||
|
||||
{/* Content */}
|
||||
<div className="p-3">
|
||||
<div className="space-y-1">
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-1">
|
||||
<h3 className="text-foreground font-semibold text-base truncate">{tablo.name}</h3>
|
||||
{/* Status badge */}
|
||||
|
|
@ -399,6 +378,45 @@ export const TabloPage = () => {
|
|||
<Shield className="w-3 h-3" />
|
||||
<span>{getUserRole(tablo)}</span>
|
||||
</div>
|
||||
{/* Action buttons */}
|
||||
<div className="flex items-center gap-1 pt-1">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon-sm"
|
||||
className="p-1.5"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
navigate(`/chat/${tablo.id}`);
|
||||
}}
|
||||
title="Discussions"
|
||||
>
|
||||
<MessageSquare className="w-4 h-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon-sm"
|
||||
className="p-1.5"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
navigate(`/tablos/${tablo.id}?section=members`);
|
||||
}}
|
||||
title="Members"
|
||||
>
|
||||
<Users className="w-4 h-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon-sm"
|
||||
className="p-1.5 text-destructive hover:text-destructive"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleDeleteTablo(tablo.id);
|
||||
}}
|
||||
title={t("pages:tablo.contextMenu.delete")}
|
||||
>
|
||||
<Trash2 className="w-4 h-4" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -414,20 +432,18 @@ export const TabloPage = () => {
|
|||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{/* Regular menu items - always show */}
|
||||
{menuItems
|
||||
.filter((item) => !item.isDisabled)
|
||||
.map((item, index) => (
|
||||
<button
|
||||
key={index}
|
||||
className="w-full px-4 py-2 text-left text-sm text-foreground hover:bg-muted"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
item.action(tablo.id);
|
||||
}}
|
||||
>
|
||||
<span>{item.name}</span>
|
||||
</button>
|
||||
))}
|
||||
{menuItems.map((item, index) => (
|
||||
<button
|
||||
key={index}
|
||||
className="w-full px-4 py-2 text-left text-sm text-foreground hover:bg-muted"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
item.action(tablo.id);
|
||||
}}
|
||||
>
|
||||
<span>{item.name}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
@ -507,9 +523,9 @@ export const TabloPage = () => {
|
|||
e.stopPropagation();
|
||||
navigate(`/chat/${tablo.id}`);
|
||||
}}
|
||||
title="Conversations"
|
||||
title="Discussions"
|
||||
>
|
||||
<Users className="w-5 h-5 color-foreground" />
|
||||
<MessageSquare className="w-5 h-5 color-foreground" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
|
|
@ -517,37 +533,24 @@ export const TabloPage = () => {
|
|||
className="p-2"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
navigate(`/planning/${tablo.id}`);
|
||||
navigate(`/tablos/${tablo.id}?section=members`);
|
||||
}}
|
||||
title="Planning"
|
||||
title="Members"
|
||||
>
|
||||
<Clock className="w-5 h-5" />
|
||||
<Users className="w-5 h-5" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
className="p-2 text-destructive hover:text-destructive"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleDeleteTablo(tablo.id);
|
||||
}}
|
||||
title={t("pages:tablo.contextMenu.delete")}
|
||||
>
|
||||
<Trash2 className="w-5 h-5" />
|
||||
</Button>
|
||||
{isAdmin && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
className="p-2 text-destructive hover:text-destructive"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleDeleteTablo(tablo.id);
|
||||
}}
|
||||
title={t("pages:tablo.contextMenu.delete")}
|
||||
>
|
||||
<Trash2 className="w-5 h-5" />
|
||||
</Button>
|
||||
)}
|
||||
{!isAdmin && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
disabled
|
||||
className="p-2 text-muted-foreground hover:text-muted-foreground"
|
||||
title="Lecture seule"
|
||||
>
|
||||
<Eye className="w-5 h-5" />
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -562,20 +565,18 @@ export const TabloPage = () => {
|
|||
}}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{menuItems
|
||||
.filter((item) => !item.isDisabled)
|
||||
.map((item, index) => (
|
||||
<button
|
||||
key={index}
|
||||
className="w-full px-4 py-2 text-left text-sm text-foreground hover:bg-muted"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
item.action(tablo.id);
|
||||
}}
|
||||
>
|
||||
<span>{item.name}</span>
|
||||
</button>
|
||||
))}
|
||||
{menuItems.map((item, index) => (
|
||||
<button
|
||||
key={index}
|
||||
className="w-full px-4 py-2 text-left text-sm text-foreground hover:bg-muted"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
item.action(tablo.id);
|
||||
}}
|
||||
>
|
||||
<span>{item.name}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue