Skip to content

Commit

Permalink
feat(upgrade-plan): create page of upgrade plan (#593)
Browse files Browse the repository at this point in the history
* feat(upgrade-plan): create page of upgrade plan

* chore(version): update to version 1.34.0
  • Loading branch information
rogefm authored Dec 5, 2024
1 parent de68f35 commit 4b49f36
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 27 deletions.
2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webapp",
"version": "1.33.4",
"version": "1.34.0",
"scripts": {
"ancient": "clojure -Sdeps '{:deps {com.github.liquidz/antq {:mvn/version \"RELEASE\"}}}' -m antq.core",
"genversion": "npx genversion src/webapp/version.js",
Expand Down
Binary file added webapp/resources/public/images/upgrade-plan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions webapp/src/webapp/app.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
[webapp.slack.slack-new-user :as slack-new-user]
[webapp.subs :as subs]
[webapp.views.home :as home]
[webapp.upgrade-plan.main :as upgrade-plan]
[webapp.webclient.panel :as webclient]))

(when (= config/release-type "hoop-ui")
Expand Down Expand Up @@ -162,6 +163,11 @@
(defmethod routes/panels :home-redirect-panel []
[layout :application-hoop [home/home-panel-hoop]])

(defmethod routes/panels :upgrade-plan-panel []
(rf/dispatch [:destroy-page-loader])
[layout :application-hoop [:div {:class "bg-gray-1 min-h-full h-max"}
[upgrade-plan/main]]])

(defmethod routes/panels :users-panel []
[layout :application-hoop [:div {:class "flex flex-col bg-gray-100 px-4 py-10 sm:px-6 lg:px-20 lg:pt-16 lg:pb-10 h-full"}
[h/h2 "Users" {:class "mb-6"}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
(:require
["@radix-ui/themes" :refer [Box Callout Flex Grid Link Switch Text]]
["lucide-react" :refer [ArrowUpRight Star]]
[re-frame.core :as rf]
[webapp.components.forms :as forms]
[webapp.components.multiselect :as multi-select]
[webapp.connections.dlp-info-types :as dlp-info-types]
Expand Down Expand Up @@ -90,9 +91,7 @@
"Enable AI Data Masking by "
[:> Link {:href "#"
:class "text-primary-10"
:on-click #(js/window.Intercom
"showNewMessage"
"I want to upgrade my current plan")}
:on-click #(rf/dispatch [:navigate :upgrade-plan])}
"upgrading your plan."]]])
(when @ai-data-masking
[:> Box {:mt "4"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@

:command (if (= @connection-type "database")
[]
[(when @connection-command
(or (re-seq #"'.*?'|\".*?\"|\S+|\t" @connection-command) []))])}))}
(when @connection-command
(or (re-seq #"'.*?'|\".*?\"|\S+|\t" @connection-command) [])))}))}

[:<>
(when (= form-type :create)
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/webapp/routes.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
["/filtered" :sessions-list-filtered-by-ids]
[["/" :session-id] :session-details]]
"/signup" :signup-hoop
"/signup/callback" :signup-callback-hoop}]))
"/signup/callback" :signup-callback-hoop
"/upgrade-plan" :upgrade-plan}]))

(defn query-params-parser
[queries]
Expand Down
6 changes: 2 additions & 4 deletions webapp/src/webapp/shared_ui/sidebar/main.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@
(:uri route))
:on-click (fn []
(when (and free-license? (not (:free-feature? route)))
(js/window.Intercom
"showNewMessage"
"I want to upgrade my current plan")))
(rf/dispatch [:navigate :upgrade-plan])))
:class (str (hover-side-menu-link? (:uri route) current-route)
"group flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold"
(when (and free-license? (not (:free-feature? route)))
Expand Down Expand Up @@ -185,7 +183,7 @@
:class (str (hover-side-menu-link? "/guardrails" current-route)
"group items-start flex gap-x-3 rounded-md p-2 text-sm leading-6 font-semibold")}
[:> hero-outline-icon/ShieldCheckIcon {:class "h-6 w-6 shrink-0 text-white"
:aria-hidden "true"}]
:aria-hidden "true"}]
[:span {:class "sr-only"}
"Guardrails"]]]
[:li
Expand Down
22 changes: 6 additions & 16 deletions webapp/src/webapp/shared_ui/sidebar/navigation.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@
(:uri route))
:on-click (fn []
(when (and free-license? (not (:free-feature? route)))
(js/window.Intercom
"showNewMessage"
"I want to upgrade my current plan")))
(rf/dispatch [:navigate :upgrade-plan])))
:class (str (hover-side-menu-link? (:uri route) current-route)
(:enabled link-styles)
(when (and free-license? (not (:free-feature? route)))
Expand All @@ -78,9 +76,7 @@
(:uri plugin))
:on-click (fn []
(when (and free-license? (not (:free-feature? plugin)))
(js/window.Intercom
"showNewMessage"
"I want to upgrade my current plan")))
(rf/dispatch [:navigate :upgrade-plan])))
:class (str (hover-side-menu-link? (:uri plugin) current-route)
(:enabled link-styles)
(when (and free-license? (not (:free-feature? plugin)))
Expand Down Expand Up @@ -127,7 +123,7 @@
(:enabled link-styles))}
[:div {:class "flex gap-3 items-center"}
[:> hero-outline-icon/ShieldCheckIcon {:class (str "h-6 w-6 shrink-0 text-white")
:aria-hidden "true"}]
:aria-hidden "true"}]
"Guardrails"]]]
[:li
[:a {:href (routes/url-for :agents)
Expand All @@ -153,9 +149,7 @@
[:a
{:on-click (fn []
(if free-license?
(js/window.Intercom
"showNewMessage"
"I want to upgrade my current plan")
(rf/dispatch [:navigate :upgrade-plan])

(rf/dispatch [:navigate :manage-ask-ai])))
:href "#"
Expand All @@ -175,9 +169,7 @@
{:as "a"
:onClick (fn []
(if (and free-license? (not (:free-feature? plugin)))
(js/window.Intercom
"showNewMessage"
"I want to upgrade my current plan")
(rf/dispatch [:navigate :upgrade-plan])

(rf/dispatch [:plugins->navigate->manage-plugin (:name plugin)])))
:href "#"
Expand Down Expand Up @@ -215,9 +207,7 @@
{:as "a"
:onClick (fn []
(if (and free-license? (not (:free-feature? plugin)))
(js/window.Intercom
"showNewMessage"
"I want to upgrade my current plan")
(rf/dispatch [:navigate :upgrade-plan])

(rf/dispatch [:plugins->navigate->manage-plugin (:name plugin)])))
:href "#"
Expand Down
57 changes: 57 additions & 0 deletions webapp/src/webapp/upgrade_plan/main.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
(ns webapp.upgrade-plan.main
(:require
["@radix-ui/themes" :refer [Avatar Box Button Flex Heading Text]]
["lucide-react" :refer [ListChecks MessagesSquare Sparkles]]
[reagent.core :as r]
[webapp.components.button :as button]
[webapp.config :as config]))

(defn- feature [{:keys [icon title description]}]
[:> Flex {:align "center" :gap "4"}
[:> Avatar {:fallback (r/as-element icon)
:size "4"}]
[:> Box
[:> Heading {:as "h3" :size "5" :weight "bold" :class "text-[--gray-12]"}
title]
[:> Text {:size "3" :class "text-[--gray-12]"}
description]]])

(defn main []
[:> Box {:class "bg-white relative overflow-hidden"}
[:> Box {:p "5"}
[button/HeaderBack]]

[:> Flex {:align "center" :justify "between" :gap "8" :p "9"}
[:> Box {:class "w-2/3 xl:w-1/2 space-y-12 pr-0 2xl:pr-16"}
[:> Box {:class "space-y-4"}
[:> Heading {:as "h1" :size "8" :weight "bold" :class "text-[--gray-12]"}
"Get more for your connections"]
[:> Text {:size "5" :class "text-[--gray-11]"}
"Upgrade to Enterprise plan and boost your experience."]]

[:> Box {:class "space-y-8"}
[feature {:icon [:> Sparkles {:size 20}]
:title "AI-Enhanced developer experience"
:description "Power up development with AI-driven query suggestions and automated data masking while maintaining security standards."}]

[feature {:icon [:> ListChecks {:size 20}]
:title "Complete visibility & control"
:description "Monitor database and infrastructure interaction with detailed session recordings and instant alerts in your favorite tools."}]

[feature {:icon [:> MessagesSquare {:size 20}]
:title "Enterprise-grade support"
:description "Access priority support through Slack, Teams, or email, plus dedicated onboarding to accelerate your team experience."}]]

[:> Button {:size "4"
:on-click #(js/window.Intercom
"showNewMessage"
"I want to upgrade my current plan")}
"Request a demo"]]

[:> Box {:class (str "mt-[--space-9] absolute top-1/2 -translate-y-1/2 right-0 w-1/2 h-auto "
"transform translate-x-1/4 xl:translate-x-16 2xl:translate-x-10")}
[:> Box {:class "h-full w-full relative"}
[:img {:src (str config/webapp-url "/images/upgrade-plan.png")
:alt "Terminal interface"
:class (str "w-full h-[578px] "
"object-cover object-left")}]]]]])

0 comments on commit 4b49f36

Please sign in to comment.