From 0b46ff31b3ffd2147d2c6c3a3580a8b450bc5636 Mon Sep 17 00:00:00 2001 From: sudomarcma Date: Tue, 17 Jun 2025 17:28:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(AttendanceRecordView):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=93=8D=E5=BA=94=E5=BC=8F=E8=A1=A8=E6=A0=BC=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E5=92=8C=E4=B8=BB=E9=A2=98=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 支持移动设备浏览 --- src/views/AttendanceRecordView.vue | 132 +++++++++++++++++++---------- 1 file changed, 88 insertions(+), 44 deletions(-) diff --git a/src/views/AttendanceRecordView.vue b/src/views/AttendanceRecordView.vue index 49f0dc8..55eb00d 100644 --- a/src/views/AttendanceRecordView.vue +++ b/src/views/AttendanceRecordView.vue @@ -47,46 +47,48 @@ - - - - - - - - - - - - - - - - - - - - - - -
EventTimestampLocation NameCoordinatesNotes
- No records found for this period. -
- {{ - record.event_type.replace('_', ' ') - }} - {{ new Date(record.timestamp).toLocaleString() }}{{ record.qrCodeUsedName }} - - Show on map - - N/A - {{ record.notes || 'N/A' }}
+
+ + + + + + + + + + + + + + + + + + + + + + +
EventTimestampLocation NameCoordinatesNotes
+ No records found for this period. +
+ {{ + record.event_type.replace('_', ' ') + }} + {{ new Date(record.timestamp).toLocaleString() }}{{ record.qrCodeUsedName }} + + Show on map + + N/A + {{ record.notes || 'N/A' }}
+
@@ -224,8 +226,8 @@ onMounted(() => { } /* New styles for manual entry card */ .manual-entry-card { - background-color: #f9f9f9; - border: 1px solid #e0e0e0; + background-color: var(--c-bg-secondary); /* Use theme variable */ + border: 1px solid var(--c-border); /* Use theme variable */ border-radius: 8px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; @@ -233,10 +235,11 @@ onMounted(() => { .manual-entry-header { margin-top: 0; margin-bottom: 0.25rem; + color: var(--c-text-primary); /* Ensure text color adapts */ } .manual-entry-desc { font-size: 0.9rem; - color: #666; + color: var(--c-text-secondary); /* Ensure text color adapts */ margin-top: 0; margin-bottom: 1rem; } @@ -252,7 +255,7 @@ onMounted(() => { align-items: flex-end; margin-bottom: 1.5rem; padding-top: 1rem; - border-top: 1px solid #eee; + border-top: 1px solid var(--c-border); /* Use theme variable */ } .form-group { display: flex; @@ -281,4 +284,45 @@ onMounted(() => { .map-link:hover { color: var(--c-primary-dark); } + +/* Added responsive table container */ +.table-responsive { + overflow-x: auto; + -webkit-overflow-scrolling: touch; /* For smoother scrolling on iOS */ +} + +/* Responsive styles */ +@media (max-width: 768px) { + .attendance-container { + max-width: 100%; + padding: 0 1rem; /* Add horizontal padding for smaller screens */ + } + + .manual-entry-form, + .filters { + flex-direction: column; /* Stack items vertically */ + align-items: stretch; /* Stretch items to full width */ + } + + .manual-entry-form .form-group, + .filters .form-group { + width: 100%; /* Make form groups take full width */ + } + + .manual-entry-form button, + .filters button { + width: 100%; /* Make buttons take full width */ + margin-top: 0.5rem; /* Add some space above buttons when stacked */ + } + + /* Adjust table font size for smaller screens if needed */ + table { + font-size: 0.9rem; + } + + th, + td { + padding: 8px 10px; /* Reduce padding for table cells */ + } +}