Client fixes

This commit is contained in:
2026-06-24 01:21:21 -04:00
parent b525dd27c8
commit 3fd94626b6
6 changed files with 10 additions and 25 deletions

View File

@@ -144,7 +144,7 @@ export async function getCoords() {
`;
const rows = await query(flux);
if(rows.length && rows[0].latitude && rows[0].longitude) {
return {lat: rows[0].latitude, lon: rows[0].longitude, alt: rows[0].altitude || c.ALTITUDE};
return {latitude: rows[0].latitude, longitude: rows[0].longitude, altitude: rows[0].altitude || c.ALTITUDE};
}
return {latitude: c.LATITUDE, longitude: c.LONGITUDE, altitude: c.ALTITUDE};
}

View File

@@ -31,12 +31,6 @@ export const WMO = {
99: { label: 'Thunderstorm w/ Hail', icon: '11d' },
}
export function weatherFromCode(code, isDay = true) {
const w = WMO[code] ?? { label: 'Unknown', icon: '01d' }
const icon = isDay ? w.icon : w.icon.replace('d', 'n')
return { weather_code: code, weather_label: w.label, weather_icon: `/icons/${icon}.png` }
}
export async function downloadIcons() {
if (!existsSync(DIR)) mkdirSync(DIR, { recursive: true })
const icons = new Set(Object.values(WMO).map(w => [w.icon, w.icon.replace('d','n')]).flat())