making quill work

This commit is contained in:
metacryst
2026-01-09 11:13:11 -06:00
parent 6230e98312
commit 12dc2384f7
2 changed files with 418 additions and 170 deletions

File diff suppressed because one or more lines are too long

View File

@@ -118,7 +118,8 @@ class Home extends Shadow {
VStack(() => { VStack(() => {
this.logs.map(log => this.logs.map(log =>
div(log) div(log)
.padding("8px 12px") .paddingHorizontal("8px")
.paddingVertical("12px")
.backgroundColor("rgba(255,255,255,0.9)") .backgroundColor("rgba(255,255,255,0.9)")
.borderRadius(6, px) .borderRadius(6, px)
.marginBottom(6, px) .marginBottom(6, px)
@@ -130,7 +131,7 @@ class Home extends Shadow {
.attr({"id": "logList"}) .attr({"id": "logList"})
.flex(1) .flex(1)
.overflowY("auto") .overflowY("auto")
.padding("0 16px") .paddingHorizontal(16, px)
}) })
.marginTop(7, em) .marginTop(7, em)
}) })
@@ -156,26 +157,26 @@ class Home extends Shadow {
formatCentralTime(date) { formatCentralTime(date) {
return new Intl.DateTimeFormat('en-US', { return new Intl.DateTimeFormat('en-US', {
timeZone: 'America/Chicago', timeZone: 'America/Chicago',
month: '2-digit', month: '2-digit',
day: '2-digit', day: '2-digit',
year: '2-digit', year: '2-digit',
hour: 'numeric', hour: 'numeric',
minute: '2-digit', minute: '2-digit',
second: '2-digit', second: '2-digit',
hour12: true hour12: true
}) })
.format(date) .format(date)
.replace(/,/, '') // "04/05/25, 2:30:00 PM" → "04/05/25 2:30:00 PM" .replace(/,/, '') // "04/05/25, 2:30:00 PM" → "04/05/25 2:30:00 PM"
.replace(/\//g, '.') // → "04.05.25 2:30:00 PM" .replace(/\//g, '.') // → "04.05.25 2:30:00 PM"
.toLowerCase() .toLowerCase()
.replace(' pm', 'pm') .replace(' pm', 'pm')
.replace(' am', 'am'); .replace(' am', 'am');
} }
async sendLocation(lat, lon, timestamp) { async sendLocation(lat, lon, timestamp) {
try { try {
const resp = await fetch('http://sam.local:3008/api/location', { const resp = await fetch('http://localhost:3008/api/location', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ body: JSON.stringify({