fix(statistics): keep player stats tab visible without local index (#851)

* fix(statistics): keep player stats tab visible without local index

Show the tab always and explain that player statistics require the local
library index, with a link to library settings, instead of hiding the tab.

* docs(release): CHANGELOG and credits for player stats tab UX (PR #851)

* docs(credits): drop minor library index and player stats tab fixes

Per team policy, small UX fixes (PR #850, #851) stay in CHANGELOG only.
This commit is contained in:
cucadmuh
2026-05-22 14:41:04 +03:00
committed by GitHub
parent 589afe9b7e
commit d54eceaf3b
15 changed files with 73 additions and 12 deletions
@@ -0,0 +1,10 @@
import { useAuthStore } from '../store/authStore';
import { useLibraryIndexStore } from '../store/libraryIndexStore';
/** True when local play history is recorded (master index on + ≥1 server included). */
export function usePlayerStatsRecordingEnabled(): boolean {
const servers = useAuthStore(s => s.servers);
const masterEnabled = useLibraryIndexStore(s => s.masterEnabled);
const syncExcludedByServer = useLibraryIndexStore(s => s.syncExcludedByServer);
return masterEnabled && servers.some(s => syncExcludedByServer[s.id] !== true);
}