Skip to content

Commit 2cbeb82

Browse files
edit app and add firebase
1 parent 5e70f5a commit 2cbeb82

File tree

8 files changed

+12829
-27
lines changed

8 files changed

+12829
-27
lines changed

.firebaserc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "geofence-demo-325"
4+
}
5+
}

firebase.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"hosting": {
3+
"public": "dist",
4+
"ignore": [
5+
"firebase.json",
6+
"**/.*",
7+
"**/node_modules/**"
8+
],
9+
"rewrites": [
10+
{
11+
"source": "**",
12+
"destination": "/index.html"
13+
}
14+
]
15+
}
16+
}

netlify.toml

-4
This file was deleted.

package-lock.json

+12,785
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8-
<title><%= htmlWebpackPlugin.options.title %></title>
8+
<title>Covid19Kenya geofence</title>
99
</head>
1010
<body>
1111
<noscript>
12-
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
12+
<strong>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
1313
</noscript>
1414
<div id="app"></div>
1515
<!-- built files will be auto injected -->

src/components/Header.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<template>
22
<header>
3-
<div class="brand">
4-
<h5>The Ranch</h5>
3+
<!-- <div class="brand">
4+
<h5>Covid19KE Geofencing</h5>
55
</div>
66
<div class="nav">
77
<ul>
88
<li>
99
<img src="../assets/boy.svg" alt="avatar" />
10-
<span>John P.</span>
10+
<span>Covidapp</span>
1111
</li>
1212
</ul>
13-
</div>
13+
</div> -->
1414
</header>
1515
</template>
1616

src/views/Admin.vue

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<section>
33
<Header />
44
<div class="main">
5-
<h3>Admin</h3>
5+
<h3>Covid19KE Geofence</h3>
66
<GmapMap
77
:center="center"
88
:zoom="zoom"
99
map-type-id="terrain"
10-
style="width: 600px; height: 400px"
10+
style="width: 325px; height: 400px"
1111
ref="mapRef"
1212
>
1313
<GmapMarker
@@ -20,7 +20,7 @@
2020
</GmapMap>
2121
<h4>Location Alerts</h4>
2222
<div class="alert" v-if="showAlert">
23-
<p>This user has left the ranch</p>
23+
<p>You have left the affected area</p>
2424
</div>
2525

2626
<div class="location alert" v-if="showLocationUpdate">
@@ -46,18 +46,18 @@ export default {
4646
showLocationUpdate: false,
4747
zoom: 16,
4848
center: {
49-
lat: -1.2413047,
50-
lng: 36.7927116
49+
lat: 1.3013,
50+
lng: 36.8071
5151
},
5252
polygon: [
53-
{ lat: -1.2414047, lng: 36.792721 },
54-
{ lat: -1.2414047, lng: 36.792721 },
55-
{ lat: -1.2414047, lng: 36.792721 },
56-
{ lat: -1.2414047, lng: 36.792721 },
57-
{ lat: -1.2414047, lng: 36.792721 },
58-
{ lat: -1.2414047, lng: 36.792721 },
59-
{ lat: -1.2414047, lng: 36.792721 },
60-
{ lat: -1.2414047, lng: 36.792721 }
53+
{ lat: 1.3013, lng: 36.8071 },
54+
{ lat: 1.3013, lng: 36.8071 },
55+
{ lat: 1.3013, lng: 36.8071 },
56+
{ lat: 1.3013, lng: 36.8071 },
57+
{ lat: 1.3013, lng: 36.8071 },
58+
{ lat: 1.3013, lng: 36.8071 },
59+
{ lat: 1.3013, lng: 36.8071 },
60+
{ lat: 1.3013, lng: 36.8071 }
6161
]
6262
};
6363
},
@@ -70,7 +70,7 @@ export default {
7070
};
7171
const latLng = new this.google.maps.LatLng(position);
7272
this.showLocationUpdate = true;
73-
this.message = "The user's location has changed";
73+
this.message = "Your location has changed";
7474
if (
7575
!this.google.maps.geometry.poly.containsLocation(
7676
latLng,
@@ -79,7 +79,7 @@ export default {
7979
) {
8080
this.showAlert = true;
8181
} else {
82-
this.message = "The user is currently in the ranch";
82+
this.message = "You have entered a covid19 prevalent area";
8383
}
8484
}
8585
},

src/views/Home.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<div>
33
<Header />
44
<div class="content">
5-
<h2>Welcome to "The Ranch"</h2>
5+
<h2>Welcome, enable location to get updates</h2>
66
<img src="../assets/placeholder.svg" alt />
7-
<h6>Enable location to get updates</h6>
7+
<h6>Enable location</h6>
88
<router-link to="/admin">Admin</router-link>
99
</div>
1010
</div>

0 commit comments

Comments
 (0)