Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

remove references to other project (picoapps.xyz)

Abi Rajaea55eaa807a0
diff --git a/backend/routes/generate_code.py b/backend/routes/generate_code.py
index 493783e7..ba9ebfc9 100644
--- a/backend/routes/generate_code.py
+++ b/backend/routes/generate_code.py
@@ -493,7 +493,7 @@ class PromptCreationStage:
return prompt_messages
except Exception:
await self.throw_error(
- "Error assembling prompt. Contact support at [email protected]"
+ "Error assembling prompt. Contact support at [email protected]"
)
raise
diff --git a/frontend/public/legal/terms-of-service.html b/frontend/public/legal/terms-of-service.html
new file mode 100644
index 00000000..42771ce1
--- /dev/null
+++ b/frontend/public/legal/terms-of-service.html
@@ -0,0 +1,159 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="utf-8"/>
+<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
+<title>WhimsyWorks, Inc. Terms of Service</title>
+<style>
+ :root {
+ color-scheme: light;
+ --bg: #f8fafc;
+ --panel: #ffffff;
+ --ink: #0f172a;
+ --muted: #64748b;
+ --line: #e2e8f0;
+ --accent: #2563eb;
+ }
+
+ * {
+ box-sizing: border-box;
+ }
+
+ body {
+ margin: 0;
+ background:
+ radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34rem),
+ var(--bg);
+ color: var(--ink);
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
+ line-height: 1.65;
+ }
+
+ .page {
+ width: min(920px, calc(100% - 32px));
+ margin: 0 auto;
+ padding: 48px 0;
+ }
+
+ header {
+ margin-bottom: 24px;
+ }
+
+ .brand {
+ color: var(--accent);
+ font-size: 14px;
+ font-weight: 700;
+ letter-spacing: 0.02em;
+ margin-bottom: 8px;
+ }
+
+ h1 {
+ margin: 0;
+ font-size: clamp(32px, 5vw, 52px);
+ line-height: 1.05;
+ letter-spacing: -0.03em;
+ }
+
+ .subtitle {
+ margin: 12px 0 0;
+ color: var(--muted);
+ font-size: 17px;
+ }
+
+ main {
+ background: var(--panel);
+ border: 1px solid var(--line);
+ border-radius: 12px;
+ box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
+ padding: clamp(24px, 4vw, 44px);
+ }
+
+ .updated {
+ margin: 0 0 28px;
+ color: var(--muted);
+ font-size: 14px;
+ }
+
+ h2 {
+ border-top: 1px solid var(--line);
+ color: var(--ink);
+ font-size: 20px;
+ line-height: 1.3;
+ margin: 28px 0 10px;
+ padding-top: 24px;
+ }
+
+ h2:first-of-type {
+ border-top: 0;
+ margin-top: 0;
+ padding-top: 0;
+ }
+
+ p {
+ margin: 0 0 16px;
+ }
+
+ .contact {
+ color: var(--muted);
+ }
+
+ a {
+ color: var(--accent);
+ }
+
+ @media (max-width: 640px) {
+ .page {
+ padding: 28px 0;
+ }
+
+ main {
+ border-radius: 10px;
+ }
+ }
+</style>
+</head>
+<body>
+<div class="page">
+<header>
+<div class="brand">screenshot-to-code by WhimsyWorks, Inc.</div>
+<h1>Terms of Service</h1>
+<p class="subtitle">Terms for using AI screenshot-to-code generation services.</p>
+</header>
+<main>
+<p class="updated"><strong>Last Updated:</strong> Nov 29, 2023</p>
+<h2>1. Acceptance of Terms</h2>
+<p>By using the AI screenshot-to-code generation services ("Services") provided by WhimsyWorks, Inc. ("Company"), users ("You") agree to be bound by these Terms of Service ("Terms").</p>
+<h2>2. Description of Services</h2>
+<p>The Services involve the conversion of images and screenshots provided by you into code through the use of artificial intelligence technology.</p>
+<h2>3. User Responsibilities</h2>
+<p>You are responsible for any images or screenshots you upload to the Services. You must ensure that you have the necessary rights or permissions for any images you upload.</p>
+<h2>4. Intellectual Property Rights</h2>
+<p>By uploading any image or screenshot, you grant the Company a worldwide, perpetual, irrevocable, non-exclusive, royalty-free license to use, reproduce, modify, display, and create derivative works from these materials. You acknowledge that all images and code generated by the Services, as well as any derivative works, are the exclusive property of the Company. The Company reserves the right to use all uploaded materials for the purpose of training and improving its AI models and other related business activities.</p>
+<h2>5. Prohibited Use</h2>
+<p>You may not use the Services for any unlawful or prohibited activities as determined by the Company. The uploading of offensive, obscene, or infringing content is strictly prohibited.</p>
+<h2>6. Payment and Purchase of Services: </h2>
+<p>
+6.1. Purchasing Code Generations: You may purchase credits for code generations, which are available in batches.
+6.2. Payment Terms: Payment must be made in advance, and the purchased credits will be added to your account upon successful transaction.
+6.3. Refund Policy: All sales of code generation credits are final and non-refundable.
+6.4. Usage of Credits: Credits for code generations must be used within the validity period specified at the time of purchase. Unused credits will expire and cannot be redeemed or refunded.
+ </p>
+<h2>7. Disclaimer of Warranties</h2>
+<p>The Services are provided "as is" and the Company expressly disclaims any warranties or guarantees of accuracy or reliability of the Services.</p>
+<h2>8. Limitation of Liability</h2>
+<p>The Company shall not be liable for any direct, indirect, incidental, special, or consequential damages resulting from the use or inability to use the Services.</p>
+<h2>9. Amendment of Terms</h2>
+<p>The Company reserves the right to modify these Terms at any time. Continued use of the Services after such changes will constitute your consent to such changes.</p>
+<h2>10. Governing Law</h2>
+<p>These Terms shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to its conflict of law principles.</p>
+<h2>11. Contact Information</h2>
+<p>For any questions regarding these Terms, please contact us at:</p>
+<p class="contact">WhimsyWorks, Inc.<br/>
+228 Park Ave S<br/>
+PMB 44611<br/>
+New York, New York 10003-1502 US</p>
+<p>or at <a href="mailto:[email protected]">[email protected]</a></p>
+</main>
+</div>
+</body>
+</html>
diff --git a/frontend/public/logos/amazon.png b/frontend/public/logos/amazon.png
new file mode 100644
index 00000000..e8140394
Binary files /dev/null and b/frontend/public/logos/amazon.png differ
diff --git a/frontend/public/logos/baidu.png b/frontend/public/logos/baidu.png
new file mode 100644
index 00000000..c1b9cdfa
Binary files /dev/null and b/frontend/public/logos/baidu.png differ
diff --git a/frontend/public/logos/bytedance.png b/frontend/public/logos/bytedance.png
new file mode 100644
index 00000000..259f37af
Binary files /dev/null and b/frontend/public/logos/bytedance.png differ
diff --git a/frontend/public/logos/microsoft.png b/frontend/public/logos/microsoft.png
new file mode 100644
index 00000000..26dd89bd
Binary files /dev/null and b/frontend/public/logos/microsoft.png differ
diff --git a/frontend/public/logos/mit.png b/frontend/public/logos/mit.png
new file mode 100644
index 00000000..b5286ce9
Binary files /dev/null and b/frontend/public/logos/mit.png differ
diff --git a/frontend/public/logos/stanford.png b/frontend/public/logos/stanford.png
new file mode 100644
index 00000000..2359ef1b
Binary files /dev/null and b/frontend/public/logos/stanford.png differ
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 3f0307fc..c2a60c65 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -3,7 +3,6 @@ import { generateCode } from "./generateCode";
import { AppState, AppTheme, EditorTheme, Settings } from "./types";
import { NEW_DESIGN_SYSTEM_CONTENT } from "./lib/design-systems";
import { IS_RUNNING_ON_CLOUD } from "./config";
-import { PicoBadge } from "./components/messages/PicoBadge";
import { OnboardingNote } from "./components/messages/OnboardingNote";
import { usePersistedState } from "./hooks/usePersistedState";
import TermsOfServiceDialog from "./components/TermsOfServiceDialog";
@@ -736,7 +735,6 @@ function App() {
: "min-h-screen"
}`}
>
- {IS_RUNNING_ON_CLOUD && <PicoBadge />}
{IS_RUNNING_ON_CLOUD && (
<TermsOfServiceDialog
open={!settings.isTermOfServiceAccepted}
diff --git a/frontend/src/components/TermsOfServiceDialog.tsx b/frontend/src/components/TermsOfServiceDialog.tsx
index ad46c0a2..04eff24e 100644
--- a/frontend/src/components/TermsOfServiceDialog.tsx
+++ b/frontend/src/components/TermsOfServiceDialog.tsx
@@ -52,7 +52,7 @@ const TermsOfServiceDialog: React.FC<{
By providing your email, you consent to receiving occasional product
updates, and you accept the{" "}
<a
- href="https://a.picoapps.xyz/camera-write"
+ href="/legal/terms-of-service.html"
target="_blank"
className="underline"
>
@@ -99,7 +99,7 @@ const TermsOfServiceDialog: React.FC<{
<img
key={companyName}
className="col-span-1 max-h-12 w-full object-contain grayscale opacity-50 hover:opacity-100"
- src={`https://picoapps.xyz/logos/${companyName}.png`}
+ src={`/logos/${companyName}.png`}
alt={companyName}
width={120}
height={48}
diff --git a/frontend/src/components/messages/PicoBadge.tsx b/frontend/src/components/messages/PicoBadge.tsx
deleted file mode 100644
index bdd00832..00000000
--- a/frontend/src/components/messages/PicoBadge.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-export function PicoBadge() {
- return (
- <>
- <a
- href="https://screenshot-to-code.canny.io/feature-requests"
- target="_blank"
- >
- <div
- className="fixed z-50 bottom-16 right-5 rounded-md shadow bg-black
- text-white px-4 text-xs py-3 cursor-pointer"
- >
- feature requests?
- </div>
- </a>
- <a href="https://picoapps.xyz?ref=screenshot-to-code" target="_blank">
- <div
- className="fixed z-50 bottom-5 right-5 rounded-md shadow text-black
- bg-white px-4 text-xs py-3 cursor-pointer"
- >
- an open source project by Pico
- </div>
- </a>
- </>
- );
-}