mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
adding added ad slot support for adddss
This commit is contained in:
@@ -232,6 +232,18 @@ socials:
|
||||
url: "https://ko-fi.com/your-handle"
|
||||
icon: "FaCoffee"
|
||||
color: "#29ABE0"
|
||||
|
||||
# Optional trusted HTML card shown at the bottom of the desktop driver page's
|
||||
# left column. Leave html empty (or omit this section) to hide the card. This
|
||||
# content is sent to driver browsers without sanitization, so only place markup
|
||||
# here that is controlled by the server operator.
|
||||
driverAd:
|
||||
title: "Advertisement"
|
||||
html: |
|
||||
<a href="https://example.com" target="_blank" rel="noopener noreferrer">
|
||||
<img src="https://example.com/ad.png" alt="Advertisement" style="display:block;width:100%;height:auto;">
|
||||
</a>
|
||||
|
||||
# Optional passive fleet telemetry, history, and daily reporting. The collector
|
||||
# observes existing server events and rover sensor frames but never participates
|
||||
# in command, assignment, docking, or safety decisions.
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -12,8 +12,8 @@
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<!-- site-metadata:inject -->
|
||||
<!-- analytics:inject -->
|
||||
<script type="module" crossorigin src="/assets/index-B0pLdqo3.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CoK6vO1j.css">
|
||||
<script type="module" crossorigin src="/assets/index-CqhbbOso.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-5vzB2lhE.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -9,6 +9,20 @@ const discordInvite = config.discord?.invite || null;
|
||||
const kofiLink = config.kofi?.link || null;
|
||||
const serverTimezone = config.timezone || null;
|
||||
const configuredSocials = getConfiguredSocials(config);
|
||||
/*
|
||||
The driver ad is trusted deployment content supplied by the server operator.
|
||||
Normalize both values at the server boundary so every browser receives a
|
||||
predictable string-only contract, even when the YAML keys are absent or were
|
||||
accidentally configured with another scalar type.
|
||||
|
||||
Keep the title and markup together because they describe one optional card.
|
||||
An empty HTML string disables the card; the title alone must never leave an
|
||||
empty panel at the bottom of the driver layout.
|
||||
*/
|
||||
const driverAd = {
|
||||
title: typeof config.driverAd?.title === 'string' ? config.driverAd.title.trim() : '',
|
||||
html: typeof config.driverAd?.html === 'string' ? config.driverAd.html.trim() : '',
|
||||
};
|
||||
|
||||
const ACTIVITY_SYNC_COOLDOWN_MS = 3000;
|
||||
const GPIO_TOGGLE_SYNC_COOLDOWN_MS = 1000;
|
||||
@@ -19,6 +33,7 @@ module.exports = {
|
||||
kofiLink,
|
||||
serverTimezone,
|
||||
configuredSocials,
|
||||
driverAd,
|
||||
ACTIVITY_SYNC_COOLDOWN_MS,
|
||||
GPIO_TOGGLE_SYNC_COOLDOWN_MS,
|
||||
PERIODIC_SYNC_MS,
|
||||
|
||||
@@ -61,6 +61,7 @@ const {
|
||||
kofiLink,
|
||||
serverTimezone,
|
||||
configuredSocials,
|
||||
driverAd,
|
||||
ACTIVITY_SYNC_COOLDOWN_MS,
|
||||
GPIO_TOGGLE_SYNC_COOLDOWN_MS,
|
||||
PERIODIC_SYNC_MS,
|
||||
@@ -209,6 +210,13 @@ function buildSession(socket) {
|
||||
adminReason: getAdminReason(),
|
||||
users,
|
||||
socials,
|
||||
/*
|
||||
This is intentionally raw, operator-authored HTML. The browser only
|
||||
mounts it on the desktop driver page, but keeping it in the ordinary
|
||||
session payload makes the server configuration the single source of
|
||||
truth and avoids a separate endpoint for one small optional card.
|
||||
*/
|
||||
driverAd,
|
||||
discord: {
|
||||
invite: discordInvite,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user