Mistake-maker + Improv-style programmer since 2010
This is a weather app built with Vue 3, TypeScript, and Vite. It uses the OpenMeteo API to get weather data and Shadcn-vue for the UI.
You can lock the app to a single location using one environment variable.
.env.example to .env.VITE_LOCKED_LOCATION to a valid JSON object.Example:
VITE_LOCKED_LOCATION={"name":"Bentonville","latitude":36.3729,"longitude":-94.2088,"country":"United States","admin1":"Arkansas"}
When this variable is set correctly:
You can also lock the three unit settings with env vars:
VITE_LOCKED_TEMPERATURE_UNIT=fahrenheit
VITE_LOCKED_WIND_SPEED_UNIT=mph
VITE_LOCKED_PRECIPITATION_UNIT=inch
When set to valid values, those settings become read-only in the app. If a value is invalid, it is ignored and a warning is shown in the settings dialog.
For small landscape displays (like 480x320), the UI automatically switches to a compact mode:
The default desktop and normal mobile layouts remain unchanged outside that compact breakpoint.