feat: add PWA 1-click install, Apple iOS Add-to-Home-Screen guide modal, manifest, and service worker
This commit is contained in:
@@ -1,9 +1,27 @@
|
||||
import "./globals.css";
|
||||
import type { Metadata } from "next";
|
||||
import type { Metadata, Viewport } from "next";
|
||||
|
||||
export const viewport: Viewport = {
|
||||
themeColor: "#030712",
|
||||
width: "device-width",
|
||||
initialScale: 1,
|
||||
maximumScale: 1,
|
||||
userScalable: false,
|
||||
};
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "AuraTrade // Institutional Quant Terminal",
|
||||
description: "High-Frequency Trading Terminal & Sentinel Risk Firewall for Exness MT5",
|
||||
description: "High-Frequency Quantitative Trading Terminal & Sentinel Risk Firewall for Exness MT5",
|
||||
manifest: "/manifest.json",
|
||||
appleWebApp: {
|
||||
capable: true,
|
||||
statusBarStyle: "black-translucent",
|
||||
title: "AuraTrade",
|
||||
},
|
||||
icons: {
|
||||
icon: "/icons/icon-192x192.png",
|
||||
apple: "/icons/apple-touch-icon.png",
|
||||
},
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
@@ -13,8 +31,30 @@ export default function RootLayout({
|
||||
}) {
|
||||
return (
|
||||
<html lang="en" className="dark">
|
||||
<body className="bg-darkBg text-gray-100 min-h-screen antialiased">
|
||||
<head>
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="AuraTrade" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
</head>
|
||||
<body className="bg-darkBg text-gray-100 min-h-screen antialiased selection:bg-cyan-500/20">
|
||||
{children}
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', function() {
|
||||
navigator.serviceWorker.register('/sw.js').then(
|
||||
function(reg) { console.log('AuraTrade PWA ServiceWorker registered'); },
|
||||
function(err) { console.log('AuraTrade PWA ServiceWorker registration failed: ', err); }
|
||||
);
|
||||
});
|
||||
}
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user