From a85a7c74c329c36c70d7484c8c805795db60f3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Tue, 30 Jan 2024 09:10:35 +0100 Subject: [PATCH] :sparkles: Rename "Library backup" to "Main components" --- common/src/app/common/types/file.cljc | 6 +++--- common/test/common_tests/types_file_test.cljc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/app/common/types/file.cljc b/common/src/app/common/types/file.cljc index 8241640e4..dc77af127 100644 --- a/common/src/app/common/types/file.cljc +++ b/common/src/app/common/types/file.cljc @@ -359,10 +359,10 @@ (mapcat used-assets-container (containers-seq file-data)))) (defn get-or-add-library-page - "If exists a page named 'Library backup', get the id and calculate the position to start + "If exists a page named 'Main components', get the id and calculate the position to start adding new components. If not, create it and start at (0, 0)." [file-data grid-gap] - (let [library-page (d/seek #(= (:name %) "Library backup") (ctpl/pages-seq file-data))] + (let [library-page (d/seek #(= (:name %) "Main components") (ctpl/pages-seq file-data))] (if (some? library-page) (let [compare-pos (fn [pos shape] (let [bounds (gsh/bounding-box shape)] @@ -374,7 +374,7 @@ (gpt/point 0 0) (ctn/shapes-seq library-page))] [file-data (:id library-page) position]) - (let [library-page (ctp/make-empty-page (uuid/next) "Library backup")] + (let [library-page (ctp/make-empty-page (uuid/next) "Main components")] [(ctpl/add-page file-data library-page) (:id library-page) (gpt/point 0 0)])))) (defn- absorb-components diff --git a/common/test/common_tests/types_file_test.cljc b/common/test/common_tests/types_file_test.cljc index bc76f87da..c95ea3893 100644 --- a/common/test/common_tests/types_file_test.cljc +++ b/common/test/common_tests/types_file_test.cljc @@ -102,7 +102,7 @@ (t/is (= (count pages) 2)) (t/is (= (:name (first pages)) "Page 1")) - (t/is (= (:name (second pages)) "Library backup")) + (t/is (= (:name (second pages)) "Main components")) (t/is (= (count components) 1))