mirror of
https://github.com/penpot/penpot.git
synced 2026-08-06 12:58:55 +00:00
♻️ Show subscription section to everybody
This commit is contained in:
parent
edbe9f8215
commit
e30b837d77
@ -147,7 +147,6 @@
|
|||||||
:render-switch
|
:render-switch
|
||||||
:hide-release-modal
|
:hide-release-modal
|
||||||
:subscriptions
|
:subscriptions
|
||||||
:subscriptions-old
|
|
||||||
:inspect-styles
|
:inspect-styles
|
||||||
;; Enable performance logs in devconsole (disabled by default)
|
;; Enable performance logs in devconsole (disabled by default)
|
||||||
:perf-logs
|
:perf-logs
|
||||||
|
|||||||
@ -1392,13 +1392,7 @@
|
|||||||
on-sub-menu-pointer-enter
|
on-sub-menu-pointer-enter
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(mf/set-ref-val! hovering?* true)))
|
(mf/set-ref-val! hovering?* true)))]
|
||||||
|
|
||||||
on-power-up-click
|
|
||||||
(mf/use-fn
|
|
||||||
(fn []
|
|
||||||
(st/emit! (ev/event {::ev/name "explore-pricing-click" ::ev/origin "dashboard" :section "sidebar"}))
|
|
||||||
(dom/open-new-window "https://penpot.app/pricing")))]
|
|
||||||
|
|
||||||
(mf/with-effect [teams]
|
(mf/with-effect [teams]
|
||||||
(when (and (contains? cf/flags :admin-console)
|
(when (and (contains? cf/flags :admin-console)
|
||||||
@ -1420,17 +1414,6 @@
|
|||||||
[:> subscription-sidebar* {:profile profile}])))
|
[:> subscription-sidebar* {:profile profile}])))
|
||||||
|
|
||||||
|
|
||||||
;; TODO remove this block when subscriptions is full implemented
|
|
||||||
(when (contains? cf/flags :subscriptions-old)
|
|
||||||
[:button {:class (stl/css :upgrade-plan-section)
|
|
||||||
:on-click on-power-up-click}
|
|
||||||
[:div {:class (stl/css :penpot-free)}
|
|
||||||
[:span (tr "dashboard.upgrade-plan.penpot-free")]
|
|
||||||
[:span {:class (stl/css :no-limits)}
|
|
||||||
(tr "dashboard.upgrade-plan.no-limits")]]
|
|
||||||
[:div {:class (stl/css :power-up)}
|
|
||||||
(tr "subscription.dashboard.upgrade-plan.power-up")]])
|
|
||||||
|
|
||||||
(when (and team profile)
|
(when (and team profile)
|
||||||
[:& comments-section
|
[:& comments-section
|
||||||
{:profile profile
|
{:profile profile
|
||||||
|
|||||||
@ -117,7 +117,8 @@
|
|||||||
:data-testid "settings-profile"}
|
:data-testid "settings-profile"}
|
||||||
[:span {:class (stl/css :element-title)} (tr "labels.settings")]]
|
[:span {:class (stl/css :element-title)} (tr "labels.settings")]]
|
||||||
|
|
||||||
(when (contains? cf/flags :subscriptions)
|
(when (or (contains? cf/flags :subscriptions)
|
||||||
|
(contains? cf/flags :admin-console))
|
||||||
[:li {:class (stl/css-case :current subscription?
|
[:li {:class (stl/css-case :current subscription?
|
||||||
:settings-item true)
|
:settings-item true)
|
||||||
:on-click go-settings-subscription
|
:on-click go-settings-subscription
|
||||||
|
|||||||
@ -927,13 +927,6 @@
|
|||||||
(keyword))]
|
(keyword))]
|
||||||
(reset! selected-sub-menu* menu))))
|
(reset! selected-sub-menu* menu))))
|
||||||
|
|
||||||
on-power-up-click
|
|
||||||
(mf/use-fn
|
|
||||||
(fn []
|
|
||||||
(st/emit! (ev/event {::ev/name "explore-pricing-click"
|
|
||||||
::ev/origin "workspace:menu"}))
|
|
||||||
(dom/open-new-window "https://penpot.app/pricing")))
|
|
||||||
|
|
||||||
toggle-flag
|
toggle-flag
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(fn [event]
|
(fn [event]
|
||||||
@ -1130,21 +1123,10 @@
|
|||||||
[:> icon* {:icon-id i/arrow-right
|
[:> icon* {:icon-id i/arrow-right
|
||||||
:class (stl/css :item-arrow)}]]
|
:class (stl/css :item-arrow)}]]
|
||||||
|
|
||||||
(when (and (contains? cf/flags :subscriptions)
|
(when (or (and (contains? cf/flags :subscriptions)
|
||||||
(not= "enterprise" subscription-type))
|
(not= "enterprise" subscription-type))
|
||||||
[:> main-menu-power-up* {:close-sub-menu close-sub-menu}])
|
(contains? cf/flags :admin-console))
|
||||||
|
[:> main-menu-power-up* {:close-sub-menu close-sub-menu}])]
|
||||||
;; TODO remove this block when subscriptions is full implemented
|
|
||||||
(when (contains? cf/flags :subscriptions-old)
|
|
||||||
[:> dropdown-menu-item* {:class (stl/css :base-menu-item :menu-item)
|
|
||||||
:on-click on-power-up-click
|
|
||||||
:on-key-down (fn [event]
|
|
||||||
(when (kbd/enter? event)
|
|
||||||
(on-power-up-click)))
|
|
||||||
:on-pointer-enter close-sub-menu
|
|
||||||
:id "file-menu-power-up"}
|
|
||||||
[:span {:class (stl/css :item-name)}
|
|
||||||
(tr "subscription.workspace.header.menu.option.power-up")]])]
|
|
||||||
|
|
||||||
(case selected-sub-menu
|
(case selected-sub-menu
|
||||||
:file
|
:file
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user