feat: Add landing page and version history functionality

- Implemented ConditionalHome component to show LandingPage for guests and Home for authenticated users.
- Created LandingPage with login options for Google and GitHub.
- Added VersionHistoryPanel component for managing document versions.
- Integrated version history functionality into EditorPage.
- Updated API client to handle FormData correctly.
- Added styles for LandingPage and VersionHistoryPanel.
- Created version management API methods for creating, listing, restoring, and fetching document versions.
This commit is contained in:
M1ngdaXie
2026-01-19 16:14:56 -08:00
parent e363b99966
commit 0ec58ca866
10 changed files with 1577 additions and 13 deletions

View File

@@ -142,7 +142,7 @@ func (s *PostgresStore) ListDocumentVersions(
// GetDocumentVersion retrieves a specific version with full snapshot
func (s *PostgresStore) GetDocumentVersion(ctx context.Context, versionID uuid.UUID) (*models.DocumentVersion, error) {
query := `
SELECT id, document_id, yjs_snapshot, text_preview, ve rsion_number,
SELECT id, document_id, yjs_snapshot, text_preview, version_number,
created_by, version_label, is_auto_generated, created_at
FROM document_versions
WHERE id = $1