- Added a new modal for reporting bugs, including fields for describing the issue and attaching optional files. - Integrated automatic screenshot capture functionality when the bug report modal is opened. - Created a new API endpoint for submitting bug reports, including validation and rate limiting. - Added database migration for tracking bug report submissions. - Updated frontend scripts to handle bug report submissions and display status messages. - Enhanced contact search functionality with improved error handling and backward compatibility. - Introduced a new button in the UI for accessing the bug report modal.
54 lines
2.9 KiB
HTML
54 lines
2.9 KiB
HTML
<div class="modal fade" id="bugReportModal" tabindex="-1" aria-hidden="true">
|
|
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title"><i class="bi bi-bug me-2"></i>Rapporter fejl</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Luk"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="alert alert-info py-2 small mb-3">
|
|
Screenshot tages automatisk af den aktuelle side.
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="bugActualInput" class="form-label">Hvad gik galt?</label>
|
|
<textarea id="bugActualInput" class="form-control" rows="4" maxlength="8000" placeholder="Beskriv problemet"></textarea>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="bugExpectedInput" class="form-label">Hvad burde være sket?</label>
|
|
<textarea id="bugExpectedInput" class="form-control" rows="4" maxlength="8000" placeholder="Forventet adfærd"></textarea>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="bugExtraFileInput" class="form-label">Ekstra fil (valgfri)</label>
|
|
<input id="bugExtraFileInput" type="file" class="form-control" />
|
|
</div>
|
|
|
|
<div class="mb-2">
|
|
<label class="form-label">Screenshot preview</label>
|
|
<div id="bugScreenshotPreviewWrap" class="border rounded p-2 bg-light text-center">
|
|
<span id="bugScreenshotPreviewPlaceholder" class="text-muted small">Ingen screenshot endnu</span>
|
|
<img id="bugScreenshotPreview" alt="Screenshot preview" style="display:none;max-width:100%;height:auto;border-radius:6px;" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex flex-wrap gap-2 mt-2">
|
|
<button type="button" class="btn btn-outline-primary btn-sm" id="bugCaptureDisplayMediaBtn">
|
|
<i class="bi bi-display me-1"></i>Tag screenshot via skærmdeling
|
|
</button>
|
|
</div>
|
|
|
|
<div id="bugReportStatus" class="small text-muted mt-2"></div>
|
|
<div class="small text-muted mt-2">Screenshot forsøges automatisk ved klik på bug-ikonet. Hvis det fejler, brug skærmdeling-knappen eller indsæt med Cmd+V.</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Annuller</button>
|
|
<button type="button" class="btn btn-primary" id="bugReportSubmitBtn">
|
|
<i class="bi bi-send me-1"></i>Send fejlrapport
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|