diff --git a/docs/config.md b/docs/config.md index a3bc757..1bffa19 100644 --- a/docs/config.md +++ b/docs/config.md @@ -71,6 +71,7 @@ window.owntracks.config = {}; - [`selectedUser`](#selecteduser) - [`showDistanceTravelled`](#showdistancetravelled) - [`startDateTime`](#startdatetime) +- [`units`](#units) - [`verbose`](#verbose) ### `api.baseUrl` @@ -565,6 +566,20 @@ Initial start date and time (browser timezone) for fetched data. }; ``` +### `units` + +Allows the configuration of the units of measurement to use for the user interface. + +Available options: + +- `metric` +- `imperial` + +Choosing anything other than one of these options will fall back to metric. + +- Type: [`String`] +- Default: `"metric"` + ### `verbose` Whether to enable verbose mode or not. diff --git a/src/components/LDeviceLocationPopup.vue b/src/components/LDeviceLocationPopup.vue index cf113fa..2564b5c 100644 --- a/src/components/LDeviceLocationPopup.vue +++ b/src/components/LDeviceLocationPopup.vue @@ -26,7 +26,8 @@
{{ lon }}
- {{ alt }}m + {{ $config.units == "imperial" ? Math.round(alt * 3.28084) : alt }} + {{ $config.units == "imperial" ? " ft" : " m" }}