From e1e38c65db39f6903605ebf5426cb2a9b96b4f9d Mon Sep 17 00:00:00 2001 From: Mo Date: Fri, 5 Nov 2021 10:09:46 -0500 Subject: [PATCH] fix: add ability to subscribe without account (#722) --- .env.sample | 1 + app/assets/javascripts/app.ts | 2 ++ .../panes/account/subscription/NoSubscription.tsx | 2 +- .../purchaseFlow/PurchaseFlowWrapper.tsx | 7 +++++-- .../purchaseFlow/panes/CreateAccount.tsx | 14 ++++++++++++++ app/views/application/app.html.erb | 1 + index.html | 2 ++ 7 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.env.sample b/.env.sample index 14812eb4c..66edd9f86 100644 --- a/.env.sample +++ b/.env.sample @@ -8,6 +8,7 @@ RAILS_SERVE_STATIC_FILES=true SECRET_KEY_BASE=test APP_HOST=http://localhost:3001 PURCHASE_URL=https://standardnotes.com/purchase +PLANS_URL=https://standardnotes.com/plans DASHBOARD_URL=http://standardnotes.com/dashboard SF_DEFAULT_SERVER=http://localhost:3000 diff --git a/app/assets/javascripts/app.ts b/app/assets/javascripts/app.ts index 2b6717e79..0550b3c55 100644 --- a/app/assets/javascripts/app.ts +++ b/app/assets/javascripts/app.ts @@ -7,6 +7,8 @@ declare global { // eslint-disable-next-line camelcase _purchase_url?: string; // eslint-disable-next-line camelcase + _plans_url?: string; + // eslint-disable-next-line camelcase _dashboard_url?: string; } } diff --git a/app/assets/javascripts/preferences/panes/account/subscription/NoSubscription.tsx b/app/assets/javascripts/preferences/panes/account/subscription/NoSubscription.tsx index f76e74ebf..b2196a42f 100644 --- a/app/assets/javascripts/preferences/panes/account/subscription/NoSubscription.tsx +++ b/app/assets/javascripts/preferences/panes/account/subscription/NoSubscription.tsx @@ -42,7 +42,7 @@ export const NoSubscription: FunctionalComponent<{ {application.hasAccount() && diff --git a/app/views/application/app.html.erb b/app/views/application/app.html.erb index 2911e7e4a..e3b893b77 100644 --- a/app/views/application/app.html.erb +++ b/app/views/application/app.html.erb @@ -36,6 +36,7 @@ window._enable_unfinished_features = "<%= ENV['ENABLE_UNFINISHED_FEATURES'] %>" === 'true'; window._websocket_url = "<%= ENV['WEBSOCKET_URL'] %>"; window._purchase_url = "<%= ENV['PURCHASE_URL'] %>"; + window._plans_url = "<%= ENV['PLANS_URL'] %>"; window._dashboard_url = "<%= ENV['DASHBOARD_URL'] %>"; diff --git a/index.html b/index.html index 07e6c45bc..3a8cb2968 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,7 @@ data-enable-unfinished-features="<%= env.ENABLE_UNFINISHED_FEATURES %>" data-web-socket-url="<%= env.DEV_WEBSOCKET_URL %>" data-purchase-url="<%= env.PURCHASE_URL %>" + data-plans-url="<%= env.PLANS_URL %>" data-dashboard-url="<%= env.DASHBOARD_URL %>" >