|
319 | 319 | ("other-os", "Other OS"), |
320 | 320 | ("unsupported", "Unsupported OS"), |
321 | 321 | ] |
322 | | - |
323 | 322 | FIREFOX_CHOICES = [ |
324 | 323 | ("", "No restriction"), |
325 | 324 | ("is-firefox", "Firefox only"), |
326 | 325 | ("not-firefox", "Non-Firefox only"), |
327 | 326 | ] |
328 | | - |
329 | 327 | AUTH_CHOICES = [ |
330 | 328 | ("", "No restriction"), |
331 | 329 | ("state-fxa-supported-signed-in", "Signed-in only"), |
332 | 330 | ("state-fxa-supported-signed-out", "Signed-out only"), |
333 | 331 | ] |
334 | | - |
| 332 | +DEFAULT_BROWSER_CHOICES = [ |
| 333 | + ("is-default", "Firefox is default browser"), |
| 334 | + ("is-not-default", "Firefox is not default browser"), |
| 335 | +] |
335 | 336 |
|
336 | 337 | UITOUR_BUTTON_NEW_TAB = "open_new_tab" |
337 | 338 | UITOUR_BUTTON_ABOUT_PREFERENCES = "open_about_preferences" |
@@ -441,6 +442,13 @@ class ConditionalDisplayBlock(blocks.StructBlock): |
441 | 442 | label="Login state", |
442 | 443 | help_text="Filter by login state. Leave empty for no restriction.", |
443 | 444 | ) |
| 445 | + default_browser = blocks.ChoiceBlock( |
| 446 | + choices=DEFAULT_BROWSER_CHOICES, |
| 447 | + default="", |
| 448 | + required=False, |
| 449 | + label="Default Browser", |
| 450 | + help_text="Filter by default browser state. Leave empty for no restriction.", |
| 451 | + ) |
444 | 452 |
|
445 | 453 | class Meta: |
446 | 454 | label = "Conditional Display" |
|
0 commit comments