Skip to content

Add login component first step#45

Merged
mmarkus1 merged 4 commits into
devfrom
Add-login-component
Jul 9, 2026
Merged

Add login component first step#45
mmarkus1 merged 4 commits into
devfrom
Add-login-component

Conversation

@rodolv-commons

Copy link
Copy Markdown
Member

This PR adds the login-server UI integration.

The app now reads login settings from config.json. If login is configured, it
connects to the login server and shows the login/user status widget in the
navbar.

How it works

The config store now also loads a login object from config.json.

In src/main.js, the app startup was moved into an async bootstrap()
function. This was changed because the login client needs runtime config before it can
connect. The login server URL is not hardcoded in the bundle. It comes from
config.json, so the app now waits for the config store to load before calling
Login.connect(...) and before mounting Vue.

The navbar reads the same config store. When login is enabled, it shows the
UserStatus component from gbv-login-client-vue.

src/stores/config.js was changed for the same reason. It now keeps the loaded
login config, exposes loginEnabled, and tracks whether config loading is
already finished or in progress.

What changed

  • Added gbv-login-client-vue
  • Added login settings to public/config.json and docker/config.json
  • Extended the config store with login state
  • Registered the login components during app startup
  • Added the user status widget to the navbar
  • Added tests for the config store

Not included

This PR only adds the login UI and user status display.

The login currently does not change JSKOS API requests. Requests are still sent
without a login token.

Passing the login token to the JSKOS API client is only needed for authenticated
API actions, such as create, update, or delete operations. That can be handled in
a separate follow-up PR if the backend requires it.

Open question

The current login server URL is bartoc.org/login/. This follows the setup used
in the BARTOC integration, but I am not sure yet if this is the final login
server that should be used for jskos-server-ui.

@rodolv-commons rodolv-commons marked this pull request as draft July 8, 2026 06:54
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.65517% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.58%. Comparing base (69a6b4f) to head (ed781dc).

Files with missing lines Patch % Lines
src/components/AccountMenu.vue 91.07% 5 Missing ⚠️
src/components/AppNavbar.vue 25.00% 3 Missing ⚠️
src/stores/config.js 96.29% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #45      +/-   ##
==========================================
- Coverage   91.13%   90.58%   -0.56%     
==========================================
  Files          16       17       +1     
  Lines         316      393      +77     
  Branches      101      137      +36     
==========================================
+ Hits          288      356      +68     
- Misses         25       33       +8     
- Partials        3        4       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mmarkus1 mmarkus1 marked this pull request as ready for review July 9, 2026 12:16
@mmarkus1 mmarkus1 merged commit f6d65e0 into dev Jul 9, 2026
7 of 8 checks passed
@mmarkus1 mmarkus1 deleted the Add-login-component branch July 9, 2026 12:20
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