Skip to content

Merge three pages into single SPA#149

Merged
zhenghaoz merged 3 commits intogorse-io:masterfrom
zhangzhenghao:merge-pages-spa
Apr 3, 2026
Merged

Merge three pages into single SPA#149
zhenghaoz merged 3 commits intogorse-io:masterfrom
zhangzhenghao:merge-pages-spa

Conversation

@zhangzhenghao
Copy link
Copy Markdown
Contributor

Summary

Consolidate login, privacy, and index pages into one Vue Single Page Application.

Changes

Frontend

  • Use Vue Router for client-side routing with history mode (clean URLs without hash)
  • Create MainLayout component for shared navigation bar
  • Move Login and Privacy pages to Vue Router components
  • Single entry point: index.html

Backend (Flask)

  • Update routes to serve single index.html for all frontend routes
  • Add /logout route for user logout
  • Catch-all route for SPA history mode support

File Structure

  • src/main.js - unified entry point
  • src/App.vue - root component with router-view
  • src/layouts/MainLayout.vue - shared navigation layout
  • src/views/ - Home, Favorites, Login, Privacy
  • src/components/Preloader.vue - shared component

Benefits

  • Simpler project structure
  • Clean URLs (history mode)
  • Better code organization
  • Shared navigation and layout

Test Plan

  1. pnpm build - successful build
  2. Run Flask server
  3. Navigate between pages using Vue Router
  4. Test logout functionality

zhangzhenghao and others added 3 commits April 3, 2026 21:51
- Consolidate login, privacy, and index pages into one Vue SPA
- Use Vue Router for client-side routing with history mode
- Create MainLayout component for shared navigation
- Update Flask routes to serve single index.html for all frontend routes
- Add /logout route for user logout
- Remove multi-page entry points (login.html, privacy.html)
- Simplify project structure with unified entry point
@zhenghaoz zhenghaoz merged commit bc32d5d into gorse-io:master Apr 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants