mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Allow docs to be permanently deleted in icon view
Summary: Previously, soft-deleted docs in icon view were still accessible from the Trash and couldn't be permanently deleted. Test Plan: Improved the nbrowser test for deleting docs to verify that it can be done in both view modes. Reviewers: dsagal, paulfitz Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2862
This commit is contained in:
@@ -200,7 +200,7 @@ function buildWorkspaceDocBlock(home: HomeModel, workspace: Workspace, flashDocI
|
||||
return dom.forEach(docs, doc => {
|
||||
if (view === 'icons') {
|
||||
return dom.update(
|
||||
buildPinnedDoc(home, doc),
|
||||
buildPinnedDoc(home, doc, workspace),
|
||||
testId('doc'),
|
||||
);
|
||||
}
|
||||
@@ -347,7 +347,7 @@ export function makeDocOptionsMenu(home: HomeModel, doc: Document, renaming: Obs
|
||||
];
|
||||
}
|
||||
|
||||
function makeRemovedDocOptionsMenu(home: HomeModel, doc: Document, workspace: Workspace) {
|
||||
export function makeRemovedDocOptionsMenu(home: HomeModel, doc: Document, workspace: Workspace) {
|
||||
function hardDeleteDoc() {
|
||||
confirmModal(`Permanently Delete "${doc.name}"?`, 'Delete Forever',
|
||||
() => home.deleteDoc(doc.id, true).catch(reportError),
|
||||
|
||||
Reference in New Issue
Block a user