Skip to content

Commit 33f2a0f

Browse files
committed
Update service-worker
1 parent 41c1a9b commit 33f2a0f

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

app/components/Login/Login.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import { Router } from 'react-router'
44
import User from 'services/User';
55
import ErrorComponent from 'components/Error/Error';
66

7+
const blackStyle = {
8+
color : '#000'
9+
};
10+
711
class Login extends React.Component
812
{
913
constructor(props, context) {
@@ -40,25 +44,27 @@ class Login extends React.Component
4044
<div className="container">
4145
<div className="columns is-vcentered">
4246
<div className="column is-4 is-offset-4">
43-
<h1 className="title has-text-centered">
47+
<p className="title has-text-centered" style={blackStyle}>
4448
IClient
45-
</h1>
49+
</p>
4650
<form onSubmit={this.handleSubmit}>
4751
<div className="box">
4852
<ErrorComponent error={this.state.error} />
49-
<label className="label">Username</label>
53+
<label className="label" htmlFor='username'>Username</label>
5054
<p className="control has-icon">
5155
<input
56+
id='username'
5257
ref='username'
5358
className="input"
5459
type="text"
5560
placeholder="Ex: jsmith"
5661
/>
5762
<i className="fa fa-user" />
5863
</p>
59-
<label className="label">Password</label>
64+
<label className="label" htmlFor='password'>Password</label>
6065
<p className="control has-icon">
6166
<input
67+
id='password'
6268
ref='password'
6369
className="input"
6470
type="password"
@@ -68,7 +74,7 @@ class Login extends React.Component
6874
</p>
6975
<hr />
7076
<p className="control">
71-
<button className="button is-primary">Login</button>
77+
<button className="button is-primary" style={blackStyle}>Login</button>
7278
</p>
7379
</div>
7480
</form>

public/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
77
<link rel="manifest" href="/manifest.json">
88
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon.png">
9-
<link rel="icon" type="image/png" href="favicons/favicon-32x32.png" sizes="32x32">
10-
<link rel="icon" type="image/png" href="favicons/favicon-16x16.png" sizes="16x16">
11-
<link rel="manifest" href="manifest.json">
9+
<link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32">
10+
<link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16">
1211
<link rel="mask-icon" href="favicons/safari-pinned-tab.svg" color="#5bbad5">
1312
<title>React Client</title>
1413
</head>

public/service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ self.addEventListener('fetch', function(event) {
3636
event.respondWith(
3737
caches.open(CACHE_NAME).then(function(cache) {
3838
return cache.match(event.request).then(function(response) {
39-
if (response) {
39+
if (response && !navigator.onLine) {
4040
return response;
4141
}
4242
return fetch(event.request).then(function(response) {

0 commit comments

Comments
 (0)