mirror of
https://github.com/penpot/penpot.git
synced 2026-09-23 20:36:15 +00:00
✨ Add config flag for export modal's link-later option (#11820)
This commit is contained in:
parent
85bba64209
commit
fd9100b440
@ -193,7 +193,10 @@
|
||||
;; Enables serving link preview (Open Graph) metadata for shared
|
||||
;; links; exposes file names and dashboard thumbnails to anyone
|
||||
;; that knows the file id.
|
||||
:link-preview})
|
||||
:link-preview
|
||||
|
||||
;; Shows the "link later" option on the files export modal.
|
||||
:export-link-later})
|
||||
|
||||
(def all-flags
|
||||
(set/union email login varia))
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.config :as cf]
|
||||
[app.main.data.exports.files :as fexp]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.store :as st]
|
||||
@ -82,6 +83,9 @@
|
||||
[{:keys [team-id files]}]
|
||||
(let [state* (mf/use-state (partial initialize-state files))
|
||||
has-libs? (some :has-libraries files)
|
||||
export-types (cond-> fexp/valid-types
|
||||
(not (contains? cf/flags :export-link-later))
|
||||
(disj :link-later))
|
||||
|
||||
state (deref state*)
|
||||
selected (:selected state)
|
||||
@ -148,7 +152,7 @@
|
||||
[:> text* {:as "p" :typography t/body-large :class (stl/css :modal-msg)}
|
||||
"What do you want to do with linked libraries?"]
|
||||
|
||||
(for [type fexp/valid-types]
|
||||
(for [type export-types]
|
||||
[:div {:class (stl/css :export-option true)
|
||||
:key (name type)}
|
||||
[:label {:for (str "export-" type)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user