Add title to form and timer hint to hours input field
This commit is contained in:
@@ -22,8 +22,8 @@ input {
|
|||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
text-muted {
|
.text-muted {
|
||||||
color: #eee;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.has-error {
|
&.has-error {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
img.moco-logo {
|
img.moco-bx-logo {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,30 @@
|
|||||||
|
|
||||||
html {
|
html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
body {
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
#moco-bx-root {
|
#moco-bx-root {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
.moco-bx-logo__container {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
img.moco-bx-logo {
|
||||||
|
flex: 0 0 48px;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
margin-right: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
line-height: 48px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import {
|
|||||||
currentDate,
|
currentDate,
|
||||||
secondsFromHours
|
secondsFromHours
|
||||||
} from "utils"
|
} from "utils"
|
||||||
|
import logoUrl from 'images/logo.png'
|
||||||
import { head } from "lodash"
|
import { head } from "lodash"
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
@@ -173,14 +174,21 @@ class App extends Component {
|
|||||||
const { service } = this.props;
|
const { service } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form
|
<>
|
||||||
changeset={this.changesetWithDefaults}
|
<div className="moco-bx-logo__container">
|
||||||
projects={this.projects}
|
<img className="moco-bx-logo" src={this.props.browser.extension.getURL(logoUrl)} />
|
||||||
errors={this.formErrors}
|
<h1>MOCO Zeiterfassung</h1>
|
||||||
onChange={this.handleChange}
|
</div>
|
||||||
onSubmit={this.handleSubmit}
|
|
||||||
onCancel={this.handleCancel}
|
<Form
|
||||||
/>
|
changeset={this.changesetWithDefaults}
|
||||||
|
projects={this.projects}
|
||||||
|
errors={this.formErrors}
|
||||||
|
onChange={this.handleChange}
|
||||||
|
onSubmit={this.handleSubmit}
|
||||||
|
onCancel={this.handleCancel}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class Bubble extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="moco-bx-bubble" onClick={this.open}>
|
<div className="moco-bx-bubble" onClick={this.open}>
|
||||||
<img className="moco-logo" src={this.props.browser.extension.getURL(logoUrl)} />
|
<img className="moco-bx-logo" src={this.props.browser.extension.getURL(logoUrl)} />
|
||||||
{this.bookedHours > 0
|
{this.bookedHours > 0
|
||||||
? <span className="moco-bx-badge">{this.bookedHours}h</span>
|
? <span className="moco-bx-badge">{this.bookedHours}h</span>
|
||||||
: null
|
: null
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Form extends Component {
|
|||||||
|
|
||||||
isValid = () => {
|
isValid = () => {
|
||||||
const { changeset } = this.props
|
const { changeset } = this.props
|
||||||
return ["assignment_id", "task_id", "hours", "description"]
|
return ["assignment_id", "task_id", "description"]
|
||||||
.map(prop => changeset[prop])
|
.map(prop => changeset[prop])
|
||||||
.every(Boolean)
|
.every(Boolean)
|
||||||
};
|
};
|
||||||
@@ -73,6 +73,7 @@ class Form extends Component {
|
|||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
autoFocus
|
autoFocus
|
||||||
/>
|
/>
|
||||||
|
<span className="text-muted">Leer lassen, um Timer zu starten</span>
|
||||||
{errors.hours ? (
|
{errors.hours ? (
|
||||||
<div className="form-error">{errors.hours.join("; ")}</div>
|
<div className="form-error">{errors.hours.join("; ")}</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user