manual submission redesign phase H - finetuning mobile
This commit is contained in:
@@ -102,9 +102,19 @@
|
||||
};
|
||||
|
||||
const showCapturedDirection = (heading, accuracy) => {
|
||||
const accuracyText = accuracy === null ? (t.accuracyUnavailable || "Accuracy unavailable") : (t.accuracy || "Accuracy") + ": ±" + displayDegrees(accuracy) + "°";
|
||||
const status = directionStatus();
|
||||
if (status) status.innerHTML = "<strong>" + cardinalDirection(heading) + " · " + displayDegrees(heading) + "°</strong><br>" + accuracyText;
|
||||
if (status) {
|
||||
status.classList.toggle("manual-direction-panel__status--accuracy", accuracy !== null);
|
||||
if (accuracy === null) {
|
||||
status.textContent = t.accuracyUnavailable || "Accuracy unavailable";
|
||||
} else {
|
||||
const label = document.createElement("span");
|
||||
label.textContent = t.accuracy || "Accuracy";
|
||||
const value = document.createElement("strong");
|
||||
value.textContent = `±${displayDegrees(accuracy)}°`;
|
||||
status.replaceChildren(label, value);
|
||||
}
|
||||
}
|
||||
const button = captureDirectionButton();
|
||||
if (button) button.textContent = (t.stopCapture || "Stop measuring direction");
|
||||
};
|
||||
@@ -150,6 +160,7 @@
|
||||
if (directionPanel()) directionPanel().dataset.state = directionDegrees.value ? "captured" : "ready";
|
||||
return;
|
||||
}
|
||||
directionStatus()?.classList.remove("manual-direction-panel__status--accuracy");
|
||||
if (!window.isSecureContext) {
|
||||
directionStatus().textContent = (t.secureCompass || "Compass capture requires a secure HTTPS connection.");
|
||||
if (directionPanel()) directionPanel().dataset.state = "unavailable";
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
|
||||
.manual-direction-panel__topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
|
||||
.manual-direction-panel__summary { margin: .35rem 0 .8rem; color: #f5f0ff; font-weight: 700; }
|
||||
.manual-report .manual-direction-panel__status--accuracy { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .75rem 0; padding: .55rem .75rem; border: 1px solid #5d4d92; border-radius: .7rem; color: #d9cfee; background: #191630; font-size: .85rem; }
|
||||
.manual-direction-panel__status--accuracy strong { color: #f5edff; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||||
.manual-direction-panel__open, .manual-direction-panel__close { min-height: 2.75rem; border: 1px solid #8d77d2; border-radius: .7rem; color: #e8dcff; font: inherit; font-weight: 750; background: #302553; cursor: pointer; }
|
||||
.manual-direction-panel__open { padding: .5rem .85rem; }
|
||||
.manual-direction-panel__close { min-width: 2.75rem; font-size: 1.4rem; }
|
||||
@@ -102,6 +104,8 @@
|
||||
:root[data-theme="light"] .manual-direction-panel__open,
|
||||
:root[data-theme="light"] .manual-direction-panel__close { color: #321d42; border-color: #b68bb5; background: #ead2eb; }
|
||||
:root[data-theme="light"] .manual-direction-panel__summary { color: #321d42; }
|
||||
:root[data-theme="light"] .manual-report .manual-direction-panel__status--accuracy { border-color: #cfaad1; color: #694b68; background: #fff8fb; }
|
||||
:root[data-theme="light"] .manual-direction-panel__status--accuracy strong { color: #321d42; }
|
||||
:root[data-theme="light"] .manual-submission { border-color: #54a67b; color: #164d34; background: #e8fff2; }
|
||||
:root[data-theme="light"] .manual-submission__icon { color: #fff; }
|
||||
:root[data-theme="light"] .manual-submission__summary { color: #2b6b48; }
|
||||
@@ -120,6 +124,7 @@
|
||||
body:not(.dashboard-page) { padding: max(1rem, env(safe-area-inset-top, 0px)) max(.5rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(.5rem, env(safe-area-inset-left, 0px)); }
|
||||
.home-grid .manual-report, .dashboard-report, .dashboard-report .manual-report { overflow: visible; }
|
||||
.manual-report { padding: 1.25rem; }
|
||||
.dashboard-report .manual-report { padding: 0; }
|
||||
.manual-report__header { padding-right: 2.5rem; }
|
||||
.manual-report form { padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
|
||||
.manual-report #manual-submit {
|
||||
|
||||
Reference in New Issue
Block a user