diff --git a/shopfloor_mobile/static/wms/src/components/misc.js b/shopfloor_mobile/static/wms/src/components/misc.js
index 76c3158033..0c06c8532d 100644
--- a/shopfloor_mobile/static/wms/src/components/misc.js
+++ b/shopfloor_mobile/static/wms/src/components/misc.js
@@ -388,3 +388,48 @@ Vue.component("screen-loading", {
`,
});
+
+Vue.component("btn-fullscreen", {
+ data: function() {
+ return {
+ fullscreen_on: document.fullscreenElement ? true : false,
+ };
+ },
+ computed: {
+ btn_label: function() {
+ const transition = this.fullscreen_on ? "exit" : "enter";
+ return this.$t("screen.settings.fullscreen." + transition);
+ },
+ },
+ methods: {
+ go_fullscreen: function() {
+ const elem = document.documentElement;
+ if (elem.requestFullscreen) {
+ elem.requestFullscreen();
+ } else if (elem.mozRequestFullScreen) {
+ /* Firefox */
+ elem.mozRequestFullScreen();
+ } else if (elem.webkitRequestFullscreen) {
+ /* Chrome, Safari & Opera */
+ elem.webkitRequestFullscreen();
+ } else if (elem.msRequestFullscreen) {
+ /* IE/Edge */
+ elem.msRequestFullscreen();
+ }
+ this.fullscreen_on = true;
+ },
+ leave_fullscreen: function() {
+ if (document.exitFullscreen) {
+ document.exitFullscreen();
+ } else if (document.mozCancelFullScreen) {
+ document.mozCancelFullScreen();
+ } else if (document.webkitExitFullscreen) {
+ document.webkitExitFullscreen();
+ } else if (document.msExitFullscreen) {
+ document.msExitFullscreen();
+ }
+ this.fullscreen_on = false;
+ },
+ },
+ template: `