mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
- Introduced `MorePagesDialog` and `MorePagesContent` components to manage and display tasks for earning additional pages. - Integrated dialog state management using `morePagesDialogAtom`. - Updated `LayoutDataProvider` to include the new dialog and handle task completion logic. - Enhanced `PageUsageDisplay` to trigger the More Pages dialog, improving user interaction for page management.
24 lines
769 B
TypeScript
24 lines
769 B
TypeScript
"use client";
|
|
|
|
import { useAtom } from "jotai";
|
|
import { morePagesDialogAtom } from "@/atoms/settings/settings-dialog.atoms";
|
|
import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
|
|
import { MorePagesContent } from "./more-pages-content";
|
|
|
|
export function MorePagesDialog() {
|
|
const [open, setOpen] = useAtom(morePagesDialogAtom);
|
|
|
|
return (
|
|
<Dialog open={open} onOpenChange={setOpen}>
|
|
<DialogContent
|
|
className="select-none max-w-md w-[95vw] max-h-[90vh] flex flex-col p-0 gap-0 overflow-hidden"
|
|
onOpenAutoFocus={(e) => e.preventDefault()}
|
|
>
|
|
<DialogTitle className="sr-only">Get More Pages</DialogTitle>
|
|
<div className="flex-1 overflow-y-auto p-6">
|
|
<MorePagesContent />
|
|
</div>
|
|
</DialogContent>
|
|
</Dialog>
|
|
);
|
|
}
|