♻️ Show subscription section to everybody

This commit is contained in:
Marina López 2026-08-03 16:16:15 +02:00
parent 6e843faba3
commit 7a2b6f06f8
4 changed files with 7 additions and 35 deletions

View File

@ -147,7 +147,6 @@
:render-switch
:hide-release-modal
:subscriptions
:subscriptions-old
:inspect-styles
;; Enable performance logs in devconsole (disabled by default)
:perf-logs

View File

@ -1392,13 +1392,7 @@
on-sub-menu-pointer-enter
(mf/use-fn
(fn [_]
(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/set-ref-val! hovering?* true)))]
(mf/with-effect [teams]
(when (and (contains? cf/flags :admin-console)
@ -1420,17 +1414,6 @@
[:> 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)
[:& comments-section
{:profile profile

View File

@ -117,7 +117,8 @@
:data-testid "settings-profile"}
[: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?
:settings-item true)
:on-click go-settings-subscription

View File

@ -1130,21 +1130,10 @@
[:> icon* {:icon-id i/arrow-right
:class (stl/css :item-arrow)}]]
(when (and (contains? cf/flags :subscriptions)
(not= "enterprise" subscription-type))
[:> 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")]])]
(when (or (and (contains? cf/flags :subscriptions)
(not= "enterprise" subscription-type))
(contains? cf/flags :admin-console))
[:> main-menu-power-up* {:close-sub-menu close-sub-menu}])]
(case selected-sub-menu
:file