Brings back posting, which Phase 0 removed with the terminal interface. - Content page: per inventory entry, fetch its X account, X hashtag search, YouTube channel and RSS/Atom feeds (new), then select, dismiss or restore the fetched items, which are kept in the database. - Writing: one AI call returns a draft per channel (X and LinkedIn), prompted from the company profile, the entry's relationship, talking points and mention policy, and each channel's rules. Fetched text is quoted as untrusted. An over-long X draft gets one request to shorten. - Drafts page: edit with a live length counter that counts like X, then publish each draft on its own. A draft is claimed before posting so it can't go out twice; failures are kept on the draft for a retry; X tokens are refreshed and saved. - Migration 2 adds content_items and drafts, and turns queued posts into drafts for the platforms they hadn't reached. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
40 lines
1.2 KiB
HTML
40 lines
1.2 KiB
HTML
{{define "content"}}{{with .Data}}
|
|
<h1>Overview</h1>
|
|
|
|
<section class="card">
|
|
<h2>Setup</h2>
|
|
<ul class="steps">
|
|
{{range .Steps}}
|
|
<li class="{{if .Done}}done{{else}}todo{{end}}">
|
|
<a href="{{.Link}}"><strong>{{.Label}}</strong></a>
|
|
<span>{{.Detail}}</span>
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
</section>
|
|
|
|
{{if .ImportErr}}
|
|
<section class="card warn">
|
|
<h2>Import from the old app failed</h2>
|
|
<p>{{.ImportErr}}</p>
|
|
<p>The old files are untouched in the data folder's <code>import/</code> directory. Fix the file named above and restart Supermarket (<code>supermarket restart</code>) to try again.</p>
|
|
</section>
|
|
{{else if .ImportStatus}}
|
|
<details class="card">
|
|
<summary>Imported from the old terminal app {{ago .ImportStatus.At}}</summary>
|
|
<ul>{{range .ImportStatus.Summary}}<li>{{.}}</li>{{end}}</ul>
|
|
{{if .QueuedPosts}}<p>Its queued posts are now drafts: <a href="/drafts">{{.QueuedPosts}} waiting for review</a>.</p>{{end}}
|
|
</details>
|
|
{{end}}
|
|
|
|
<h2>Modules</h2>
|
|
<div class="grid">
|
|
{{range .Modules}}
|
|
<section class="card module">
|
|
<h3>{{if .Link}}<a href="{{.Link}}">{{.Name}}</a>{{else}}{{.Name}}{{end}} <span class="badge">{{.Phase}}</span></h3>
|
|
<p>{{.Body}}</p>
|
|
</section>
|
|
{{end}}
|
|
</div>
|
|
{{end}}{{end}}
|