edit user ref

This commit is contained in:
Francesco Esposito 2019-07-23 23:08:49 +02:00
parent edce373367
commit c23d64a716
5 changed files with 52 additions and 37 deletions

View File

@ -10,10 +10,10 @@ Technologies:
* Bootstrap (reactstrap) * Bootstrap (reactstrap)
## Demo ## Demo
Try tomadoro: https://frab1t.github.io/tomadoro/ Try tomadoro: https://frsposito.github.io/tomadoro/
## License ## License
GPLv3 GPLv3
--- ---
Made with ❤️ by Francesco Esposito ([@frab1t](https://github.com/frab1t)) Made with ❤️ by Francesco Esposito ([@frsposito](https://github.com/frsposito))

35
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "tomadoro", "name": "tomadoro",
"version": "1.0.0", "version": "1.4.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -6355,7 +6355,8 @@
}, },
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true "bundled": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@ -6392,7 +6393,8 @@
}, },
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true "bundled": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
@ -6401,7 +6403,8 @@
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true "bundled": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -6504,7 +6507,8 @@
}, },
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true "bundled": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -6514,6 +6518,7 @@
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -6533,11 +6538,13 @@
}, },
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true "bundled": true,
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.2.4", "version": "2.2.4",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -6554,6 +6561,7 @@
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -6626,7 +6634,8 @@
}, },
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true "bundled": true,
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -6636,6 +6645,7 @@
"once": { "once": {
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -6711,7 +6721,8 @@
}, },
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true "bundled": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -6741,6 +6752,7 @@
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -6758,6 +6770,7 @@
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@ -6796,11 +6809,13 @@
}, },
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true "bundled": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true "bundled": true,
"optional": true
} }
} }
}, },

View File

@ -23,7 +23,7 @@
"predeploy": "npm run build", "predeploy": "npm run build",
"deploy": "gh-pages -d build" "deploy": "gh-pages -d build"
}, },
"homepage": "http://frab1t.github.io/tomadoro", "homepage": "http://frsposito.github.io/tomadoro",
"eslintConfig": { "eslintConfig": {
"extends": "react-app" "extends": "react-app"
}, },
@ -35,11 +35,11 @@
], ],
"repository": { "repository": {
"type": "git", "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", "license": "GPL-3.0-or-later",
"devDependencies": { "devDependencies": {
"gh-pages": "^2.0.1" "gh-pages": "^2.0.1"
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

@ -12,7 +12,7 @@ class App extends Component {
this.appName = 'tomadoro'; this.appName = 'tomadoro';
this.pomodoroSeconds = 1500; this.pomodoroSeconds = 1500;
this.breakSeconds = 300; this.breakSeconds = 300;
this.state = { this.state = {
startClickNotification: false, // TODO: refactoring identificativo startClickNotification: false, // TODO: refactoring identificativo
seconds: 0, seconds: 0,
@ -43,11 +43,11 @@ class App extends Component {
tick() { tick() {
this.setState(state => ({ this.setState(state => ({
seconds: state.seconds -1 seconds: state.seconds - 1
})); }));
document.title = `(${this.formatMinute(this.state.seconds)}) ${this.appName}`; document.title = `(${this.formatMinute(this.state.seconds)}) ${this.appName}`;
if (this.state.seconds === 0) { if (this.state.seconds === 0) {
this.stopTimer(); this.stopTimer();
this.terminatedTimer(); this.terminatedTimer();
@ -61,7 +61,7 @@ class App extends Component {
}); });
this.interval = setInterval(() => this.tick(), 1000); this.interval = setInterval(() => this.tick(), 1000);
} }
stopTimer() { stopTimer() {
this.setState({ this.setState({
@ -72,7 +72,7 @@ class App extends Component {
} }
resetTimer() { resetTimer() {
if(this.state.break) { if (this.state.break) {
this.breakMode(); this.breakMode();
} else { } else {
this.pomodoroMode(); this.pomodoroMode();
@ -102,11 +102,11 @@ class App extends Component {
break: true break: true
}); });
} }
switchMode() { // TODO: refactoring naming switchMode() { // TODO: refactoring naming
if(this.state.break && !this.state.started) { if (this.state.break && !this.state.started) {
this.pomodoroMode(); this.pomodoroMode();
} else if(!this.state.break && !this.state.started) { } else if (!this.state.break && !this.state.started) {
this.breakMode(); this.breakMode();
} }
} }
@ -117,13 +117,13 @@ class App extends Component {
}); });
} }
render() { render() {
return ( return (
<div className="App"> <div className="App">
<div className="App-header"> <div className="App-header">
tomadoro tomadoro
</div> </div>
<Container> <Container>
<Row> <Row>
<Col> <Col>
@ -143,12 +143,12 @@ class App extends Component {
</Row> </Row>
<Row> <Row>
<Col <Col
sm={{size: 10, offset: 1}} sm={{ size: 10, offset: 1 }}
md={{size: 8, offset: 2}} md={{ size: 8, offset: 2 }}
lg={{ size: 6, offset: 3 }} lg={{ size: 6, offset: 3 }}
> >
<Box <Box
startTimer={this.startTimer} startTimer={this.startTimer}
stopTimer={this.stopTimer} stopTimer={this.stopTimer}
isStarted={this.state.started} isStarted={this.state.started}
@ -160,16 +160,16 @@ class App extends Component {
</Container> </Container>
{ // notification { // notification
this.state.startClickNotification ? ( this.state.startClickNotification ? (
<Notification <Notification
send={this.state.sendNotification} send={this.state.sendNotification}
handleNotification={this.handleNotification} />) handleNotification={this.handleNotification} />)
: ''} : ''}
<div className="footer"> <div className="footer">
<p> <p>
<a href="https://github.com/frab1t/tomadoro">tomadoro</a>{` `} <a href="https://github.com/frsposito/tomadoro">tomadoro</a>{` `}
by <a href="https://twitter.com/frab1t">@frab1t</a> (Francesco Esposito) by <a href="https://github.com/frsposito">@frsposito</a> (Francesco Esposito)
</p> </p>
</div> </div>
</div> </div>