Add legal consent and reliable external redirects
This commit is contained in:
@@ -159,6 +159,15 @@ func _build_ui() -> void:
|
||||
var disclosure := _body("Contributions are voluntary, one-time, and not tax-deductible. Card details are entered only on Stripe's secure checkout page.")
|
||||
disclosure.add_theme_font_size_override("font_size", 14)
|
||||
contribution.add_child(disclosure)
|
||||
var legal_links := HBoxContainer.new()
|
||||
legal_links.add_theme_constant_override("separation", 12)
|
||||
contribution.add_child(legal_links)
|
||||
for spec in [["Terms of Service", "terms"], ["Privacy Policy", "privacy"]]:
|
||||
var link := Button.new()
|
||||
link.text = spec[0]
|
||||
link.flat = true
|
||||
link.pressed.connect(_open_legal_document.bind(str(spec[1])))
|
||||
legal_links.add_child(link)
|
||||
|
||||
|
||||
func on_show(_payload: Variant = null) -> void:
|
||||
@@ -173,6 +182,10 @@ func on_hide() -> void:
|
||||
donation_service.stop_polling()
|
||||
|
||||
|
||||
func _open_legal_document(kind: String) -> void:
|
||||
main.open_legal_document(kind)
|
||||
|
||||
|
||||
static func parse_amount_cents(value: String) -> int:
|
||||
return DonationAmount.parse_cents(value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user