pendify 0.1.6__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {pendify-0.1.6/src/pendify.egg-info → pendify-0.1.7}/PKG-INFO +1 -1
  2. {pendify-0.1.6 → pendify-0.1.7}/pyproject.toml +1 -1
  3. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/page.py +19 -4
  4. {pendify-0.1.6 → pendify-0.1.7/src/pendify.egg-info}/PKG-INFO +1 -1
  5. {pendify-0.1.6 → pendify-0.1.7}/LICENSE +0 -0
  6. {pendify-0.1.6 → pendify-0.1.7}/MANIFEST.in +0 -0
  7. {pendify-0.1.6 → pendify-0.1.7}/README.md +0 -0
  8. {pendify-0.1.6 → pendify-0.1.7}/setup.cfg +0 -0
  9. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/__init__.py +0 -0
  10. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/__main__.py +0 -0
  11. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/alert.py +0 -0
  12. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/autostart.py +0 -0
  13. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/client.py +0 -0
  14. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/codes.py +0 -0
  15. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/config.py +0 -0
  16. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/icon.py +0 -0
  17. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/pairing.py +0 -0
  18. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/pendify.ico +0 -0
  19. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/plate_almena.py +0 -0
  20. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/qr.py +0 -0
  21. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/runfile.py +0 -0
  22. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/tray.py +0 -0
  23. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/update.py +0 -0
  24. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/watcher.py +0 -0
  25. {pendify-0.1.6 → pendify-0.1.7}/src/pendify/worker.py +0 -0
  26. {pendify-0.1.6 → pendify-0.1.7}/src/pendify.egg-info/SOURCES.txt +0 -0
  27. {pendify-0.1.6 → pendify-0.1.7}/src/pendify.egg-info/dependency_links.txt +0 -0
  28. {pendify-0.1.6 → pendify-0.1.7}/src/pendify.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pendify
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Pairs this PC with a phone account by a QR on a loopback page and sends it two kinds of alerts.
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/ElkinDev/PendiFy
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pendify"
7
- version = "0.1.6"
7
+ version = "0.1.7"
8
8
  description = "Pairs this PC with a phone account by a QR on a loopback page and sends it two kinds of alerts."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -55,7 +55,6 @@ WORDS = {
55
55
  "qr_press": "Pulsa Mostrar el código",
56
56
  "show_code": "Mostrar el código",
57
57
  "hide_code": "Ocultar el código",
58
- "mask": "Clave oculta",
59
58
  "fold": "Más opciones: escribir los valores del enlace u olvidar este PC",
60
59
  "credit": "Creado por",
61
60
  "sponsor_by": "Patrocinado por Pendiapp.com",
@@ -147,7 +146,6 @@ WORDS = {
147
146
  "qr_press": "Press Show the code",
148
147
  "show_code": "Show the code",
149
148
  "hide_code": "Hide the code",
150
- "mask": "Key hidden",
151
149
  "fold": "More options: type the link values, or forget this PC",
152
150
  "credit": "Created by",
153
151
  "sponsor_by": "Sponsored by Pendiapp.com",
@@ -427,6 +425,8 @@ _STYLE += ("@media (min-width:880px){.page{max-width:max(1040px,85vw)}\n"
427
425
  '.key[data-shown="true"] .mask{visibility:hidden}\n'
428
426
  '.key-card:has(.key[data-shown="false"]) .modules{visibility:hidden}\n'
429
427
  '.key-card:has(.key[data-shown="true"]) .qr-mask{visibility:hidden}\n'
428
+ # A press on either mask shows the code (OR-108).
429
+ ".qr-mask,.mask{cursor:pointer}\n"
430
430
  ".qr-for{margin:0}\n"
431
431
  # The label with impact (OR-105, the pfmask mockup): the #state linked block's recipe, stretched to the
432
432
  # card, the owner's leading capitals as its lead line and the rest under it. The masks over the QR (OR-104,
@@ -576,6 +576,19 @@ _SCRIPT = ("const s=document.getElementById('state');const w=document.getElement
576
576
  "function showKey(on){k.dataset.shown=String(on);r.textContent=on?r.dataset.hide:r.dataset.show;"
577
577
  "clearTimeout(hide);if(on)hide=setTimeout(()=>showKey(false),60000);}"
578
578
  "if(r)r.addEventListener('click',()=>showKey(k.dataset.shown!=='true'));"
579
+ # A key held after a mask press repeats on the reveal the focus moved to; its repeats would set it
580
+ # active or click it and hide the code again, so only a repeat Enter or Space loses its default there.
581
+ "if(r)r.addEventListener('keydown',e=>{if(e.repeat&&(e.key==='Enter'||e.key===' '))e.preventDefault();});"
582
+ # Both masks do what the reveal does (OR-108), and never hide the code. The QR's mask is an image in
583
+ # the svg that a click shows the code from; the keyboard and the screen reader have the reveal. The
584
+ # key's mask is a button: a click, Enter or Space shows the code, then focus moves to the reveal,
585
+ # since the mask turns visibility:hidden and would drop it to the body. Enter and Space both prevent
586
+ # their default: Space would scroll the page, and Enter's keypress would go to the reveal the focus
587
+ # moved to, which would toggle the code back to hidden.
588
+ "document.querySelectorAll('.qr-mask').forEach(m=>m.addEventListener('click',()=>showKey(true)));"
589
+ "document.querySelectorAll('.mask').forEach(m=>{const press=()=>{showKey(true);r.focus();};"
590
+ "m.addEventListener('click',press);m.addEventListener('keydown',e=>{if(e.key==='Enter'||e.key===' '){"
591
+ "e.preventDefault();press();}});});"
579
592
  # The theme button (pendiapp.com's assets/theme.js): the choice goes to data-theme and to localStorage,
580
593
  # and it is posted to /theme, which keeps it in config.json: the page's port changes on every run, so
581
594
  # its localStorage is a new origin each time. The server's value, served as data-theme, wins on the next
@@ -700,8 +713,10 @@ def _lead(sentence):
700
713
 
701
714
 
702
715
  def _mask(words):
703
- """The mask over the key, three groups of the four heads, named for a screen reader. `words` are escaped."""
704
- return f'<span class="mask" role="img" aria-label="{words["mask"]}">{_MASK_GROUP * 3}</span>'
716
+ """The mask over the key, three groups of the four heads, a control named by the press words, as the QR's
717
+ mask is: a press on either shows the code (lane pfpress). `words` are escaped."""
718
+ return (f'<span class="mask" role="button" tabindex="0" aria-label="{words["qr_press"]}">'
719
+ f'{_MASK_GROUP * 3}</span>')
705
720
 
706
721
 
707
722
  def _sponsor_runs():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pendify
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Pairs this PC with a phone account by a QR on a loopback page and sends it two kinds of alerts.
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/ElkinDev/PendiFy
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes