Let OpenWeather Units fall through the settings cascade
The Units field carried a Default of "metric" and had no blank option, so the global panel layer always set a value and locked organizations and users out of changing it. Mirror the fix already applied to OpenSky's plan. - Plugin descriptor: drop the "metric" Default and add a blank "Not set" option; runtime still falls back to metric when no layer sets it. - Web App: add a "Not set" choice to the Units control and stop forcing metric back into the form on load. - Test guards that the units field has no Default and offers a blank option. - Rebuilt embedded frontend. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
6231b43076
commit
285551fe8a
Vendored
+5
-5
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -35,8 +35,8 @@
|
||||
})()
|
||||
</script>
|
||||
<title>PilotVault — Control Panel</title>
|
||||
<script type="module" crossorigin src="./assets/index-BK_MuFN4.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-D7rbxd3q.css">
|
||||
<script type="module" crossorigin src="./assets/index-CpDOSPL4.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-DIbxnHR0.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -741,6 +741,7 @@ const owHealthTs = ref(null)
|
||||
const OW_HEALTH_KEY = 'pv.openweather.health'
|
||||
|
||||
const OW_UNITS_OPTS = [
|
||||
{ value: '', label: 'Not set' },
|
||||
{ value: 'metric', label: 'Metric (°C)' },
|
||||
{ value: 'imperial', label: 'Imperial (°F)' },
|
||||
{ value: 'standard', label: 'Standard (K)' },
|
||||
@@ -766,7 +767,6 @@ function owSourceLabel(k) {
|
||||
|
||||
function fillOwForm() {
|
||||
for (const k of OW_KEYS) owForm[k] = owField(k).own || ''
|
||||
if (!owForm.units) owForm.units = 'metric'
|
||||
}
|
||||
|
||||
function applyOpenWeatherView(body) {
|
||||
|
||||
Reference in New Issue
Block a user