-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat/refactor: checkbox disabled quando cronômetro está rodando e aju…
…stes finos com hofs
- Loading branch information
Showing
20 changed files
with
152 additions
and
166 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,65 @@ | ||
{ | ||
"short_name": "Vai dar tempo", | ||
"name": "Um timer rápido para intervalo de aula", | ||
"start_url": ".", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff", | ||
"scope": "./", | ||
"icons": [ | ||
{ | ||
"src": "favicon.ico", | ||
"sizes": "64x64 32x32 24x24 16x16", | ||
"type": "image/x-icon" | ||
"src": "icon-48x48.png", | ||
"sizes": "48x48", | ||
"type": "image/png", | ||
"purpose": "maskable any" | ||
}, | ||
{ | ||
"src": "icon-72x72.png", | ||
"sizes": "72x72", | ||
"type": "image/png", | ||
"purpose": "maskable any" | ||
}, | ||
{ | ||
"src": "icon-96x96.png", | ||
"sizes": "96x96", | ||
"type": "image/png", | ||
"purpose": "maskable any" | ||
}, | ||
{ | ||
"src": "icon-128x128.png", | ||
"sizes": "128x128", | ||
"type": "image/png", | ||
"purpose": "maskable any" | ||
}, | ||
{ | ||
"src": "logo192.png", | ||
"src": "icon-144x144.png", | ||
"sizes": "144x144", | ||
"type": "image/png", | ||
"sizes": "192x192" | ||
"purpose": "maskable any" | ||
}, | ||
{ | ||
"src": "logo512.png", | ||
"src": "icon-152x152.png", | ||
"sizes": "152x152", | ||
"type": "image/png", | ||
"sizes": "512x512" | ||
"purpose": "maskable any" | ||
}, | ||
{ | ||
"src": "icon-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png", | ||
"purpose": "maskable any" | ||
}, | ||
{ | ||
"src": "icon-384x384.png", | ||
"sizes": "384x384", | ||
"type": "image/png", | ||
"purpose": "maskable any" | ||
}, | ||
{ | ||
"src": "icon-512x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png", | ||
"purpose": "maskable any" | ||
} | ||
], | ||
"start_url": ".", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,7 @@ header p { | |
|
||
.cardapio { | ||
min-width: 45vw; | ||
max-width: 92vw; | ||
overflow: none; | ||
padding-bottom: 10vh; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React, { Component } from 'react'; | ||
|
||
export default class Acao extends Component { | ||
render() { | ||
const { content, value, name } = this.props.frase; | ||
return ( | ||
<label htmlFor={ this.props.value }> | ||
<div className='item'> | ||
<div className='item-product'> | ||
<input | ||
id={ this.props.idx } | ||
value={ value } | ||
type='checkbox' | ||
disabled={ this.props.started } | ||
onChange={(e) => this.props.check(e)} | ||
/> | ||
{ content } | ||
</div> | ||
<div className='item-price'>{ name }</div> | ||
</div> | ||
</label> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,144 +1,42 @@ | ||
import React, { Component } from 'react'; | ||
import Acao from './Acao'; | ||
// Importação graças a ajuda do Washington | ||
const actions = require('../conteudo/acoes'); | ||
|
||
export default class Acoes extends Component { | ||
state = { | ||
frases: '', | ||
} | ||
}; | ||
|
||
componentDidMount() { | ||
const sorteiaAcao = () => { | ||
const chaves = Object.keys(actions); | ||
const times = Object.keys(actions); | ||
const frases = []; | ||
for (let i = 0; i < chaves.length; i += 1) { | ||
const chave = chaves[i]; | ||
const random = Math.floor(Math.random() * actions[chave].length); | ||
const temp = actions[chave][random]; | ||
frases.push(temp); | ||
for (let i = 0; i < times.length; i += 1) { | ||
const content = actions[times[i]].actions[Math.floor(Math.random() * actions[times[i]].actions.length)] | ||
frases.push({ content: content, value: actions[times[i]].value, name: actions[times[i]].name }); | ||
} | ||
this.setState({ | ||
frases, | ||
}) | ||
} | ||
}); | ||
}; | ||
sorteiaAcao(); | ||
} | ||
|
||
render() { | ||
const { check } = this.props; | ||
const { frases } = this.state; | ||
return ( | ||
<div className="cardapio"> | ||
<form className="form"> | ||
<div className="itens"> | ||
<label htmlFor="um"> | ||
<div className="item"> | ||
<div className="item-product"> | ||
<input | ||
id="um" | ||
value="1" | ||
type="checkbox" | ||
onChange={ (e) => check(e) } | ||
/> | ||
{ frases[0] } | ||
</div> | ||
<div className="item-price">1 min</div> | ||
</div> | ||
</label> | ||
|
||
<label htmlFor="umemeio"> | ||
<div className="item"> | ||
<div className="item-product"> | ||
<input | ||
id="umemeio" | ||
value="1.5" | ||
type="checkbox" | ||
onChange={ (e) => check(e) } | ||
/> | ||
{ frases[1] } | ||
</div> | ||
<div className="item-price">1 min 30 seg</div> | ||
</div> | ||
</label> | ||
|
||
<label htmlFor="dois"> | ||
<div className="item"> | ||
<div className="item-product"> | ||
<input | ||
id="dois" | ||
value="2" | ||
type="checkbox" | ||
onChange={ (e) => check(e) } | ||
/> | ||
{ frases[2] } | ||
</div> | ||
<div className="item-price">2 min</div> | ||
</div> | ||
</label> | ||
|
||
<label htmlFor="doismeio"> | ||
<div className="item"> | ||
<div className="item-product"> | ||
<input | ||
id="doismeio" | ||
value="2.5" | ||
type="checkbox" | ||
onChange={ (e) => check(e) } | ||
/> | ||
{ frases[3] } | ||
</div> | ||
<div className="item-price">2 min 30 seg</div> | ||
</div> | ||
</label> | ||
|
||
<label htmlFor="tres"> | ||
<div className="item"> | ||
<div className="item-product"> | ||
<input | ||
id="tres" | ||
value="3" | ||
type="checkbox" | ||
onChange={ (e) => check(e) } | ||
/> | ||
{ frases[4] } | ||
</div> | ||
<div className="item-price">3 min</div> | ||
</div> | ||
</label> | ||
|
||
<label htmlFor="quatro"> | ||
<div className="item"> | ||
<div className="item-product"> | ||
<input | ||
id="quatro" | ||
value="4" | ||
type="checkbox" | ||
onChange={ (e) => check(e) } | ||
/> | ||
{ frases[5] } | ||
</div> | ||
<div className="item-price">4 min</div> | ||
</div> | ||
</label> | ||
|
||
<label htmlFor="cinco"> | ||
<div className="item"> | ||
<div className="item-product"> | ||
<input | ||
id="cinco" | ||
value="5" | ||
type="checkbox" | ||
onChange={ (e) => check(e) } | ||
/> | ||
{ frases[6] } | ||
</div> | ||
<div className="item-price">5 min</div> | ||
</div> | ||
</label> | ||
|
||
</div> | ||
</form> | ||
</div> | ||
) | ||
<div className='cardapio'> | ||
<form className='form'> | ||
<div className='itens'> | ||
{frases && | ||
frases?.map((frase, idx) => ( | ||
<Acao frase={ frase } key={ idx } started={ this.props.started } check={ check } /> | ||
))} | ||
</div> | ||
</form> | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
0a6b9f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vaidartempo – ./
intervalo.devsakae.tech
vaidartempo-git-main-devsakae.vercel.app
vaidartempo.vercel.app
vaidartempo-devsakae.vercel.app