mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-26 14:58:55 +08:00
feat(core): simple recovery history ui poc (#5033)
Simple recovery history UI poc. What's missing - [x] e2e All biz logic should be done, excluding complete ui details. - [ ] offline prompt - [ ] history timeline - [ ] page ui https://github.com/toeverything/AFFiNE/assets/584378/fc3f6a48-ff7f-4265-b9f5-9c0087cb2635
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
query listHistory(
|
||||
$workspaceId: String!
|
||||
$pageDocId: String!
|
||||
$take: Int
|
||||
$before: DateTime
|
||||
) {
|
||||
workspace(id: $workspaceId) {
|
||||
histories(guid: $pageDocId, take: $take, before: $before) {
|
||||
id
|
||||
timestamp
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -362,6 +362,22 @@ query getWorkspaces {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const listHistoryQuery = {
|
||||
id: 'listHistoryQuery' as const,
|
||||
operationName: 'listHistory',
|
||||
definitionName: 'workspace',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query listHistory($workspaceId: String!, $pageDocId: String!, $take: Int, $before: DateTime) {
|
||||
workspace(id: $workspaceId) {
|
||||
histories(guid: $pageDocId, take: $take, before: $before) {
|
||||
id
|
||||
timestamp
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getInvoicesCountQuery = {
|
||||
id: 'getInvoicesCountQuery' as const,
|
||||
operationName: 'getInvoicesCount',
|
||||
@@ -445,6 +461,17 @@ mutation publishPage($workspaceId: String!, $pageId: String!, $mode: PublicPageM
|
||||
}`,
|
||||
};
|
||||
|
||||
export const recoverDocMutation = {
|
||||
id: 'recoverDocMutation' as const,
|
||||
operationName: 'recoverDoc',
|
||||
definitionName: 'recoverDoc',
|
||||
containsFile: false,
|
||||
query: `
|
||||
mutation recoverDoc($workspaceId: String!, $docId: String!, $timestamp: DateTime!) {
|
||||
recoverDoc(workspaceId: $workspaceId, guid: $docId, timestamp: $timestamp)
|
||||
}`,
|
||||
};
|
||||
|
||||
export const removeAvatarMutation = {
|
||||
id: 'removeAvatarMutation' as const,
|
||||
operationName: 'removeAvatar',
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
mutation recoverDoc(
|
||||
$workspaceId: String!
|
||||
$docId: String!
|
||||
$timestamp: DateTime!
|
||||
) {
|
||||
recoverDoc(workspaceId: $workspaceId, guid: $docId, timestamp: $timestamp)
|
||||
}
|
||||
Reference in New Issue
Block a user