[PR #1017] [MERGED] refactor: move login.html into a login component #926

Closed
opened 2026-02-25 23:35:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/1017
Author: @fmartingr
Created: 12/8/2024
Status: Merged
Merged: 12/9/2024
Merged by: @fmartingr

Base: masterHead: refactor/login-component


📝 Commits (10+)

  • e971dc4 feat: Add login component JavaScript file
  • 84c9869 feat: Create login component and refactor login view
  • a2db0b5 refactor: Convert login to single-page application with dynamic component rendering
  • 6c1fc16 feat: Enhance session validation and login form display logic
  • 7db97c9 fix: Resolve Vue app mounting and method duplication issues
  • 29373e6 fix: Prevent null reference error when focusing username input
  • 006750d fix: Initialize isLoggedIn to true to show login form during async check
  • 56edd9b refactor: Improve session validation and login flow logic
  • 3d232d7 fix: Adjust login component visibility and initial login state
  • 710d4b9 feat: Add login form template to login component

📊 Changes

5 files changed (+217 additions, -187 deletions)

View changed files

📝 internal/http/routes/frontend.go (+0 -6)
📝 internal/http/routes/frontend_test.go (+0 -7)
internal/view/assets/js/component/login.js (+152 -0)
📝 internal/view/index.html (+65 -11)
internal/view/login.html (+0 -163)

📄 Description

Changes

  • Removed separate login page and route, integrating login functionality into the main SPA
  • Modified login component to match original design using Vue directives
  • Updated state management for login/main view visibility using v-if/v-else-if
  • Removed server-side version injection, replacing with API-based version fetching
  • Fixed logout functionality to show login form without page redirect

Technical Details

  1. Removed /login route from internal/http/routes/frontend.go
  2. Updated login component template in internal/view/assets/js/component/login.js:
  3. Modified internal/view/index.html:
    • Updated login state management
    • Improved logout function to maintain SPA behavior

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/1017 **Author:** [@fmartingr](https://github.com/fmartingr) **Created:** 12/8/2024 **Status:** ✅ Merged **Merged:** 12/9/2024 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `refactor/login-component` --- ### 📝 Commits (10+) - [`e971dc4`](https://github.com/go-shiori/shiori/commit/e971dc47a17f4fa43524935aab703327cd015a32) feat: Add login component JavaScript file - [`84c9869`](https://github.com/go-shiori/shiori/commit/84c98696dba9f237963131ca0ac05b9c44ce0468) feat: Create login component and refactor login view - [`a2db0b5`](https://github.com/go-shiori/shiori/commit/a2db0b5db241ad396f68bd682f3199d5bef393c7) refactor: Convert login to single-page application with dynamic component rendering - [`6c1fc16`](https://github.com/go-shiori/shiori/commit/6c1fc164ca9c760c535f29523eae71a2ee310164) feat: Enhance session validation and login form display logic - [`7db97c9`](https://github.com/go-shiori/shiori/commit/7db97c9e7ae640caaebe9246576f583139b8f7c3) fix: Resolve Vue app mounting and method duplication issues - [`29373e6`](https://github.com/go-shiori/shiori/commit/29373e6ebb5d30bd8232c85a3f6830d8f9b9f5a4) fix: Prevent null reference error when focusing username input - [`006750d`](https://github.com/go-shiori/shiori/commit/006750d10d5110d723b27c7d9521192f45ff05e7) fix: Initialize `isLoggedIn` to true to show login form during async check - [`56edd9b`](https://github.com/go-shiori/shiori/commit/56edd9be69524fc373064020c1207cfcbf39da17) refactor: Improve session validation and login flow logic - [`3d232d7`](https://github.com/go-shiori/shiori/commit/3d232d70a9dbd81ac1e704432a35b06d07d8a560) fix: Adjust login component visibility and initial login state - [`710d4b9`](https://github.com/go-shiori/shiori/commit/710d4b9f606d790874395b242d735e04f768ba7b) feat: Add login form template to login component ### 📊 Changes **5 files changed** (+217 additions, -187 deletions) <details> <summary>View changed files</summary> 📝 `internal/http/routes/frontend.go` (+0 -6) 📝 `internal/http/routes/frontend_test.go` (+0 -7) ➕ `internal/view/assets/js/component/login.js` (+152 -0) 📝 `internal/view/index.html` (+65 -11) ➖ `internal/view/login.html` (+0 -163) </details> ### 📄 Description ## Changes - Removed separate login page and route, integrating login functionality into the main SPA - Modified login component to match original design using Vue directives - Updated state management for login/main view visibility using v-if/v-else-if - Removed server-side version injection, replacing with API-based version fetching - Fixed logout functionality to show login form without page redirect ## Technical Details 1. Removed `/login` route from `internal/http/routes/frontend.go` 2. Updated login component template in `internal/view/assets/js/component/login.js`: 3. Modified `internal/view/index.html`: - Updated login state management - Improved logout function to maintain SPA behavior --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:35:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#926
No description provided.