[object Object]

← back to Wallco Ai

wallco.ai · /compare gets 'Export as Brief →' gold button + Brief-options details (project + client name inputs) — direct link goes to /brief?ids=72,161,139 with no labels; if user fills project+client in the details panel, 'Open Brief →' opens /brief?ids=…&project=…&client=… in new tab; renames 'Print or save as PDF' to 'Print this view' (less ambiguous now that there's a separate Brief PDF path); IIFE wires brief-go button via window.open(_,_,'noopener') · verified: /compare?ids=72,161,139 contains href=/brief?ids=72,161,139 + 7 export-related element refs

cdb076510fa480135b86af8e79934decdbbe108c · 2026-05-12 09:06:19 -0700 · SteveStudio2

Files touched

Diff

commit cdb076510fa480135b86af8e79934decdbbe108c
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Tue May 12 09:06:19 2026 -0700

    wallco.ai · /compare gets 'Export as Brief →' gold button + Brief-options details (project + client name inputs) — direct link goes to /brief?ids=72,161,139 with no labels; if user fills project+client in the details panel, 'Open Brief →' opens /brief?ids=…&project=…&client=… in new tab; renames 'Print or save as PDF' to 'Print this view' (less ambiguous now that there's a separate Brief PDF path); IIFE wires brief-go button via window.open(_,_,'noopener') · verified: /compare?ids=72,161,139 contains href=/brief?ids=72,161,139 + 7 export-related element refs
---
 server.js | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/server.js b/server.js
index 1d04242..6b0d22f 100644
--- a/server.js
+++ b/server.js
@@ -5253,10 +5253,19 @@ ${htmlHeader('/compare')}
         </td>`).join('')}</tr>
       </tbody>
     </table>
-    <div style="margin-top:24px;display:flex;gap:12px;flex-wrap:wrap">
-      <button type="button" id="compare-print" style="padding:10px 18px;font:13px var(--sans,system-ui);background:var(--ink,#111);color:var(--bg,#fff);border:0;border-radius:4px;cursor:pointer">Print or save as PDF</button>
+    <div style="margin-top:24px;display:flex;gap:12px;flex-wrap:wrap;align-items:center">
+      <a href="/brief?ids=${rawIds.join(',')}" target="_blank" rel="noopener noreferrer" id="compare-brief" style="padding:10px 18px;font:13px var(--sans,system-ui);background:var(--gold,#c9a14b);color:var(--accent,#0d0d0d);text-decoration:none;border:0;border-radius:4px;font-weight:500" title="Export this comparison as a printable multi-design proposal PDF">Export as Brief →</a>
+      <button type="button" id="compare-print" style="padding:10px 18px;font:13px var(--sans,system-ui);background:var(--ink,#111);color:var(--bg,#fff);border:0;border-radius:4px;cursor:pointer">Print this view</button>
       <button type="button" id="compare-copy" style="padding:10px 18px;font:13px var(--sans,system-ui);background:transparent;color:var(--ink,#111);border:1px solid var(--ink,#111);border-radius:4px;cursor:pointer">Copy share link</button>
       <a href="/designs" style="padding:10px 18px;font:13px var(--sans,system-ui);background:transparent;color:var(--ink,#111);text-decoration:none;border:1px solid var(--line,#ddd);border-radius:4px">Browse more designs</a>
+      <details style="margin-left:auto;font:12px var(--sans,system-ui);color:var(--ink-soft,#555)">
+        <summary style="cursor:pointer;padding:6px 10px;border:1px solid var(--line,#ddd);border-radius:4px;list-style:none">Brief options ▾</summary>
+        <div style="margin-top:8px;padding:12px;background:var(--card-bg,#faf8f3);border:1px solid var(--line,#ebe5d6);border-radius:6px;display:grid;gap:8px;min-width:280px">
+          <label>Project name<br><input id="brief-project" type="text" placeholder="e.g. Living Room" style="margin-top:4px;width:100%;padding:6px 8px;font:13px var(--sans);border:1px solid var(--line,#ddd);border-radius:4px"></label>
+          <label>Client name<br><input id="brief-client" type="text" placeholder="e.g. Smith Residence" style="margin-top:4px;width:100%;padding:6px 8px;font:13px var(--sans);border:1px solid var(--line,#ddd);border-radius:4px"></label>
+          <button type="button" id="brief-go" style="padding:8px 14px;background:var(--ink,#111);color:var(--bg,#fff);border:0;border-radius:4px;cursor:pointer;font:13px var(--sans)">Open Brief →</button>
+        </div>
+      </details>
     </div>
     <script>
       (function(){
@@ -5278,6 +5287,16 @@ ${htmlHeader('/compare')}
           try { await navigator.clipboard.writeText(url); cBtn.textContent = 'Copied!'; setTimeout(function(){ cBtn.textContent='Copy share link'; }, 1800); }
           catch(e) { window.prompt('Copy:', url); }
         });
+        // Brief-options details — assembles /brief URL with project+client query params
+        var bGo = document.getElementById('brief-go');
+        if (bGo) bGo.addEventListener('click', function(){
+          var p = (document.getElementById('brief-project').value || '').trim();
+          var c = (document.getElementById('brief-client').value || '').trim();
+          var qs = ['ids=' + stored.join(',')];
+          if (p) qs.push('project=' + encodeURIComponent(p));
+          if (c) qs.push('client=' + encodeURIComponent(c));
+          window.open('/brief?' + qs.join('&'), '_blank', 'noopener');
+        });
       })();
     </script>
   `}

← 702842c wallco.ai · /brief?ids= now ships Cache-Control + Last-Modif  ·  back to Wallco Ai  ·  wallco.ai · /me/saved 'Build proposal PDF →' button restyled 528112c →