mirror of
https://github.com/FranP-code/Pomodoro-Timer-with-Clockify-integration.git
synced 2025-10-12 23:52:30 +00:00
Fixes and adjustments in the Pomodoro registration
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -32,6 +32,7 @@ yarn-error.log*
|
||||
/.github
|
||||
/.vscode
|
||||
|
||||
.firebasesrc
|
||||
.firebaserc
|
||||
/firebase.json
|
||||
␠netlify.toml
|
||||
package-lock.json
|
||||
30
src/App.js
30
src/App.js
@@ -1,30 +1,16 @@
|
||||
import React, {useState} from 'react'
|
||||
import {firebase} from './components/Firebase/firebase'
|
||||
import {getAuth, onAuthStateChanged} from 'firebase/auth'
|
||||
import { doc, updateDoc, getFirestore, collection, getDoc } from "firebase/firestore";
|
||||
|
||||
import detectKeys from './components/Misc/detectKeys';
|
||||
|
||||
import { getAuth, onAuthStateChanged } from 'firebase/auth';
|
||||
import React, { useState } from 'react';
|
||||
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
|
||||
import AboutThis from "./components/AboutThis";
|
||||
import BannerLogin from "./components/BannerLogin";
|
||||
import GoDownArrow from "./components/GoDownArrow";
|
||||
import Header from "./components/Header";
|
||||
import MainPomodoro from "./components/MainPomodoro";
|
||||
|
||||
import {
|
||||
BrowserRouter as Router,
|
||||
Switch,
|
||||
Route,
|
||||
Link
|
||||
} from "react-router-dom";
|
||||
|
||||
import Identify from "./components/Identify";
|
||||
import Account from "./components/Account";
|
||||
import BannerLogin from "./components/BannerLogin";
|
||||
import ClockifyTasksDisplay from './components/ClockifyTasksDisplay';
|
||||
import Credits from './components/Credits';
|
||||
|
||||
import Footer from './components/Footer';
|
||||
import ResetPassword from './components/Identify Childrens/ResetPassword';
|
||||
import GoDownArrow from "./components/GoDownArrow";
|
||||
import Header from "./components/Header";
|
||||
import Identify from "./components/Identify";
|
||||
import MainPomodoro from "./components/MainPomodoro";
|
||||
|
||||
function App() {
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ const AboutThis = (props) => {
|
||||
You have more projects?
|
||||
</h4>
|
||||
<p>
|
||||
Yes!, all there are in my <a href="http://franp.xyz">personal website</a>.
|
||||
Yes!, all there are in my <a target="_blank" href="https://porfolio-franp.netlify.app">personal website</a>.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, {useState} from 'react'
|
||||
import {firebase} from './Firebase/firebase'
|
||||
import {getAuth, onAuthStateChanged} from 'firebase/auth'
|
||||
import { doc, updateDoc, getFirestore, collection, getDoc } from "firebase/firestore";
|
||||
import { getAuth, onAuthStateChanged } from 'firebase/auth';
|
||||
import { doc, getDoc, getFirestore, updateDoc } from "firebase/firestore";
|
||||
import React, { useState } from 'react';
|
||||
import Message from './Account Childrens/Message';
|
||||
import loadingGifLightTheme from './img/loading-light-theme.png'
|
||||
import loadingGifDarkTheme from './img/loading-dark-theme.png'
|
||||
import { firebase } from './Firebase/firebase';
|
||||
import loadingGifDarkTheme from './img/loading-dark-theme.png';
|
||||
import loadingGifLightTheme from './img/loading-light-theme.png';
|
||||
|
||||
const Account = (props) => {
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import React, {useState} from 'react'
|
||||
//import { makeRequest } from '../Clockify/clockify'
|
||||
import { firebase } from './Firebase/firebase';
|
||||
import { getAuth, onAuthStateChanged } from "firebase/auth";
|
||||
import { doc, updateDoc, getFirestore, collection, getDoc } from "firebase/firestore";
|
||||
import loadingGifLightTheme from './img/loading-light-theme.png'
|
||||
import loadingGifDarkTheme from './img/loading-dark-theme.png'
|
||||
import detectKeys from './Misc/detectKeys';
|
||||
import { doc, getDoc, getFirestore } from "firebase/firestore";
|
||||
import React, { useState } from 'react';
|
||||
import { firebase } from './Firebase/firebase';
|
||||
import loadingGifDarkTheme from './img/loading-dark-theme.png';
|
||||
import loadingGifLightTheme from './img/loading-light-theme.png';
|
||||
|
||||
const ClockifyTasksDisplay = (props) => {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import React from 'react'
|
||||
const Footer = (props) => {
|
||||
return (
|
||||
<footer className={props.darkMode ? 'made-with-love dark-mode-component' : 'made-with-love'}>
|
||||
Made with 💓 by <a href="http://www.franp.xyz">Francisco Pessano</a>
|
||||
Made with 💓 by <a href="https://porfolio-franp.netlify.app" target="_blank">Francisco Pessano</a>
|
||||
</footer>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
import React, {useState} from 'react'
|
||||
import React from 'react'
|
||||
import DarkMode from './Header Childrens/DarkMode'
|
||||
import GoToAccount from './Header Childrens/GoToAccount'
|
||||
|
||||
const Header = (props) => {
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<header className={props.darkMode ? 'header-main-page dark-mode-component' : 'header-main-page'} >
|
||||
<a href="/"><h1>Pomodoro Timer</h1></a>
|
||||
<h3>Made By <span className="selectable"><a target="_blank" href="http://www.franp.xyz" rel="noreferrer">Francisco Pessano</a></span></h3>
|
||||
<h3>Made By <span className="selectable"><a target="_blank" href="https://porfolio-franp.netlify.app" rel="noreferrer">Francisco Pessano</a></span></h3>
|
||||
<DarkMode
|
||||
darkMode={props.darkMode}
|
||||
setDarkmode={props.setDarkmode}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { createUserWithEmailAndPassword, getAuth, onAuthStateChanged, sendPasswordResetEmail, signInWithEmailAndPassword, signOut } from 'firebase/auth'
|
||||
import { doc, getFirestore, setDoc } from 'firebase/firestore'
|
||||
import React, { useState } from 'react'
|
||||
import { withRouter } from 'react-router-dom'
|
||||
import { firebase } from './Firebase/firebase'
|
||||
import LoginForm from './Identify Childrens/LoginForm'
|
||||
import RegisterForm from './Identify Childrens/RegisterForm'
|
||||
|
||||
import {firebase} from './Firebase/firebase'
|
||||
import {withRouter} from 'react-router-dom'
|
||||
|
||||
import {getAuth, createUserWithEmailAndPassword, signInWithEmailAndPassword, signOut, onAuthStateChanged, sendPasswordResetEmail } from 'firebase/auth'
|
||||
import { getFirestore, collection, doc, setDoc } from 'firebase/firestore'
|
||||
import ResetPassword from './Identify Childrens/ResetPassword'
|
||||
|
||||
import loadingGifLightTheme from './img/loading-light-theme.png'
|
||||
import loadingGifDarkTheme from './img/loading-dark-theme.png'
|
||||
import loadingGifLightTheme from './img/loading-light-theme.png'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const Identify = (props) => {
|
||||
|
||||
@@ -119,7 +119,7 @@ const MainPomodoroTimer = (props) => {
|
||||
}
|
||||
}
|
||||
|
||||
const setPomodoroCounter = (counter = false, mode) => {
|
||||
const setPomodoroCounter = (counter = false) => {
|
||||
if (!counter) {
|
||||
console.error('NOT PARAMETER PASSED')
|
||||
}
|
||||
@@ -158,9 +158,9 @@ const MainPomodoroTimer = (props) => {
|
||||
})*/
|
||||
|
||||
const getFavicon = () => {
|
||||
const r = document.getElementById('favicon')
|
||||
|
||||
return r
|
||||
return document.getElementById('favicon')
|
||||
|
||||
}
|
||||
|
||||
React.useEffect ( () => {
|
||||
@@ -171,7 +171,6 @@ const MainPomodoroTimer = (props) => {
|
||||
|
||||
if (!weAreInBreakTime) {
|
||||
|
||||
|
||||
getFavicon().href = './img/working favicon.ico'
|
||||
|
||||
if (!alreadyCountingStart) {
|
||||
@@ -188,7 +187,6 @@ const MainPomodoroTimer = (props) => {
|
||||
|
||||
playAudio('work')
|
||||
|
||||
|
||||
if (notificationPermission) {
|
||||
|
||||
new Notification('Pomodoro ended');
|
||||
@@ -286,6 +284,7 @@ const MainPomodoroTimer = (props) => {
|
||||
}
|
||||
|
||||
if (!props.timerOn) {
|
||||
|
||||
document.title = 'Clockify Pomodoro Timer'
|
||||
|
||||
getFavicon().href = './img/favicon.ico'
|
||||
@@ -294,27 +293,48 @@ const MainPomodoroTimer = (props) => {
|
||||
|
||||
if (!weAreInBreakTime) {
|
||||
|
||||
if (minutes <= ( setTimeStyle().minutes / 2) ) {
|
||||
if (restCounter !== 3){
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
setPomodoroCounter('Pomodoros')
|
||||
|
||||
setRestCounter((restCounter + 1))
|
||||
|
||||
setBreak(1, 0)
|
||||
setWeAreInBreakTime(true)
|
||||
}, 1)
|
||||
}
|
||||
|
||||
if (restCounter === 3) {
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
setPomodoroCounter('Pomodoros')
|
||||
setRestCounter((restCounter + 1))
|
||||
|
||||
setBreak(0, 1)
|
||||
setWeAreInBreakTime(true)
|
||||
}, 1)
|
||||
}
|
||||
|
||||
if (!alreadyCountingEnd) {
|
||||
|
||||
const time = getAndFormatCurrentTime(props.KonamiCodeActive)
|
||||
|
||||
props.setEndTime(time)
|
||||
setAlreadyCountingEnd(true)
|
||||
|
||||
props.setLetsUpload(true)
|
||||
}
|
||||
}
|
||||
|
||||
document.title = randomText('rest')
|
||||
}
|
||||
|
||||
|
||||
props.setTimerOn(true)
|
||||
}
|
||||
|
||||
if (weAreInBreakTime) {
|
||||
|
||||
|
||||
|
||||
if (restCounter === 4) {
|
||||
|
||||
|
||||
@@ -323,7 +343,6 @@ const MainPomodoroTimer = (props) => {
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
setPomodoroCounter('Rest')
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ import uploadToClockifyTimer from './Clockify/uploadToClockifyTimer'
|
||||
|
||||
const MainPomodoro = (props) => {
|
||||
|
||||
|
||||
|
||||
const [style, setStyle] = useState('Regular')
|
||||
const [displayHidden, setDisplayHidden] = useState(true)
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
[build]
|
||||
command = “CI= npm run build”
|
||||
Reference in New Issue
Block a user