1 コミット

作成者 SHA1 メッセージ 日付
  Adrien 8b42c890db test screen orientations 4年前
2個のファイルの変更30行の追加21行の削除
分割表示
  1. +4
    -1
      build/service-worker-prod.js
  2. +26
    -20
      src/components/Battleground.vue

+ 4
- 1
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.


+ 26
- 20
src/components/Battleground.vue ファイルの表示

@@ -1,16 +1,14 @@
<template>
<div class="battleground" v-if="battleground">
<div class="battleground-background" :style="backgroundCss"/>
<div class="battleground-content">
<div id="objectives" class="objectives">
<div class="objectives-row" v-for="objectiveRow in battleground.objectives">
<template v-for="objective in objectiveRow">
<Objective :objective="objective"></Objective>
</template>
</div>
<div class="battleground-objectives">
<div class="battleground-objectives-row" v-for="objectiveRow in battleground.objectives">
<template v-for="objective in objectiveRow">
<Objective :objective="objective"></Objective>
</template>
</div>
<router-link to="/battlegrounds">Back to selector</router-link>
</div>
<router-link to="/battlegrounds">Back to selector</router-link>
</div>
</template>

@@ -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


読み込み中…
キャンセル
保存