Add account components 386-405; Reduce setting, PinInput Cmd+V

Twenty account components: SettingsList, OptionCycler, KeyBindings,
ControllerMap, ProfileCard, CharacterCreator, LoginForm, PasswordGrid,
SessionList, LanguagePicker, PalettePicker, VolumeMixer,
DifficultySelect, AccessibilityOptions, AccountSwitcher, PlayerSelect,
TwoFactor, About, PatchNotes and FeedbackForm.

The components never check credentials, and no secret reaches the log:
LoginForm reports Submitted and the caller counts Failures; each new
failure clears the password, refocuses it, shakes the form and names no
field. TwoFactor builds on input.PinInput and drains an epoch-aligned
period bar. PalettePicker draws each tile in its own palette on a
pixel.Pad grid.

pixel.Settings.Reduce stills motion like the system preference, the
micro font gains '?', display.Face draws avatar faces anywhere, and
input.PinInput pastes on Cmd+V as native hosts send it.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-12 08:21:39 -04:00
1 parent 51af14709d
commit c745b082a9
38 files changed
+2788 -13

No files matched your search

+2 -1
View File
@@ -44,7 +44,8 @@ func PinInput(c *ui.Context, text string, value *string, o PinInputOptions) PinI
switch {
case ev.Kind == ui.InputText:
put(ev.Text)
case ev.Kind == ui.InputCommand && ev.Text == "paste":
// Browsers paste by command, native hosts by Cmd+V.
case ev.Kind == ui.InputCommand && ev.Text == "paste", ev.Kind == ui.InputKeyDown && ev.Key == ui.KeyV && ev.Mods == ui.Cmd:
put(c.ReadClipboard())
case ev.Kind == ui.InputKeyDown && ev.Key == ui.KeyBackspace && ev.Mods == 0:
if len(*value) > 0 {
+8
View File
@@ -126,6 +126,14 @@ func TestPinInputTypesBacksAndPastes(t *testing.T) {
if pin != "1298" || complete != 1 {
t.Fatalf("paste left %q, complete %d times", pin, complete)
}
// Native hosts paste on Cmd+V, as a key.
tt.Key(0, ui.KeyBackspace)
tt.Key(0, ui.KeyBackspace)
tt.SetClipboard("55")
tt.Key(ui.Cmd, ui.KeyV)
if pin != "1255" || complete != 2 {
t.Fatalf("Cmd+V left %q, complete %d times", pin, complete)
}
if _, ok := tt.TextCaret(); !ok {
t.Fatal("the boxes take no text from input methods")
}