Generic (non-5e) ruleset mode + UI polish + combat switch fix #7
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"short_name": "TTRPG Display",
|
||||||
|
"name": "TTRPG Initiative Tracker — Player Display",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "favicon.ico",
|
||||||
|
"sizes": "64x64 32x32 24x24 16x16",
|
||||||
|
"type": "image/x-icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo192.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "192x192"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo512.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "512x512"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": "/display",
|
||||||
|
"scope": "/",
|
||||||
|
"display": "standalone",
|
||||||
|
"orientation": "landscape",
|
||||||
|
"theme_color": "#1A202C",
|
||||||
|
"background_color": "#1A202C"
|
||||||
|
}
|
||||||
+5
-1
@@ -3519,8 +3519,12 @@ function App() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const queryParams = new URLSearchParams(window.location.search);
|
const queryParams = new URLSearchParams(window.location.search);
|
||||||
if (queryParams.get('playerView') === 'true' || window.location.pathname === '/display') {
|
const isDisplay = queryParams.get('playerView') === 'true' || window.location.pathname === '/display';
|
||||||
|
if (isDisplay) {
|
||||||
setIsPlayerViewOnlyMode(true);
|
setIsPlayerViewOnlyMode(true);
|
||||||
|
// swap manifest so Android home-screen installs launch /display
|
||||||
|
const link = document.querySelector('link[rel="manifest"]');
|
||||||
|
if (link) link.href = `${process.env.PUBLIC_URL || ''}/display-manifest.json`;
|
||||||
}
|
}
|
||||||
if (window.location.pathname === '/logs') {
|
if (window.location.pathname === '/logs') {
|
||||||
setIsLogsMode(true);
|
setIsLogsMode(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user