Fix dark-mode sun icon visibility and remove Porsi column from day detail modal

This commit is contained in:
andrew committed 2026-11-27 15:01:54 +07:00
1 parent 926f4c3876
commit 52612a4762
3 files changed
+53 -17

No files matched your search

+2
View File
@@ -8,6 +8,7 @@ __pycache__/
*.pyc
*.pyo
venv/
venv-convert/
.venv/
# Data / state
@@ -27,6 +28,7 @@ batch_crossings.csv
*.log
*.jpg
*.png
calib_images/
# Superpowers / scratch
.superpowers/
+40 -1
View File
@@ -1 +1,40 @@
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:affinity="https://www.affinity.studio/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:affinity="https://www.affinity.studio/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(1,0,0,1,-237.606825,-80.255975)">
<g transform="matrix(4.266667,0,0,4.266667,-4130.378838,-448.729773)">
<g transform="matrix(0.413869,0,0,0.413869,667.424485,0.417027)" fill="#FFFFFF">
<g transform="matrix(1.060796,0,0,1.060796,-57.209043,-22.977402)">
<path d="M1001.326,370.87C1038.527,370.87 1068.729,401.072 1068.729,438.272C1068.729,475.473 1038.527,505.675 1001.326,505.675C964.126,505.675 933.924,475.473 933.924,438.272C933.924,401.072 964.126,370.87 1001.326,370.87ZM1001.326,385.011C971.93,385.011 948.064,408.876 948.064,438.272C948.064,467.668 971.93,491.534 1001.326,491.534C1030.722,491.534 1054.588,467.668 1054.588,438.272C1054.588,408.876 1030.722,385.011 1001.326,385.011Z"/>
</g>
<g transform="matrix(0,1,-0.602072,0,1314.697559,-563.053977)">
<path d="M1012.494,360.97C1012.494,367.845 1009.134,373.427 1004.994,373.427C1000.855,373.427 997.494,367.845 997.494,360.97L997.494,337.608C997.494,330.732 1000.855,325.151 1004.994,325.151C1009.134,325.151 1012.494,330.732 1012.494,337.608L1012.494,360.97Z"/>
</g>
<g transform="matrix(0.707107,0.707107,-0.425729,0.425729,512.031417,-486.373353)">
<path d="M1012.494,360.97C1012.494,367.845 1009.134,373.427 1004.994,373.427C1000.855,373.427 997.494,367.845 997.494,360.97L997.494,337.608C997.494,330.732 1000.855,325.151 1004.994,325.151C1009.134,325.151 1012.494,330.732 1012.494,337.608L1012.494,360.97Z"/>
</g>
<g transform="matrix(1,-0,0,0.602072,-1.317865,135.418709)">
<path d="M1012.494,360.97C1012.494,367.845 1009.134,373.427 1004.994,373.427C1000.855,373.427 997.494,367.845 997.494,360.97L997.494,337.608C997.494,330.732 1000.855,325.151 1004.994,325.151C1009.134,325.151 1012.494,330.732 1012.494,337.608L1012.494,360.97Z"/>
</g>
<g transform="matrix(0.707107,-0.707107,0.425729,0.425729,75.362759,938.084851)">
<path d="M1012.494,360.97C1012.494,367.845 1009.134,373.427 1004.994,373.427C1000.855,373.427 997.494,367.845 997.494,360.97L997.494,337.608C997.494,330.732 1000.855,325.151 1004.994,325.151C1009.134,325.151 1012.494,330.732 1012.494,337.608L1012.494,360.97Z"/>
</g>
<g transform="matrix(-0,-1,0.602072,-0,697.154821,1446.934659)">
<path d="M1012.494,360.97C1012.494,367.845 1009.134,373.427 1004.994,373.427C1000.855,373.427 997.494,367.845 997.494,360.97L997.494,337.608C997.494,330.732 1000.855,325.151 1004.994,325.151C1009.134,325.151 1012.494,330.732 1012.494,337.608L1012.494,360.97Z"/>
</g>
<g transform="matrix(-0.707107,-0.707107,0.425729,-0.425729,1499.820963,1374.753508)">
<path d="M1012.494,360.97C1012.494,367.845 1009.134,373.427 1004.994,373.427C1000.855,373.427 997.494,367.845 997.494,360.97L997.494,337.608C997.494,330.732 1000.855,325.151 1004.994,325.151C1009.134,325.151 1012.494,330.732 1012.494,337.608L1012.494,360.97Z"/>
</g>
<g transform="matrix(-0.707107,0.707107,-0.425729,-0.425729,1936.48962,-49.704695)">
<path d="M1012.494,360.97C1012.494,367.845 1009.134,373.427 1004.994,373.427C1000.855,373.427 997.494,367.845 997.494,360.97L997.494,337.608C997.494,330.732 1000.855,325.151 1004.994,325.151C1009.134,325.151 1012.494,330.732 1012.494,337.608L1012.494,360.97Z"/>
</g>
<g transform="matrix(-1,0,-0,-0.602072,2009.393044,751.643581)">
<path d="M1012.494,360.97C1012.494,367.845 1009.134,373.427 1004.994,373.427C1000.855,373.427 997.494,367.845 997.494,360.97L997.494,337.608C997.494,330.732 1000.855,325.151 1004.994,325.151C1009.134,325.151 1012.494,330.732 1012.494,337.608L1012.494,360.97Z"/>
</g>
</g>
<g transform="matrix(0.579146,0,0,0.579146,430.848092,52.177941)">
<rect x="1023.747" y="123.981" width="207.202" height="207.202" style="fill:none;"/>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 4.5 KiB

+11 -16
View File
@@ -172,14 +172,13 @@
color: var(--text-muted);
}
.btn-theme {
.btn-theme img { width: 20px; height: 20px; display: block; }
html[data-theme="dark"] #themeIcon { filter: invert(1) brightness(1.2); }
min-width: var(--touch-min); min-height: var(--touch-min);
padding: 8px; border-radius: 8px;
background: var(--btn-ghost-bg); border: 1px solid var(--border);
color: var(--text-muted); cursor: pointer; font-size: 18px; line-height: 1;
display: inline-flex; align-items: center; justify-content: center;
}
.btn-theme img { width: 20px; height: 20px; display: block; }
/* ── Main ── */
.main {
@@ -794,15 +793,14 @@ html[data-theme="dark"] #themeIcon { filter: invert(1) brightness(1.2); }
background: rgba(0,0,0,0.18);
}
.modal-table th:nth-child(1), .modal-table td:nth-child(1) { width: 9%; }
.modal-table th:nth-child(2), .modal-table td:nth-child(2) { width: 14%; }
.modal-table th:nth-child(3), .modal-table td:nth-child(3) { width: 11%; }
.modal-table th:nth-child(2), .modal-table td:nth-child(2) { width: 15%; }
.modal-table th:nth-child(3), .modal-table td:nth-child(3) { width: 13%; }
.modal-table th:nth-child(4), .modal-table td:nth-child(4),
.modal-table th:nth-child(5), .modal-table td:nth-child(5) { width: 10%; }
.modal-table th:nth-child(6), .modal-table td:nth-child(6) { width: 10%; }
.modal-table th:nth-child(7), .modal-table td:nth-child(7) { width: 10%; }
.modal-table th:nth-child(8), .modal-table td:nth-child(8) { width: 10%; }
.modal-table th:nth-child(9), .modal-table td:nth-child(9) { width: 9%; }
.modal-table th:nth-child(10), .modal-table td:nth-child(10) { width: 7%; }
.modal-table th:nth-child(6), .modal-table td:nth-child(6) { width: 11%; }
.modal-table th:nth-child(7), .modal-table td:nth-child(7) { width: 11%; }
.modal-table th:nth-child(8), .modal-table td:nth-child(8) { width: 11%; }
.modal-table th:nth-child(9), .modal-table td:nth-child(9) { width: 10%; }
.modal-table .mono { font-family: var(--mono); font-weight: 600; }
.modal-empty {
color: var(--text-muted); font-size: 12px; padding: 16px; text-align: center;
@@ -886,7 +884,7 @@ html[data-theme="dark"] #themeIcon { filter: invert(1) brightness(1.2); }
<div class="site-name">{{ site_name }}</div>
<div class="site-line">Counting Day: <span id="current-date">--</span></div>
</div>
<button class="btn-theme" id="themeToggle" title="Mode terang" type="button" aria-label="Ganti tema"><img id="themeIcon" src="{{ url_for('static', filename='img/sun_light mode.svg') }}" alt="sun" width="20" height="20"></button>
<button class="btn-theme" id="themeToggle" title="Mode terang" type="button" aria-label="Ganti tema"><img id="themeIcon" src="{{ url_for('static', filename='img/sun_light mode.svg') }}?v=2" alt="sun" width="20" height="20"></button>
</div>
</header>
@@ -1195,7 +1193,6 @@ html[data-theme="dark"] #themeIcon { filter: invert(1) brightness(1.2); }
<th>Mulai</th>
<th>Selesai</th>
<th>Durasi</th>
<th>Porsi</th>
</tr>
</thead>
<tbody id="modal-table-body"></tbody>
@@ -1293,8 +1290,9 @@ function chartThemeColors() {
function syncThemeToggleUi() {
const icon = document.getElementById('themeIcon');
const sunUrl = "{{ url_for('static', filename='img/sun_light mode.svg') }}";
const sunUrl = "{{ url_for('static', filename='img/sun_light mode.svg') }}?v=2";
const moonUrl = "{{ url_for('static', filename='img/moon_dark mode.svg') }}";
const btn = document.getElementById('themeToggle');
if (!btn) return;
const light = getTheme() === 'light';
if (icon) icon.src = light ? moonUrl : sunUrl;
@@ -1974,7 +1972,6 @@ async function showDayDetail(date) {
const typePill = bType === 'mixed'
? '<span class="type-pill mixed">MIXED</span>'
: `<span class="type-pill ${bType}">${bType.toUpperCase()}</span>`;
const pct = total > 0 ? (b.count / total) * 100 : 0;
return `
<tr>
<td class="mono">#${b.batch_number}</td>
@@ -1986,7 +1983,6 @@ async function showDayDetail(date) {
<td>${formatTime(b.start_time)}</td>
<td>${formatTime(b.end_time)}</td>
<td>${b.duration_minutes} menit</td>
<td class="mono">${pct.toFixed(1)}%</td>
</tr>`;
}).join('');
@@ -2001,10 +1997,9 @@ async function showDayDetail(date) {
<td style="font-size:10px; color:var(--text-muted);">${batches[0] ? formatTime(batches[0].start_time) : '--'}</td>
<td style="font-size:10px; color:var(--text-muted);">${batches[batches.length - 1] ? formatTime(batches[batches.length - 1].end_time) : '--'}</td>
<td style="font-weight:700;">${Math.round(totalDuration * 10) / 10} menit</td>
<td class="mono" style="font-weight:700;">100%</td>
</tr>`;
} else {
tableHtml = `<tr><td colspan="10" class="modal-empty">Tidak ada batch pada tanggal ini</td></tr>`;
tableHtml = `<tr><td colspan="9" class="modal-empty">Tidak ada batch pada tanggal ini</td></tr>`;
}
document.getElementById('modal-table-body').innerHTML = tableHtml;