ENH - add Flare account controls and photo overview

Use the centered SkyNavbar surface back action, expose every owned profile photo as a selectable thumbnail, and add confirmed Sky Cloud sign-out plus server-authoritative Flare account deletion. Keep client, server, localization, stateful mocks, and regression coverage aligned.
This commit is contained in:
Dominik
2026-08-16 20:34:43 +02:00
parent d260f44b96
commit 3b7f0b8858
10 changed files with 576 additions and 34 deletions
+36
View File
@@ -467,6 +467,42 @@ Bridge.Callbacks.Register("sky_phone:flare:bootstrap", function(source)
return { success = true, data = bootstrap(account.id) }
end)
Bridge.Callbacks.Register("sky_phone:flare:delete-profile", function(source)
if not SkyPhone.AllowOperation(source, "flare_profile_delete", 3, 60) then
return { success = false, error = "rate_limited" }
end
local account, error_response = SkyPhone.RequireAccount(source)
if not account then
return error_response
end
if not load_profile(account.id) then
return { success = false, error = "profile_not_found" }
end
if not Bridge.Database.Transaction({
{
query = [[
DELETE FROM `sky_phone_flare_matches`
WHERE `account_a_id` = ? OR `account_b_id` = ?
]],
params = { account.id, account.id },
},
{
query = [[
DELETE FROM `sky_phone_flare_swipes`
WHERE `swiper_account_id` = ? OR `target_account_id` = ?
]],
params = { account.id, account.id },
},
{
query = "DELETE FROM `sky_phone_flare_profiles` WHERE `account_id` = ?",
params = { account.id },
},
}) then
return { success = false, error = "request_failed" }
end
return { success = true }
end)
Bridge.Callbacks.Register("sky_phone:flare:save-profile", function(source, data)
if not SkyPhone.AllowOperation(source, "flare_profile", 12, 60) then
return { success = false, error = "rate_limited" }