mirror of https://github.com/penpot/penpot.git
Merge c5341c0378 into 6ec451b46d
This commit is contained in:
commit
b411bf1475
|
|
@ -20,12 +20,7 @@ test.describe("Dashboard Deleted Page", () => {
|
||||||
// Navigate directly to deleted page
|
// Navigate directly to deleted page
|
||||||
await dashboardPage.goToDeleted();
|
await dashboardPage.goToDeleted();
|
||||||
|
|
||||||
// Check for the restore all and clear trash buttons
|
// Check for the delete-page-section element
|
||||||
await expect(
|
await expect(page.getByTestId("deleted-page-section")).toBeVisible();
|
||||||
page.getByRole("button", { name: "Restore All" }),
|
|
||||||
).toBeVisible();
|
|
||||||
await expect(
|
|
||||||
page.getByRole("button", { name: "Clear trash" }),
|
|
||||||
).toBeVisible();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -284,37 +284,44 @@
|
||||||
|
|
||||||
[:*
|
[:*
|
||||||
[:> header* {:team team}]
|
[:> header* {:team team}]
|
||||||
[:section {:class (stl/css :dashboard-container :no-bg)}
|
[:section {:class (stl/css :dashboard-container :no-bg)
|
||||||
|
:data-testid "deleted-page-section"}
|
||||||
[:*
|
[:*
|
||||||
[:div {:class (stl/css :no-bg)}
|
[:div {:class (stl/css :no-bg)}
|
||||||
|
|
||||||
[:> menu* {:team-id team-id :section :dashboard-deleted}]
|
[:> menu* {:team-id team-id :section :dashboard-deleted}]
|
||||||
|
|
||||||
[:div {:class (stl/css :deleted-info-content)}
|
(if (seq projects)
|
||||||
[:p {:class (stl/css :deleted-info)}
|
[:*
|
||||||
(tr "dashboard.trash-info-text-part1")
|
[:div {:class (stl/css :deleted-info-content)}
|
||||||
[:span {:class (stl/css :info-text-highlight)}
|
[:p {:class (stl/css :deleted-info)}
|
||||||
(tr "dashboard.trash-info-text-part2" deletion-days)]
|
(tr "dashboard.trash-info-text-part1")
|
||||||
(tr "dashboard.trash-info-text-part3")
|
[:span {:class (stl/css :info-text-highlight)}
|
||||||
[:br]
|
(tr "dashboard.trash-info-text-part2" deletion-days)]
|
||||||
(tr "dashboard.trash-info-text-part4")]
|
(tr "dashboard.trash-info-text-part3")
|
||||||
[:div {:class (stl/css :deleted-options)}
|
[:br]
|
||||||
[:> button* {:variant "ghost"
|
(tr "dashboard.trash-info-text-part4")]
|
||||||
:type "button"
|
[:div {:class (stl/css :deleted-options)}
|
||||||
:on-click on-restore-all}
|
[:> button* {:variant "ghost"
|
||||||
(tr "dashboard.restore-all-deleted-button")]
|
:type "button"
|
||||||
[:> button* {:variant "destructive"
|
:on-click on-restore-all}
|
||||||
:type "button"
|
(tr "dashboard.restore-all-deleted-button")]
|
||||||
:icon "delete"
|
[:> button* {:variant "destructive"
|
||||||
:on-click on-delete-all}
|
:type "button"
|
||||||
(tr "dashboard.clear-trash-button")]]]
|
:icon "delete"
|
||||||
|
:on-click on-delete-all}
|
||||||
|
(tr "dashboard.clear-trash-button")]]]
|
||||||
|
|
||||||
(when projects
|
(for [{:keys [id] :as project} projects]
|
||||||
(for [{:keys [id] :as project} projects]
|
(let [files (when deleted-map
|
||||||
(let [files (when deleted-map
|
(->> (vals deleted-map)
|
||||||
(->> (vals deleted-map)
|
(filterv #(= id (:project-id %)))
|
||||||
(filterv #(= id (:project-id %)))
|
(sort-by :modified-at #(compare %2 %1))))]
|
||||||
(sort-by :modified-at #(compare %2 %1))))]
|
[:> deleted-project-item* {:project project
|
||||||
[:> deleted-project-item* {:project project
|
:files files
|
||||||
:files files
|
:key id}]))]
|
||||||
:key id}])))]]]]))
|
|
||||||
|
;; when no deleted projects
|
||||||
|
[:div {:class (stl/css :deleted-info-content)}
|
||||||
|
[:p {:class (stl/css :deleted-info)}
|
||||||
|
(tr "dashboard.trash-info-text-no-projects")]])]]]]))
|
||||||
|
|
|
||||||
|
|
@ -8489,6 +8489,9 @@ msgstr "Restore project"
|
||||||
msgid "dashboard.delete-project-button"
|
msgid "dashboard.delete-project-button"
|
||||||
msgstr "Delete project"
|
msgstr "Delete project"
|
||||||
|
|
||||||
|
msgid "dashboard.trash-info-text-no-projects"
|
||||||
|
msgstr "Your trash is empty. Deleted files and projects will appear here."
|
||||||
|
|
||||||
msgid "dashboard.trash-info-text-part1"
|
msgid "dashboard.trash-info-text-part1"
|
||||||
msgstr "Deleted files will remain in the trash for"
|
msgstr "Deleted files will remain in the trash for"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8342,6 +8342,9 @@ msgstr "Restaurar proyecto"
|
||||||
msgid "dashboard.delete-project-button"
|
msgid "dashboard.delete-project-button"
|
||||||
msgstr "Eliminar proyecto"
|
msgstr "Eliminar proyecto"
|
||||||
|
|
||||||
|
msgid "dashboard.trash-info-text-no-projects"
|
||||||
|
msgstr "Tu papelera está vacía. Los archivos y proyectos eliminados aparecerán aquí."
|
||||||
|
|
||||||
msgid "dashboard.trash-info-text-part1"
|
msgid "dashboard.trash-info-text-part1"
|
||||||
msgstr "Los archivos eliminados permanecerán en la papelera durante"
|
msgstr "Los archivos eliminados permanecerán en la papelera durante"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue