Commit f851387
committed
✨ feat: feat: desktop integration with template system + viewer enhancements
Template System:
- WebAppTemplate dataclass (13 fields: mime_types, url_schemes, features, etc.)
- TemplateRegistry with search, match_url, category grouping
- 45 pre-built templates across 5 modules:
office365 (8), google (10), communication (7), media (8), productivity (12)
- Template Gallery UI (Adw.Window, FlowBox grid, search, category sections)
- Gallery integrated into webapp_dialog.py headerbar ("Templates" button)
- Template selection auto-fills: URL, name, icon, category, app mode
Desktop Integration:
- .desktop generation: MimeType, Comment, GenericName, Keywords, X-BigWebApp-Template
- URL scheme handlers → x-scheme-handler/* MIME type auto-conversion
- %f positional arg in Exec line when MIME types present
- File handler: FileAwarePage(QWebEnginePage) with chooseFiles() intercept
- Download handler: QFileDialog.getSaveFileName via xdg-desktop-portal
- Notifications: setNotificationPresenter → notify-send bridge
- Permissions: auto-grant notifications, camera, microphone
- MPRIS media keys: optional D-Bus service + JS Media Session bridge
- command_executor: extra_env param for template metadata env vars
- webapp_model: template fields + apply_template() method
Viewer Fixes:
- fix Wayland/KWin resize bug: lock window size during navigation
(setFixedSize on loadStarted, unlock on loadFinished)
- _on_new_window: use request.openIn(page) instead of setUrl()
- _enforce_screen_limits: setMaximumSize to screen bounds
- _load_geometry: clamp saved dimensions to 90% of screen
- _toggle_fullscreen: lift/restore max-size limits properly1 parent 9ae3643 commit f851387
14 files changed
Lines changed: 1456 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
171 | 201 | | |
172 | 202 | | |
173 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
174 | 207 | | |
175 | 208 | | |
176 | 209 | | |
177 | 210 | | |
178 | 211 | | |
179 | 212 | | |
180 | 213 | | |
181 | | - | |
| 214 | + | |
182 | 215 | | |
183 | 216 | | |
184 | 217 | | |
185 | | - | |
| 218 | + | |
186 | 219 | | |
187 | 220 | | |
188 | 221 | | |
| 222 | + | |
| 223 | + | |
189 | 224 | | |
190 | 225 | | |
191 | 226 | | |
192 | 227 | | |
193 | 228 | | |
194 | 229 | | |
195 | 230 | | |
196 | | - | |
| 231 | + | |
197 | 232 | | |
198 | 233 | | |
199 | 234 | | |
200 | | - | |
| 235 | + | |
201 | 236 | | |
202 | 237 | | |
203 | 238 | | |
| |||
0 commit comments