Add FCM device registration and Gitea bug reporter

This commit is contained in:
2026-09-15 01:01:08 +02:00
parent b2af866cf0
commit b96b1890d2
33 changed files with 1232 additions and 18 deletions
+13
View File
@@ -0,0 +1,13 @@
(() => {
const form = document.querySelector('.bug-report-form');
if (!form) return;
const cap = window.Capacitor;
if (cap?.getPlatform() === 'android') {
document.getElementById('bug-platform').value = 'Android';
cap.Plugins.MetalCircleDevice?.getInfo().then(info => {
document.getElementById('bug-app-version').value = info.appVersion || '';
}).catch(() => {});
}
form.addEventListener('submit', () => { form.querySelector('button[type="submit"]').disabled = true; });
window.addEventListener('pageshow', event => { if (event.persisted) location.reload(); });
})();