Show usernames instead of EIDs across tools#604
Open
SorkyStorious wants to merge 1 commit into
Open
Conversation
The recent-ID pills and player-ID input boxes now display a player's
in-game username rather than their raw EID, so EIDs stay hidden once
data has loaded (friendlier and safer for screenshots).
- Store each EID as { username, nickname } instead of a single string.
`username` is auto-captured from the backup; `nickname` is the manual
label set via the pencil button. Display precedence: nickname ||
username || eid. Legacy string values migrate into the nickname slot,
written to a versioned localStorage key (siteWideSavedPlayerNamesV2)
so a stale cached old bundle can't wipe it.
- Capture the username centrally in requestFirstContact so every tool's
backup fetch populates it (best-effort; never breaks data loading).
Unknown EIDs route through addEid so the recent-IDs cap is enforced.
- Input box: shows the username by default; clicking it reveals the raw
EID for editing, clicking away or reloading re-hides it, and the
submit control reloads the active player. A valid typed EID is
preserved across blur so Tab-then-submit loads it. Logic extracted to
a shared ui/composables/eid_input composable used by eicoop's
UserDashboardEntryForm and the shared ui/PlayerIdForm.
- Highlight the currently-loaded recent-ID pill.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The recent-ID pills and player-ID input boxes now display a player's in-game username rather than their raw EID, so EIDs stay hidden once data has loaded (friendlier and safer for screenshots).
usernameis auto-captured from the backup. Display precedence: nickname || username || eid.