feat(ui): add progress bar overlay for webpage loading
- commit
- 305b057830dd051df2d075e018a350d5e120e3de
- author
- bnema · · 2025-12-17 21:23 UTC
- parent
- 445f033
- signature
- unsigned
7 files · +372 -6
M go.mod +20 -1
| @@ -4,6 +4,9 @@ go 1.25.3 | |||
| 4 | 4 | ||
| 5 | 5 | require ( | |
| 6 | 6 | github.com/bnema/puregotk-webkit v0.0.0-00010101000000-000000000000 | |
| 7 | + | github.com/charmbracelet/bubbles v0.21.0 | |
| 8 | + | github.com/charmbracelet/bubbletea v1.3.10 | |
| 9 | + | github.com/charmbracelet/lipgloss v1.1.0 | |
| 7 | 10 | github.com/fsnotify/fsnotify v1.9.0 | |
| 8 | 11 | github.com/jwijenbergh/puregotk v0.0.0-20251022075221-eae1610c7d83 | |
| 9 | 12 | github.com/ncruces/go-sqlite3 v0.30.3 | |
| @@ -15,25 +18,41 @@ require ( | |||
| 15 | 18 | ) | |
| 16 | 19 | ||
| 17 | 20 | require ( | |
| 21 | + | github.com/atotto/clipboard v0.1.4 // indirect | |
| 22 | + | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect | |
| 23 | + | github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect | |
| 24 | + | github.com/charmbracelet/x/ansi v0.10.1 // indirect | |
| 25 | + | github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect | |
| 26 | + | github.com/charmbracelet/x/term v0.2.1 // indirect | |
| 18 | 27 | github.com/davecgh/go-spew v1.1.1 // indirect | |
| 28 | + | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 19 | 29 | github.com/go-viper/mapstructure/v2 v2.4.0 // indirect | |
| 30 | + | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 20 | 31 | github.com/jwijenbergh/purego v0.0.0-20251017112123-b71757b9ba42 // indirect | |
| 21 | - | github.com/kylelemons/godebug v1.1.0 // indirect | |
| 32 | + | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect | |
| 22 | 33 | github.com/mattn/go-colorable v0.1.13 // indirect | |
| 23 | 34 | github.com/mattn/go-isatty v0.0.20 // indirect | |
| 35 | + | github.com/mattn/go-localereader v0.0.1 // indirect | |
| 36 | + | github.com/mattn/go-runewidth v0.0.16 // indirect | |
| 24 | 37 | github.com/mfridman/interpolate v0.0.2 // indirect | |
| 38 | + | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect | |
| 39 | + | github.com/muesli/cancelreader v0.2.2 // indirect | |
| 40 | + | github.com/muesli/termenv v0.16.0 // indirect | |
| 25 | 41 | github.com/ncruces/julianday v1.0.0 // indirect | |
| 26 | 42 | github.com/pelletier/go-toml/v2 v2.2.4 // indirect | |
| 27 | 43 | github.com/pmezard/go-difflib v1.0.0 // indirect | |
| 44 | + | github.com/rivo/uniseg v0.4.7 // indirect | |
| 28 | 45 | github.com/sagikazarmark/locafero v0.11.0 // indirect | |
| 29 | 46 | github.com/sethvargo/go-retry v0.3.0 // indirect | |
| 30 | 47 | github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect | |
| 31 | 48 | github.com/spf13/afero v1.15.0 // indirect | |
| 32 | 49 | github.com/spf13/cast v1.10.0 // indirect | |
| 50 | + | github.com/spf13/cobra v1.10.2 // indirect | |
| 33 | 51 | github.com/spf13/pflag v1.0.10 // indirect | |
| 34 | 52 | github.com/stretchr/objx v0.5.2 // indirect | |
| 35 | 53 | github.com/subosito/gotenv v1.6.0 // indirect | |
| 36 | 54 | github.com/tetratelabs/wazero v1.10.1 // indirect | |
| 55 | + | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect | |
| 37 | 56 | go.uber.org/multierr v1.11.0 // indirect | |
| 38 | 57 | go.yaml.in/yaml/v3 v3.0.4 // indirect | |
| 39 | 58 | golang.org/x/sync v0.18.0 // indirect | |
| @@ -4,6 +4,9 @@ go 1.25.3 | |||||
| 4 | 4 | ||||
| 5 | require ( | 5 | require ( | ||
| 6 | github.com/bnema/puregotk-webkit v0.0.0-00010101000000-000000000000 | 6 | github.com/bnema/puregotk-webkit v0.0.0-00010101000000-000000000000 | ||
| 7 | + | github.com/charmbracelet/bubbles v0.21.0 | |||
| 8 | + | github.com/charmbracelet/bubbletea v1.3.10 | |||
| 9 | + | github.com/charmbracelet/lipgloss v1.1.0 | |||
| 7 | github.com/fsnotify/fsnotify v1.9.0 | 10 | github.com/fsnotify/fsnotify v1.9.0 | ||
| 8 | github.com/jwijenbergh/puregotk v0.0.0-20251022075221-eae1610c7d83 | 11 | github.com/jwijenbergh/puregotk v0.0.0-20251022075221-eae1610c7d83 | ||
| 9 | github.com/ncruces/go-sqlite3 v0.30.3 | 12 | github.com/ncruces/go-sqlite3 v0.30.3 | ||
| @@ -15,25 +18,41 @@ require ( | |||||
| 15 | ) | 18 | ) | ||
| 16 | 19 | ||||
| 17 | require ( | 20 | require ( | ||
| 21 | + | github.com/atotto/clipboard v0.1.4 // indirect | |||
| 22 | + | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect | |||
| 23 | + | github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect | |||
| 24 | + | github.com/charmbracelet/x/ansi v0.10.1 // indirect | |||
| 25 | + | github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect | |||
| 26 | + | github.com/charmbracelet/x/term v0.2.1 // indirect | |||
| 18 | github.com/davecgh/go-spew v1.1.1 // indirect | 27 | github.com/davecgh/go-spew v1.1.1 // indirect | ||
| 28 | + | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |||
| 19 | github.com/go-viper/mapstructure/v2 v2.4.0 // indirect | 29 | github.com/go-viper/mapstructure/v2 v2.4.0 // indirect | ||
| 30 | + | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |||
| 20 | github.com/jwijenbergh/purego v0.0.0-20251017112123-b71757b9ba42 // indirect | 31 | github.com/jwijenbergh/purego v0.0.0-20251017112123-b71757b9ba42 // indirect | ||
| 21 | - | github.com/kylelemons/godebug v1.1.0 // indirect | 32 | + | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect |
| 22 | github.com/mattn/go-colorable v0.1.13 // indirect | 33 | github.com/mattn/go-colorable v0.1.13 // indirect | ||
| 23 | github.com/mattn/go-isatty v0.0.20 // indirect | 34 | github.com/mattn/go-isatty v0.0.20 // indirect | ||
| 35 | + | github.com/mattn/go-localereader v0.0.1 // indirect | |||
| 36 | + | github.com/mattn/go-runewidth v0.0.16 // indirect | |||
| 24 | github.com/mfridman/interpolate v0.0.2 // indirect | 37 | github.com/mfridman/interpolate v0.0.2 // indirect | ||
| 38 | + | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect | |||
| 39 | + | github.com/muesli/cancelreader v0.2.2 // indirect | |||
| 40 | + | github.com/muesli/termenv v0.16.0 // indirect | |||
| 25 | github.com/ncruces/julianday v1.0.0 // indirect | 41 | github.com/ncruces/julianday v1.0.0 // indirect | ||
| 26 | github.com/pelletier/go-toml/v2 v2.2.4 // indirect | 42 | github.com/pelletier/go-toml/v2 v2.2.4 // indirect | ||
| 27 | github.com/pmezard/go-difflib v1.0.0 // indirect | 43 | github.com/pmezard/go-difflib v1.0.0 // indirect | ||
| 44 | + | github.com/rivo/uniseg v0.4.7 // indirect | |||
| 28 | github.com/sagikazarmark/locafero v0.11.0 // indirect | 45 | github.com/sagikazarmark/locafero v0.11.0 // indirect | ||
| 29 | github.com/sethvargo/go-retry v0.3.0 // indirect | 46 | github.com/sethvargo/go-retry v0.3.0 // indirect | ||
| 30 | github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect | 47 | github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect | ||
| 31 | github.com/spf13/afero v1.15.0 // indirect | 48 | github.com/spf13/afero v1.15.0 // indirect | ||
| 32 | github.com/spf13/cast v1.10.0 // indirect | 49 | github.com/spf13/cast v1.10.0 // indirect | ||
| 50 | + | github.com/spf13/cobra v1.10.2 // indirect | |||
| 33 | github.com/spf13/pflag v1.0.10 // indirect | 51 | github.com/spf13/pflag v1.0.10 // indirect | ||
| 34 | github.com/stretchr/objx v0.5.2 // indirect | 52 | github.com/stretchr/objx v0.5.2 // indirect | ||
| 35 | github.com/subosito/gotenv v1.6.0 // indirect | 53 | github.com/subosito/gotenv v1.6.0 // indirect | ||
| 36 | github.com/tetratelabs/wazero v1.10.1 // indirect | 54 | github.com/tetratelabs/wazero v1.10.1 // indirect | ||
| 55 | + | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect | |||
| 37 | go.uber.org/multierr v1.11.0 // indirect | 56 | go.uber.org/multierr v1.11.0 // indirect | ||
| 38 | go.yaml.in/yaml/v3 v3.0.4 // indirect | 57 | go.yaml.in/yaml/v3 v3.0.4 // indirect | ||
| 39 | golang.org/x/sync v0.18.0 // indirect | 58 | golang.org/x/sync v0.18.0 // indirect | ||
M go.sum +49 -0
| @@ -1,8 +1,33 @@ | |||
| 1 | + | github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= | |
| 2 | + | github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= | |
| 3 | + | github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= | |
| 4 | + | github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= | |
| 5 | + | github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8= | |
| 6 | + | github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA= | |
| 7 | + | github.com/charmbracelet/bubbles v0.21.0 h1:9TdC97SdRVg/1aaXNVWfFH3nnLAwOXr8Fn6u6mfQdFs= | |
| 8 | + | github.com/charmbracelet/bubbles v0.21.0/go.mod h1:HF+v6QUR4HkEpz62dx7ym2xc71/KBHg+zKwJtMw+qtg= | |
| 9 | + | github.com/charmbracelet/bubbletea v1.3.10 h1:otUDHWMMzQSB0Pkc87rm691KZ3SWa4KUlvF9nRvCICw= | |
| 10 | + | github.com/charmbracelet/bubbletea v1.3.10/go.mod h1:ORQfo0fk8U+po9VaNvnV95UPWA1BitP1E0N6xJPlHr4= | |
| 11 | + | github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= | |
| 12 | + | github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk= | |
| 13 | + | github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= | |
| 14 | + | github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= | |
| 15 | + | github.com/charmbracelet/x/ansi v0.10.1 h1:rL3Koar5XvX0pHGfovN03f5cxLbCF2YvLeyz7D2jVDQ= | |
| 16 | + | github.com/charmbracelet/x/ansi v0.10.1/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE= | |
| 17 | + | github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8= | |
| 18 | + | github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= | |
| 19 | + | github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payRxjMjKgx2PaCWLZ4p3ro9y97+TVLZNaRZgJwSVDQ= | |
| 20 | + | github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= | |
| 21 | + | github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= | |
| 22 | + | github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= | |
| 1 | 23 | github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= | |
| 24 | + | github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= | |
| 2 | 25 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | |
| 3 | 26 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | |
| 4 | 27 | github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= | |
| 5 | 28 | github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= | |
| 29 | + | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= | |
| 30 | + | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= | |
| 6 | 31 | github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= | |
| 7 | 32 | github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= | |
| 8 | 33 | github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= | |
| @@ -14,6 +39,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= | |||
| 14 | 39 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | |
| 15 | 40 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= | |
| 16 | 41 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | |
| 42 | + | github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= | |
| 43 | + | github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= | |
| 17 | 44 | github.com/jwijenbergh/purego v0.0.0-20251017112123-b71757b9ba42 h1:kQ0LX4ffJvtONhymro3HzrB8XUa6dIGgrbnkl38Rgl0= | |
| 18 | 45 | github.com/jwijenbergh/purego v0.0.0-20251017112123-b71757b9ba42/go.mod h1:amE5lVGstyh2GTEIHFEbgJHmoMD0llIuapnzIlZx7Fc= | |
| 19 | 46 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= | |
| @@ -22,14 +49,26 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= | |||
| 22 | 49 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= | |
| 23 | 50 | github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= | |
| 24 | 51 | github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= | |
| 52 | + | github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= | |
| 53 | + | github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= | |
| 25 | 54 | github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= | |
| 26 | 55 | github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= | |
| 27 | 56 | github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= | |
| 28 | 57 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | |
| 29 | 58 | github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= | |
| 30 | 59 | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | |
| 60 | + | github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= | |
| 61 | + | github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= | |
| 62 | + | github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= | |
| 63 | + | github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= | |
| 31 | 64 | github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= | |
| 32 | 65 | github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= | |
| 66 | + | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= | |
| 67 | + | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= | |
| 68 | + | github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= | |
| 69 | + | github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= | |
| 70 | + | github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= | |
| 71 | + | github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= | |
| 33 | 72 | github.com/ncruces/go-sqlite3 v0.30.3 h1:X/CgWW9GzmIAkEPrifhKqf0cC15DuOVxAJaHFTTAURQ= | |
| 34 | 73 | github.com/ncruces/go-sqlite3 v0.30.3/go.mod h1:AxKu9sRxkludimFocbktlY6LiYSkxiI5gTA8r+os/Nw= | |
| 35 | 74 | github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= | |
| @@ -45,11 +84,15 @@ github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jp | |||
| 45 | 84 | github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY= | |
| 46 | 85 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= | |
| 47 | 86 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= | |
| 87 | + | github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= | |
| 88 | + | github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= | |
| 89 | + | github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= | |
| 48 | 90 | github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= | |
| 49 | 91 | github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= | |
| 50 | 92 | github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= | |
| 51 | 93 | github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= | |
| 52 | 94 | github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= | |
| 95 | + | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= | |
| 53 | 96 | github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= | |
| 54 | 97 | github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= | |
| 55 | 98 | github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA= | |
| @@ -62,6 +105,9 @@ github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= | |||
| 62 | 105 | github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= | |
| 63 | 106 | github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= | |
| 64 | 107 | github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= | |
| 108 | + | github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= | |
| 109 | + | github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= | |
| 110 | + | github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= | |
| 65 | 111 | github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= | |
| 66 | 112 | github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= | |
| 67 | 113 | github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= | |
| @@ -74,6 +120,8 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8 | |||
| 74 | 120 | github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= | |
| 75 | 121 | github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8= | |
| 76 | 122 | github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU= | |
| 123 | + | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= | |
| 124 | + | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= | |
| 77 | 125 | go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= | |
| 78 | 126 | go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= | |
| 79 | 127 | go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= | |
| @@ -82,6 +130,7 @@ golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/y | |||
| 82 | 130 | golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= | |
| 83 | 131 | golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= | |
| 84 | 132 | golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= | |
| 133 | + | golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 85 | 134 | golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 86 | 135 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 87 | 136 | golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| @@ -1,8 +1,33 @@ | |||||
| 1 | + | github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= | |||
| 2 | + | github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= | |||
| 3 | + | github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= | |||
| 4 | + | github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= | |||
| 5 | + | github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8= | |||
| 6 | + | github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA= | |||
| 7 | + | github.com/charmbracelet/bubbles v0.21.0 h1:9TdC97SdRVg/1aaXNVWfFH3nnLAwOXr8Fn6u6mfQdFs= | |||
| 8 | + | github.com/charmbracelet/bubbles v0.21.0/go.mod h1:HF+v6QUR4HkEpz62dx7ym2xc71/KBHg+zKwJtMw+qtg= | |||
| 9 | + | github.com/charmbracelet/bubbletea v1.3.10 h1:otUDHWMMzQSB0Pkc87rm691KZ3SWa4KUlvF9nRvCICw= | |||
| 10 | + | github.com/charmbracelet/bubbletea v1.3.10/go.mod h1:ORQfo0fk8U+po9VaNvnV95UPWA1BitP1E0N6xJPlHr4= | |||
| 11 | + | github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= | |||
| 12 | + | github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk= | |||
| 13 | + | github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY= | |||
| 14 | + | github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30= | |||
| 15 | + | github.com/charmbracelet/x/ansi v0.10.1 h1:rL3Koar5XvX0pHGfovN03f5cxLbCF2YvLeyz7D2jVDQ= | |||
| 16 | + | github.com/charmbracelet/x/ansi v0.10.1/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE= | |||
| 17 | + | github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8= | |||
| 18 | + | github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= | |||
| 19 | + | github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payRxjMjKgx2PaCWLZ4p3ro9y97+TVLZNaRZgJwSVDQ= | |||
| 20 | + | github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= | |||
| 21 | + | github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= | |||
| 22 | + | github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= | |||
| 1 | github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= | 23 | github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= | ||
| 24 | + | github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= | |||
| 2 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | 25 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||
| 3 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | 26 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
| 4 | github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= | 27 | github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= | ||
| 5 | github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= | 28 | github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= | ||
| 29 | + | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= | |||
| 30 | + | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= | |||
| 6 | github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= | 31 | github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= | ||
| 7 | github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= | 32 | github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= | ||
| 8 | github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= | 33 | github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= | ||
| @@ -14,6 +39,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= | |||||
| 14 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | 39 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | ||
| 15 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= | 40 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= | ||
| 16 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | 41 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||
| 42 | + | github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= | |||
| 43 | + | github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= | |||
| 17 | github.com/jwijenbergh/purego v0.0.0-20251017112123-b71757b9ba42 h1:kQ0LX4ffJvtONhymro3HzrB8XUa6dIGgrbnkl38Rgl0= | 44 | github.com/jwijenbergh/purego v0.0.0-20251017112123-b71757b9ba42 h1:kQ0LX4ffJvtONhymro3HzrB8XUa6dIGgrbnkl38Rgl0= | ||
| 18 | github.com/jwijenbergh/purego v0.0.0-20251017112123-b71757b9ba42/go.mod h1:amE5lVGstyh2GTEIHFEbgJHmoMD0llIuapnzIlZx7Fc= | 45 | github.com/jwijenbergh/purego v0.0.0-20251017112123-b71757b9ba42/go.mod h1:amE5lVGstyh2GTEIHFEbgJHmoMD0llIuapnzIlZx7Fc= | ||
| 19 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= | 46 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= | ||
| @@ -22,14 +49,26 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= | |||||
| 22 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= | 49 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= | ||
| 23 | github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= | 50 | github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= | ||
| 24 | github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= | 51 | github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= | ||
| 52 | + | github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= | |||
| 53 | + | github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= | |||
| 25 | github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= | 54 | github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= | ||
| 26 | github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= | 55 | github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= | ||
| 27 | github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= | 56 | github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= | ||
| 28 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | 57 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | ||
| 29 | github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= | 58 | github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= | ||
| 30 | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | 59 | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | ||
| 60 | + | github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= | |||
| 61 | + | github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= | |||
| 62 | + | github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= | |||
| 63 | + | github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= | |||
| 31 | github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= | 64 | github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= | ||
| 32 | github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= | 65 | github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= | ||
| 66 | + | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= | |||
| 67 | + | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= | |||
| 68 | + | github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= | |||
| 69 | + | github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= | |||
| 70 | + | github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= | |||
| 71 | + | github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= | |||
| 33 | github.com/ncruces/go-sqlite3 v0.30.3 h1:X/CgWW9GzmIAkEPrifhKqf0cC15DuOVxAJaHFTTAURQ= | 72 | github.com/ncruces/go-sqlite3 v0.30.3 h1:X/CgWW9GzmIAkEPrifhKqf0cC15DuOVxAJaHFTTAURQ= | ||
| 34 | github.com/ncruces/go-sqlite3 v0.30.3/go.mod h1:AxKu9sRxkludimFocbktlY6LiYSkxiI5gTA8r+os/Nw= | 73 | github.com/ncruces/go-sqlite3 v0.30.3/go.mod h1:AxKu9sRxkludimFocbktlY6LiYSkxiI5gTA8r+os/Nw= | ||
| 35 | github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= | 74 | github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= | ||
| @@ -45,11 +84,15 @@ github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jp | |||||
| 45 | github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY= | 84 | github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY= | ||
| 46 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= | 85 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= | ||
| 47 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= | 86 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= | ||
| 87 | + | github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= | |||
| 88 | + | github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= | |||
| 89 | + | github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= | |||
| 48 | github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= | 90 | github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= | ||
| 49 | github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= | 91 | github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= | ||
| 50 | github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= | 92 | github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= | ||
| 51 | github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= | 93 | github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= | ||
| 52 | github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= | 94 | github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= | ||
| 95 | + | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= | |||
| 53 | github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= | 96 | github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= | ||
| 54 | github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= | 97 | github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= | ||
| 55 | github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA= | 98 | github.com/sahilm/fuzzy v0.1.1 h1:ceu5RHF8DGgoi+/dR5PsECjCDH1BE3Fnmpo7aVXOdRA= | ||
| @@ -62,6 +105,9 @@ github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= | |||||
| 62 | github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= | 105 | github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= | ||
| 63 | github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= | 106 | github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= | ||
| 64 | github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= | 107 | github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= | ||
| 108 | + | github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= | |||
| 109 | + | github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= | |||
| 110 | + | github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= | |||
| 65 | github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= | 111 | github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= | ||
| 66 | github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= | 112 | github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= | ||
| 67 | github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= | 113 | github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= | ||
| @@ -74,6 +120,8 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8 | |||||
| 74 | github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= | 120 | github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= | ||
| 75 | github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8= | 121 | github.com/tetratelabs/wazero v1.10.1 h1:2DugeJf6VVk58KTPszlNfeeN8AhhpwcZqkJj2wwFuH8= | ||
| 76 | github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU= | 122 | github.com/tetratelabs/wazero v1.10.1/go.mod h1:DRm5twOQ5Gr1AoEdSi0CLjDQF1J9ZAuyqFIjl1KKfQU= | ||
| 123 | + | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= | |||
| 124 | + | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= | |||
| 77 | go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= | 125 | go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= | ||
| 78 | go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= | 126 | go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= | ||
| 79 | go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= | 127 | go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= | ||
| @@ -82,6 +130,7 @@ golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b h1:M2rDM6z3Fhozi9O7NWsxAkg/y | |||||
| 82 | golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= | 130 | golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b/go.mod h1:3//PLf8L/X+8b4vuAfHzxeRUl04Adcb341+IGKfnqS8= | ||
| 83 | golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= | 131 | golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= | ||
| 84 | golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= | 132 | golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= | ||
| 133 | + | golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |||
| 85 | golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | 134 | golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 86 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | 135 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 87 | golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | 136 | golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
M internal/infrastructure/webkit/webview.go +15 -0
| @@ -322,6 +322,21 @@ func (wv *WebView) connectSignals() { | |||
| 322 | 322 | } | |
| 323 | 323 | sigID = gobject.SignalConnect(wv.inner.GoPointer(), "notify::favicon", glib.NewCallback(&faviconCb)) | |
| 324 | 324 | wv.signalIDs = append(wv.signalIDs, sigID) | |
| 325 | + | ||
| 326 | + | // notify::estimated-load-progress signal for load progress updates | |
| 327 | + | // This fires frequently during page load with values from 0.0 to 1.0 | |
| 328 | + | progressCb := func() { | |
| 329 | + | progress := wv.inner.GetEstimatedLoadProgress() | |
| 330 | + | wv.mu.Lock() | |
| 331 | + | wv.progress = progress | |
| 332 | + | wv.mu.Unlock() | |
| 333 | + | ||
| 334 | + | if wv.OnProgressChanged != nil { | |
| 335 | + | wv.OnProgressChanged(progress) | |
| 336 | + | } | |
| 337 | + | } | |
| 338 | + | sigID = gobject.SignalConnect(wv.inner.GoPointer(), "notify::estimated-load-progress", glib.NewCallback(&progressCb)) | |
| 339 | + | wv.signalIDs = append(wv.signalIDs, sigID) | |
| 325 | 340 | } | |
| 326 | 341 | ||
| 327 | 342 | // ID returns the unique identifier for this WebView. | |
| @@ -322,6 +322,21 @@ func (wv *WebView) connectSignals() { | |||||
| 322 | } | 322 | } | ||
| 323 | sigID = gobject.SignalConnect(wv.inner.GoPointer(), "notify::favicon", glib.NewCallback(&faviconCb)) | 323 | sigID = gobject.SignalConnect(wv.inner.GoPointer(), "notify::favicon", glib.NewCallback(&faviconCb)) | ||
| 324 | wv.signalIDs = append(wv.signalIDs, sigID) | 324 | wv.signalIDs = append(wv.signalIDs, sigID) | ||
| 325 | + | ||||
| 326 | + | // notify::estimated-load-progress signal for load progress updates | |||
| 327 | + | // This fires frequently during page load with values from 0.0 to 1.0 | |||
| 328 | + | progressCb := func() { | |||
| 329 | + | progress := wv.inner.GetEstimatedLoadProgress() | |||
| 330 | + | wv.mu.Lock() | |||
| 331 | + | wv.progress = progress | |||
| 332 | + | wv.mu.Unlock() | |||
| 333 | + | ||||
| 334 | + | if wv.OnProgressChanged != nil { | |||
| 335 | + | wv.OnProgressChanged(progress) | |||
| 336 | + | } | |||
| 337 | + | } | |||
| 338 | + | sigID = gobject.SignalConnect(wv.inner.GoPointer(), "notify::estimated-load-progress", glib.NewCallback(&progressCb)) | |||
| 339 | + | wv.signalIDs = append(wv.signalIDs, sigID) | |||
| 325 | } | 340 | } | ||
| 326 | 341 | ||||
| 327 | // ID returns the unique identifier for this WebView. | 342 | // ID returns the unique identifier for this WebView. | ||
M internal/ui/component/pane_view.go +35 -0
| @@ -22,6 +22,7 @@ type PaneView struct { | |||
| 22 | 22 | overlay layout.OverlayWidget | |
| 23 | 23 | webViewWidget layout.Widget // The actual WebView widget | |
| 24 | 24 | borderBox layout.BoxWidget // Border overlay for active indication | |
| 25 | + | progressBar *ProgressBar // Loading progress indicator | |
| 25 | 26 | paneID entity.PaneID | |
| 26 | 27 | isActive bool | |
| 27 | 28 | ||
| @@ -62,11 +63,18 @@ func NewPaneView(factory layout.WidgetFactory, paneID entity.PaneID, webViewWidg | |||
| 62 | 63 | overlay.SetClipOverlay(borderBox, false) | |
| 63 | 64 | overlay.SetMeasureOverlay(borderBox, false) | |
| 64 | 65 | ||
| 66 | + | // Create progress bar overlay at bottom | |
| 67 | + | progressBar := NewProgressBar(factory) | |
| 68 | + | overlay.AddOverlay(progressBar.Widget()) | |
| 69 | + | overlay.SetClipOverlay(progressBar.Widget(), false) | |
| 70 | + | overlay.SetMeasureOverlay(progressBar.Widget(), false) | |
| 71 | + | ||
| 65 | 72 | return &PaneView{ | |
| 66 | 73 | factory: factory, | |
| 67 | 74 | overlay: overlay, | |
| 68 | 75 | webViewWidget: webViewWidget, | |
| 69 | 76 | borderBox: borderBox, | |
| 77 | + | progressBar: progressBar, | |
| 70 | 78 | paneID: paneID, | |
| 71 | 79 | isActive: false, | |
| 72 | 80 | } | |
| @@ -267,3 +275,30 @@ func (pv *PaneView) RemoveOverlayWidget(widget layout.Widget) { | |||
| 267 | 275 | func (pv *PaneView) GetContentDimensions() (width, height int) { | |
| 268 | 276 | return pv.overlay.GetAllocatedWidth(), pv.overlay.GetAllocatedHeight() | |
| 269 | 277 | } | |
| 278 | + | ||
| 279 | + | // SetLoadProgress updates the progress bar with the current load progress. | |
| 280 | + | // progress should be between 0.0 and 1.0. | |
| 281 | + | func (pv *PaneView) SetLoadProgress(progress float64) { | |
| 282 | + | pv.mu.RLock() | |
| 283 | + | pb := pv.progressBar | |
| 284 | + | pv.mu.RUnlock() | |
| 285 | + | ||
| 286 | + | if pb != nil { | |
| 287 | + | pb.SetProgress(progress) | |
| 288 | + | } | |
| 289 | + | } | |
| 290 | + | ||
| 291 | + | // SetLoading shows or hides the progress bar. | |
| 292 | + | func (pv *PaneView) SetLoading(loading bool) { | |
| 293 | + | pv.mu.RLock() | |
| 294 | + | pb := pv.progressBar | |
| 295 | + | pv.mu.RUnlock() | |
| 296 | + | ||
| 297 | + | if pb != nil { | |
| 298 | + | if loading { | |
| 299 | + | pb.Show() | |
| 300 | + | } else { | |
| 301 | + | pb.Hide() | |
| 302 | + | } | |
| 303 | + | } | |
| 304 | + | } | |
| @@ -22,6 +22,7 @@ type PaneView struct { | |||||
| 22 | overlay layout.OverlayWidget | 22 | overlay layout.OverlayWidget | ||
| 23 | webViewWidget layout.Widget // The actual WebView widget | 23 | webViewWidget layout.Widget // The actual WebView widget | ||
| 24 | borderBox layout.BoxWidget // Border overlay for active indication | 24 | borderBox layout.BoxWidget // Border overlay for active indication | ||
| 25 | + | progressBar *ProgressBar // Loading progress indicator | |||
| 25 | paneID entity.PaneID | 26 | paneID entity.PaneID | ||
| 26 | isActive bool | 27 | isActive bool | ||
| 27 | 28 | ||||
| @@ -62,11 +63,18 @@ func NewPaneView(factory layout.WidgetFactory, paneID entity.PaneID, webViewWidg | |||||
| 62 | overlay.SetClipOverlay(borderBox, false) | 63 | overlay.SetClipOverlay(borderBox, false) | ||
| 63 | overlay.SetMeasureOverlay(borderBox, false) | 64 | overlay.SetMeasureOverlay(borderBox, false) | ||
| 64 | 65 | ||||
| 66 | + | // Create progress bar overlay at bottom | |||
| 67 | + | progressBar := NewProgressBar(factory) | |||
| 68 | + | overlay.AddOverlay(progressBar.Widget()) | |||
| 69 | + | overlay.SetClipOverlay(progressBar.Widget(), false) | |||
| 70 | + | overlay.SetMeasureOverlay(progressBar.Widget(), false) | |||
| 71 | + | ||||
| 65 | return &PaneView{ | 72 | return &PaneView{ | ||
| 66 | factory: factory, | 73 | factory: factory, | ||
| 67 | overlay: overlay, | 74 | overlay: overlay, | ||
| 68 | webViewWidget: webViewWidget, | 75 | webViewWidget: webViewWidget, | ||
| 69 | borderBox: borderBox, | 76 | borderBox: borderBox, | ||
| 77 | + | progressBar: progressBar, | |||
| 70 | paneID: paneID, | 78 | paneID: paneID, | ||
| 71 | isActive: false, | 79 | isActive: false, | ||
| 72 | } | 80 | } | ||
| @@ -267,3 +275,30 @@ func (pv *PaneView) RemoveOverlayWidget(widget layout.Widget) { | |||||
| 267 | func (pv *PaneView) GetContentDimensions() (width, height int) { | 275 | func (pv *PaneView) GetContentDimensions() (width, height int) { | ||
| 268 | return pv.overlay.GetAllocatedWidth(), pv.overlay.GetAllocatedHeight() | 276 | return pv.overlay.GetAllocatedWidth(), pv.overlay.GetAllocatedHeight() | ||
| 269 | } | 277 | } | ||
| 278 | + | ||||
| 279 | + | // SetLoadProgress updates the progress bar with the current load progress. | |||
| 280 | + | // progress should be between 0.0 and 1.0. | |||
| 281 | + | func (pv *PaneView) SetLoadProgress(progress float64) { | |||
| 282 | + | pv.mu.RLock() | |||
| 283 | + | pb := pv.progressBar | |||
| 284 | + | pv.mu.RUnlock() | |||
| 285 | + | ||||
| 286 | + | if pb != nil { | |||
| 287 | + | pb.SetProgress(progress) | |||
| 288 | + | } | |||
| 289 | + | } | |||
| 290 | + | ||||
| 291 | + | // SetLoading shows or hides the progress bar. | |||
| 292 | + | func (pv *PaneView) SetLoading(loading bool) { | |||
| 293 | + | pv.mu.RLock() | |||
| 294 | + | pb := pv.progressBar | |||
| 295 | + | pv.mu.RUnlock() | |||
| 296 | + | ||||
| 297 | + | if pb != nil { | |||
| 298 | + | if loading { | |||
| 299 | + | pb.Show() | |||
| 300 | + | } else { | |||
| 301 | + | pb.Hide() | |||
| 302 | + | } | |||
| 303 | + | } | |||
| 304 | + | } | |||
A internal/ui/component/progress_bar.go +174 -0
| @@ -0,0 +1,174 @@ | |||
| 1 | + | // Package component provides UI components for the browser. | |
| 2 | + | package component | |
| 3 | + | ||
| 4 | + | import ( | |
| 5 | + | "sync" | |
| 6 | + | ||
| 7 | + | "github.com/jwijenbergh/puregotk/v4/glib" | |
| 8 | + | "github.com/jwijenbergh/puregotk/v4/gtk" | |
| 9 | + | ||
| 10 | + | "github.com/bnema/dumber/internal/ui/layout" | |
| 11 | + | ) | |
| 12 | + | ||
| 13 | + | const ( | |
| 14 | + | // Animation step size - how much to increment per frame | |
| 15 | + | progressStep = 0.02 | |
| 16 | + | // Animation interval in milliseconds | |
| 17 | + | progressIntervalMs = 16 // ~60fps | |
| 18 | + | ) | |
| 19 | + | ||
| 20 | + | // ProgressBar displays a slim loading progress indicator at the bottom of a pane. | |
| 21 | + | // Uses native GtkProgressBar with "osd" styling for overlay appearance. | |
| 22 | + | // Implements smooth animation by incrementing towards the target value. | |
| 23 | + | type ProgressBar struct { | |
| 24 | + | factory layout.WidgetFactory | |
| 25 | + | progressBar *gtk.ProgressBar | |
| 26 | + | widget layout.Widget // Wrapped widget for layout compatibility | |
| 27 | + | ||
| 28 | + | visible bool | |
| 29 | + | currentValue float64 // Current displayed value | |
| 30 | + | targetValue float64 // Target value to animate towards | |
| 31 | + | animationTimer uint // Timer source ID for animation | |
| 32 | + | ||
| 33 | + | mu sync.Mutex | |
| 34 | + | } | |
| 35 | + | ||
| 36 | + | // NewProgressBar creates a new progress bar component using native GtkProgressBar. | |
| 37 | + | func NewProgressBar(factory layout.WidgetFactory) *ProgressBar { | |
| 38 | + | progressBar := gtk.NewProgressBar() | |
| 39 | + | ||
| 40 | + | // Add "osd" class for on-screen-display overlay styling (like Epiphany) | |
| 41 | + | progressBar.AddCssClass("osd") | |
| 42 | + | ||
| 43 | + | // Position at bottom, full width | |
| 44 | + | progressBar.SetValign(gtk.AlignEndValue) | |
| 45 | + | progressBar.SetHalign(gtk.AlignFillValue) | |
| 46 | + | progressBar.SetHexpand(true) | |
| 47 | + | ||
| 48 | + | // Don't intercept pointer events - let clicks pass through to WebView | |
| 49 | + | progressBar.SetCanTarget(false) | |
| 50 | + | progressBar.SetCanFocus(false) | |
| 51 | + | ||
| 52 | + | // Hidden by default | |
| 53 | + | progressBar.SetVisible(false) | |
| 54 | + | ||
| 55 | + | // Wrap for layout compatibility | |
| 56 | + | widget := factory.WrapWidget(&progressBar.Widget) | |
| 57 | + | ||
| 58 | + | return &ProgressBar{ | |
| 59 | + | factory: factory, | |
| 60 | + | progressBar: progressBar, | |
| 61 | + | widget: widget, | |
| 62 | + | visible: false, | |
| 63 | + | currentValue: 0, | |
| 64 | + | targetValue: 0, | |
| 65 | + | } | |
| 66 | + | } | |
| 67 | + | ||
| 68 | + | // SetProgress sets the target progress value and starts smooth animation. | |
| 69 | + | // progress should be between 0.0 and 1.0. | |
| 70 | + | func (pb *ProgressBar) SetProgress(progress float64) { | |
| 71 | + | pb.mu.Lock() | |
| 72 | + | defer pb.mu.Unlock() | |
| 73 | + | ||
| 74 | + | // Clamp progress to valid range | |
| 75 | + | if progress < 0 { | |
| 76 | + | progress = 0 | |
| 77 | + | } else if progress > 1 { | |
| 78 | + | progress = 1 | |
| 79 | + | } | |
| 80 | + | ||
| 81 | + | pb.targetValue = progress | |
| 82 | + | ||
| 83 | + | // For large jumps (>0.3) or completion, update immediately | |
| 84 | + | diff := progress - pb.currentValue | |
| 85 | + | if diff > 0.3 || progress >= 1.0 { | |
| 86 | + | pb.currentValue = progress | |
| 87 | + | pb.progressBar.SetFraction(progress) | |
| 88 | + | return | |
| 89 | + | } | |
| 90 | + | ||
| 91 | + | // Start animation if not already running | |
| 92 | + | if pb.animationTimer == 0 { | |
| 93 | + | pb.startAnimation() | |
| 94 | + | } | |
| 95 | + | } | |
| 96 | + | ||
| 97 | + | // startAnimation begins the smooth progress animation. | |
| 98 | + | // Must be called with lock held. | |
| 99 | + | func (pb *ProgressBar) startAnimation() { | |
| 100 | + | var cb glib.SourceFunc | |
| 101 | + | cb = func(_ uintptr) bool { | |
| 102 | + | pb.mu.Lock() | |
| 103 | + | defer pb.mu.Unlock() | |
| 104 | + | ||
| 105 | + | // Check if we've reached the target | |
| 106 | + | if pb.currentValue >= pb.targetValue { | |
| 107 | + | pb.animationTimer = 0 | |
| 108 | + | return false // Stop the timer | |
| 109 | + | } | |
| 110 | + | ||
| 111 | + | // Increment towards target | |
| 112 | + | pb.currentValue += progressStep | |
| 113 | + | if pb.currentValue > pb.targetValue { | |
| 114 | + | pb.currentValue = pb.targetValue | |
| 115 | + | } | |
| 116 | + | ||
| 117 | + | pb.progressBar.SetFraction(pb.currentValue) | |
| 118 | + | ||
| 119 | + | // Continue animation if not at target | |
| 120 | + | return pb.currentValue < pb.targetValue | |
| 121 | + | } | |
| 122 | + | ||
| 123 | + | pb.animationTimer = glib.TimeoutAdd(progressIntervalMs, &cb, 0) | |
| 124 | + | } | |
| 125 | + | ||
| 126 | + | // Show makes the progress bar visible. | |
| 127 | + | func (pb *ProgressBar) Show() { | |
| 128 | + | pb.mu.Lock() | |
| 129 | + | defer pb.mu.Unlock() | |
| 130 | + | ||
| 131 | + | if !pb.visible { | |
| 132 | + | pb.visible = true | |
| 133 | + | pb.progressBar.SetVisible(true) | |
| 134 | + | } | |
| 135 | + | } | |
| 136 | + | ||
| 137 | + | // Hide makes the progress bar invisible and resets state. | |
| 138 | + | func (pb *ProgressBar) Hide() { | |
| 139 | + | pb.mu.Lock() | |
| 140 | + | defer pb.mu.Unlock() | |
| 141 | + | ||
| 142 | + | if pb.visible { | |
| 143 | + | pb.visible = false | |
| 144 | + | pb.progressBar.SetVisible(false) | |
| 145 | + | ||
| 146 | + | // Stop any running animation | |
| 147 | + | if pb.animationTimer != 0 { | |
| 148 | + | glib.SourceRemove(pb.animationTimer) | |
| 149 | + | pb.animationTimer = 0 | |
| 150 | + | } | |
| 151 | + | ||
| 152 | + | // Reset values | |
| 153 | + | pb.currentValue = 0 | |
| 154 | + | pb.targetValue = 0 | |
| 155 | + | pb.progressBar.SetFraction(0) | |
| 156 | + | } | |
| 157 | + | } | |
| 158 | + | ||
| 159 | + | // IsVisible returns whether the progress bar is currently visible. | |
| 160 | + | func (pb *ProgressBar) IsVisible() bool { | |
| 161 | + | pb.mu.Lock() | |
| 162 | + | defer pb.mu.Unlock() | |
| 163 | + | return pb.visible | |
| 164 | + | } | |
| 165 | + | ||
| 166 | + | // Widget returns the underlying GtkProgressBar widget for embedding in overlays. | |
| 167 | + | func (pb *ProgressBar) Widget() layout.Widget { | |
| 168 | + | return pb.widget | |
| 169 | + | } | |
| 170 | + | ||
| 171 | + | // GtkWidget returns the raw GtkProgressBar for direct GTK operations. | |
| 172 | + | func (pb *ProgressBar) GtkWidget() *gtk.ProgressBar { | |
| 173 | + | return pb.progressBar | |
| 174 | + | } | |
| @@ -0,0 +1,174 @@ | |||||
| 1 | + | // Package component provides UI components for the browser. | |||
| 2 | + | package component | |||
| 3 | + | ||||
| 4 | + | import ( | |||
| 5 | + | "sync" | |||
| 6 | + | ||||
| 7 | + | "github.com/jwijenbergh/puregotk/v4/glib" | |||
| 8 | + | "github.com/jwijenbergh/puregotk/v4/gtk" | |||
| 9 | + | ||||
| 10 | + | "github.com/bnema/dumber/internal/ui/layout" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | const ( | |||
| 14 | + | // Animation step size - how much to increment per frame | |||
| 15 | + | progressStep = 0.02 | |||
| 16 | + | // Animation interval in milliseconds | |||
| 17 | + | progressIntervalMs = 16 // ~60fps | |||
| 18 | + | ) | |||
| 19 | + | ||||
| 20 | + | // ProgressBar displays a slim loading progress indicator at the bottom of a pane. | |||
| 21 | + | // Uses native GtkProgressBar with "osd" styling for overlay appearance. | |||
| 22 | + | // Implements smooth animation by incrementing towards the target value. | |||
| 23 | + | type ProgressBar struct { | |||
| 24 | + | factory layout.WidgetFactory | |||
| 25 | + | progressBar *gtk.ProgressBar | |||
| 26 | + | widget layout.Widget // Wrapped widget for layout compatibility | |||
| 27 | + | ||||
| 28 | + | visible bool | |||
| 29 | + | currentValue float64 // Current displayed value | |||
| 30 | + | targetValue float64 // Target value to animate towards | |||
| 31 | + | animationTimer uint // Timer source ID for animation | |||
| 32 | + | ||||
| 33 | + | mu sync.Mutex | |||
| 34 | + | } | |||
| 35 | + | ||||
| 36 | + | // NewProgressBar creates a new progress bar component using native GtkProgressBar. | |||
| 37 | + | func NewProgressBar(factory layout.WidgetFactory) *ProgressBar { | |||
| 38 | + | progressBar := gtk.NewProgressBar() | |||
| 39 | + | ||||
| 40 | + | // Add "osd" class for on-screen-display overlay styling (like Epiphany) | |||
| 41 | + | progressBar.AddCssClass("osd") | |||
| 42 | + | ||||
| 43 | + | // Position at bottom, full width | |||
| 44 | + | progressBar.SetValign(gtk.AlignEndValue) | |||
| 45 | + | progressBar.SetHalign(gtk.AlignFillValue) | |||
| 46 | + | progressBar.SetHexpand(true) | |||
| 47 | + | ||||
| 48 | + | // Don't intercept pointer events - let clicks pass through to WebView | |||
| 49 | + | progressBar.SetCanTarget(false) | |||
| 50 | + | progressBar.SetCanFocus(false) | |||
| 51 | + | ||||
| 52 | + | // Hidden by default | |||
| 53 | + | progressBar.SetVisible(false) | |||
| 54 | + | ||||
| 55 | + | // Wrap for layout compatibility | |||
| 56 | + | widget := factory.WrapWidget(&progressBar.Widget) | |||
| 57 | + | ||||
| 58 | + | return &ProgressBar{ | |||
| 59 | + | factory: factory, | |||
| 60 | + | progressBar: progressBar, | |||
| 61 | + | widget: widget, | |||
| 62 | + | visible: false, | |||
| 63 | + | currentValue: 0, | |||
| 64 | + | targetValue: 0, | |||
| 65 | + | } | |||
| 66 | + | } | |||
| 67 | + | ||||
| 68 | + | // SetProgress sets the target progress value and starts smooth animation. | |||
| 69 | + | // progress should be between 0.0 and 1.0. | |||
| 70 | + | func (pb *ProgressBar) SetProgress(progress float64) { | |||
| 71 | + | pb.mu.Lock() | |||
| 72 | + | defer pb.mu.Unlock() | |||
| 73 | + | ||||
| 74 | + | // Clamp progress to valid range | |||
| 75 | + | if progress < 0 { | |||
| 76 | + | progress = 0 | |||
| 77 | + | } else if progress > 1 { | |||
| 78 | + | progress = 1 | |||
| 79 | + | } | |||
| 80 | + | ||||
| 81 | + | pb.targetValue = progress | |||
| 82 | + | ||||
| 83 | + | // For large jumps (>0.3) or completion, update immediately | |||
| 84 | + | diff := progress - pb.currentValue | |||
| 85 | + | if diff > 0.3 || progress >= 1.0 { | |||
| 86 | + | pb.currentValue = progress | |||
| 87 | + | pb.progressBar.SetFraction(progress) | |||
| 88 | + | return | |||
| 89 | + | } | |||
| 90 | + | ||||
| 91 | + | // Start animation if not already running | |||
| 92 | + | if pb.animationTimer == 0 { | |||
| 93 | + | pb.startAnimation() | |||
| 94 | + | } | |||
| 95 | + | } | |||
| 96 | + | ||||
| 97 | + | // startAnimation begins the smooth progress animation. | |||
| 98 | + | // Must be called with lock held. | |||
| 99 | + | func (pb *ProgressBar) startAnimation() { | |||
| 100 | + | var cb glib.SourceFunc | |||
| 101 | + | cb = func(_ uintptr) bool { | |||
| 102 | + | pb.mu.Lock() | |||
| 103 | + | defer pb.mu.Unlock() | |||
| 104 | + | ||||
| 105 | + | // Check if we've reached the target | |||
| 106 | + | if pb.currentValue >= pb.targetValue { | |||
| 107 | + | pb.animationTimer = 0 | |||
| 108 | + | return false // Stop the timer | |||
| 109 | + | } | |||
| 110 | + | ||||
| 111 | + | // Increment towards target | |||
| 112 | + | pb.currentValue += progressStep | |||
| 113 | + | if pb.currentValue > pb.targetValue { | |||
| 114 | + | pb.currentValue = pb.targetValue | |||
| 115 | + | } | |||
| 116 | + | ||||
| 117 | + | pb.progressBar.SetFraction(pb.currentValue) | |||
| 118 | + | ||||
| 119 | + | // Continue animation if not at target | |||
| 120 | + | return pb.currentValue < pb.targetValue | |||
| 121 | + | } | |||
| 122 | + | ||||
| 123 | + | pb.animationTimer = glib.TimeoutAdd(progressIntervalMs, &cb, 0) | |||
| 124 | + | } | |||
| 125 | + | ||||
| 126 | + | // Show makes the progress bar visible. | |||
| 127 | + | func (pb *ProgressBar) Show() { | |||
| 128 | + | pb.mu.Lock() | |||
| 129 | + | defer pb.mu.Unlock() | |||
| 130 | + | ||||
| 131 | + | if !pb.visible { | |||
| 132 | + | pb.visible = true | |||
| 133 | + | pb.progressBar.SetVisible(true) | |||
| 134 | + | } | |||
| 135 | + | } | |||
| 136 | + | ||||
| 137 | + | // Hide makes the progress bar invisible and resets state. | |||
| 138 | + | func (pb *ProgressBar) Hide() { | |||
| 139 | + | pb.mu.Lock() | |||
| 140 | + | defer pb.mu.Unlock() | |||
| 141 | + | ||||
| 142 | + | if pb.visible { | |||
| 143 | + | pb.visible = false | |||
| 144 | + | pb.progressBar.SetVisible(false) | |||
| 145 | + | ||||
| 146 | + | // Stop any running animation | |||
| 147 | + | if pb.animationTimer != 0 { | |||
| 148 | + | glib.SourceRemove(pb.animationTimer) | |||
| 149 | + | pb.animationTimer = 0 | |||
| 150 | + | } | |||
| 151 | + | ||||
| 152 | + | // Reset values | |||
| 153 | + | pb.currentValue = 0 | |||
| 154 | + | pb.targetValue = 0 | |||
| 155 | + | pb.progressBar.SetFraction(0) | |||
| 156 | + | } | |||
| 157 | + | } | |||
| 158 | + | ||||
| 159 | + | // IsVisible returns whether the progress bar is currently visible. | |||
| 160 | + | func (pb *ProgressBar) IsVisible() bool { | |||
| 161 | + | pb.mu.Lock() | |||
| 162 | + | defer pb.mu.Unlock() | |||
| 163 | + | return pb.visible | |||
| 164 | + | } | |||
| 165 | + | ||||
| 166 | + | // Widget returns the underlying GtkProgressBar widget for embedding in overlays. | |||
| 167 | + | func (pb *ProgressBar) Widget() layout.Widget { | |||
| 168 | + | return pb.widget | |||
| 169 | + | } | |||
| 170 | + | ||||
| 171 | + | // GtkWidget returns the raw GtkProgressBar for direct GTK operations. | |||
| 172 | + | func (pb *ProgressBar) GtkWidget() *gtk.ProgressBar { | |||
| 173 | + | return pb.progressBar | |||
| 174 | + | } | |||
M internal/ui/coordinator/content.go +51 -2
| @@ -113,13 +113,23 @@ func (c *ContentCoordinator) EnsureWebView(ctx context.Context, paneID entity.Pa | |||
| 113 | 113 | c.onFaviconChanged(ctx, paneID, favicon) | |
| 114 | 114 | } | |
| 115 | 115 | ||
| 116 | - | // Set up load change callback to re-apply zoom on navigation | |
| 116 | + | // Set up load change callback to re-apply zoom on navigation and handle progress bar | |
| 117 | 117 | wv.OnLoadChanged = func(event webkit.LoadEvent) { | |
| 118 | - | if event == webkit.LoadCommitted { | |
| 118 | + | switch event { | |
| 119 | + | case webkit.LoadStarted: | |
| 120 | + | c.onLoadStarted(ctx, paneID) | |
| 121 | + | case webkit.LoadCommitted: | |
| 119 | 122 | c.onLoadCommitted(ctx, paneID, wv) | |
| 123 | + | case webkit.LoadFinished: | |
| 124 | + | c.onLoadFinished(ctx, paneID) | |
| 120 | 125 | } | |
| 121 | 126 | } | |
| 122 | 127 | ||
| 128 | + | // Set up progress callback for loading indicator | |
| 129 | + | wv.OnProgressChanged = func(progress float64) { | |
| 130 | + | c.onProgressChanged(ctx, paneID, progress) | |
| 131 | + | } | |
| 132 | + | ||
| 123 | 133 | // Set up URI change callback for SPA navigation (History API) | |
| 124 | 134 | // This fires when URL changes via JavaScript without a full page load | |
| 125 | 135 | wv.OnURIChanged = func(uri string) { | |
| @@ -479,3 +489,42 @@ func (c *ContentCoordinator) onSPANavigation(ctx context.Context, paneID entity. | |||
| 479 | 489 | c.onHistoryRecord(ctx, paneID, url) | |
| 480 | 490 | } | |
| 481 | 491 | } | |
| 492 | + | ||
| 493 | + | // onLoadStarted shows the progress bar when page loading begins. | |
| 494 | + | func (c *ContentCoordinator) onLoadStarted(ctx context.Context, paneID entity.PaneID) { | |
| 495 | + | _, wsView := c.getActiveWS() | |
| 496 | + | if wsView == nil { | |
| 497 | + | return | |
| 498 | + | } | |
| 499 | + | ||
| 500 | + | paneView := wsView.GetPaneView(paneID) | |
| 501 | + | if paneView != nil { | |
| 502 | + | paneView.SetLoading(true) | |
| 503 | + | } | |
| 504 | + | } | |
| 505 | + | ||
| 506 | + | // onLoadFinished hides the progress bar when page loading completes. | |
| 507 | + | func (c *ContentCoordinator) onLoadFinished(ctx context.Context, paneID entity.PaneID) { | |
| 508 | + | _, wsView := c.getActiveWS() | |
| 509 | + | if wsView == nil { | |
| 510 | + | return | |
| 511 | + | } | |
| 512 | + | ||
| 513 | + | paneView := wsView.GetPaneView(paneID) | |
| 514 | + | if paneView != nil { | |
| 515 | + | paneView.SetLoading(false) | |
| 516 | + | } | |
| 517 | + | } | |
| 518 | + | ||
| 519 | + | // onProgressChanged updates the progress bar with current load progress. | |
| 520 | + | func (c *ContentCoordinator) onProgressChanged(ctx context.Context, paneID entity.PaneID, progress float64) { | |
| 521 | + | _, wsView := c.getActiveWS() | |
| 522 | + | if wsView == nil { | |
| 523 | + | return | |
| 524 | + | } | |
| 525 | + | ||
| 526 | + | paneView := wsView.GetPaneView(paneID) | |
| 527 | + | if paneView != nil { | |
| 528 | + | paneView.SetLoadProgress(progress) | |
| 529 | + | } | |
| 530 | + | } | |
| @@ -113,13 +113,23 @@ func (c *ContentCoordinator) EnsureWebView(ctx context.Context, paneID entity.Pa | |||||
| 113 | c.onFaviconChanged(ctx, paneID, favicon) | 113 | c.onFaviconChanged(ctx, paneID, favicon) | ||
| 114 | } | 114 | } | ||
| 115 | 115 | ||||
| 116 | - | // Set up load change callback to re-apply zoom on navigation | 116 | + | // Set up load change callback to re-apply zoom on navigation and handle progress bar |
| 117 | wv.OnLoadChanged = func(event webkit.LoadEvent) { | 117 | wv.OnLoadChanged = func(event webkit.LoadEvent) { | ||
| 118 | - | if event == webkit.LoadCommitted { | 118 | + | switch event { |
| 119 | + | case webkit.LoadStarted: | |||
| 120 | + | c.onLoadStarted(ctx, paneID) | |||
| 121 | + | case webkit.LoadCommitted: | |||
| 119 | c.onLoadCommitted(ctx, paneID, wv) | 122 | c.onLoadCommitted(ctx, paneID, wv) | ||
| 123 | + | case webkit.LoadFinished: | |||
| 124 | + | c.onLoadFinished(ctx, paneID) | |||
| 120 | } | 125 | } | ||
| 121 | } | 126 | } | ||
| 122 | 127 | ||||
| 128 | + | // Set up progress callback for loading indicator | |||
| 129 | + | wv.OnProgressChanged = func(progress float64) { | |||
| 130 | + | c.onProgressChanged(ctx, paneID, progress) | |||
| 131 | + | } | |||
| 132 | + | ||||
| 123 | // Set up URI change callback for SPA navigation (History API) | 133 | // Set up URI change callback for SPA navigation (History API) | ||
| 124 | // This fires when URL changes via JavaScript without a full page load | 134 | // This fires when URL changes via JavaScript without a full page load | ||
| 125 | wv.OnURIChanged = func(uri string) { | 135 | wv.OnURIChanged = func(uri string) { | ||
| @@ -479,3 +489,42 @@ func (c *ContentCoordinator) onSPANavigation(ctx context.Context, paneID entity. | |||||
| 479 | c.onHistoryRecord(ctx, paneID, url) | 489 | c.onHistoryRecord(ctx, paneID, url) | ||
| 480 | } | 490 | } | ||
| 481 | } | 491 | } | ||
| 492 | + | ||||
| 493 | + | // onLoadStarted shows the progress bar when page loading begins. | |||
| 494 | + | func (c *ContentCoordinator) onLoadStarted(ctx context.Context, paneID entity.PaneID) { | |||
| 495 | + | _, wsView := c.getActiveWS() | |||
| 496 | + | if wsView == nil { | |||
| 497 | + | return | |||
| 498 | + | } | |||
| 499 | + | ||||
| 500 | + | paneView := wsView.GetPaneView(paneID) | |||
| 501 | + | if paneView != nil { | |||
| 502 | + | paneView.SetLoading(true) | |||
| 503 | + | } | |||
| 504 | + | } | |||
| 505 | + | ||||
| 506 | + | // onLoadFinished hides the progress bar when page loading completes. | |||
| 507 | + | func (c *ContentCoordinator) onLoadFinished(ctx context.Context, paneID entity.PaneID) { | |||
| 508 | + | _, wsView := c.getActiveWS() | |||
| 509 | + | if wsView == nil { | |||
| 510 | + | return | |||
| 511 | + | } | |||
| 512 | + | ||||
| 513 | + | paneView := wsView.GetPaneView(paneID) | |||
| 514 | + | if paneView != nil { | |||
| 515 | + | paneView.SetLoading(false) | |||
| 516 | + | } | |||
| 517 | + | } | |||
| 518 | + | ||||
| 519 | + | // onProgressChanged updates the progress bar with current load progress. | |||
| 520 | + | func (c *ContentCoordinator) onProgressChanged(ctx context.Context, paneID entity.PaneID, progress float64) { | |||
| 521 | + | _, wsView := c.getActiveWS() | |||
| 522 | + | if wsView == nil { | |||
| 523 | + | return | |||
| 524 | + | } | |||
| 525 | + | ||||
| 526 | + | paneView := wsView.GetPaneView(paneID) | |||
| 527 | + | if paneView != nil { | |||
| 528 | + | paneView.SetLoadProgress(progress) | |||
| 529 | + | } | |||
| 530 | + | } | |||
M internal/ui/theme/css.go +28 -3
| @@ -46,6 +46,10 @@ func GenerateCSSWithScale(p Palette, scale float64) string { | |||
| 46 | 46 | ||
| 47 | 47 | // Stacked pane styling | |
| 48 | 48 | sb.WriteString(generateStackedPaneCSS(p)) | |
| 49 | + | sb.WriteString("\n") | |
| 50 | + | ||
| 51 | + | // Progress bar styling | |
| 52 | + | sb.WriteString(generateProgressBarCSS(p)) | |
| 49 | 53 | ||
| 50 | 54 | return sb.String() | |
| 51 | 55 | } | |
| @@ -200,7 +204,7 @@ entry.omnibox-entry > *:focus-visible { | |||
| 200 | 204 | border-radius: 0; | |
| 201 | 205 | border-left: 0.1875em solid transparent; | |
| 202 | 206 | border-bottom: 0.0625em solid alpha(var(--border), 0.5); | |
| 203 | - | transition: background-color 100ms ease-in-out, border-left-color 100ms ease-in-out; | |
| 207 | + | transition: background-color 100ms ease-in-out, border-left 100ms ease-in-out; | |
| 204 | 208 | min-height: 2.75em; | |
| 205 | 209 | } | |
| 206 | 210 | ||
| @@ -210,12 +214,12 @@ entry.omnibox-entry > *:focus-visible { | |||
| 210 | 214 | ||
| 211 | 215 | .omnibox-row:hover { | |
| 212 | 216 | background-color: alpha(var(--accent), 0.12); | |
| 213 | - | border-left-color: var(--accent); | |
| 217 | + | border-left: 0.1875em solid var(--accent); | |
| 214 | 218 | } | |
| 215 | 219 | ||
| 216 | 220 | .omnibox-row:selected { | |
| 217 | 221 | background-color: alpha(var(--accent), 0.2); | |
| 218 | - | border-left-color: var(--accent); | |
| 222 | + | border-left: 0.1875em solid var(--accent); | |
| 219 | 223 | } | |
| 220 | 224 | ||
| 221 | 225 | /* Favicon in omnibox rows */ | |
| @@ -378,3 +382,24 @@ button.stacked-pane-title-button:hover .stacked-pane-titlebar label { | |||
| 378 | 382 | } | |
| 379 | 383 | ` | |
| 380 | 384 | } | |
| 385 | + | ||
| 386 | + | // generateProgressBarCSS creates progress bar styles for page loading indication. | |
| 387 | + | func generateProgressBarCSS(p Palette) string { | |
| 388 | + | return `/* ===== Progress Bar Styling ===== */ | |
| 389 | + | ||
| 390 | + | /* Native GtkProgressBar with osd class */ | |
| 391 | + | progressbar.osd { | |
| 392 | + | min-height: 4px; | |
| 393 | + | } | |
| 394 | + | ||
| 395 | + | progressbar.osd trough { | |
| 396 | + | min-height: 4px; | |
| 397 | + | background-color: alpha(var(--bg), 0.3); | |
| 398 | + | } | |
| 399 | + | ||
| 400 | + | progressbar.osd progress { | |
| 401 | + | min-height: 4px; | |
| 402 | + | background-color: var(--accent); | |
| 403 | + | } | |
| 404 | + | ` | |
| 405 | + | } | |
| @@ -46,6 +46,10 @@ func GenerateCSSWithScale(p Palette, scale float64) string { | |||||
| 46 | 46 | ||||
| 47 | // Stacked pane styling | 47 | // Stacked pane styling | ||
| 48 | sb.WriteString(generateStackedPaneCSS(p)) | 48 | sb.WriteString(generateStackedPaneCSS(p)) | ||
| 49 | + | sb.WriteString("\n") | |||
| 50 | + | ||||
| 51 | + | // Progress bar styling | |||
| 52 | + | sb.WriteString(generateProgressBarCSS(p)) | |||
| 49 | 53 | ||||
| 50 | return sb.String() | 54 | return sb.String() | ||
| 51 | } | 55 | } | ||
| @@ -200,7 +204,7 @@ entry.omnibox-entry > *:focus-visible { | |||||
| 200 | border-radius: 0; | 204 | border-radius: 0; | ||
| 201 | border-left: 0.1875em solid transparent; | 205 | border-left: 0.1875em solid transparent; | ||
| 202 | border-bottom: 0.0625em solid alpha(var(--border), 0.5); | 206 | border-bottom: 0.0625em solid alpha(var(--border), 0.5); | ||
| 203 | - | transition: background-color 100ms ease-in-out, border-left-color 100ms ease-in-out; | 207 | + | transition: background-color 100ms ease-in-out, border-left 100ms ease-in-out; |
| 204 | min-height: 2.75em; | 208 | min-height: 2.75em; | ||
| 205 | } | 209 | } | ||
| 206 | 210 | ||||
| @@ -210,12 +214,12 @@ entry.omnibox-entry > *:focus-visible { | |||||
| 210 | 214 | ||||
| 211 | .omnibox-row:hover { | 215 | .omnibox-row:hover { | ||
| 212 | background-color: alpha(var(--accent), 0.12); | 216 | background-color: alpha(var(--accent), 0.12); | ||
| 213 | - | border-left-color: var(--accent); | 217 | + | border-left: 0.1875em solid var(--accent); |
| 214 | } | 218 | } | ||
| 215 | 219 | ||||
| 216 | .omnibox-row:selected { | 220 | .omnibox-row:selected { | ||
| 217 | background-color: alpha(var(--accent), 0.2); | 221 | background-color: alpha(var(--accent), 0.2); | ||
| 218 | - | border-left-color: var(--accent); | 222 | + | border-left: 0.1875em solid var(--accent); |
| 219 | } | 223 | } | ||
| 220 | 224 | ||||
| 221 | /* Favicon in omnibox rows */ | 225 | /* Favicon in omnibox rows */ | ||
| @@ -378,3 +382,24 @@ button.stacked-pane-title-button:hover .stacked-pane-titlebar label { | |||||
| 378 | } | 382 | } | ||
| 379 | ` | 383 | ` | ||
| 380 | } | 384 | } | ||
| 385 | + | ||||
| 386 | + | // generateProgressBarCSS creates progress bar styles for page loading indication. | |||
| 387 | + | func generateProgressBarCSS(p Palette) string { | |||
| 388 | + | return `/* ===== Progress Bar Styling ===== */ | |||
| 389 | + | ||||
| 390 | + | /* Native GtkProgressBar with osd class */ | |||
| 391 | + | progressbar.osd { | |||
| 392 | + | min-height: 4px; | |||
| 393 | + | } | |||
| 394 | + | ||||
| 395 | + | progressbar.osd trough { | |||
| 396 | + | min-height: 4px; | |||
| 397 | + | background-color: alpha(var(--bg), 0.3); | |||
| 398 | + | } | |||
| 399 | + | ||||
| 400 | + | progressbar.osd progress { | |||
| 401 | + | min-height: 4px; | |||
| 402 | + | background-color: var(--accent); | |||
| 403 | + | } | |||
| 404 | + | ` | |||
| 405 | + | } | |||