All checks were successful
Deploy to NAS / deploy (push) Successful in 2m20s
- Migrate static JS to TypeScript (static-ts/ → compiled to internal/api/static/) - Add image resizing on upload: JPEG/PNG/WebP scaled to max 1920px at quality 80 - Extract shared upload logic into upload.go (saveUpload, saveResizedImage, saveResizedWebP) - Add POST /media endpoint for drag-drop/paste media uploads with markdown ref return - Add background music player with video/audio coordination (autoplay.ts) - Add global nav, public feed, hashtags, visibility, Markdown rendering for entries - Add Dockerfile stage for TypeScript compilation (static-ts-builder) - Add goldmark, disintegration/imaging, golang.org/x/image dependencies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
1.2 KiB
JavaScript
29 lines
1.2 KiB
JavaScript
"use strict";
|
|
var _a;
|
|
// GPS button
|
|
(_a = document.getElementById('btn-gps')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', function () {
|
|
const status = document.getElementById('gps-status');
|
|
if (!navigator.geolocation) {
|
|
status.textContent = '// GPS nicht verfügbar';
|
|
return;
|
|
}
|
|
status.textContent = '// Standort wird ermittelt...';
|
|
navigator.geolocation.getCurrentPosition(function (pos) {
|
|
document.getElementById('entry-lat').value = pos.coords.latitude.toFixed(6);
|
|
document.getElementById('entry-lon').value = pos.coords.longitude.toFixed(6);
|
|
status.textContent = '// Standort gesetzt (' + pos.coords.accuracy.toFixed(0) + ' m Genauigkeit)';
|
|
}, function (err) {
|
|
status.textContent = '// Fehler: ' + err.message;
|
|
}, { enableHighAccuracy: true, timeout: 10000 });
|
|
});
|
|
// Set current time as default
|
|
(function () {
|
|
const input = document.getElementById('entry-time');
|
|
if (input && !input.value) {
|
|
const now = new Date();
|
|
const hh = String(now.getHours()).padStart(2, '0');
|
|
const mm = String(now.getMinutes()).padStart(2, '0');
|
|
input.value = hh + ':' + mm;
|
|
}
|
|
})();
|