Delete Account API + UI + Store assets (icon, graphic, screenshot)

- DELETE /api/v1/auth/delete-account (GDPR + Google Play req)
- Settings: red Delete Account section with confirmation
- Store assets: icon-512, feature-graphic, screenshot-1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 23:56:20 +00:00
parent 3f04637550
commit 03d7bd8de6
6 changed files with 69 additions and 43 deletions

View File

@@ -217,6 +217,21 @@ export default function SettingsPage() {
<div className="text-center text-xs text-muted py-4">
<p>{t("common.appName")} {t("common.appVersion")}</p>
</div>
<section className="bg-red-50 dark:bg-red-900/20 rounded-xl p-4 border border-red-200 dark:border-red-800 mt-6">
<h2 className="font-semibold text-red-600 dark:text-red-400 mb-2">Smazat ucet</h2>
<p className="text-sm text-red-500 mb-3">Trvale smazat ucet a vsechna data. Tuto akci nelze vratit.</p>
<button onClick={() => {
if (confirm("Opravdu chcete trvale smazat svuj ucet a vsechna data?")) {
const token = localStorage.getItem("taskteam_token");
fetch("/api/v1/auth/delete-account", { method: "DELETE", headers: { Authorization: "Bearer " + token } })
.then(r => r.json())
.then(() => { localStorage.clear(); window.location.href = "/login"; });
}
}} className="px-4 py-2 bg-red-600 text-white rounded-lg text-sm font-medium">
Smazat ucet
</button>
</section>
</div>
);
}