mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 22:49:01 -05:00
✨ Add the ability to disable dashboard templates section
This commit is contained in:
parent
7feda98eb3
commit
81658c90d1
4 changed files with 21 additions and 12 deletions
|
@ -14,6 +14,7 @@
|
||||||
- Improve dashboard performance related to thumbnails; now the thumbnails are
|
- Improve dashboard performance related to thumbnails; now the thumbnails are
|
||||||
rendered as bitmap images.
|
rendered as bitmap images.
|
||||||
- Add the ability to disable google fonts provider with the `disable-google-fonts-provider` flag
|
- Add the ability to disable google fonts provider with the `disable-google-fonts-provider` flag
|
||||||
|
- Add the ability to disable dashboard templates section with the `disable-dashboard-templates-section` flag
|
||||||
|
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
|
|
||||||
(def default-flags
|
(def default-flags
|
||||||
[:enable-newsletter-subscription
|
[:enable-newsletter-subscription
|
||||||
|
:enable-dashboard-templates-section
|
||||||
:enable-google-fonts-provider])
|
:enable-google-fonts-provider])
|
||||||
|
|
||||||
(defn- parse-flags
|
(defn- parse-flags
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.math :as mth]
|
[app.common.math :as mth]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
|
[app.config :as cf]
|
||||||
[app.main.data.dashboard :as dd]
|
[app.main.data.dashboard :as dd]
|
||||||
[app.main.data.dashboard.shortcuts :as sc]
|
[app.main.data.dashboard.shortcuts :as sc]
|
||||||
[app.main.data.events :as ev]
|
[app.main.data.events :as ev]
|
||||||
|
@ -259,11 +260,13 @@
|
||||||
:projects projects
|
:projects projects
|
||||||
:profile profile
|
:profile profile
|
||||||
:default-project-id default-project-id}]
|
:default-project-id default-project-id}]
|
||||||
|
|
||||||
|
(when (contains? cf/flags :dashboard-templates-section)
|
||||||
[:& templates-section {:profile profile
|
[:& templates-section {:profile profile
|
||||||
:project project
|
:project project
|
||||||
:default-project-id default-project-id
|
:default-project-id default-project-id
|
||||||
:team team
|
:team team
|
||||||
:content-width @content-width}]]
|
:content-width @content-width}])]
|
||||||
|
|
||||||
:dashboard-fonts
|
:dashboard-fonts
|
||||||
[:& fonts-page {:team team}]
|
[:& fonts-page {:team team}]
|
||||||
|
@ -275,11 +278,12 @@
|
||||||
(when project
|
(when project
|
||||||
[:*
|
[:*
|
||||||
[:& files-section {:team team :project project}]
|
[:& files-section {:team team :project project}]
|
||||||
|
(when (contains? cf/flags :dashboard-templates-section)
|
||||||
[:& templates-section {:profile profile
|
[:& templates-section {:profile profile
|
||||||
:project project
|
:project project
|
||||||
:default-project-id default-project-id
|
:default-project-id default-project-id
|
||||||
:team team
|
:team team
|
||||||
:content-width @content-width}]])
|
:content-width @content-width}])])
|
||||||
|
|
||||||
:dashboard-search
|
:dashboard-search
|
||||||
[:& search-page {:team team
|
[:& search-page {:team team
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.geom.point :as gpt]
|
[app.common.geom.point :as gpt]
|
||||||
[app.common.math :as mth]
|
[app.common.math :as mth]
|
||||||
|
[app.config :as cf]
|
||||||
[app.main.data.dashboard :as dd]
|
[app.main.data.dashboard :as dd]
|
||||||
[app.main.data.events :as ev]
|
[app.main.data.events :as ev]
|
||||||
[app.main.data.messages :as msg]
|
[app.main.data.messages :as msg]
|
||||||
|
@ -414,7 +415,9 @@
|
||||||
(when team-hero?
|
(when team-hero?
|
||||||
[:& team-hero {:team team :close-fn close-banner}])
|
[:& team-hero {:team team :close-fn close-banner}])
|
||||||
|
|
||||||
(when (or (not tutorial-viewed?) (not walkthrough-viewed?))
|
(when (and (contains? cf/flags :dashboard-templates-section)
|
||||||
|
(or (not tutorial-viewed?)
|
||||||
|
(not walkthrough-viewed?)))
|
||||||
[:div.hero-projects
|
[:div.hero-projects
|
||||||
(when (and (not tutorial-viewed?) (:is-default team))
|
(when (and (not tutorial-viewed?) (:is-default team))
|
||||||
[:& tutorial-project
|
[:& tutorial-project
|
||||||
|
|
Loading…
Add table
Reference in a new issue