- {dayNumber}
+
+
+
+
+ {eventIds.map((eventId) => )}
+ {sessionIds.map((sessionId) => )}
+
-
- {eventIds?.map((rowId) => )}
+
+ );
+}
+
+function TabContentCalendarDayEvents({ eventId }: { eventId: string }) {
+ const event = persisted.UI.useRow("events", eventId, persisted.STORE_ID);
+
+ return (
+
);
}
-function TabContentCalendarDayEvent({ rowId }: { rowId: string }) {
- const event = persisted.UI.useRow("events", rowId, persisted.STORE_ID);
- return
{event.title}
;
+function TabContentCalendarDaySessions({ sessionId }: { sessionId: string }) {
+ const session = persisted.UI.useRow("sessions", sessionId, persisted.STORE_ID);
+ return (
+
+
+
+ {session.title}
+
+
+ );
}
function TabContentFolder({ tab }: { tab: Tab }) {
diff --git a/apps/desktop2/src/routes/app/main/_layout.index.tsx b/apps/desktop2/src/routes/app/main/_layout.index.tsx
index 9ac5067f8..cb026cfb3 100644
--- a/apps/desktop2/src/routes/app/main/_layout.index.tsx
+++ b/apps/desktop2/src/routes/app/main/_layout.index.tsx
@@ -1,8 +1,8 @@
import { createFileRoute } from "@tanstack/react-router";
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@hypr/ui/components/ui/resizable";
-import { useLeftSidebar, useRightPanel } from "@hypr/utils/contexts";
-import { Chat } from "../../../components/chat";
+import { useLeftSidebar } from "@hypr/utils/contexts";
+import { FloatingChatButton } from "../../../components/floating-chat-button";
import { LeftSidebar } from "../../../components/main/left-sidebar";
import { MainContent, MainHeader } from "../../../components/main/main-area";
@@ -11,7 +11,6 @@ export const Route = createFileRoute("/app/main/_layout/")({
});
function Component() {
- const { isExpanded: isRightPanelExpanded } = useRightPanel();
const { isExpanded: isLeftPanelExpanded } = useLeftSidebar();
return (
@@ -27,21 +26,10 @@ function Component() {
- {isRightPanelExpanded
- ? (
-
-
-
-
-
-
-
-
-
- )
- : }
+
+
);
}
diff --git a/apps/desktop2/src/store/tinybase/persisted.ts b/apps/desktop2/src/store/tinybase/persisted.ts
index e762fb30b..255d56d6c 100644
--- a/apps/desktop2/src/store/tinybase/persisted.ts
+++ b/apps/desktop2/src/store/tinybase/persisted.ts
@@ -371,6 +371,21 @@ export const StoreComponent = () => {
(a, b) => a.localeCompare(b),
(a, b) => String(a).localeCompare(String(b)),
)
+ .setIndexDefinition(
+ INDEXES.sessionByDateWithoutEvent,
+ "sessions",
+ (getCell) => {
+ if (getCell("event_id")) {
+ return "";
+ }
+
+ const d = new Date(getCell("created_at")!);
+ return format(d, "yyyy-MM-dd");
+ },
+ "created_at",
+ (a, b) => a.localeCompare(b),
+ (a, b) => String(a).localeCompare(String(b)),
+ )
.setIndexDefinition(INDEXES.tagsByName, "tags", "name")
.setIndexDefinition(INDEXES.tagSessionsBySession, "mapping_tag_session", "session_id")
.setIndexDefinition(INDEXES.tagSessionsByTag, "mapping_tag_session", "tag_id")
@@ -412,6 +427,7 @@ export const INDEXES = {
sessionsByFolder: "sessionsByFolder",
eventsByCalendar: "eventsByCalendar",
eventsByDate: "eventsByDate",
+ sessionByDateWithoutEvent: "sessionByDateWithoutEvent",
tagsByName: "tagsByName",
tagSessionsBySession: "tagSessionsBySession",
tagSessionsByTag: "tagSessionsByTag",
diff --git a/packages/ui/src/components/block/calendar-structure.tsx b/packages/ui/src/components/block/calendar-structure.tsx
new file mode 100644
index 000000000..7db80fc81
--- /dev/null
+++ b/packages/ui/src/components/block/calendar-structure.tsx
@@ -0,0 +1,71 @@
+import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
+import { Button } from "../ui/button";
+
+interface CalendarStructureProps {
+ monthLabel: string;
+ weekDays: string[];
+ startDayOfWeek: number;
+ onPreviousMonth: () => void;
+ onNextMonth: () => void;
+ onToday: () => void;
+ children: React.ReactNode;
+}
+
+export const CalendarStructure = ({
+ monthLabel,
+ weekDays,
+ startDayOfWeek,
+ onPreviousMonth,
+ onNextMonth,
+ onToday,
+ children,
+}: CalendarStructureProps) => {
+ return (
+
+
+
{monthLabel}
+
+
+
+
+
+
+
+
+
+ {weekDays.map((day) => (
+
+ {day}
+
+ ))}
+
+
+ {Array.from({ length: startDayOfWeek }).map((_, i) => (
+
+ ))}
+ {children}
+
+
+ );
+};