mirror of
https://github.com/beilunyang/moemail.git
synced 2026-05-06 20:02:52 +08:00
feat: Add email deletion functionality
This commit is contained in:
@@ -1,11 +1,49 @@
|
|||||||
import { NextResponse } from "next/server"
|
import { NextResponse } from "next/server"
|
||||||
|
import { auth } from "@/lib/auth"
|
||||||
import { createDb } from "@/lib/db"
|
import { createDb } from "@/lib/db"
|
||||||
import { messages } from "@/lib/schema"
|
import { emails, messages } from "@/lib/schema"
|
||||||
import { and, eq, lt, or, sql } from "drizzle-orm"
|
import { eq, and, lt, or, sql } from "drizzle-orm"
|
||||||
import { encodeCursor, decodeCursor } from "@/lib/cursor"
|
import { encodeCursor, decodeCursor } from "@/lib/cursor"
|
||||||
|
|
||||||
export const runtime = "edge"
|
export const runtime = "edge"
|
||||||
|
|
||||||
|
export async function DELETE(
|
||||||
|
_request: Request,
|
||||||
|
{ params }: { params: { id: string } }
|
||||||
|
) {
|
||||||
|
const db = createDb()
|
||||||
|
const session = await auth()
|
||||||
|
|
||||||
|
try {
|
||||||
|
const email = await db.query.emails.findFirst({
|
||||||
|
where: and(
|
||||||
|
eq(emails.id, params.id),
|
||||||
|
eq(emails.userId, session!.user!.id!)
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!email) {
|
||||||
|
return NextResponse.json(
|
||||||
|
{ error: "邮箱不存在或无权限删除" },
|
||||||
|
{ status: 403 }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
await db.delete(messages)
|
||||||
|
.where(eq(messages.emailId, params.id))
|
||||||
|
|
||||||
|
await db.delete(emails)
|
||||||
|
.where(eq(emails.id, params.id))
|
||||||
|
|
||||||
|
return NextResponse.json({ success: true })
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Failed to delete email:', error)
|
||||||
|
return NextResponse.json(
|
||||||
|
{ error: "删除邮箱失败" },
|
||||||
|
{ status: 500 }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const PAGE_SIZE = 20
|
const PAGE_SIZE = 20
|
||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
|
|||||||
@@ -3,11 +3,22 @@
|
|||||||
import { useEffect, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
import { useSession } from "next-auth/react"
|
import { useSession } from "next-auth/react"
|
||||||
import { CreateDialog } from "./create-dialog"
|
import { CreateDialog } from "./create-dialog"
|
||||||
import { Mail, RefreshCw } from "lucide-react"
|
import { Mail, RefreshCw, Trash2 } from "lucide-react"
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
import { useThrottle } from "@/hooks/use-throttle"
|
import { useThrottle } from "@/hooks/use-throttle"
|
||||||
import { EMAIL_CONFIG } from "@/config"
|
import { EMAIL_CONFIG } from "@/config"
|
||||||
|
import { useToast } from "@/components/ui/use-toast"
|
||||||
|
import {
|
||||||
|
AlertDialog,
|
||||||
|
AlertDialogAction,
|
||||||
|
AlertDialogCancel,
|
||||||
|
AlertDialogContent,
|
||||||
|
AlertDialogDescription,
|
||||||
|
AlertDialogFooter,
|
||||||
|
AlertDialogHeader,
|
||||||
|
AlertDialogTitle,
|
||||||
|
} from "@/components/ui/alert-dialog"
|
||||||
|
|
||||||
interface Email {
|
interface Email {
|
||||||
id: string
|
id: string
|
||||||
@@ -17,7 +28,7 @@ interface Email {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface EmailListProps {
|
interface EmailListProps {
|
||||||
onEmailSelect: (email: Email) => void
|
onEmailSelect: (email: Email | null) => void
|
||||||
selectedEmailId?: string
|
selectedEmailId?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,6 +46,8 @@ export function EmailList({ onEmailSelect, selectedEmailId }: EmailListProps) {
|
|||||||
const [nextCursor, setNextCursor] = useState<string | null>(null)
|
const [nextCursor, setNextCursor] = useState<string | null>(null)
|
||||||
const [loadingMore, setLoadingMore] = useState(false)
|
const [loadingMore, setLoadingMore] = useState(false)
|
||||||
const [total, setTotal] = useState(0)
|
const [total, setTotal] = useState(0)
|
||||||
|
const [emailToDelete, setEmailToDelete] = useState<Email | null>(null)
|
||||||
|
const { toast } = useToast()
|
||||||
|
|
||||||
const fetchEmails = async (cursor?: string) => {
|
const fetchEmails = async (cursor?: string) => {
|
||||||
try {
|
try {
|
||||||
@@ -99,68 +112,135 @@ export function EmailList({ onEmailSelect, selectedEmailId }: EmailListProps) {
|
|||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [session])
|
}, [session])
|
||||||
|
|
||||||
|
const handleDelete = async (email: Email) => {
|
||||||
|
try {
|
||||||
|
const response = await fetch(`/api/emails/${email.id}`, {
|
||||||
|
method: "DELETE"
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
const data = await response.json()
|
||||||
|
toast({
|
||||||
|
title: "错误",
|
||||||
|
description: (data as { error: string }).error,
|
||||||
|
variant: "destructive"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
setEmails(prev => prev.filter(e => e.id !== email.id))
|
||||||
|
setTotal(prev => prev - 1)
|
||||||
|
|
||||||
|
toast({
|
||||||
|
title: "成功",
|
||||||
|
description: "邮箱已删除"
|
||||||
|
})
|
||||||
|
|
||||||
|
if (selectedEmailId === email.id) {
|
||||||
|
onEmailSelect(null)
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
toast({
|
||||||
|
title: "错误",
|
||||||
|
description: "删除邮箱失败",
|
||||||
|
variant: "destructive"
|
||||||
|
})
|
||||||
|
} finally {
|
||||||
|
setEmailToDelete(null)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!session) return null
|
if (!session) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full">
|
<>
|
||||||
<div className="p-2 flex justify-between items-center border-b border-primary/20">
|
<div className="flex flex-col h-full">
|
||||||
<div className="flex items-center gap-2">
|
<div className="p-2 flex justify-between items-center border-b border-primary/20">
|
||||||
<Button
|
<div className="flex items-center gap-2">
|
||||||
variant="ghost"
|
<Button
|
||||||
size="icon"
|
variant="ghost"
|
||||||
onClick={handleRefresh}
|
size="icon"
|
||||||
disabled={refreshing}
|
onClick={handleRefresh}
|
||||||
className={cn("h-8 w-8", refreshing && "animate-spin")}
|
disabled={refreshing}
|
||||||
>
|
className={cn("h-8 w-8", refreshing && "animate-spin")}
|
||||||
<RefreshCw className="h-4 w-4" />
|
>
|
||||||
</Button>
|
<RefreshCw className="h-4 w-4" />
|
||||||
<span className="text-xs text-gray-500">
|
</Button>
|
||||||
{total}/{EMAIL_CONFIG.MAX_ACTIVE_EMAILS} 个邮箱
|
<span className="text-xs text-gray-500">
|
||||||
</span>
|
{total}/{EMAIL_CONFIG.MAX_ACTIVE_EMAILS} 个邮箱
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<CreateDialog onEmailCreated={handleRefresh} />
|
||||||
</div>
|
</div>
|
||||||
<CreateDialog onEmailCreated={handleRefresh} />
|
|
||||||
</div>
|
<div className="flex-1 overflow-auto p-2" onScroll={handleScroll}>
|
||||||
|
{loading ? (
|
||||||
<div className="flex-1 overflow-auto p-2" onScroll={handleScroll}>
|
<div className="text-center text-sm text-gray-500">加载中...</div>
|
||||||
{loading ? (
|
) : emails.length > 0 ? (
|
||||||
<div className="text-center text-sm text-gray-500">加载中...</div>
|
<div className="space-y-1">
|
||||||
) : emails.length > 0 ? (
|
{emails.map(email => (
|
||||||
<div className="space-y-1">
|
<div
|
||||||
{emails.map(email => (
|
key={email.id}
|
||||||
<div
|
className={cn("flex items-center gap-2 p-2 rounded cursor-pointer text-sm group",
|
||||||
key={email.id}
|
"hover:bg-primary/5",
|
||||||
onClick={() => onEmailSelect(email)}
|
selectedEmailId === email.id && "bg-primary/10"
|
||||||
className={cn(
|
)}
|
||||||
"flex items-center gap-2 p-2 rounded cursor-pointer text-sm",
|
onClick={() => onEmailSelect(email)}
|
||||||
"hover:bg-primary/5",
|
>
|
||||||
selectedEmailId === email.id && "bg-primary/10"
|
<Mail className="h-4 w-4 text-primary/60" />
|
||||||
)}
|
<div className="truncate flex-1">
|
||||||
>
|
<div className="font-medium truncate">{email.address}</div>
|
||||||
<Mail className="w-4 h-4 text-primary/60" />
|
<div className="text-xs text-gray-500">
|
||||||
<div className="truncate flex-1">
|
{new Date(email.expiresAt).getFullYear() === 9999 ? (
|
||||||
<div className="font-medium truncate">{email.address}</div>
|
"永久有效"
|
||||||
<div className="text-xs text-gray-500">
|
) : (
|
||||||
{new Date(email.expiresAt).getFullYear() === 9999 ? (
|
`过期时间: ${new Date(email.expiresAt).toLocaleString()}`
|
||||||
"永久有效"
|
)}
|
||||||
) : (
|
</div>
|
||||||
`过期时间: ${new Date(email.expiresAt).toLocaleString()}`
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon"
|
||||||
|
className="opacity-0 group-hover:opacity-100 h-8 w-8"
|
||||||
|
onClick={() => setEmailToDelete(email)}
|
||||||
|
>
|
||||||
|
<Trash2 className="h-4 w-4 text-destructive" />
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
))}
|
||||||
))}
|
{loadingMore && (
|
||||||
{loadingMore && (
|
<div className="text-center text-sm text-gray-500 py-2">
|
||||||
<div className="text-center text-sm text-gray-500 py-2">
|
加载更多...
|
||||||
加载更多...
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
</div>
|
||||||
</div>
|
) : (
|
||||||
) : (
|
<div className="text-center text-sm text-gray-500">
|
||||||
<div className="text-center text-sm text-gray-500">
|
还没有邮箱,创建一个吧!
|
||||||
还没有邮箱,创建一个吧!
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<AlertDialog open={!!emailToDelete} onOpenChange={() => setEmailToDelete(null)}>
|
||||||
|
<AlertDialogContent>
|
||||||
|
<AlertDialogHeader>
|
||||||
|
<AlertDialogTitle>确认删除</AlertDialogTitle>
|
||||||
|
<AlertDialogDescription>
|
||||||
|
确定要删除邮箱 {emailToDelete?.address} 吗?此操作将同时删除该邮箱中的所有邮件,且不可恢复。
|
||||||
|
</AlertDialogDescription>
|
||||||
|
</AlertDialogHeader>
|
||||||
|
<AlertDialogFooter>
|
||||||
|
<AlertDialogCancel>取消</AlertDialogCancel>
|
||||||
|
<AlertDialogAction
|
||||||
|
className="bg-destructive hover:bg-destructive/90"
|
||||||
|
onClick={() => emailToDelete && handleDelete(emailToDelete)}
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</AlertDialogAction>
|
||||||
|
</AlertDialogFooter>
|
||||||
|
</AlertDialogContent>
|
||||||
|
</AlertDialog>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
137
app/components/ui/alert-dialog.tsx
Normal file
137
app/components/ui/alert-dialog.tsx
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
"use client"
|
||||||
|
|
||||||
|
import * as React from "react"
|
||||||
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
||||||
|
import { cn } from "@/lib/utils"
|
||||||
|
import { buttonVariants } from "@/components/ui/button"
|
||||||
|
|
||||||
|
const AlertDialog = AlertDialogPrimitive.Root
|
||||||
|
const AlertDialogTrigger = AlertDialogPrimitive.Trigger
|
||||||
|
|
||||||
|
const AlertDialogPortal = AlertDialogPrimitive.Portal
|
||||||
|
const AlertDialogOverlay = React.forwardRef<
|
||||||
|
React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
|
||||||
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
||||||
|
>(({ className, ...props }, ref) => (
|
||||||
|
<AlertDialogPrimitive.Overlay
|
||||||
|
className={cn(
|
||||||
|
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
ref={ref}
|
||||||
|
/>
|
||||||
|
))
|
||||||
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName
|
||||||
|
|
||||||
|
const AlertDialogContent = React.forwardRef<
|
||||||
|
React.ElementRef<typeof AlertDialogPrimitive.Content>,
|
||||||
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
|
||||||
|
>(({ className, ...props }, ref) => (
|
||||||
|
<AlertDialogPortal>
|
||||||
|
<AlertDialogOverlay />
|
||||||
|
<AlertDialogPrimitive.Content
|
||||||
|
ref={ref}
|
||||||
|
className={cn(
|
||||||
|
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
</AlertDialogPortal>
|
||||||
|
))
|
||||||
|
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName
|
||||||
|
|
||||||
|
const AlertDialogHeader = ({
|
||||||
|
className,
|
||||||
|
...props
|
||||||
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
||||||
|
<div
|
||||||
|
className={cn(
|
||||||
|
"flex flex-col space-y-2 text-center sm:text-left",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
AlertDialogHeader.displayName = "AlertDialogHeader"
|
||||||
|
|
||||||
|
const AlertDialogFooter = ({
|
||||||
|
className,
|
||||||
|
...props
|
||||||
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
||||||
|
<div
|
||||||
|
className={cn(
|
||||||
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
AlertDialogFooter.displayName = "AlertDialogFooter"
|
||||||
|
|
||||||
|
const AlertDialogTitle = React.forwardRef<
|
||||||
|
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
||||||
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
||||||
|
>(({ className, ...props }, ref) => (
|
||||||
|
<AlertDialogPrimitive.Title
|
||||||
|
ref={ref}
|
||||||
|
className={cn("text-lg font-semibold", className)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
))
|
||||||
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName
|
||||||
|
|
||||||
|
const AlertDialogDescription = React.forwardRef<
|
||||||
|
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
||||||
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
||||||
|
>(({ className, ...props }, ref) => (
|
||||||
|
<AlertDialogPrimitive.Description
|
||||||
|
ref={ref}
|
||||||
|
className={cn("text-sm text-muted-foreground", className)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
))
|
||||||
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName
|
||||||
|
|
||||||
|
const AlertDialogAction = React.forwardRef<
|
||||||
|
React.ElementRef<typeof AlertDialogPrimitive.Action>,
|
||||||
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
|
||||||
|
>(({ className, ...props }, ref) => (
|
||||||
|
<AlertDialogPrimitive.Action
|
||||||
|
ref={ref}
|
||||||
|
className={cn(buttonVariants(), className)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
))
|
||||||
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName
|
||||||
|
|
||||||
|
const AlertDialogCancel = React.forwardRef<
|
||||||
|
React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
|
||||||
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
|
||||||
|
>(({ className, ...props }, ref) => (
|
||||||
|
<AlertDialogPrimitive.Cancel
|
||||||
|
ref={ref}
|
||||||
|
className={cn(
|
||||||
|
buttonVariants({ variant: "outline" }),
|
||||||
|
"mt-2 sm:mt-0",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
))
|
||||||
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName
|
||||||
|
|
||||||
|
export {
|
||||||
|
AlertDialog,
|
||||||
|
AlertDialogPortal,
|
||||||
|
AlertDialogOverlay,
|
||||||
|
AlertDialogTrigger,
|
||||||
|
AlertDialogContent,
|
||||||
|
AlertDialogHeader,
|
||||||
|
AlertDialogFooter,
|
||||||
|
AlertDialogTitle,
|
||||||
|
AlertDialogDescription,
|
||||||
|
AlertDialogAction,
|
||||||
|
AlertDialogCancel,
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
|
const DOMAINS = typeof process !== 'undefined' && process.env?.NEXT_PUBLIC_EMAIL_DOMAIN ? process.env.NEXT_PUBLIC_EMAIL_DOMAIN : 'moemail.app'
|
||||||
|
|
||||||
export const EMAIL_CONFIG = {
|
export const EMAIL_CONFIG = {
|
||||||
MAX_ACTIVE_EMAILS: 30, // Maximum number of active emails
|
MAX_ACTIVE_EMAILS: 30, // Maximum number of active emails
|
||||||
POLL_INTERVAL: 10_000, // Polling interval in milliseconds
|
POLL_INTERVAL: 10_000, // Polling interval in milliseconds
|
||||||
DOMAINS: (process.env.NEXT_PUBLIC_EMAIL_DOMAIN || 'moemail.app').split(','), // Email domains array
|
DOMAINS: DOMAINS.split(','), // Email domains array
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type EmailConfig = typeof EMAIL_CONFIG
|
export type EmailConfig = typeof EMAIL_CONFIG
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@auth/drizzle-adapter": "^1.7.4",
|
"@auth/drizzle-adapter": "^1.7.4",
|
||||||
"@cloudflare/next-on-pages": "^1.13.6",
|
"@cloudflare/next-on-pages": "^1.13.6",
|
||||||
|
"@radix-ui/react-alert-dialog": "^1.1.4",
|
||||||
"@radix-ui/react-dialog": "^1.1.2",
|
"@radix-ui/react-dialog": "^1.1.2",
|
||||||
"@radix-ui/react-label": "^2.1.0",
|
"@radix-ui/react-label": "^2.1.0",
|
||||||
"@radix-ui/react-radio-group": "^1.2.1",
|
"@radix-ui/react-radio-group": "^1.2.1",
|
||||||
|
|||||||
65
pnpm-lock.yaml
generated
65
pnpm-lock.yaml
generated
@@ -14,6 +14,9 @@ importers:
|
|||||||
'@cloudflare/next-on-pages':
|
'@cloudflare/next-on-pages':
|
||||||
specifier: ^1.13.6
|
specifier: ^1.13.6
|
||||||
version: 1.13.6(@cloudflare/workers-types@4.20241205.0)(vercel@39.1.1)(wrangler@3.93.0(@cloudflare/workers-types@4.20241205.0))
|
version: 1.13.6(@cloudflare/workers-types@4.20241205.0)(vercel@39.1.1)(wrangler@3.93.0(@cloudflare/workers-types@4.20241205.0))
|
||||||
|
'@radix-ui/react-alert-dialog':
|
||||||
|
specifier: ^1.1.4
|
||||||
|
version: 1.1.4(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||||
'@radix-ui/react-dialog':
|
'@radix-ui/react-dialog':
|
||||||
specifier: ^1.1.2
|
specifier: ^1.1.2
|
||||||
version: 1.1.2(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
version: 1.1.2(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||||
@@ -1587,6 +1590,19 @@ packages:
|
|||||||
'@radix-ui/primitive@1.1.1':
|
'@radix-ui/primitive@1.1.1':
|
||||||
resolution: {integrity: sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==}
|
resolution: {integrity: sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==}
|
||||||
|
|
||||||
|
'@radix-ui/react-alert-dialog@1.1.4':
|
||||||
|
resolution: {integrity: sha512-A6Kh23qZDLy3PSU4bh2UJZznOrUdHImIXqF8YtUa6CN73f8EOO9XlXSCd9IHyPvIquTaa/kwaSWzZTtUvgXVGw==}
|
||||||
|
peerDependencies:
|
||||||
|
'@types/react': '*'
|
||||||
|
'@types/react-dom': '*'
|
||||||
|
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
|
||||||
|
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@types/react':
|
||||||
|
optional: true
|
||||||
|
'@types/react-dom':
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@radix-ui/react-arrow@1.1.1':
|
'@radix-ui/react-arrow@1.1.1':
|
||||||
resolution: {integrity: sha512-NaVpZfmv8SKeZbn4ijN2V3jlHA9ngBG16VnIIm22nUR0Yk8KUALyBxT3KYEUnNuch9sTE8UTsS3whzBgKOL30w==}
|
resolution: {integrity: sha512-NaVpZfmv8SKeZbn4ijN2V3jlHA9ngBG16VnIIm22nUR0Yk8KUALyBxT3KYEUnNuch9sTE8UTsS3whzBgKOL30w==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -1675,6 +1691,19 @@ packages:
|
|||||||
'@types/react-dom':
|
'@types/react-dom':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
'@radix-ui/react-dialog@1.1.4':
|
||||||
|
resolution: {integrity: sha512-Ur7EV1IwQGCyaAuyDRiOLA5JIUZxELJljF+MbM/2NC0BYwfuRrbpS30BiQBJrVruscgUkieKkqXYDOoByaxIoA==}
|
||||||
|
peerDependencies:
|
||||||
|
'@types/react': '*'
|
||||||
|
'@types/react-dom': '*'
|
||||||
|
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
|
||||||
|
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@types/react':
|
||||||
|
optional: true
|
||||||
|
'@types/react-dom':
|
||||||
|
optional: true
|
||||||
|
|
||||||
'@radix-ui/react-direction@1.1.0':
|
'@radix-ui/react-direction@1.1.0':
|
||||||
resolution: {integrity: sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==}
|
resolution: {integrity: sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -6805,6 +6834,20 @@ snapshots:
|
|||||||
|
|
||||||
'@radix-ui/primitive@1.1.1': {}
|
'@radix-ui/primitive@1.1.1': {}
|
||||||
|
|
||||||
|
'@radix-ui/react-alert-dialog@1.1.4(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)':
|
||||||
|
dependencies:
|
||||||
|
'@radix-ui/primitive': 1.1.1
|
||||||
|
'@radix-ui/react-compose-refs': 1.1.1(@types/react@18.3.14)(react@19.0.0)
|
||||||
|
'@radix-ui/react-context': 1.1.1(@types/react@18.3.14)(react@19.0.0)
|
||||||
|
'@radix-ui/react-dialog': 1.1.4(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||||
|
'@radix-ui/react-primitive': 2.0.1(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||||
|
'@radix-ui/react-slot': 1.1.1(@types/react@18.3.14)(react@19.0.0)
|
||||||
|
react: 19.0.0
|
||||||
|
react-dom: 19.0.0(react@19.0.0)
|
||||||
|
optionalDependencies:
|
||||||
|
'@types/react': 18.3.14
|
||||||
|
'@types/react-dom': 18.3.2
|
||||||
|
|
||||||
'@radix-ui/react-arrow@1.1.1(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)':
|
'@radix-ui/react-arrow@1.1.1(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@radix-ui/react-primitive': 2.0.1(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
'@radix-ui/react-primitive': 2.0.1(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||||
@@ -6884,6 +6927,28 @@ snapshots:
|
|||||||
'@types/react': 18.3.14
|
'@types/react': 18.3.14
|
||||||
'@types/react-dom': 18.3.2
|
'@types/react-dom': 18.3.2
|
||||||
|
|
||||||
|
'@radix-ui/react-dialog@1.1.4(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)':
|
||||||
|
dependencies:
|
||||||
|
'@radix-ui/primitive': 1.1.1
|
||||||
|
'@radix-ui/react-compose-refs': 1.1.1(@types/react@18.3.14)(react@19.0.0)
|
||||||
|
'@radix-ui/react-context': 1.1.1(@types/react@18.3.14)(react@19.0.0)
|
||||||
|
'@radix-ui/react-dismissable-layer': 1.1.3(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||||
|
'@radix-ui/react-focus-guards': 1.1.1(@types/react@18.3.14)(react@19.0.0)
|
||||||
|
'@radix-ui/react-focus-scope': 1.1.1(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||||
|
'@radix-ui/react-id': 1.1.0(@types/react@18.3.14)(react@19.0.0)
|
||||||
|
'@radix-ui/react-portal': 1.1.3(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||||
|
'@radix-ui/react-presence': 1.1.2(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||||
|
'@radix-ui/react-primitive': 2.0.1(@types/react-dom@18.3.2)(@types/react@18.3.14)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||||
|
'@radix-ui/react-slot': 1.1.1(@types/react@18.3.14)(react@19.0.0)
|
||||||
|
'@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.14)(react@19.0.0)
|
||||||
|
aria-hidden: 1.2.4
|
||||||
|
react: 19.0.0
|
||||||
|
react-dom: 19.0.0(react@19.0.0)
|
||||||
|
react-remove-scroll: 2.6.2(@types/react@18.3.14)(react@19.0.0)
|
||||||
|
optionalDependencies:
|
||||||
|
'@types/react': 18.3.14
|
||||||
|
'@types/react-dom': 18.3.2
|
||||||
|
|
||||||
'@radix-ui/react-direction@1.1.0(@types/react@18.3.14)(react@19.0.0)':
|
'@radix-ui/react-direction@1.1.0(@types/react@18.3.14)(react@19.0.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
react: 19.0.0
|
react: 19.0.0
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ interface Env {
|
|||||||
|
|
||||||
const CLEANUP_CONFIG = {
|
const CLEANUP_CONFIG = {
|
||||||
// Whether to delete expired emails
|
// Whether to delete expired emails
|
||||||
DELETE_EXPIRED_EMAILS: false,
|
DELETE_EXPIRED_EMAILS: true,
|
||||||
|
|
||||||
// Whether to delete messages from expired emails if not deleting the emails themselves
|
// Whether to delete messages from expired emails if not deleting the emails themselves
|
||||||
DELETE_MESSAGES_FROM_EXPIRED: true,
|
DELETE_MESSAGES_FROM_EXPIRED: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user