fix: load maxAccounts from config on frontend init

The data store's fetchVersion() was never called, so maxAccounts stayed
at the default value of 10. Consolidated into the global store's
fetchVersion() which is called on init.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Badri Narayanan S
2026-01-21 21:06:39 +05:30
parent e51e3ff56a
commit 1f43c32260
2 changed files with 4 additions and 18 deletions

View File

@@ -43,6 +43,10 @@ document.addEventListener('alpine:init', () => {
if (data.version) {
this.version = data.version;
}
// Update maxAccounts in data store
if (data.config && typeof data.config.maxAccounts === 'number') {
Alpine.store('data').maxAccounts = data.config.maxAccounts;
}
}
} catch (error) {
console.debug('Could not fetch version:', error);