← back to Prestige Car Wash
chore: lint (harden promoUse onclick), refactor (mmss), v0.3.0 (session close)
02fe5434973864b397fe44f3ab2987115741ecec · 2026-07-22 07:18:17 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M package-lock.jsonM package.jsonM public/admin/index.htmlM server.js
Diff
commit 02fe5434973864b397fe44f3ab2987115741ecec
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jul 22 07:18:17 2026 -0700
chore: lint (harden promoUse onclick), refactor (mmss), v0.3.0 (session close)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
package-lock.json | 4 ++--
package.json | 2 +-
public/admin/index.html | 2 +-
server.js | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index a0e3cc8..6d16a8a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "prestige-car-wash",
- "version": "0.2.0",
+ "version": "0.3.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "prestige-car-wash",
- "version": "0.2.0",
+ "version": "0.3.0",
"dependencies": {
"dotenv": "^16.4.7",
"express": "^4.21.2",
diff --git a/package.json b/package.json
index 81e546d..596f343 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "prestige-car-wash",
- "version": "0.2.0",
+ "version": "0.3.0",
"private": true,
"description": "Prestige Car Wash — SFV marketing site + growth command-center admin",
"main": "server.js",
diff --git a/public/admin/index.html b/public/admin/index.html
index 53bb995..6b3096a 100644
--- a/public/admin/index.html
+++ b/public/admin/index.html
@@ -282,7 +282,7 @@ function renderPromos(){
${best?`<div class="tags" style="margin-top:8px">${best}</div>`:''}
<div class="pbtns">
${p.ready?`<a class="btn ghost" href="${enc(p.src)}" download="${enc(p.id)}.mp4">⬇ Download</a>
- <button class="btn" onclick='promoUse(${JSON.stringify({url:p.src,poster:p.poster,name:p.title})})'>✨ Use in a post</button>`:''}
+ <button class="btn" data-promo="${enc(JSON.stringify({url:p.src,poster:p.poster,name:p.title}))}" onclick='promoUse(JSON.parse(this.dataset.promo))'>✨ Use in a post</button>`:''}
</div>
${when(p.created_at)}
</div>
diff --git a/server.js b/server.js
index aff1b3e..8c5983a 100644
--- a/server.js
+++ b/server.js
@@ -198,7 +198,7 @@ app.get('/api/admin/social/templates', (req, res) => res.json(socialTpl()));
// promo whose file is missing on disk is flagged (ready=false) rather than
// served as a broken <video>. mm:ss is precomputed for the card badge.
const abs = (p) => '/' + String(p || '').replace(/^\//, '');
-const mmss = (s) => { s = Math.max(0, parseInt(s, 10) || 0); return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, '0')}`; };
+const mmss = (s) => { const sec=Math.max(0,parseInt(s,10)||0); return `${Math.floor(sec/60)}:${String(sec%60).padStart(2,'0')}`; };
app.get('/api/admin/promos', (req, res) => {
const list = (promos().promos || []).map(p => {
const rel = String(p.src || '').replace(/^\//, '');
← 557b5cd Add HyperFrames promo videos to the growth-center backend
·
back to Prestige Car Wash
·
Add growth idea: 6 Tesla Superchargers with costed SWOT (hos f8cc786 →