mirror of
https://github.com/FranP-code/Pomodoro-Timer-with-Clockify-integration.git
synced 2025-10-12 23:52:30 +00:00
Dinamic favicon add
This commit is contained in:
BIN
public/img/Rest Icon.png
Normal file
BIN
public/img/Rest Icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
public/img/Rest Icon.psd
Normal file
BIN
public/img/Rest Icon.psd
Normal file
Binary file not shown.
BIN
public/img/Working Icon.png
Normal file
BIN
public/img/Working Icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
public/img/Working Icon.psd
Normal file
BIN
public/img/Working Icon.psd
Normal file
Binary file not shown.
BIN
public/img/rest favicon.ico
Normal file
BIN
public/img/rest favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
public/img/working favicon.ico
Normal file
BIN
public/img/working favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -11,7 +11,7 @@
|
|||||||
<link href="https://fonts.googleapis.com/css2?family=Rambla:wght@400;700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Rambla:wght@400;700&display=swap" rel="stylesheet">
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="./img/favicon.ico" />
|
<link rel="icon" href="./img/favicon.ico" id="favicon" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
<meta
|
<meta
|
||||||
|
|||||||
@@ -216,6 +216,12 @@ const MainPomodoroTimer = (props) => {
|
|||||||
|
|
||||||
})*/
|
})*/
|
||||||
|
|
||||||
|
const getFavicon = () => {
|
||||||
|
const r = document.getElementById('favicon')
|
||||||
|
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
React.useEffect ( () => {
|
React.useEffect ( () => {
|
||||||
let idTimeOut
|
let idTimeOut
|
||||||
|
|
||||||
@@ -224,6 +230,8 @@ const MainPomodoroTimer = (props) => {
|
|||||||
|
|
||||||
if (!weAreInBreakTime) {
|
if (!weAreInBreakTime) {
|
||||||
|
|
||||||
|
getFavicon().href = './img/working favicon.ico'
|
||||||
|
|
||||||
if (!alreadyCountingStart) {
|
if (!alreadyCountingStart) {
|
||||||
const time = getAndFormatCurrentTime()
|
const time = getAndFormatCurrentTime()
|
||||||
props.setStartTime(time)
|
props.setStartTime(time)
|
||||||
@@ -279,6 +287,8 @@ const MainPomodoroTimer = (props) => {
|
|||||||
|
|
||||||
if(weAreInBreakTime) {
|
if(weAreInBreakTime) {
|
||||||
|
|
||||||
|
getFavicon().href = './img/rest favicon.ico'
|
||||||
|
|
||||||
if (minutes === 0 && seconds === 0) {
|
if (minutes === 0 && seconds === 0) {
|
||||||
setTimerActivity(false)
|
setTimerActivity(false)
|
||||||
|
|
||||||
@@ -315,6 +325,8 @@ const MainPomodoroTimer = (props) => {
|
|||||||
|
|
||||||
if (!props.timerOn) {
|
if (!props.timerOn) {
|
||||||
|
|
||||||
|
getFavicon().href = './img/favicon.ico'
|
||||||
|
|
||||||
if ( timerActivity === true) {
|
if ( timerActivity === true) {
|
||||||
|
|
||||||
if (!weAreInBreakTime) {
|
if (!weAreInBreakTime) {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import MainPomodoroTimer from './Main Pomodoro Childrens/MainPomodoroTimer'
|
|||||||
import PomodoroCounter from './Main Pomodoro Childrens/PomodoroCounter'
|
import PomodoroCounter from './Main Pomodoro Childrens/PomodoroCounter'
|
||||||
import StyleSelector from './Main Pomodoro Childrens/StyleSelector'
|
import StyleSelector from './Main Pomodoro Childrens/StyleSelector'
|
||||||
import uploadToClockifyTimer from './Clockify/uploadToClockifyTimer'
|
import uploadToClockifyTimer from './Clockify/uploadToClockifyTimer'
|
||||||
import react from 'react'
|
|
||||||
|
|
||||||
|
|
||||||
const MainPomodoro = (props) => {
|
const MainPomodoro = (props) => {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user