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 password setup wizard UI

+64
+64
ui/password.slint
··· 1 + import { Button, LineEdit } from "std-widgets.slint"; 2 + 3 + export component PasswordSetupWindow inherits Window { 4 + title: "ioma — Set Emergency Password"; 5 + width: 420px; 6 + height: 260px; 7 + 8 + in-out property <string> error-text: ""; 9 + 10 + callback submit-clicked(string /* password */); 11 + callback cancel-clicked(); 12 + 13 + VerticalLayout { 14 + alignment: start; 15 + padding: 24px; 16 + spacing: 12px; 17 + 18 + Text { 19 + text: "Have someone you trust set an emergency unlock password."; 20 + wrap: word-wrap; 21 + color: #888888; 22 + font-size: 13px; 23 + } 24 + 25 + password-field := LineEdit { 26 + placeholder-text: "Password"; 27 + input-type: password; 28 + } 29 + 30 + confirm-field := LineEdit { 31 + placeholder-text: "Confirm password"; 32 + input-type: password; 33 + } 34 + 35 + if error-text != "" : Text { 36 + text: error-text; 37 + color: #ff6b6b; 38 + font-size: 13px; 39 + } 40 + 41 + HorizontalLayout { 42 + alignment: end; 43 + spacing: 8px; 44 + 45 + Button { 46 + text: "Cancel"; 47 + clicked => { root.cancel-clicked(); } 48 + } 49 + Button { 50 + text: "Set Password"; 51 + clicked => { 52 + if password-field.text == "" { 53 + root.error-text = "Password cannot be empty."; 54 + } else if password-field.text != confirm-field.text { 55 + root.error-text = "Passwords do not match."; 56 + } else { 57 + root.error-text = ""; 58 + root.submit-clicked(password-field.text); 59 + } 60 + } 61 + } 62 + } 63 + } 64 + }