Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
VITE_BACKEND_URL=http://backend.com
VITE_BACKEND_URL=http://backend.com
REACT_APP_GOOGLE_CLIENT_ID=your_google_client_id_here
REACT_APP_GOOGLE_API_KEY=your_google_api_key_here
26 changes: 15 additions & 11 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
// App.js (updated)
import { BrowserRouter, Routes, Route, useLocation } from "react-router-dom";
import { useLayoutEffect } from "react";
import Editor from "./pages/Editor";
import BugReport from "./pages/BugReport";
import Templates from "./pages/Templates";
import LandingPage from "./pages/LandingPage";
import SettingsContextProvider from "./context/SettingsContext";
import { GoogleDriveProvider } from "./context/GoogleDriveContext";
import NotFound from "./pages/NotFound";

export default function App() {
return (
<SettingsContextProvider>
<BrowserRouter>
<RestoreScroll />
<Routes>
<Route path="/" element={<LandingPage />} />
<Route path="/editor" element={<Editor />} />
<Route path="/bug-report" element={<BugReport />} />
<Route path="/templates" element={<Templates />} />
<Route path="*" element={<NotFound />} />
</Routes>
</BrowserRouter>
<GoogleDriveProvider>
<BrowserRouter>
<RestoreScroll />
<Routes>
<Route path="/" element={<LandingPage />} />
<Route path="/editor" element={<Editor />} />
<Route path="/bug-report" element={<BugReport />} />
<Route path="/templates" element={<Templates />} />
<Route path="*" element={<NotFound />} />
</Routes>
</BrowserRouter>
</GoogleDriveProvider>
</SettingsContextProvider>
);
}
Expand All @@ -30,4 +34,4 @@ function RestoreScroll() {
window.scroll(0, 0);
}, [location.pathname]);
return null;
}
}
191 changes: 191 additions & 0 deletions src/components/gdmodal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
/* components/GoogleDriveModal.css */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}

.modal-content {
background: white;
border-radius: 8px;
padding: 0;
width: 90%;
max-width: 600px;
max-height: 80vh;
overflow: hidden;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
border-bottom: 1px solid #e1e5e9;
}

.modal-header h2 {
margin: 0;
color: #333;
}

.close-button {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #666;
}

.close-button:hover {
color: #333;
}

.auth-section {
padding: 40px 20px;
text-align: center;
}

.sign-in-button {
background: #4285f4;
color: white;
border: none;
padding: 12px 24px;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
margin-top: 16px;
}

.sign-in-button:hover {
background: #3367d6;
}

.tab-navigation {
display: flex;
border-bottom: 1px solid #e1e5e9;
}

.tab-button {
flex: 1;
padding: 16px;
background: none;
border: none;
cursor: pointer;
font-size: 16px;
color: #666;
}

.tab-button.active {
color: #4285f4;
border-bottom: 2px solid #4285f4;
}

.error-message {
background: #ffeaea;
color: #d32f2f;
padding: 12px 20px;
margin: 20px;
border-radius: 4px;
border-left: 4px solid #d32f2f;
}

.file-list-section, .save-section {
padding: 20px;
}

.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}

.refresh-button {
background: #f8f9fa;
border: 1px solid #dadce0;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
}

.refresh-button:hover {
background: #e8f0fe;
}

.loading, .empty-state {
text-align: center;
padding: 40px;
color: #666;
}

.file-list {
max-height: 400px;
overflow-y: auto;
}

.file-item {
padding: 16px;
border: 1px solid #e1e5e9;
border-radius: 4px;
margin-bottom: 8px;
cursor: pointer;
}

.file-item:hover {
background: #f8f9fa;
border-color: #4285f4;
}

.file-name {
font-weight: 500;
color: #333;
}

.file-modified {
font-size: 14px;
color: #666;
margin-top: 4px;
}

.input-group {
margin-bottom: 20px;
}

.input-group label {
display: block;
margin-bottom: 8px;
color: #333;
font-weight: 500;
}

.input-group input {
width: 100%;
padding: 12px;
border: 1px solid #dadce0;
border-radius: 4px;
font-size: 16px;
box-sizing: border-box;
}

.save-button {
background: #34a853;
color: white;
border: none;
padding: 12px 24px;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
width: 100%;
}

.save-button:hover {
background: #2e8b47;
}
Loading