Repository navigation
feat: 'encrypt' keyword scrambles hero text (inverse of 'decrypt') - #97
Merged
Merged
Conversation
The hero animation now has two modes driven by separate events:
- rnp:replay-hero ('decrypt'): garbage settles L→R into readable text
- rnp:encrypt-hero ('encrypt'): readable text scrambles L→R and stays
mangled — type 'decrypt' (or refresh) to restore
One-way semantics match the metaphor: encryption without the key leaves
ciphertext opaque.
Wiring:
- HeroDecrypt.vue: new runEncrypt() does the scramble wave and stops at
the final mangled state (no auto-decrypt cycle)
- FingerprintPlayground.vue: input watcher dispatches rnp:replay-hero
for /decrypt/ or rnp:encrypt-hero for /encrypt/. Decrypt wins if both
appear. Substring match so either fires appended to the default seed,
standalone, or inside a longer word. Also loosened the decrypt regex
from /\bdecrypt\b/ to /decrypt/ so it triggers in more contexts.
- EasterEggs.vue: global keypress (anywhere outside inputs) now branches
on endsWith('decrypt') vs endsWith('encrypt'), with distinct toasts
('Replaying decryption…' / 'Encrypting…')
rnp.help() / help() updated to list decrypt and encrypt as separate
entries with their distinct effects.
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.
Summary
encryptnow drives a separate, inverse hero animation. Previously bothencryptanddecryptfired the samernp:replay-heroevent (decryption scramble). They're now distinct:decrypt→rnp:replay-hero: garbage settles L→R into readable text (existing behavior)encrypt→rnp:encrypt-hero: readable text scrambles L→R and stays mangled — typedecrypt(or refresh) to restoreOne-way semantics match the metaphor: encryption without the key leaves ciphertext opaque. Refreshing the page still auto-plays the decrypt animation on mount via the existing reduced-motion-aware
run()call.Changes
HeroDecrypt.vue: newrunEncrypt()does the scramble wave and stops at the final mangled state (no auto-decrypt cycle). Listener registered forrnp:encrypt-hero.FingerprintPlayground.vue: input watcher dispatchesrnp:replay-herofor/decrypt/iorrnp:encrypt-herofor/encrypt/i. Decrypt wins if both appear. Substring match (no word boundaries) so either fires appended to the defaultLibrePGPseed, standalone, or inside a longer word. The decrypt regex was also loosened from/\bdecrypt\b/to/decrypt/for the same reason.EasterEggs.vue: global keypress (anywhere outside inputs) now branches onendsWith('decrypt')vsendsWith('encrypt'), with distinct toasts (Replaying decryption…/Encrypting…). Help text (rnp.help()) lists them as separate entries with their distinct effects.Test plan
curl http://localhost:4322/— page renders cleanlyHeroDecryptlistens for bothrnp:replay-heroandrnp:encrypt-heroencryptin the fingerprint box → text scrambles and stays; typedecrypt→ text settles back