Skip to content

Commit

Permalink
fix: pwa fixes recommended by lhci, closes #372
Browse files Browse the repository at this point in the history
  • Loading branch information
ivelin committed May 20, 2020
1 parent 9394d98 commit acbd2f3
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 76 deletions.
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.
7 changes: 3 additions & 4 deletions src/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
fluid
>
<v-app-bar
:clipped-left="$vuetify.breakpoint.lgAndUp"
app
color="blue darken-3"
dark
>
<v-toolbar-title
style="width: 300px"
Expand Down Expand Up @@ -70,8 +68,9 @@
<!-- drawer -->
<v-navigation-drawer
v-model="drawer"
:clipped="$vuetify.breakpoint.lgAndUp"
app
mini-variant
expand-on-hover
>
<v-list dense>
<template v-for="item in items">
Expand Down Expand Up @@ -161,7 +160,7 @@ export default {
},
data: () => ({
dialog: false,
drawer: true,
drawer: null, // hide drawer on mobile and show on desktop
on: true,
newFavorites: 0,
newAlerts: 2,
Expand Down
6 changes: 6 additions & 0 deletions src/registerServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ if (process.env.NODE_ENV === 'production') {
'For more details, visit https://goo.gl/AFskqB'
)
},
registered () {
console.log('Service worker has been registered.')
},
cached () {
console.log('Content has been cached for offline use.')
},
updatefound () {
console.log('New content is downloading.')
},
updated (reg) {
store.commit(UPDATE_AVAILABLE, reg.waiting)
console.log('New content is available; please refresh.')
Expand Down
152 changes: 80 additions & 72 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
@@ -1,84 +1,92 @@
<template>
<v-content>
<v-container
id="container"
class="pa-0 ma-0"
fluid
>
<v-row
align="center"
justify="center"
<v-app>
<v-content>
<v-container
id="container"
class="pa-0 ma-0"
fluid
>
<v-card
max-width="344"
class="mx-auto"
<v-row
align="center"
justify="center"
no-gutters
>
<v-list-item
align="center"
justify="center"
<v-card
max-width="344"
class="mx-auto"
>
<v-list-item-content>
<v-list-item-title class="headline">
Cozy at Home
</v-list-item-title>
<v-list-item-subtitle>
via Ambient Intelligence
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-list-item
align="center"
justify="center"
>
<v-list-item-content>
<v-list-item-title class="headline">
Cozy at Home
</v-list-item-title>
<v-list-item-subtitle>
via Ambient Intelligence
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>

<v-img
src="@/assets/home-screen-logo.png"
height="194"
/>
<v-img
src="@/assets/home-screen-logo.png"
/>

<v-card-text id="welcome-text">
Review your home timeline for notable moments.
Configure input sensors and camers for Ambianic to observe.
Share, purge or backup your data
- it never slips out of your control.
</v-card-text>
<v-card-text id="welcome-text">
Review your home timeline for notable moments.
Configure input sensors and camers for Ambianic to observe.
Share, purge or backup your data
- it never slips out of your control.
</v-card-text>

<v-card-actions>
<v-btn
rounded
color="pink darken-4"
dark
class="ma-2 white--text"
:to="'timeline'"
id="btn-timeline"
>
View Timeline
<v-icon
right
<v-card-actions>
<v-btn
rounded
color="pink darken-4"
dark
class="ma-2 white--text"
:to="'timeline'"
id="btn-timeline"
>
mdi-history
</v-icon>
</v-btn>
<v-spacer />
<v-btn
id="btn-settings"
rounded
color="pink darken-4"
dark
class="ma-2 white--text"
:to="'settings'"
>
Settings
<v-icon
right
View Timeline
<v-icon
right
>
mdi-history
</v-icon>
</v-btn>
<v-spacer />
<v-btn
id="btn-settings"
rounded
color="pink darken-4"
dark
class="ma-2 white--text"
:to="'settings'"
>
mdi-settings
</v-icon>
</v-btn>
</v-card-actions>
</v-card>
</v-row>
<v-row class="mt-4">
<update-notification class="mx-auto" />
</v-row>
</v-container>
</v-content>
Settings
<v-icon
right
>
mdi-settings
</v-icon>
</v-btn>
</v-card-actions>
</v-card>
</v-row>
<v-row
align="end"
justify="center"
no-gutters=""
>
<v-col>
<update-notification class="mx-auto" />
</v-col>
</v-row>
</v-container>
</v-content>
</v-app>
</template>

<script>
Expand Down

0 comments on commit acbd2f3

Please sign in to comment.