Skip to content

Commit

Permalink
feat: add info banner for maintenance
Browse files Browse the repository at this point in the history
- start and end date currently hardcoded
  • Loading branch information
TheGreatRefrigerator committed Jun 24, 2024
1 parent f4dd928 commit dd8cefe
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/fragments/InfoBanner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<template>
<div></div>
</template>
<script>
export default {
name: 'InfoBanner',
created() {
const now = Date.now()
const bannerStart = Date.parse('2024-06-24T14:52:00')
const bannerEnd = Date.parse('2024-06-29T00:00:00')
const bannerText = 'Due to Server Maintenance on June 24th at 17:00 CET there might be some network disruptions that restrict functionality.<br>On Friday, June 28th at 8:30 CET for 6-24h this application won\'t be working properly due to unavailable geocoding.'
if (bannerStart < now && now < bannerEnd) {
this.showError(bannerText, {timeout: 0, y: 'top', x: 'no'})
}
}
}
</script>
1 change: 1 addition & 0 deletions src/pages/maps/Maps.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div class="maps" :style="{height: viewHeight + 'px'}">
<info-banner />
<resize-observer @notify="setViewHeight()" />
<simple-place-search :height="simpleMapSearchHeight" v-if="simpleSearchIsVisible"></simple-place-search>
<v-btn round v-if="refreshSearchAvailable"
Expand Down
2 changes: 2 additions & 0 deletions src/pages/maps/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { ResizeObserver } from 'vue-resize'
import Place from '@/models/place'
import lodash from 'lodash'
import {EventBus} from '@/common/event-bus'
import InfoBanner from '@/fragments/InfoBanner.vue'

export default {
data: () => ({
Expand All @@ -41,6 +42,7 @@ export default {
previousMapViewDataTimeStamp: null
}),
components: {
InfoBanner,
MapView,
SimplePlaceSearch,
Altitude,
Expand Down

0 comments on commit dd8cefe

Please sign in to comment.