From 6c015c322c38e05e79656b34b7cfded62e739bcc Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 14 Jul 2023 18:28:28 -0400 Subject: [PATCH] Use human readable duration format in `status_config.yaml` --- package.json | 1 + pnpm-lock.yaml | 7 +++++++ src/StatusScreen.vue | 3 ++- src/status_config.yaml | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3b01a3b..cd2f4f1 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "aprs-parser": "github:ad1217/npm-aprs-parser#no-dynamic-require", "distinct-colors": "^1.0.4", "ol": "^6.15.1", + "parse-duration": "^1.1.0", "vue": "^3.3.4", "vue3-openlayers": "^0.1.75" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 79d2504..d1d4efa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ dependencies: ol: specifier: ^6.15.1 version: 6.15.1 + parse-duration: + specifier: ^1.1.0 + version: 1.1.0 vue: specifier: ^3.3.4 version: 3.3.4 @@ -720,6 +723,10 @@ packages: resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==} dev: false + /parse-duration@1.1.0: + resolution: {integrity: sha512-z6t9dvSJYaPoQq7quMzdEagSFtpGu+utzHqqxmpVWNNZRIXnvqyCvn9XsTdh7c/w0Bqmdz3RB3YnRaKtpRtEXQ==} + dev: false + /parse-headers@2.0.5: resolution: {integrity: sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==} dev: false diff --git a/src/StatusScreen.vue b/src/StatusScreen.vue index 27dfce1..d508e3e 100644 --- a/src/StatusScreen.vue +++ b/src/StatusScreen.vue @@ -26,7 +26,7 @@ :callsign="callsign" :tactical="tactical" :lowVoltage="config.lowVoltage" - :timeoutLength="config.timeoutLength" + :timeoutLength="parseDuration(config.timeoutLength)" :messages="messagesFromStation[callsign] || []" :now="now" > @@ -38,6 +38,7 @@