Add Stripe donation flow

This commit is contained in:
hz
2026-07-19 22:26:33 -05:00
parent f12904bf73
commit dec5e74aa7
30 changed files with 1053 additions and 1 deletions
+12 -1
View File
@@ -314,6 +314,11 @@ func _build_ui() -> void:
bookmarks.main = self
screens_container.add_child(bookmarks)
screens["bookmarks"] = bookmarks
var donations := preload("res://scripts/ui/donation_screen.gd").new()
donations.name = "DonationScreen"
donations.main = self
screens_container.add_child(donations)
screens["donations"] = donations
feedback_dialog = preload("res://scripts/ui/app_feedback_dialog.gd").new()
feedback_dialog.name = "AppFeedbackDialog"
@@ -386,6 +391,7 @@ func _populate_navigation(container: VBoxContainer, include_brand: bool) -> void
spacer.size_flags_vertical = Control.SIZE_EXPAND_FILL
container.add_child(spacer)
container.add_child(HSeparator.new())
_add_nav_button(container, "donations", "Support MedMind", "heart-pulse", true)
_add_nav_button(container, "performance", "Profile", "user-round", true)
_add_nav_button(container, "settings", "Settings", "settings", true)
_add_nav_button(container, "logout", "Log out", "log-out", true)
@@ -426,6 +432,7 @@ func _on_navigation_pressed(key: String) -> void:
"settings": show_screen("settings")
"notes": show_screen("notes")
"bookmarks": show_screen("bookmarks")
"donations": show_screen("donations")
"logout": _logout()
@@ -440,7 +447,8 @@ func _update_header_title(screen_name: String) -> void:
"profile": "Profile",
"settings": "Settings",
"notes": "Notes",
"bookmarks": "Bookmarks"
"bookmarks": "Bookmarks",
"donations": "Support MedMind"
}
header_title.text = str(titles.get(screen_name, ""))
@@ -735,6 +743,9 @@ func _on_theme_changed(is_dark_mode: bool) -> void:
var selector = screens.get("selection")
if selector != null and selector.has_method("refresh_theme_controls"):
selector.refresh_theme_controls()
var donations = screens.get("donations")
if donations != null and donations.has_method("refresh_theme_controls"):
donations.refresh_theme_controls()
var player = screens.get("player")
if player != null and player.has_method("refresh_theme_controls"):
player.refresh_theme_controls()