a lightweight, interval-based utility to combat digital strain through "Ma" (intentional pauses) for the eyes and body.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add inline pw input to overlay ui

+41 -2
+41 -2
ui/overlay.slint
··· 1 - import { Button, ProgressIndicator } from "std-widgets.slint"; 1 + import { Button, ProgressIndicator, LineEdit } from "std-widgets.slint"; 2 2 3 3 export component OverlayWindow inherits Window { 4 4 title: "ioma — break time"; ··· 11 11 in property <float> progress: 0.0; // 0.0 = start, 1.0 = done 12 12 in property <bool> snooze-visible: true; 13 13 in property <bool> is-dark: true; 14 + in-out property <bool> unlock-input-visible: false; 15 + in-out property <string> unlock-error: ""; 14 16 15 17 callback snooze-clicked(); 16 18 callback unlock-clicked(); 19 + callback unlock-submit-clicked(string /* password */); 17 20 18 21 background: is-dark ? #1a1a2e : #f5f5f0; 19 22 ··· 66 69 clicked => { root.snooze-clicked(); } 67 70 } 68 71 69 - Button { 72 + if !unlock-input-visible : Button { 70 73 text: "Unlock"; 71 74 clicked => { root.unlock-clicked(); } 75 + } 76 + } 77 + 78 + if unlock-input-visible : VerticalLayout { 79 + alignment: center; 80 + spacing: 8px; 81 + 82 + pw-field := LineEdit { 83 + width: 260px; 84 + placeholder-text: "Emergency password"; 85 + input-type: password; 86 + } 87 + 88 + if unlock-error != "" : Text { 89 + text: unlock-error; 90 + color: #ff6b6b; 91 + font-size: 13px; 92 + horizontal-alignment: center; 93 + } 94 + 95 + HorizontalLayout { 96 + alignment: center; 97 + spacing: 8px; 98 + 99 + Button { 100 + text: "Cancel"; 101 + clicked => { 102 + root.unlock-input-visible = false; 103 + root.unlock-error = ""; 104 + pw-field.text = ""; 105 + } 106 + } 107 + Button { 108 + text: "Submit"; 109 + clicked => { root.unlock-submit-clicked(pw-field.text); } 110 + } 72 111 } 73 112 } 74 113 }