mirror of https://github.com/franjsco/tomadoro
edit user ref
This commit is contained in:
parent
edce373367
commit
c23d64a716
|
@ -10,10 +10,10 @@ Technologies:
|
|||
* Bootstrap (reactstrap)
|
||||
|
||||
## Demo
|
||||
Try tomadoro: https://frab1t.github.io/tomadoro/
|
||||
Try tomadoro: https://frsposito.github.io/tomadoro/
|
||||
|
||||
## License
|
||||
GPLv3
|
||||
|
||||
---
|
||||
Made with ❤️ by Francesco Esposito ([@frab1t](https://github.com/frab1t))
|
||||
Made with ❤️ by Francesco Esposito ([@frsposito](https://github.com/frsposito))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "tomadoro",
|
||||
"version": "1.0.0",
|
||||
"version": "1.4.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -6355,7 +6355,8 @@
|
|||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
|
@ -6392,7 +6393,8 @@
|
|||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
|
@ -6401,7 +6403,8 @@
|
|||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
|
@ -6504,7 +6507,8 @@
|
|||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
@ -6514,6 +6518,7 @@
|
|||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
|
@ -6533,11 +6538,13 @@
|
|||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.2.4",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.1",
|
||||
"yallist": "^3.0.0"
|
||||
|
@ -6554,6 +6561,7 @@
|
|||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
|
@ -6626,7 +6634,8 @@
|
|||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
|
@ -6636,6 +6645,7 @@
|
|||
"once": {
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -6711,7 +6721,8 @@
|
|||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.1",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
|
@ -6741,6 +6752,7 @@
|
|||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
@ -6758,6 +6770,7 @@
|
|||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"bundled": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
|
@ -6796,11 +6809,13 @@
|
|||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.0.2",
|
||||
"bundled": true
|
||||
"bundled": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"predeploy": "npm run build",
|
||||
"deploy": "gh-pages -d build"
|
||||
},
|
||||
"homepage": "http://frab1t.github.io/tomadoro",
|
||||
"homepage": "http://frsposito.github.io/tomadoro",
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
|
@ -35,11 +35,11 @@
|
|||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/frab1t/tomadoro.git"
|
||||
"url": "git+https://github.com/frsposito/tomadoro.git"
|
||||
},
|
||||
"author": "frab1t",
|
||||
"author": "frsposito",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"devDependencies": {
|
||||
"gh-pages": "^2.0.1"
|
||||
}
|
||||
}
|
||||
}
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 114 KiB |
42
src/App.js
42
src/App.js
|
@ -12,7 +12,7 @@ class App extends Component {
|
|||
this.appName = 'tomadoro';
|
||||
this.pomodoroSeconds = 1500;
|
||||
this.breakSeconds = 300;
|
||||
|
||||
|
||||
this.state = {
|
||||
startClickNotification: false, // TODO: refactoring identificativo
|
||||
seconds: 0,
|
||||
|
@ -43,11 +43,11 @@ class App extends Component {
|
|||
|
||||
tick() {
|
||||
this.setState(state => ({
|
||||
seconds: state.seconds -1
|
||||
seconds: state.seconds - 1
|
||||
}));
|
||||
|
||||
document.title = `(${this.formatMinute(this.state.seconds)}) ${this.appName}`;
|
||||
|
||||
|
||||
if (this.state.seconds === 0) {
|
||||
this.stopTimer();
|
||||
this.terminatedTimer();
|
||||
|
@ -61,7 +61,7 @@ class App extends Component {
|
|||
});
|
||||
|
||||
this.interval = setInterval(() => this.tick(), 1000);
|
||||
}
|
||||
}
|
||||
|
||||
stopTimer() {
|
||||
this.setState({
|
||||
|
@ -72,7 +72,7 @@ class App extends Component {
|
|||
}
|
||||
|
||||
resetTimer() {
|
||||
if(this.state.break) {
|
||||
if (this.state.break) {
|
||||
this.breakMode();
|
||||
} else {
|
||||
this.pomodoroMode();
|
||||
|
@ -102,11 +102,11 @@ class App extends Component {
|
|||
break: true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
switchMode() { // TODO: refactoring naming
|
||||
if(this.state.break && !this.state.started) {
|
||||
if (this.state.break && !this.state.started) {
|
||||
this.pomodoroMode();
|
||||
} else if(!this.state.break && !this.state.started) {
|
||||
} else if (!this.state.break && !this.state.started) {
|
||||
this.breakMode();
|
||||
}
|
||||
}
|
||||
|
@ -117,13 +117,13 @@ class App extends Component {
|
|||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
<div className="App-header">
|
||||
tomadoro
|
||||
</div>
|
||||
|
||||
|
||||
<Container>
|
||||
<Row>
|
||||
<Col>
|
||||
|
@ -143,12 +143,12 @@ class App extends Component {
|
|||
</Row>
|
||||
|
||||
<Row>
|
||||
<Col
|
||||
sm={{size: 10, offset: 1}}
|
||||
md={{size: 8, offset: 2}}
|
||||
<Col
|
||||
sm={{ size: 10, offset: 1 }}
|
||||
md={{ size: 8, offset: 2 }}
|
||||
lg={{ size: 6, offset: 3 }}
|
||||
>
|
||||
<Box
|
||||
<Box
|
||||
startTimer={this.startTimer}
|
||||
stopTimer={this.stopTimer}
|
||||
isStarted={this.state.started}
|
||||
|
@ -160,16 +160,16 @@ class App extends Component {
|
|||
</Container>
|
||||
|
||||
{ // notification
|
||||
this.state.startClickNotification ? (
|
||||
<Notification
|
||||
send={this.state.sendNotification}
|
||||
handleNotification={this.handleNotification} />)
|
||||
: ''}
|
||||
this.state.startClickNotification ? (
|
||||
<Notification
|
||||
send={this.state.sendNotification}
|
||||
handleNotification={this.handleNotification} />)
|
||||
: ''}
|
||||
|
||||
<div className="footer">
|
||||
<p>
|
||||
<a href="https://github.com/frab1t/tomadoro">tomadoro</a>{` `}
|
||||
by <a href="https://twitter.com/frab1t">@frab1t</a> (Francesco Esposito)
|
||||
<a href="https://github.com/frsposito/tomadoro">tomadoro</a>{` `}
|
||||
by <a href="https://github.com/frsposito">@frsposito</a> (Francesco Esposito)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue