mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix: archive session
This commit is contained in:
@@ -74,7 +74,7 @@ export function SessionHeader(props: {
|
||||
const [archiveOpen, setArchiveOpen] = useState(false)
|
||||
const [deleteOpen, setDeleteOpen] = useState(false)
|
||||
|
||||
const { abortSession, renameSession, deleteSession, isPending } = useSessionActions(api, session.id)
|
||||
const { archiveSession, renameSession, deleteSession, isPending } = useSessionActions(api, session.id)
|
||||
|
||||
const handleDelete = async () => {
|
||||
await deleteSession()
|
||||
@@ -168,7 +168,7 @@ export function SessionHeader(props: {
|
||||
description={`Are you sure you want to archive "${title}"? This will disconnect the active session.`}
|
||||
confirmLabel="Archive"
|
||||
confirmingLabel="Archiving..."
|
||||
onConfirm={abortSession}
|
||||
onConfirm={archiveSession}
|
||||
isPending={isPending}
|
||||
destructive
|
||||
/>
|
||||
|
||||
@@ -177,7 +177,7 @@ function SessionItem(props: {
|
||||
const [archiveOpen, setArchiveOpen] = useState(false)
|
||||
const [deleteOpen, setDeleteOpen] = useState(false)
|
||||
|
||||
const { abortSession, renameSession, deleteSession, isPending } = useSessionActions(api, s.id)
|
||||
const { archiveSession, renameSession, deleteSession, isPending } = useSessionActions(api, s.id)
|
||||
|
||||
const longPressHandlers = useLongPress({
|
||||
onLongPress: () => {
|
||||
@@ -273,7 +273,7 @@ function SessionItem(props: {
|
||||
description={`Are you sure you want to archive "${sessionName}"? This will disconnect the active session.`}
|
||||
confirmLabel="Archive"
|
||||
confirmingLabel="Archiving..."
|
||||
onConfirm={abortSession}
|
||||
onConfirm={archiveSession}
|
||||
isPending={isPending}
|
||||
destructive
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user