فهرست منبع

当浏览器userAgent包含vbox字样,自动隐藏Header,备用端口回退为8080,因推车使用的是客户端而不是Web不会占用8080端口。

felix 1 سال پیش
والد
کامیت
33411aa277

+ 1 - 1
Settings/Sonopost/Setting.json

@@ -15,7 +15,7 @@
   },
   "WebSetting": {
     "WebPort": 80,
-    "WebPortStandby": 8181,
+    "WebPortStandby": 8080,
     "WebSocketPort": 54321
   },
   "InputDeviceNames": [

+ 4 - 0
Vinno.FIS.Sonopost/Assets/wwwroot/css/index.css

@@ -221,3 +221,7 @@ input.layui-input::placeholder {
     .sonopost-card .sonopost-card-body {
         padding: 10px 20px;
     }
+
+.flyinsono_noheader {
+    top: 0 !important;
+}

+ 4 - 0
Vinno.FIS.Sonopost/Assets/wwwroot/css/index.less

@@ -241,3 +241,7 @@ input.layui-input::placeholder {
         padding: 10px 20px;
     }
 }
+
+.flyinsono_noheader {
+    top: 0 !important;
+}

+ 9 - 0
Vinno.FIS.Sonopost/Assets/wwwroot/js/index.js

@@ -106,6 +106,7 @@ $(async function () {
                 initAppElementNodes(this);
                 this._renderSideMenu();
                 this.renderLangSelector();
+                checkIsVBoxBrowser();
                 checkLanguageClass(this);
                 bindGlobalEvents(this);
                 setTimeout(() => {
@@ -121,6 +122,14 @@ $(async function () {
         app.run();
         return app;
 
+        function checkIsVBoxBrowser() {
+            if (navigator.userAgent.toLowerCase().indexOf("vbox") > 0) {
+                $(".layui-header").css("visibility", "hidden");
+                $(".layui-side").addClass("flyinsono_noheader");
+                $(".layui-body").addClass("flyinsono_noheader");
+            }
+        }
+
         async function checkLanguageClass(app) {
             let isCN = locale.isCurrentChinese();
             app.el.toggleClass("lang-en", !isCN);

+ 1 - 1
Vinno.FIS.Sonopost/Features/Config/SonopostSystemSettingInfo.cs

@@ -60,7 +60,7 @@ namespace Vinno.FIS.Sonopost.Features.Config
                     WebSetting = new WebSetting
                     {
                         WebPort = 80,
-                        WebPortStandby = 8181,
+                        WebPortStandby = 8080,
                         WebSocketPort = 54321,
                     },
                     InputDeviceNames = new List<string>