mirror of
https://github.com/penpot/penpot.git
synced 2025-06-25 08:07:00 +02:00
✨ Add history version days for subscriptions (#6571)
This commit is contained in:
parent
e9edebbbb5
commit
f84ffc3562
1 changed files with 9 additions and 2 deletions
|
@ -33,7 +33,13 @@
|
||||||
(def versions
|
(def versions
|
||||||
(l/derived :workspace-versions st/state))
|
(l/derived :workspace-versions st/state))
|
||||||
|
|
||||||
(def versions-stored-days 7)
|
(defn get-versions-stored-days
|
||||||
|
[team]
|
||||||
|
(let [subscription-name (-> team :subscription :type)]
|
||||||
|
(cond
|
||||||
|
(= subscription-name "unlimited") 30
|
||||||
|
(= subscription-name "enterprise") 90
|
||||||
|
:else 7)))
|
||||||
|
|
||||||
(defn group-snapshots
|
(defn group-snapshots
|
||||||
[data]
|
[data]
|
||||||
|
@ -206,6 +212,7 @@
|
||||||
[]
|
[]
|
||||||
(let [profiles (mf/deref refs/profiles)
|
(let [profiles (mf/deref refs/profiles)
|
||||||
profile (mf/deref refs/profile)
|
profile (mf/deref refs/profile)
|
||||||
|
team (mf/deref refs/team)
|
||||||
|
|
||||||
expanded (mf/use-state #{})
|
expanded (mf/use-state #{})
|
||||||
|
|
||||||
|
@ -358,7 +365,7 @@
|
||||||
|
|
||||||
nil))])
|
nil))])
|
||||||
|
|
||||||
[:> cta* {:title (tr "workspace.versions.warning.text" versions-stored-days)}
|
[:> cta* {:title (tr "workspace.versions.warning.text" (get-versions-stored-days team))}
|
||||||
[:> i18n/tr-html*
|
[:> i18n/tr-html*
|
||||||
{:tag-name "div"
|
{:tag-name "div"
|
||||||
:class (stl/css :cta)
|
:class (stl/css :cta)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue