Client - use imperial unit for wind speed

This commit is contained in:
Sam 2021-11-14 15:07:35 +01:00
parent c069e7ff0c
commit cf2386a89e
2 changed files with 26 additions and 4 deletions

View File

@ -87,7 +87,10 @@
:useImperialUnits="useImperialUnits" :useImperialUnits="useImperialUnits"
/> />
</div> </div>
<WorkoutWeather :workoutObject="workoutObject" /> <WorkoutWeather
:workoutObject="workoutObject"
:useImperialUnits="useImperialUnits"
/>
</div> </div>
</template> </template>

View File

@ -89,8 +89,26 @@
:title="$t(`workouts.WEATHER.WIND`)" :title="$t(`workouts.WEATHER.WIND`)"
/> />
</td> </td>
<td>{{ Number(workoutObject.weatherStart.wind).toFixed(1) }}m/s</td> <td>
<td>{{ Number(workoutObject.weatherEnd.wind).toFixed(1) }}m/s</td> <Distance
:distance="workoutObject.weatherStart.wind"
unitFrom="m"
:digits="1"
:displayUnit="false"
:useImperialUnits="useImperialUnits"
/>
{{ useImperialUnits ? 'ft' : 'm' }}/s
</td>
<td>
<Distance
:distance="workoutObject.weatherEnd.wind"
unitFrom="m"
:digits="1"
:displayUnit="false"
:useImperialUnits="useImperialUnits"
/>
{{ useImperialUnits ? 'ft' : 'm' }}/s
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -104,10 +122,11 @@
interface Props { interface Props {
workoutObject: IWorkoutObject workoutObject: IWorkoutObject
useImperialUnits: boolean
} }
const props = defineProps<Props>() const props = defineProps<Props>()
const { workoutObject } = toRefs(props) const { useImperialUnits, workoutObject } = toRefs(props)
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>