Client - minor fix and changes

This commit is contained in:
Sam 2021-11-14 17:52:36 +01:00
parent 1bacfa499f
commit 26c8d47c51
22 changed files with 32 additions and 32 deletions

View File

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><!--[if IE]><link rel="icon" href="/favicon.ico"><![endif]--><link rel="stylesheet" href="/static/css/fork-awesome.min.css"><link rel="stylesheet" href="/static/css/leaflet.css"><title>FitTrackee</title><link href="/static/css/admin.babfd43e.css" rel="prefetch"><link href="/static/css/main.f9856c63.css" rel="prefetch"><link href="/static/css/main~workouts.0edb3403.css" rel="prefetch"><link href="/static/css/profile.05400f70.css" rel="prefetch"><link href="/static/css/reset.46776e72.css" rel="prefetch"><link href="/static/css/workouts.612eca1c.css" rel="prefetch"><link href="/static/js/admin.2f1d393d.js" rel="prefetch"><link href="/static/js/chunk-2d0c9189.c81458cc.js" rel="prefetch"><link href="/static/js/chunk-2d0cf391.020c75ea.js" rel="prefetch"><link href="/static/js/chunk-2d0da8f3.c8c3e7e8.js" rel="prefetch"><link href="/static/js/chunk-2d2248b6.d84473c1.js" rel="prefetch"><link href="/static/js/chunk-2d22523a.4b710d99.js" rel="prefetch"><link href="/static/js/main.b5ccfa42.js" rel="prefetch"><link href="/static/js/main~workouts.6afa0411.js" rel="prefetch"><link href="/static/js/profile.62578012.js" rel="prefetch"><link href="/static/js/reset.518e646f.js" rel="prefetch"><link href="/static/js/workouts.16965303.js" rel="prefetch"><link href="/static/css/app.977e86b0.css" rel="preload" as="style"><link href="/static/js/app.73db18ef.js" rel="preload" as="script"><link href="/static/js/chunk-vendors.caa4fc1c.js" rel="preload" as="script"><link href="/static/css/app.977e86b0.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="/img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/img/icons/favicon-16x16.png"><link rel="manifest" href="/manifest.json"><meta name="theme-color" content="#4DBA87"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="fittrackee_client"><link rel="apple-touch-icon" href="/img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="/img/icons/safari-pinned-tab.svg" color="#4DBA87"><meta name="msapplication-TileImage" content="/img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but FitTrackee doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.caa4fc1c.js"></script><script src="/static/js/app.73db18ef.js"></script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><!--[if IE]><link rel="icon" href="/favicon.ico"><![endif]--><link rel="stylesheet" href="/static/css/fork-awesome.min.css"><link rel="stylesheet" href="/static/css/leaflet.css"><title>FitTrackee</title><link href="/static/css/admin.babfd43e.css" rel="prefetch"><link href="/static/css/main.f9856c63.css" rel="prefetch"><link href="/static/css/main~workouts.0edb3403.css" rel="prefetch"><link href="/static/css/profile.05400f70.css" rel="prefetch"><link href="/static/css/reset.46776e72.css" rel="prefetch"><link href="/static/css/workouts.379cd51f.css" rel="prefetch"><link href="/static/js/admin.2f1d393d.js" rel="prefetch"><link href="/static/js/chunk-2d0c9189.c81458cc.js" rel="prefetch"><link href="/static/js/chunk-2d0cf391.020c75ea.js" rel="prefetch"><link href="/static/js/chunk-2d0da8f3.c8c3e7e8.js" rel="prefetch"><link href="/static/js/chunk-2d2248b6.d84473c1.js" rel="prefetch"><link href="/static/js/chunk-2d22523a.4b710d99.js" rel="prefetch"><link href="/static/js/main.a53955db.js" rel="prefetch"><link href="/static/js/main~workouts.6afa0411.js" rel="prefetch"><link href="/static/js/profile.62578012.js" rel="prefetch"><link href="/static/js/reset.518e646f.js" rel="prefetch"><link href="/static/js/workouts.808a94ee.js" rel="prefetch"><link href="/static/css/app.110c4593.css" rel="preload" as="style"><link href="/static/js/app.1342fc6b.js" rel="preload" as="script"><link href="/static/js/chunk-vendors.caa4fc1c.js" rel="preload" as="script"><link href="/static/css/app.110c4593.css" rel="stylesheet"><link rel="icon" type="image/png" sizes="32x32" href="/img/icons/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/img/icons/favicon-16x16.png"><link rel="manifest" href="/manifest.json"><meta name="theme-color" content="#4DBA87"><meta name="apple-mobile-web-app-capable" content="no"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="fittrackee_client"><link rel="apple-touch-icon" href="/img/icons/apple-touch-icon-152x152.png"><link rel="mask-icon" href="/img/icons/safari-pinned-tab.svg" color="#4DBA87"><meta name="msapplication-TileImage" content="/img/icons/msapplication-icon-144x144.png"><meta name="msapplication-TileColor" content="#000000"></head><body><noscript><strong>We're sorry but FitTrackee doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.caa4fc1c.js"></script><script src="/static/js/app.1342fc6b.js"></script></body></html>

View File

@ -64,7 +64,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/img/workouts/mountains.svg"
},
{
"revision": "13ac96463015a312747a6b9a4f1b73ae",
"revision": "f60d9b21713c9ccfd397225febcc9d64",
"url": "/index.html"
},
{
@ -80,8 +80,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/static/css/admin.babfd43e.css"
},
{
"revision": "fce9c138af29ae690284",
"url": "/static/css/app.977e86b0.css"
"revision": "6454c1c09efc280ffea6",
"url": "/static/css/app.110c4593.css"
},
{
"revision": "82c1118c918377daaa71a320ab8eea42",
@ -92,7 +92,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/static/css/leaflet.css"
},
{
"revision": "de871b3e11220201a429",
"revision": "e947669500c2a5c15e48",
"url": "/static/css/main.f9856c63.css"
},
{
@ -108,8 +108,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/static/css/reset.46776e72.css"
},
{
"revision": "416857816d8d6ae1b4f6",
"url": "/static/css/workouts.612eca1c.css"
"revision": "e06594c3be1a4424faa5",
"url": "/static/css/workouts.379cd51f.css"
},
{
"revision": "e719f9244c69e28e7d00e725ca1e280e",
@ -196,8 +196,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/static/js/admin.2f1d393d.js"
},
{
"revision": "fce9c138af29ae690284",
"url": "/static/js/app.73db18ef.js"
"revision": "6454c1c09efc280ffea6",
"url": "/static/js/app.1342fc6b.js"
},
{
"revision": "bd7d183c9f68e5f4027d",
@ -224,8 +224,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/static/js/chunk-vendors.caa4fc1c.js"
},
{
"revision": "de871b3e11220201a429",
"url": "/static/js/main.b5ccfa42.js"
"revision": "e947669500c2a5c15e48",
"url": "/static/js/main.a53955db.js"
},
{
"revision": "ac1280c03a31a5894834",
@ -240,7 +240,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/static/js/reset.518e646f.js"
},
{
"revision": "416857816d8d6ae1b4f6",
"url": "/static/js/workouts.16965303.js"
"revision": "e06594c3be1a4424faa5",
"url": "/static/js/workouts.808a94ee.js"
}
]);

View File

@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
importScripts(
"/precache-manifest.e717d4293c1a8f95d57d8d26e0a07cb2.js"
"/precache-manifest.bf04912a8322e67fc8fc6ac3e401ce2a.js"
);
workbox.core.setCacheNameDetails({prefix: "fittrackee_client"});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -49,7 +49,7 @@
unitTo.value,
digits.value
)
: distance.value.toFixed(digits.value)
: parseFloat(distance.value.toFixed(digits.value))
)
</script>

View File

@ -45,7 +45,7 @@
: defaultUnitFrom
const totalDistance = user.value.imperial_units
? convertDistance(user.value.total_distance, defaultUnitFrom, unitTo, 2)
: user.value.total_distance
: parseFloat(user.value.total_distance.toFixed(2))
function get_duration(total_duration: ComputedRef<string>) {
const duration = total_duration.value.match(/day/g)

View File

@ -182,7 +182,7 @@
name="workout-distance"
type="number"
min="0"
step="0.01"
step="0.001"
required
@invalid="invalidateForm"
:disabled="loading"
@ -332,7 +332,7 @@
workoutForm.workoutDistance = `${
authUser.value.imperial_units
? convertDistance(workout.distance, 'km', 'mi', 2)
: workout.distance
: parseFloat(workout.distance.toFixed(2))
}`
workoutForm.workoutDate = workoutDateTime.workout_date
workoutForm.workoutTime = workoutDateTime.workout_time

View File

@ -25,7 +25,7 @@ export const formatRecord = (
)} ${unitTo}/h`
break
case 'FD':
value = `${convertDistance(+record.value, unitFrom, unitTo, 2)} ${unitTo}`
value = `${convertDistance(+record.value, unitFrom, unitTo, 3)} ${unitTo}`
break
case 'LD':
value = record.value

View File

@ -150,7 +150,7 @@ describe('formatRecord after conversion', () => {
expected: {
id: 10,
record_type: 'FD',
value: '11.18 mi',
value: '11.185 mi',
workout_date: '2019/07/08',
workout_id: 'hvYBqYBRa7wwXpaStWR4V2',
},
@ -470,7 +470,7 @@ describe('getRecordsBySports after conversion', () => {
{
id: 10,
record_type: 'FD',
value: '11.18 mi',
value: '11.185 mi',
workout_date: '2019/07/08',
workout_id: 'n6JcLPQt3QtZWFfiSnYm4C',
},