diff --git a/build/service-worker-prod.js b/build/service-worker-prod.js index d6ab08b..1af69ef 100644 --- a/build/service-worker-prod.js +++ b/build/service-worker-prod.js @@ -12,10 +12,13 @@ /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ ) ); + var isLocalIp = window.location.hostname.match( + /^192\.168(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){2}$/ + ) window.addEventListener('load', function() { if ('serviceWorker' in navigator && - (window.location.protocol === 'https:' || isLocalhost)) { + (window.location.protocol === 'https:' || isLocalhost || isLocalIp)) { navigator.serviceWorker.register('service-worker.js') .then(function(registration) { // updatefound is fired if service-worker.js changes. diff --git a/src/components/Battleground.vue b/src/components/Battleground.vue index 2027e07..7cbe7ba 100644 --- a/src/components/Battleground.vue +++ b/src/components/Battleground.vue @@ -1,16 +1,14 @@ @@ -18,7 +16,7 @@ $border-style: 1px solid $blizzard-font-color .battleground - &-background, &-content + &-background, &-objectives height: 100vh width: 100vw @@ -29,18 +27,18 @@ filter: blur(2px) brightness(70%) z-index: -10 - .objectives - display: flex - flex-direction: column - height: 100% - - &-row + &-objectives display: flex - justify-content: space-between - flex-grow: 1 - &:first-child - border-top: $border-style - border-bottom: $border-style + flex-direction: column + + &-row + display: flex + justify-content: space-between + flex-grow: 1 + &:first-child + border-top: $border-style + border-bottom: $border-style + .objective &:first-child border-left: $border-style @@ -76,6 +74,14 @@ this.battlegroundId = to.params.battlegroundId } }, + mounted: function () { + console.log('Mounted : lock landscape orientation') + screen.orientation.lock('landscape') + }, + destroyed: function () { + console.log('Destroyed : unlock orientation') + screen.orientation.unlock() + }, components: { Timer, Objective