Wire ShareButton into list/note/calendar pages; fix nav and calendar select labels
- Add ShareButton to list detail, note editor, and calendar event panel - Add Settings gear icon to AppNav (core page not in module registry) - Fix calendar event dialog showing raw UUID: pass explicit children to SelectValue so labels display before SelectContent mounts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
39aa5704f9
commit
734268cb75
@@ -11,6 +11,7 @@ import { useMemo, useState, useTransition } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { ShareButton } from "@/components/share-button";
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
@@ -307,7 +308,9 @@ export function CalendarShell({
|
||||
}
|
||||
>
|
||||
<SelectTrigger aria-label={`${calendar.name} visibility`}>
|
||||
<SelectValue />
|
||||
<SelectValue>
|
||||
{calendar.visibility === "household" ? "Household" : "Private"}
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="household">Household</SelectItem>
|
||||
@@ -353,7 +356,9 @@ export function CalendarShell({
|
||||
}
|
||||
>
|
||||
<SelectTrigger aria-label="Calendar visibility">
|
||||
<SelectValue />
|
||||
<SelectValue>
|
||||
{calendarVisibility === "household" ? "Household" : "Private"}
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="household">Household</SelectItem>
|
||||
@@ -431,7 +436,9 @@ export function CalendarShell({
|
||||
}
|
||||
>
|
||||
<SelectTrigger id="event-calendar">
|
||||
<SelectValue />
|
||||
<SelectValue>
|
||||
{calendarRows.find((c) => c.id === selectedEvent.calendarId)?.name ?? "Select a calendar"}
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{calendarRows.map((calendar) => (
|
||||
@@ -483,16 +490,21 @@ export function CalendarShell({
|
||||
}
|
||||
/>
|
||||
<div className="flex items-center justify-between gap-2 pt-2">
|
||||
<div>
|
||||
<div className="flex gap-2">
|
||||
{selectedEvent.id && (
|
||||
<Button variant="destructive" onClick={removeSelectedEvent}>
|
||||
Delete event
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
<Button onClick={saveSelectedEvent} disabled={!selectedEvent.title || isPending}>
|
||||
Save event
|
||||
</Button>
|
||||
<div className="flex gap-2">
|
||||
{selectedEvent.id && (
|
||||
<ShareButton entityType="calendar.event" entityId={selectedEvent.id} />
|
||||
)}
|
||||
<Button onClick={saveSelectedEvent} disabled={!selectedEvent.title || isPending}>
|
||||
Save event
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user