Skip to content

Show usernames instead of EIDs across tools#604

Open
SorkyStorious wants to merge 1 commit into
carpetsage:mainfrom
SorkyStorious:feature/hide-eid-show-username
Open

Show usernames instead of EIDs across tools#604
SorkyStorious wants to merge 1 commit into
carpetsage:mainfrom
SorkyStorious:feature/hide-eid-show-username

Conversation

@SorkyStorious

Copy link
Copy Markdown

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. Display precedence: nickname || username || eid.
  • Capture the username centrally in requestFirstContact so every tool's backup fetch populates it. 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.

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.
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.

1 participant