Skip to content

Commit

Permalink
Merge pull request #685 from tone-row/dev
Browse files Browse the repository at this point in the history
v1.50.0
  • Loading branch information
rob-gordon authored Jul 11, 2024
2 parents d2a4662 + d2a1438 commit 2055517
Show file tree
Hide file tree
Showing 26 changed files with 786 additions and 623 deletions.
4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@supabase/supabase-js": "^2.31.0",
"@upstash/ratelimit": "^1.1.3",
"@vercel/kv": "^1.0.1",
"ai": "^3.1.0",
"ai": "^3.2.19",
"ajv": "^8.12.0",
"axios": "^0.27.2",
"csv-parse": "^5.3.6",
Expand Down Expand Up @@ -47,6 +47,6 @@
"@vercel/node": "^2.15.10",
"eslint": "^8.3.0",
"jest": "^29.4.3",
"typescript": "^5.2.2"
"typescript": "^5.5.3"
}
}
6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app",
"version": "1.49.4",
"version": "1.50.0",
"main": "module/module.js",
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -59,7 +59,7 @@
"@svgr/webpack": "^6.3.1",
"@tone-row/slang": "^1.2.35",
"@tone-row/strip-comments": "^2.0.1",
"ai": "^3.1.0",
"ai": "^3.2.19",
"buffer": "^6.0.3",
"classnames": "^2.3.2",
"construct-style-sheets-polyfill": "^3.1.0",
Expand Down Expand Up @@ -199,7 +199,7 @@
"tailwindcss": "^3.2.6",
"ts-node": "^10.9.1",
"ts-unused-exports": "^7.0.3",
"typescript": "^5.2.2",
"typescript": "^5.5.3",
"web-worker": "^1.2.0"
},
"jest": {
Expand Down
8 changes: 7 additions & 1 deletion app/src/components/Feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ const msg = {
};

export default function Feedback() {
const { register, handleSubmit, reset, watch } = useForm<FormData>();
const { register, handleSubmit, reset, watch } = useForm<FormData>({
defaultValues: {
from: "",
text: new URLSearchParams(window.location.search).get("text") || "",
},
});
const fields = watch();
const isValid = fields.from && fields.text;
const [success, setSuccess] = useState(false);
Expand All @@ -37,6 +42,7 @@ export default function Feedback() {
(data: FormData) => send({ ...msg, ...data }),
[send]
);

return (
<Page data-testid="feedback" size="sm" className="gap-8">
<header className="grid gap-4">
Expand Down
15 changes: 11 additions & 4 deletions app/src/components/LoadTemplateDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { prepareChart } from "../lib/prepareChart/prepareChart";
import { mountGraph, unmountGraph } from "../lib/useUnmountStore";
import { FFTheme } from "../lib/FFTheme";
import { getDefaultText } from "../lib/getDefaultText";
import { RequestTemplate } from "./RequestTemplate";

/**
* We want to load template content if the user has no content
Expand Down Expand Up @@ -107,10 +108,16 @@ export function LoadTemplateDialog() {
className="overflow-y-auto max-h-[calc(100vh-2rem)] h-[650px] grid-rows-[auto_minmax(0,1fr)]"
>
<Close />
<Dialog.Title className="text-xl font-bold flex items-center">
<PiShapesDuotone className="mr-2" />
<Trans>Templates</Trans>
</Dialog.Title>
<div className="grid gap-1 sm:flex justify-between items-baseline">
<Dialog.Title className="text-xl font-bold flex items-baseline">
<PiShapesDuotone className="mr-2 translate-y-1" />

<span className="mr-4">
<Trans>Templates</Trans>
</span>
</Dialog.Title>
<RequestTemplate />
</div>
<Dialog.Description asChild>
{templateData ? (
<div className="grid gap-2 h-full grid-rows-[auto_minmax(0,1fr)]">
Expand Down
16 changes: 16 additions & 0 deletions app/src/components/RequestTemplate.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Trans, t } from "@lingui/macro";
import { Link } from "react-router-dom";

export function RequestTemplate() {
return (
<Link
to={`/o?text=${encodeURIComponent(
t`I would like to request a new template:`
)}`}
className="text-[14px] font-normal opacity-50 hover:opacity-1000"
data-session-activity="Request Template"
>
<Trans>Missing a template? Suggest one here!</Trans>
</Link>
);
}
2 changes: 1 addition & 1 deletion app/src/lib/versionCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export async function useCheckVersion() {
refetchOnWindowFocus: true,
refetchOnMount: true,
refetchOnReconnect: true,
refetchInterval: 1000 * 60 * 1, // 1 minute
refetchInterval: 1000 * 60 * 5, // 5 minutes
refetchIntervalInBackground: true,
});
}
2 changes: 1 addition & 1 deletion app/src/locales/de/messages.js

Large diffs are not rendered by default.

60 changes: 34 additions & 26 deletions app/src/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ msgstr "Erweiterte Exportoptionen (PNG, JPG, SVG)"
msgid "Amount"
msgstr "Betrag"

#: src/components/Feedback.tsx:86
#: src/components/Feedback.tsx:92
msgid "An error occurred. Try resubmitting or email {0} directly."
msgstr "Es ist ein Fehler aufgetreten. Versuchen Sie, es erneut einzureichen oder senden Sie eine E-Mail direkt an {0}."

Expand All @@ -92,11 +92,11 @@ msgstr "Attribute"
msgid "August 2023"
msgstr "August 2023"

#: src/components/LoadTemplateDialog.tsx:124
#: src/components/LoadTemplateDialog.tsx:131
msgid "Back"
msgstr "Zurück"

#: src/components/Feedback.tsx:109
#: src/components/Feedback.tsx:115
msgid "Back To Editor"
msgstr "Zurück zum Editor"

Expand Down Expand Up @@ -205,7 +205,7 @@ msgstr "Überprüfen Sie Ihre E-Mail auf einen Link zum Einloggen. Sie können d
msgid "Choose"
msgstr "Wählen"

#: src/pages/New.tsx:166
#: src/pages/New.tsx:167
msgid "Choose Template"
msgstr "Vorlage auswählen"

Expand Down Expand Up @@ -254,7 +254,7 @@ msgstr "Farben beinhalten Rot, Orange, Gelb, Blau, Violett, Schwarz, Weiß und G
msgid "Column"
msgstr "Spalte"

#: src/components/Feedback.tsx:72
#: src/components/Feedback.tsx:78
msgid "Comment"
msgstr "Kommentar"

Expand Down Expand Up @@ -325,7 +325,7 @@ msgstr "Kopiere deinen Excalidraw-Code und füge ihn in <0>excalidraw.com</0> ei
msgid "Copy your mermaid.js code or open it directly in the mermaid.js live editor."
msgstr "Kopieren Sie Ihren mermaid.js-Code oder öffnen Sie ihn direkt im mermaid.js Live-Editor."

#: src/pages/New.tsx:268
#: src/pages/New.tsx:269
msgid "Create"
msgstr "Erstellen"

Expand All @@ -337,7 +337,7 @@ msgstr "Erstellen Sie Flussdiagramme mit KI"
msgid "Create Unlimited Flowcharts"
msgstr "Erstellen Sie unbegrenzte Flussdiagramme"

#: src/pages/New.tsx:153
#: src/pages/New.tsx:154
msgid "Create a New Chart"
msgstr "Nein Diagramm erstellen"

Expand Down Expand Up @@ -518,7 +518,7 @@ msgstr "Editierbar"
msgid "Editor"
msgstr "Editor"

#: src/components/Feedback.tsx:62
#: src/components/Feedback.tsx:68
#: src/pages/ForgotPassword.tsx:53
#: src/pages/ForgotPassword.tsx:57
#: src/pages/LogIn.tsx:145
Expand All @@ -530,7 +530,7 @@ msgstr "E-Mail"
msgid "Empty"
msgstr "Leer"

#: src/pages/New.tsx:226
#: src/pages/New.tsx:227
msgid "Enter a prompt or information you would like to create a chart from."
msgstr "Geben Sie eine Aufforderung oder Informationen ein, aus denen Sie ein Diagramm erstellen möchten."

Expand Down Expand Up @@ -571,7 +571,7 @@ msgstr "Exportieren Sie nach PNG & JPG"
msgid "Export to PNG, JPG, and SVG"
msgstr "Exportieren Sie nach PNG, JPG und SVG"

#: src/components/Feedback.tsx:44
#: src/components/Feedback.tsx:50
#: src/components/Header.tsx:114
#: src/components/Header.tsx:376
msgid "Feedback"
Expand Down Expand Up @@ -601,7 +601,7 @@ msgstr "Schriftfamilie"
msgid "Forgot your password?"
msgstr "Haben Sie Ihr Passwort vergessen?"

#: src/components/Feedback.tsx:47
#: src/components/Feedback.tsx:53
msgid "Found a bug? Have a feature request? We would love to hear from you!"
msgstr "Einen Fehler gefunden? Eine Funktionsanfrage? Wir würden uns freuen von Ihnen zu hören!"

Expand Down Expand Up @@ -666,6 +666,10 @@ msgstr "Wie werden Kanten in diesen Daten deklariert?"
msgid "How would you like to save your chart?"
msgstr "Wie möchten Sie Ihren Chart speichern?"

#: src/components/RequestTemplate.tsx:8
msgid "I would like to request a new template:"
msgstr "Ich möchte gerne eine neue Vorlage anfordern:"

#: src/components/LearnSyntaxDialog.tsx:136
msgid "ID's"
msgstr "IDs"
Expand Down Expand Up @@ -799,7 +803,7 @@ msgstr "Heller Modus"
msgid "Link"
msgstr "Link"

#: src/components/LoadTemplateDialog.tsx:173
#: src/components/LoadTemplateDialog.tsx:180
msgid "Load"
msgstr "Laden"

Expand All @@ -815,19 +819,19 @@ msgstr "Datei laden"
msgid "Load Files"
msgstr "Dateien laden"

#: src/components/LoadTemplateDialog.tsx:99
#: src/components/LoadTemplateDialog.tsx:100
msgid "Load Template"
msgstr "Vorlage laden"

#: src/components/LoadTemplateDialog.tsx:145
#: src/components/LoadTemplateDialog.tsx:152
msgid "Load default content"
msgstr "Standardinhalt laden"

#: src/components/LoadFromHashDialog.tsx:36
msgid "Load from link?"
msgstr "Von Link laden?"

#: src/components/LoadTemplateDialog.tsx:142
#: src/components/LoadTemplateDialog.tsx:149
msgid "Load layout and styles"
msgstr "Layout und Stile laden"

Expand Down Expand Up @@ -874,6 +878,10 @@ msgstr "Abrechnung verwalten"
msgid "Map Data"
msgstr "Daten abbilden"

#: src/components/RequestTemplate.tsx:13
msgid "Missing a template? Suggest one here!"
msgstr "Fehlt eine Vorlage? Schlag hier eine vor!"

#: src/components/Checkout.tsx:155
msgid "Monthly"
msgstr "Monatlich"
Expand All @@ -886,8 +894,8 @@ msgstr "Mehrere Zeiger auf derselben Zeile"
msgid "My dog ate my credit card!"
msgstr "Mein Hund hat meine Kreditkarte gefressen!"

#: src/pages/New.tsx:155
#: src/pages/New.tsx:163
#: src/pages/New.tsx:156
#: src/pages/New.tsx:164
msgid "Name Chart"
msgstr "Diagramm benennen"

Expand Down Expand Up @@ -1178,7 +1186,7 @@ msgstr "In Datei speichern"
msgid "Save your Work"
msgstr "Speichern Sie Ihre Arbeit"

#: src/pages/New.tsx:206
#: src/pages/New.tsx:207
msgid "Set Content"
msgstr "Inhalt festlegen"

Expand Down Expand Up @@ -1271,7 +1279,7 @@ msgid "Style Classes"
msgstr "Stil-Klassen"

#: src/components/EditWithAI.tsx:242
#: src/components/Feedback.tsx:81
#: src/components/Feedback.tsx:87
#: src/components/ImportDataDialog.tsx:577
msgid "Submit"
msgstr "Einsenden"
Expand Down Expand Up @@ -1311,7 +1319,7 @@ msgstr "Ziel-Trennzeichen"
msgid "Target Distance From Node"
msgstr "Zielabstand vom Knoten "

#: src/components/LoadTemplateDialog.tsx:112
#: src/components/LoadTemplateDialog.tsx:116
msgid "Templates"
msgstr "Vorlagen"

Expand Down Expand Up @@ -1346,7 +1354,7 @@ msgstr "Text gefolgt von Doppelpunkt + Leerzeichen erstellt eine Kante mit dem T
msgid "Text on a line creates a node with the text as the label"
msgstr "Text in einer Zeile erstellt einen Knoten mit dem Text als Label"

#: src/components/Feedback.tsx:106
#: src/components/Feedback.tsx:112
msgid "Thank you for your feedback!"
msgstr "Danke für Ihr Feedback!"

Expand Down Expand Up @@ -1409,11 +1417,11 @@ msgstr "Diese Funktion ist nur für Pro-Benutzer verfügbar. <0>Werden Sie Pro-N
msgid "This is your sandbox. It's a great place for experimentation, but <0>it resets daily</0>."
msgstr "Das ist dein Sandkasten. Es ist ein großartiger Ort für Experimente, aber <0>er wird täglich zurückgesetzt</0>."

#: src/pages/New.tsx:272
#: src/pages/New.tsx:273
msgid "This may take between 30 seconds and 2 minutes depending on the length of your input."
msgstr "Dies kann je nach Länge Ihrer Eingabe zwischen 30 Sekunden und 2 Minuten dauern."

#: src/components/LoadTemplateDialog.tsx:159
#: src/components/LoadTemplateDialog.tsx:166
msgid "This will replace the current content."
msgstr "Dies ersetzt den aktuellen Inhalt."

Expand Down Expand Up @@ -1527,7 +1535,7 @@ msgstr "Upgraden Sie auf Pro für nur $4/Monat."
msgid "Upload your File"
msgstr "Laden Sie Ihre Datei hoch"

#: src/pages/New.tsx:220
#: src/pages/New.tsx:221
msgid "Use AI"
msgstr "Künstliche Intelligenz verwenden"

Expand All @@ -1536,7 +1544,7 @@ msgstr "Künstliche Intelligenz verwenden"
msgid "Use Custom CSS Only"
msgstr "Nur benutzerdefinierte CSS verwenden"

#: src/pages/New.tsx:212
#: src/pages/New.tsx:213
msgid "Use Default Content"
msgstr "Standardinhalt verwenden"

Expand Down Expand Up @@ -1649,7 +1657,7 @@ msgstr "Ja: Option A"
msgid "You are about to add {numNodes} nodes and {numEdges} edges to your graph."
msgstr "Sie sind dabei, {numNodes} Knoten und {numEdges} Kanten zu Ihrem Graphen hinzuzufügen."

#: src/pages/New.tsx:250
#: src/pages/New.tsx:251
msgid "You can create unlimited permanent flowcharts with <0>Flowchart Fun Pro</0>."
msgstr "Mit <0>Flowchart Fun Pro</0> können Sie unbegrenzt dauerhafte Flussdiagramme erstellen."

Expand Down
2 changes: 1 addition & 1 deletion app/src/locales/en/messages.js

Large diffs are not rendered by default.

Loading

0 comments on commit 2055517

Please sign in to comment.