Compare commits
	
		
			1 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					57a4038577 | 
@@ -1,9 +1,9 @@
 | 
			
		||||
<Project>
 | 
			
		||||
 | 
			
		||||
	<PropertyGroup>
 | 
			
		||||
		<PluginVersion>10.7.52</PluginVersion>
 | 
			
		||||
		<ProPluginVersion>10.7.52</ProPluginVersion>
 | 
			
		||||
		<AuthenticationVersion>2.5.0</AuthenticationVersion>
 | 
			
		||||
		<PluginVersion>10.7.53</PluginVersion>
 | 
			
		||||
		<ProPluginVersion>10.7.53</ProPluginVersion>
 | 
			
		||||
		<AuthenticationVersion>2.6.0</AuthenticationVersion>
 | 
			
		||||
		<NET8Version>8.0.17</NET8Version>
 | 
			
		||||
		<NET9Version>9.0.6</NET9Version>
 | 
			
		||||
	</PropertyGroup>
 | 
			
		||||
 
 | 
			
		||||
@@ -105,11 +105,12 @@ public partial class PluginDebugPage
 | 
			
		||||
                    Title = pluginInfo.Name,
 | 
			
		||||
                    ContentTemplate = debugRender,
 | 
			
		||||
                    Max = false,
 | 
			
		||||
                    Width = "1440px",
 | 
			
		||||
                    Height = "810px",
 | 
			
		||||
                    Top = "70px",
 | 
			
		||||
                    Left = "220px",
 | 
			
		||||
                    Width = "80%",
 | 
			
		||||
                    Height = "80%",
 | 
			
		||||
                    Top = "0%",
 | 
			
		||||
                    Left = "10%",
 | 
			
		||||
                    Background = "var(--bb-primary-color)",
 | 
			
		||||
                    Overflow = true
 | 
			
		||||
                };
 | 
			
		||||
                await WinBoxService.Show(option);
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -45,6 +45,42 @@
 | 
			
		||||
    <!-- PWA Service Worker -->
 | 
			
		||||
    <script type="text/javascript">'serviceWorker' in navigator && navigator.serviceWorker.register('./service-worker.js')</script>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
    let installPromptTriggered = false;
 | 
			
		||||
 | 
			
		||||
    function getCookie(name) {
 | 
			
		||||
        const match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
 | 
			
		||||
        return match ? match[2] : null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function hasShownInstallPrompt() {
 | 
			
		||||
        return getCookie("tgPWAInstallPromptShown") === "true";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function markInstallPromptShown() {
 | 
			
		||||
        document.cookie = "tgPWAInstallPromptShown=true; max-age=31536000; path=/";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    window.addEventListener('beforeinstallprompt', (e) => {
 | 
			
		||||
        e.preventDefault();
 | 
			
		||||
 | 
			
		||||
        if (!hasShownInstallPrompt() && !installPromptTriggered) {
 | 
			
		||||
            installPromptTriggered = true;
 | 
			
		||||
            setTimeout(() => {
 | 
			
		||||
                e.prompt()
 | 
			
		||||
                  .then(() => e.userChoice)
 | 
			
		||||
                  .then(choiceResult => {
 | 
			
		||||
                                    markInstallPromptShown();
 | 
			
		||||
                  })
 | 
			
		||||
                  .catch(err => {
 | 
			
		||||
                  });
 | 
			
		||||
            }, 2000); // 延迟 2 秒提示
 | 
			
		||||
        } else {
 | 
			
		||||
            // console.log("已提示过安装,不再弹出");
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
 
 | 
			
		||||
@@ -146,11 +146,12 @@ public partial class MainLayout : IDisposable
 | 
			
		||||
                Title = title,
 | 
			
		||||
                ContentTemplate = item,
 | 
			
		||||
                Max = false,
 | 
			
		||||
                Width = "1440px",
 | 
			
		||||
                Height = "810px",
 | 
			
		||||
                Top = "70px",
 | 
			
		||||
                Left = "220px",
 | 
			
		||||
                Width = "80%",
 | 
			
		||||
                Height = "80%",
 | 
			
		||||
                Top = "0%",
 | 
			
		||||
                Left = "10%",
 | 
			
		||||
                Background = "var(--bb-primary-color)",
 | 
			
		||||
                Overflow = true
 | 
			
		||||
            };
 | 
			
		||||
            await WinBoxService.Show(option);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,6 @@
 | 
			
		||||
 | 
			
		||||
.mainlayout ::deep .layout-header {
 | 
			
		||||
    z-index: 5;
 | 
			
		||||
}
 | 
			
		||||
.mainlayout ::deep .menu-icon {
 | 
			
		||||
    width: 16px;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
<Project>
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <Version>10.7.52</Version>
 | 
			
		||||
    <Version>10.7.53</Version>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user