Drafts are written by the AI from the person's buying signal (hypothesis and angle), their company and their history, then reviewed and edited. Queued emails go out through the Core's mail server one at a time, within the sending hours, the daily limit and a gap, never to a suppressed or bouncing address or someone emailed in the last 14 days; with a signature, an opt-out line, UTM-tagged links and a copy in Sent. The inbox is read read-only every 10 minutes: replies (by Message-ID or sender) count as Replied, bounces mark the address, and "stop" replies are suppressed. LinkedIn messages are copied, sent by hand and marked sent. New pages: Prospects → Outreach and Settings → Email (with an SMTP, IMAP, SPF, DKIM and DMARC check). Schema 10; emersion/go-imap for IMAP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
148 lines
9.9 KiB
HTML
148 lines
9.9 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="htmx-config" content='{"includeIndicatorStyles": false}'>
|
|
<title>{{.Title}} · Supermarket</title>
|
|
<link rel="icon" href="/favicon.ico" sizes="any">
|
|
<link rel="icon" type="image/png" href="/static/favicon.png">
|
|
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
|
|
<link rel="stylesheet" href="/static/app.css">
|
|
<script src="/static/htmx.min.js" defer></script>
|
|
<script src="/static/app.js" defer></script>
|
|
</head>
|
|
<body>
|
|
<div class="shell">
|
|
<aside class="sidebar" id="sidebar">
|
|
<a class="brand" href="/"><img class="logo" src="/static/logo.png" alt="" width="28" height="28">Supermarket</a>
|
|
<form class="search" action="/search" method="get" role="search">
|
|
{{template "icon" "search"}}
|
|
<input type="search" name="q" value="{{.Query}}" placeholder="Search" aria-label="Search" id="search-box">
|
|
<kbd title="Press / to search">/</kbd>
|
|
</form>
|
|
<nav class="nav" aria-label="Main">
|
|
<a href="/" {{if eq .Nav "home"}}aria-current="page"{{end}}>{{template "icon" "overview"}}<span>Overview</span></a>
|
|
<a href="/inventory" {{if eq .Nav "inventory"}}aria-current="page"{{end}}>{{template "icon" "inventory"}}<span>Inventory</span></a>
|
|
|
|
<div class="nav-label">Modules</div>
|
|
{{$nav := .Nav}}{{$inbox := .Inbox}}
|
|
{{range .Modules}}
|
|
{{if .Link}}
|
|
<a href="{{.Link}}" {{if eq $nav .ID}}aria-current="page"{{end}} class="{{if hasPrefix $nav .ID}}open{{end}}">{{template "icon" .ID}}<span>{{.Name}}</span></a>
|
|
{{if eq .ID "content"}}
|
|
<div class="subnav">
|
|
<a href="/posts" {{if eq $nav "content/posts"}}aria-current="page"{{end}}>Posts{{if $inbox}} <span class="count-badge" title="{{$inbox}} waiting for review">{{$inbox}}</span>{{end}}</a>
|
|
<a href="/content" {{if eq $nav "content/sources"}}aria-current="page"{{end}}>Sources</a>
|
|
<a href="/content/scheduled" {{if eq $nav "content/scheduled"}}aria-current="page"{{end}}>Scheduled</a>
|
|
<a href="/content/published" {{if eq $nav "content/published"}}aria-current="page"{{end}}>Published</a>
|
|
</div>
|
|
{{end}}
|
|
{{if eq .ID "prospects"}}
|
|
<div class="subnav">
|
|
<a href="/signals" {{if eq $nav "prospects/signals"}}aria-current="page"{{end}}>Signals</a>
|
|
<a href="/prospects" {{if eq $nav "prospects/review"}}aria-current="page"{{end}}>Review{{with $.NewProspects}} <span class="count-badge" title="{{.}} waiting for review">{{.}}</span>{{end}}</a>
|
|
<a href="/outreach" {{if eq $nav "prospects/outreach"}}aria-current="page"{{end}}>Outreach{{with $.Drafts}} <span class="count-badge" title="{{.}} drafts to review">{{.}}</span>{{end}}</a>
|
|
<a href="/prospects/suppressed" {{if eq $nav "prospects/suppressed"}}aria-current="page"{{end}}>Suppression list</a>
|
|
<a href="/crm" {{if eq $nav "prospects/crm"}}aria-current="page"{{end}}>CRM queue</a>
|
|
</div>
|
|
{{end}}
|
|
{{else}}
|
|
<span class="soon" title="{{.Body}}">{{template "icon" .ID}}<span>{{.Name}}</span><small>{{.Phase}}</small></span>
|
|
{{end}}
|
|
{{end}}
|
|
</nav>
|
|
<div class="sidebar-foot">
|
|
<a href="/settings/profile" {{if hasPrefix .Nav "settings"}}aria-current="page"{{end}}>{{template "icon" "settings"}}<span>Settings</span></a>
|
|
<p class="version">Supermarket {{.Version}}</p>
|
|
</div>
|
|
</aside>
|
|
<div class="scrim" data-nav-close></div>
|
|
|
|
<div class="main-col">
|
|
<header class="topbar">
|
|
<button type="button" class="icon-button menu-button" data-nav-toggle aria-controls="sidebar" aria-label="Open navigation">{{template "icon" "menu"}}</button>
|
|
<nav class="crumbs" aria-label="Breadcrumb">
|
|
{{with .Section}}<span>{{.}}</span><span class="sep" aria-hidden="true">/</span>{{end}}
|
|
<span class="here">{{.Title}}</span>
|
|
</nav>
|
|
</header>
|
|
<main>
|
|
{{if .Flash}}<p class="flash" role="status">{{.Flash}}</p>{{end}}
|
|
{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
|
|
{{template "content" .}}
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|
|
{{/* Settings pages share this frame: a heading, and the tabs on the left
|
|
(grouped, as in brain). Call with the page: {{template "settings-start" $}}
|
|
… {{template "settings-end"}}. */}}
|
|
{{define "settings-start"}}
|
|
<div class="page-head">
|
|
<h1>Settings</h1>
|
|
<p class="lede">Your company, the accounts Supermarket posts with, the prospecting tools it reads, the AI it writes with, and your Federated Core.</p>
|
|
</div>
|
|
<div class="settings">
|
|
<nav class="settings-nav" aria-label="Settings sections">
|
|
<div class="nav-label">Company</div>
|
|
<a href="/settings/profile" {{if eq .Nav "settings/profile"}}aria-current="page"{{end}}>{{template "icon" "profile"}}Profile</a>
|
|
<div class="nav-label">Connections</div>
|
|
<a href="/settings/accounts" {{if eq .Nav "settings/accounts"}}aria-current="page"{{end}}>{{template "icon" "accounts"}}Social accounts</a>
|
|
<a href="/settings/core" {{if eq .Nav "settings/core"}}aria-current="page"{{end}}>{{template "icon" "core"}}Core & Hermes</a>
|
|
<a href="/settings/sources" {{if eq .Nav "settings/sources"}}aria-current="page"{{end}}>{{template "icon" "prospects"}}Lead sources</a>
|
|
<a href="/settings/email" {{if eq .Nav "settings/email"}}aria-current="page"{{end}}>{{template "icon" "email"}}Email</a>
|
|
<div class="nav-label">AI</div>
|
|
<a href="/settings/ai" {{if eq .Nav "settings/ai"}}aria-current="page"{{end}}>{{template "icon" "ai"}}AI</a>
|
|
</nav>
|
|
<div class="settings-body">
|
|
{{end}}
|
|
|
|
{{define "settings-end"}}
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
|
|
{{/* Sign-ins running out: {{template "reminders" .Reminders}}. */}}
|
|
{{define "reminders"}}{{range .}}
|
|
<section class="card warn reminder" role="status">
|
|
<p><strong>{{if .Expired}}{{.Network}}'s sign-in expired on {{.At.Local.Format "2 Jan 2006"}}.{{else}}{{.Network}}'s sign-in expires {{if eq .Days 0}}today{{else if eq .Days 1}}tomorrow{{else}}in {{.Days}} days{{end}}, on {{.At.Local.Format "2 Jan 2006"}}.{{end}}</strong>
|
|
{{if .Expired}}Nothing can be published to {{.Network}} until you reconnect; scheduled posts for it come back to Posts.{{else}}After that, nothing can be published to {{.Network}} until you reconnect.{{end}}</p>
|
|
<a class="button" href="/settings/accounts#network-{{.Network}}">Reconnect {{.Network}}</a>
|
|
</section>
|
|
{{end}}{{end}}
|
|
|
|
{{/* A secret's field: {{template "key-field" (dict "F" secretField "Set" bool)}}.
|
|
Saved values are never shown; an empty field keeps what's saved. */}}
|
|
{{define "key-field"}}
|
|
<div class="secret">
|
|
<label><span class="label-row">{{.F.Label}}{{with .F.Link}} <a class="get-it" href="{{.}}" target="_blank" rel="noopener noreferrer">Get it ↗</a>{{end}}</span>
|
|
<input type="password" name="{{.F.Name}}" autocomplete="off" placeholder="{{if .Set}}saved — type to replace{{else}}not set{{end}}">
|
|
{{if .F.Help}}<span class="help">{{.F.Help}} Kept in <code>secrets.json</code>, readable only by you, and never shown again.</span>{{end}}
|
|
</label>
|
|
{{if .Set}}<label class="check small"><input type="checkbox" name="remove:{{.F.Name}}"> remove</label>{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
|
|
{{/* Icons from Lucide (lucide.dev, ISC licence). */}}
|
|
{{define "icon"}}<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
{{- if eq . "search"}}<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>
|
|
{{- else if eq . "overview"}}<rect width="7" height="9" x="3" y="3" rx="1"/><rect width="7" height="5" x="14" y="3" rx="1"/><rect width="7" height="9" x="14" y="12" rx="1"/><rect width="7" height="5" x="3" y="16" rx="1"/>
|
|
{{- else if eq . "inventory"}}<path d="m16 6 4 14"/><path d="M12 6v14"/><path d="M8 8v12"/><path d="M4 4v16"/>
|
|
{{- else if eq . "content"}}<path d="M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2"/><path d="M18 14h-8"/><path d="M15 18h-5"/><path d="M10 6h8v4h-8V6Z"/>
|
|
{{- else if eq . "prospects"}}<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>
|
|
{{- else if eq . "email"}}<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>
|
|
{{- else if eq . "seo"}}<polyline points="22 7 13.5 15.5 8.5 10.5 2 17"/><polyline points="16 7 22 7 22 13"/>
|
|
{{- else if eq . "metrics"}}<path d="M3 3v18h18"/><path d="M18 17V9"/><path d="M13 17V5"/><path d="M8 17v-3"/>
|
|
{{- else if eq . "sites"}}<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>
|
|
{{- else if eq . "settings"}}<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>
|
|
{{- else if eq . "profile"}}<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>
|
|
{{- else if eq . "accounts"}}<circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><path d="m8.59 13.51 6.83 3.98"/><path d="m15.41 6.51-6.82 3.98"/>
|
|
{{- else if eq . "ai"}}<path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/>
|
|
{{- else if eq . "core"}}<path d="M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z"/><path d="m2 22 3-3"/><path d="M7.5 13.5 10 11"/><path d="M10.5 16.5 13 14"/><path d="m18 3-4 4h6l-4 4"/>
|
|
{{- else if eq . "menu"}}<path d="M4 12h16"/><path d="M4 6h16"/><path d="M4 18h16"/>
|
|
{{- end}}</svg>{{end}}
|