Skip to content

Commit

Permalink
Package Updates (#676)
Browse files Browse the repository at this point in the history
* Upgrade posthog

* Upgrade cytoscape

* Move edit with ai to the bottom

* Remove trial

* Translations

* Remove codecov

* Remove unused
  • Loading branch information
rob-gordon committed May 23, 2024
1 parent 556ffce commit bdd7eee
Show file tree
Hide file tree
Showing 29 changed files with 429 additions and 402 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,3 @@ jobs:
run: pnpm install
- name: Test
run: pnpm -F app test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./app/coverage/*.json # optional
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
3 changes: 0 additions & 3 deletions api/create-checkout-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ const handler: VercelApiHandler = async (req, res) => {
customer_email: email,
success_url: `${getBaseUrl()}/success`,
cancel_url: `${getBaseUrl()}/pricing`,
subscription_data: {
trial_period_days: 2,
},
});

res.json({ url: session.url });
Expand Down
2 changes: 1 addition & 1 deletion api/prompt/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default async function handler(req: Request) {
redis: kv,
limiter: isPro
? Ratelimit.slidingWindow(3, "1m") // Pro users: 3 requests per minute
: Ratelimit.fixedWindow(5, "30d"), // Unauthenticated users: 5 requests per month
: Ratelimit.fixedWindow(2, "30d"), // Unauthenticated users: 2 requests per month
});

// Determine the key for rate limiting
Expand Down
6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"classnames": "^2.3.2",
"construct-style-sheets-polyfill": "^3.1.0",
"core-js": "^3.18.1",
"cytoscape": "^3.26.0",
"cytoscape": "^3.29.2",
"cytoscape-cose-bilkent": "^4.1.0",
"cytoscape-dagre": "^2.5.0",
"cytoscape-elk": "^2.1.0",
Expand Down Expand Up @@ -97,7 +97,7 @@
"papaparse": "^5.4.1",
"phosphor-react": "^1.3.1",
"postcss-flexbugs-fixes": "^5.0.2",
"posthog-js": "^1.128.1",
"posthog-js": "^1.133.0",
"prettier": "^2.3.1",
"re-resizable": "^6.9.0",
"react": "^18.2.0",
Expand Down Expand Up @@ -149,7 +149,7 @@
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/css-font-loading-module": "^0.0.7",
"@types/cytoscape": "^3.19.11",
"@types/cytoscape": "^3.21.1",
"@types/cytoscape-fcose": "^2.2.2",
"@types/download": "^6.2.4",
"@types/file-saver": "^2.0.1",
Expand Down
1 change: 1 addition & 0 deletions app/public/images/company_logos/netflix.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/components/AiToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function AiToolbar() {
return (
<div
className={classNames(
"drop-shadow-lg absolute top-2 right-2",
"drop-shadow-lg absolute bottom-2 right-2",
globalZ.editWithAiButton
)}
>
Expand Down
17 changes: 12 additions & 5 deletions app/src/components/Checkout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,14 @@ export function Checkout({

return (
<div>
<h2 className="text-white text-4xl font-bold text-center mb-2">
<h2 className="text-white text-4xl font-bold text-center mb-2 tracking-wide">
<Trans>Choose a Plan</Trans>
</h2>
<p className="text-white text-[24px] text-center mb-8">
<Trans>Try it for free for two days. Cancel anytime.</Trans>
<p className="text-white text-[24px] text-center mb-8 text-wrap-balance leading-tight opacity-80">
<Trans>
Gain access to AI Features and never lose your work with a Pro
account.
</Trans>
</p>
<div className="grid sm:grid-cols-2 gap-3 mb-8">
<PlanButton
Expand Down Expand Up @@ -165,12 +168,16 @@ export function Checkout({
"animate-pulse": createCheckoutSession.isLoading,
}
)}
data-session-activity="Start Free Trial"
onClick={() => {
createCheckoutSession.mutate(plan);
}}
data-session-activity="Upgrade Account"
>
<Trans>Start free trial</Trans>
<Trans>
{createCheckoutSession.isLoading
? "Processing..."
: "Upgrade to Pro"}
</Trans>
</button>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "./Header.css";

import { Trans, t } from "@lingui/macro";
import { t } from "@lingui/macro";
import * as Dialog from "@radix-ui/react-dialog";
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
import * as NavigationMenu from "@radix-ui/react-navigation-menu";
Expand Down Expand Up @@ -207,7 +207,7 @@ export const Header = memo(function SharedHeader() {
track("sponsor", "click");
}}
>
<Trans>Try Pro for Free</Trans>
Flowchart Fun Pro
</Link>
) : null}
</nav>
Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/de/messages.js

Large diffs are not rendered by default.

40 changes: 18 additions & 22 deletions app/src/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ msgstr "Werden Sie ein Pro-Benutzer"
msgid "Begin Typing"
msgstr "Beginne zu tippen"

#: src/components/Checkout.tsx:141
#: src/components/Checkout.tsx:144
msgid "Billed annually at $24"
msgstr "Jährlich abgerechnet für $24"

#: src/components/Checkout.tsx:153
#: src/components/Checkout.tsx:156
msgid "Billed monthly at $6"
msgstr "Monatlich abgerechnet für $6"

Expand Down Expand Up @@ -254,7 +254,7 @@ msgstr "Spalte"
msgid "Comment"
msgstr "Kommentar"

#: src/pages/Pricing2.tsx:197
#: src/pages/Pricing2.tsx:202
msgid "Complete access to all features for just $6/month!"
msgstr "Vollständiger Zugriff auf alle Funktionen für nur 6 $ pro Monat!"

Expand Down Expand Up @@ -610,6 +610,10 @@ msgstr "Kostenlos"
msgid "Fullscreen"
msgstr "Vollbild"

#: src/components/Checkout.tsx:133
msgid "Gain access to AI Features and never lose your work with a Pro account."
msgstr "Erhalten Sie Zugang zu KI-Funktionen und verlieren Sie nie Ihre Arbeit mit einem Pro-Konto."

#: src/components/Tabs/ThemeTab.tsx:155
msgid "General"
msgstr "Allgemein"
Expand Down Expand Up @@ -867,7 +871,7 @@ msgstr "Abrechnung verwalten"
msgid "Map Data"
msgstr "Daten abbilden"

#: src/components/Checkout.tsx:152
#: src/components/Checkout.tsx:155
msgid "Monthly"
msgstr "Monatlich"

Expand Down Expand Up @@ -1251,10 +1255,6 @@ msgstr "Start"
msgid "Start Over"
msgstr "Von vorne anfangen"

#: src/components/Checkout.tsx:173
msgid "Start free trial"
msgstr "Kostenlose Testphase starten"

#: src/pages/Account.tsx:162
msgid "Status"
msgstr "Status"
Expand All @@ -1273,7 +1273,7 @@ msgstr "Stil-Klassen"
msgid "Submit"
msgstr "Einsenden"

#: src/pages/Pricing2.tsx:362
#: src/pages/Pricing2.tsx:367
msgid "Subscribe to Pro and flowchart the fun way!"
msgstr "Abonniere Pro und erstelle Flussdiagramme auf unterhaltsame Weise!"

Expand Down Expand Up @@ -1459,26 +1459,18 @@ msgstr "Transformieren Sie Ihre Ideen in professionelle Diagramme in Sekunden"
msgid "Transform text into diagrams instantly"
msgstr "Verwandeln Sie Texte sofort in Diagramme"

#: src/pages/Pricing2.tsx:192
#: src/pages/Pricing2.tsx:197
msgid "Transform your Ideas into Professional Diagrams in Seconds"
msgstr "Verwandeln Sie Ihre Ideen in professionelle Diagramme in Sekundenschnelle"

#: src/pages/Pricing2.tsx:260
#: src/pages/Pricing2.tsx:265
msgid "Trusted by over 100,000 users across businesses and universities"
msgstr "Vertraut von über 100.000 Benutzern aus Unternehmen und Universitäten"

#: src/components/Header.tsx:210
msgid "Try Pro for Free"
msgstr "Probiere Pro kostenlos aus"

#: src/components/App.tsx:79
msgid "Try again"
msgstr "Erneut versuchen"

#: src/components/Checkout.tsx:133
msgid "Try it for free for two days. Cancel anytime."
msgstr "Teste es zwei Tage lang kostenlos. Jederzeit kündbar."

#: src/lib/parserErrors.tsx:60
msgid "Two edges have the same ID"
msgstr "Zwei Kanten haben die gleiche ID"
Expand Down Expand Up @@ -1609,7 +1601,7 @@ msgstr "Wasserzeichenfreie Diagramme"
msgid "Watermarks"
msgstr "Wasserzeichen"

#: src/pages/Pricing2.tsx:287
#: src/pages/Pricing2.tsx:292
msgid "What's Included"
msgstr "Was ist enthalten"

Expand Down Expand Up @@ -1642,7 +1634,7 @@ msgstr "Möchten Sie fortfahren?"
msgid "Write your prompt here or click to enable the microphone, then press and hold to record."
msgstr "Schreiben Sie hier Ihre Aufforderung oder klicken Sie auf das Mikrofon, um es zu aktivieren, dann halten Sie es gedrückt, um aufzunehmen."

#: src/components/Checkout.tsx:140
#: src/components/Checkout.tsx:143
msgid "Yearly"
msgstr "Jährlich"

Expand Down Expand Up @@ -1700,10 +1692,14 @@ msgstr "Vergrößern"
msgid "Zoom Out"
msgstr "Verkleinern"

#: src/components/Checkout.tsx:206
#: src/components/Checkout.tsx:213
msgid "month"
msgstr "Monat"

#: src/pages/LogIn.tsx:205
msgid "or"
msgstr "oder"

#: src/components/Checkout.tsx:176
msgid "{0}"
msgstr "{0}"
2 changes: 1 addition & 1 deletion app/src/locales/en/messages.js

Large diffs are not rendered by default.

40 changes: 18 additions & 22 deletions app/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ msgstr "Become a Pro User"
msgid "Begin Typing"
msgstr "Begin Typing"

#: src/components/Checkout.tsx:141
#: src/components/Checkout.tsx:144
msgid "Billed annually at $24"
msgstr "Billed annually at $24"

#: src/components/Checkout.tsx:153
#: src/components/Checkout.tsx:156
msgid "Billed monthly at $6"
msgstr "Billed monthly at $6"

Expand Down Expand Up @@ -254,7 +254,7 @@ msgstr "Column"
msgid "Comment"
msgstr "Comment"

#: src/pages/Pricing2.tsx:197
#: src/pages/Pricing2.tsx:202
msgid "Complete access to all features for just $6/month!"
msgstr "Complete access to all features for just $6/month!"

Expand Down Expand Up @@ -610,6 +610,10 @@ msgstr "Free"
msgid "Fullscreen"
msgstr "Fullscreen"

#: src/components/Checkout.tsx:133
msgid "Gain access to AI Features and never lose your work with a Pro account."
msgstr "Gain access to AI Features and never lose your work with a Pro account."

#: src/components/Tabs/ThemeTab.tsx:155
msgid "General"
msgstr "General"
Expand Down Expand Up @@ -867,7 +871,7 @@ msgstr "Manage Billing"
msgid "Map Data"
msgstr "Map Data"

#: src/components/Checkout.tsx:152
#: src/components/Checkout.tsx:155
msgid "Monthly"
msgstr "Monthly"

Expand Down Expand Up @@ -1251,10 +1255,6 @@ msgstr "Start"
msgid "Start Over"
msgstr "Start Over"

#: src/components/Checkout.tsx:173
msgid "Start free trial"
msgstr "Start free trial"

#: src/pages/Account.tsx:162
msgid "Status"
msgstr "Status"
Expand All @@ -1273,7 +1273,7 @@ msgstr "Style Classes"
msgid "Submit"
msgstr "Submit"

#: src/pages/Pricing2.tsx:362
#: src/pages/Pricing2.tsx:367
msgid "Subscribe to Pro and flowchart the fun way!"
msgstr "Subscribe to Pro and flowchart the fun way!"

Expand Down Expand Up @@ -1459,26 +1459,18 @@ msgstr "Transform Your Ideas into Professional Diagrams in Seconds"
msgid "Transform text into diagrams instantly"
msgstr "Transform text into diagrams instantly"

#: src/pages/Pricing2.tsx:192
#: src/pages/Pricing2.tsx:197
msgid "Transform your Ideas into Professional Diagrams in Seconds"
msgstr "Transform your Ideas into Professional Diagrams in Seconds"

#: src/pages/Pricing2.tsx:260
#: src/pages/Pricing2.tsx:265
msgid "Trusted by over 100,000 users across businesses and universities"
msgstr "Trusted by over 100,000 users across businesses and universities"

#: src/components/Header.tsx:210
msgid "Try Pro for Free"
msgstr "Try Pro for Free"

#: src/components/App.tsx:79
msgid "Try again"
msgstr "Try again"

#: src/components/Checkout.tsx:133
msgid "Try it for free for two days. Cancel anytime."
msgstr "Try it for free for two days. Cancel anytime."

#: src/lib/parserErrors.tsx:60
msgid "Two edges have the same ID"
msgstr "Two edges have the same ID"
Expand Down Expand Up @@ -1609,7 +1601,7 @@ msgstr "Watermark-Free Diagrams"
msgid "Watermarks"
msgstr "Watermarks"

#: src/pages/Pricing2.tsx:287
#: src/pages/Pricing2.tsx:292
msgid "What's Included"
msgstr "What's Included"

Expand Down Expand Up @@ -1642,7 +1634,7 @@ msgstr "Would you like to continue?"
msgid "Write your prompt here or click to enable the microphone, then press and hold to record."
msgstr "Write your prompt here or click to enable the microphone, then press and hold to record."

#: src/components/Checkout.tsx:140
#: src/components/Checkout.tsx:143
msgid "Yearly"
msgstr "Yearly"

Expand Down Expand Up @@ -1700,10 +1692,14 @@ msgstr "Zoom In"
msgid "Zoom Out"
msgstr "Zoom Out"

#: src/components/Checkout.tsx:206
#: src/components/Checkout.tsx:213
msgid "month"
msgstr "month"

#: src/pages/LogIn.tsx:205
msgid "or"
msgstr "or"

#: src/components/Checkout.tsx:176
msgid "{0}"
msgstr "{0}"
2 changes: 1 addition & 1 deletion app/src/locales/es/messages.js

Large diffs are not rendered by default.

Loading

0 comments on commit bdd7eee

Please sign in to comment.