Merge branch 'add-fullscreen-toggle' into 'v3'
Add fullscreen toggle button. Closes #390 See merge request openflexure/openflexure-microscope-server!377
This commit is contained in:
commit
94eb331435
1 changed files with 15 additions and 1 deletions
|
|
@ -11,9 +11,13 @@
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<button class="uk-button uk-button-default" @click="toggleFullscreen">
|
||||||
|
Toggle Fullscreen
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Export main app
|
// Export main app
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -34,6 +38,16 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
async toggleFullscreen() {
|
||||||
|
if (!document.fullscreenElement) {
|
||||||
|
await document.documentElement.requestFullscreen();
|
||||||
|
} else {
|
||||||
|
await document.exitFullscreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
appTheme: function() {
|
appTheme: function() {
|
||||||
this.setLocalStorageObj("appTheme", this.appTheme);
|
this.setLocalStorageObj("appTheme", this.appTheme);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue