added onboarding page

This commit is contained in:
Mahesh Sanikommmu 2025-08-26 22:01:58 -07:00
parent ee9252e98e
commit 0c432af694
5 changed files with 479 additions and 1 deletions

View file

@ -26,12 +26,19 @@ interface SearchResponse {
export default defineBackground(() => {
let twitterImporter: TwitterImporter | null = null;
browser.runtime.onInstalled.addListener(() => {
browser.runtime.onInstalled.addListener((details) => {
browser.contextMenus.create({
id: CONTEXT_MENU_IDS.SAVE_TO_SUPERMEMORY,
title: "Save to Supermemory",
contexts: ["selection", "page", "link"],
});
// Open welcome tab on first install
if (details.reason === "install") {
browser.tabs.create({
url: browser.runtime.getURL("/welcome.html"),
});
}
});
// Intercept Twitter requests to capture authentication headers.

View file

@ -0,0 +1,135 @@
function Welcome() {
return (
<div className="welcome-container">
<div className="welcome-content">
{/* Header */}
<div className="welcome-header">
<img
src="/logo-trademark.svg"
alt="Supermemory"
className="welcome-logo"
/>
<p className="welcome-subtitle">
Your AI-powered second brain for saving and organizing everything
that matters
</p>
</div>
{/* Features Section */}
<div className="welcome-features">
<h2 className="features-title">What can you do with Supermemory?</h2>
<div className="features-grid">
<div className="feature-card">
<div className="feature-icon">💾</div>
<h3>Save Any Page</h3>
<p>
Instantly save web pages, articles, and content to your personal
knowledge base
</p>
</div>
<div className="feature-card">
<div className="feature-icon">🐦</div>
<h3>Import Twitter/X Bookmarks</h3>
<p>
Bring all your saved tweets and bookmarks into one organized
place
</p>
</div>
<div className="feature-card">
<div className="feature-icon">🤖</div>
<h3>Import ChatGPT Memories</h3>
<p>
Keep your important AI conversations and insights accessible
</p>
</div>
<div className="feature-card">
<div className="feature-icon">🔍</div>
<h3>AI-Powered Search</h3>
<p>
Find anything you've saved using intelligent semantic search
</p>
</div>
</div>
</div>
{/* Getting Started */}
<div className="welcome-getting-started">
<h2 className="getting-started-title">
Get Started in 2 Simple Steps
</h2>
<div className="steps">
<div className="step">
<div className="step-number">1</div>
<div className="step-content">
<h3>Login to Your Account</h3>
<p>Connect your Supermemory account to start saving content</p>
</div>
</div>
<div className="step">
<div className="step-number">2</div>
<div className="step-content">
<h3>Start Saving</h3>
<p>Click the extension icon on any page to save it instantly</p>
</div>
</div>
</div>
</div>
{/* Actions */}
<div className="welcome-actions">
<button
type="button"
className="login-primary-btn"
onClick={() => {
chrome.tabs.create({
url: import.meta.env.PROD
? "https://app.supermemory.ai/login"
: "http://localhost:3000/login",
});
}}
>
Login to Get Started
</button>
<div className="welcome-help">
<p className="help-text">
Need help getting started?{" "}
<button
type="button"
className="help-link"
onClick={() => {
window.open("mailto:dhravya@supermemory.com", "_blank");
}}
>
Contact Support
</button>
</p>
</div>
</div>
{/* Footer */}
<div className="welcome-footer">
<p>
Learn more at{" "}
<a
href="https://supermemory.ai"
target="_blank"
rel="noopener noreferrer"
className="footer-link"
>
supermemory.ai
</a>
</p>
</div>
</div>
</div>
);
}
export default Welcome;

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/icon-16.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to Supermemory</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
</body>
</html>

View file

@ -0,0 +1,13 @@
import React from "react";
import ReactDOM from "react-dom/client";
import Welcome from "./Welcome";
import "./welcome.css";
const rootElement = document.getElementById("root");
if (rootElement) {
ReactDOM.createRoot(rootElement).render(
<React.StrictMode>
<Welcome />
</React.StrictMode>,
);
}

View file

@ -0,0 +1,310 @@
/* Custom Font Definitions */
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url('/fonts/SpaceGrotesk-Light.ttf') format('truetype');
}
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/SpaceGrotesk-Regular.ttf') format('truetype');
}
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('/fonts/SpaceGrotesk-Medium.ttf') format('truetype');
}
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('/fonts/SpaceGrotesk-SemiBold.ttf') format('truetype');
}
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/SpaceGrotesk-Bold.ttf') format('truetype');
}
/* Welcome Page Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: #ffffff;
color: #000000;
line-height: 1.5;
}
.welcome-container {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 32px;
background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}
.welcome-content {
max-width: 800px;
width: 100%;
text-align: center;
}
/* Header Styles */
.welcome-header {
margin-bottom: 48px;
}
.welcome-logo {
height: 64px;
margin-bottom: 24px;
}
.welcome-title {
font-size: 32px;
font-weight: 700;
color: #000000;
margin-bottom: 16px;
}
.welcome-subtitle {
font-size: 18px;
color: #6c757d;
font-weight: 400;
max-width: 600px;
margin: 0 auto;
}
/* Features Section */
.welcome-features {
margin-bottom: 48px;
}
.features-title {
font-size: 24px;
font-weight: 600;
color: #000000;
margin-bottom: 32px;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 24px;
margin-bottom: 32px;
}
.feature-card {
background: #ffffff;
border: 1px solid #e9ecef;
border-radius: 12px;
padding: 24px;
text-align: center;
transition: all 0.2s ease;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.feature-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
border-color: #ced4da;
}
.feature-icon {
font-size: 32px;
margin-bottom: 16px;
display: block;
}
.feature-card h3 {
font-size: 18px;
font-weight: 600;
color: #000000;
margin-bottom: 12px;
}
.feature-card p {
font-size: 14px;
color: #6c757d;
line-height: 1.4;
}
/* Getting Started Section */
.welcome-getting-started {
margin-bottom: 48px;
}
.getting-started-title {
font-size: 24px;
font-weight: 600;
color: #000000;
margin-bottom: 32px;
}
.steps {
display: flex;
justify-content: center;
gap: 32px;
flex-wrap: wrap;
}
.step {
display: flex;
align-items: center;
gap: 16px;
max-width: 300px;
text-align: left;
}
.step-number {
width: 48px;
height: 48px;
background: #374151;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-weight: 600;
flex-shrink: 0;
}
.step-content h3 {
font-size: 16px;
font-weight: 600;
color: #000000;
margin-bottom: 4px;
}
.step-content p {
font-size: 14px;
color: #6c757d;
line-height: 1.3;
}
/* Actions Section */
.welcome-actions {
margin-bottom: 32px;
}
.login-primary-btn {
width: auto;
min-width: 200px;
padding: 16px 32px;
background-color: #374151;
color: white;
border: none;
border-radius: 24px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: background-color 0.2s ease;
margin-bottom: 16px;
outline: none;
}
.login-primary-btn:hover:not(:disabled) {
background-color: #1f2937;
}
.login-primary-btn:disabled {
background-color: #9e9e9e;
cursor: not-allowed;
}
.welcome-help {
margin-top: 16px;
}
.help-text {
font-size: 14px;
color: #6c757d;
margin: 0;
}
.help-link {
background: none;
border: none;
color: #4285f4;
cursor: pointer;
text-decoration: underline;
font-size: 14px;
padding: 0;
outline: none;
}
.help-link:hover {
color: #1a73e8;
}
/* Footer */
.welcome-footer {
border-top: 1px solid #e9ecef;
padding-top: 24px;
margin-top: 32px;
}
.welcome-footer p {
font-size: 14px;
color: #6c757d;
}
.footer-link {
color: #4285f4;
text-decoration: none;
}
.footer-link:hover {
text-decoration: underline;
color: #1a73e8;
}
/* Responsive Design */
@media (max-width: 768px) {
.welcome-container {
padding: 16px;
}
.welcome-title {
font-size: 28px;
}
.welcome-subtitle {
font-size: 16px;
}
.features-grid {
grid-template-columns: 1fr;
gap: 16px;
}
.steps {
flex-direction: column;
align-items: center;
}
.step {
max-width: 100%;
text-align: center;
flex-direction: column;
}
}