From 1e582da54cd77adba18a671efe1e50d3302a0f15 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sun, 5 Jul 2020 12:47:47 +0200 Subject: [PATCH] :globe_with_meridians: (notification) notification in French --- doc/details.md | 1 + src/hooks/useTimer.ts | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 doc/details.md diff --git a/doc/details.md b/doc/details.md new file mode 100644 index 0000000..a11db6f --- /dev/null +++ b/doc/details.md @@ -0,0 +1 @@ +# Les étapes de codes diff --git a/src/hooks/useTimer.ts b/src/hooks/useTimer.ts index b86ba17..ecaf7f8 100644 --- a/src/hooks/useTimer.ts +++ b/src/hooks/useTimer.ts @@ -33,7 +33,7 @@ export const useTimer = () => { const start = () => { timeState.value = 'started' - notify('Session started!') + notify('La session commence !') stopwatchId = setInterval(() => { seconds.value++ @@ -41,11 +41,11 @@ export const useTimer = () => { sessionSeconds.value = intervalSeconds.value isProgrammer1Turn.value = !isProgrammer1Turn.value - const programmer = isProgrammer1Turn.value - ? 'Programmer 1' - : 'Programmer 2' + const dev = isProgrammer1Turn.value ? 'Dev 1' : 'Dev 2' - notify('Time to change', { body: `${programmer}, your turn!` }) + notify('Changement de joueur !', { + body: `${dev}, à votre tour !` + }) } }, 1000) @@ -58,9 +58,11 @@ export const useTimer = () => { timeState.value = 'stopped' if (stopwatchId) { clearInterval(stopwatchId) + stopwatchId = null } if (stopWatchSessionId) { clearInterval(stopWatchSessionId) + stopWatchSessionId = null } seconds.value = 0 sessionSeconds.value = intervalSeconds.value