Everything the user sees says Market: the sidebar, titles, breadcrumbs, help text, messages, suggestions and the agent tool's description; the export downloads as supermarket-market.yaml. Its pages live under /market, and the old /inventory addresses redirect there (308, so a form's POST stays a POST). The YAML format (inventory:), the database and the code's names are unchanged, so exported files still import. A breadcrumb no longer repeats the page's own title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.6 KiB
HTML
34 lines
1.6 KiB
HTML
{{define "content"}}{{with .Data}}
|
|
<p><a href="/market">← Market</a></p>
|
|
<h1>Import into the Market</h1>
|
|
|
|
{{with .Result}}
|
|
<section class="card {{if .Errors}}warn{{end}}">
|
|
<p>{{.Added}} added, {{.Updated}} updated, {{.Skipped}} skipped (already in the Market).</p>
|
|
{{if .Errors}}<ul>{{range .Errors}}<li>{{.}}</li>{{end}}</ul>{{end}}
|
|
<p><a href="/market">See the Market</a></p>
|
|
</section>
|
|
{{end}}
|
|
|
|
<form class="card" method="post" action="/market/import" enctype="multipart/form-data">
|
|
<p>YAML: a list of entries, or a document with an <code>inventory:</code> list. The old app's <code>config.yaml</code> works too (its <code>applications:</code> list).</p>
|
|
<label>Paste <textarea name="yaml" rows="12" placeholder="inventory:
|
|
- name: Example
|
|
relationship: competitor
|
|
twitter_handle: example
|
|
hashtags: ['#Example']">{{.YAML}}</textarea></label>
|
|
<label>…or choose a file <input type="file" name="file" accept=".yaml,.yml,text/yaml"></label>
|
|
<div class="cols">
|
|
<label>Relationship for entries without one
|
|
<select name="relationship">{{range .Relationships}}<option value="{{.}}">{{.}}</option>{{end}}</select>
|
|
</label>
|
|
<label class="check"><input type="checkbox" name="overwrite"> Replace entries that already exist</label>
|
|
</div>
|
|
<div class="actions">
|
|
<button type="submit">Import</button>
|
|
<button type="submit" name="example" value="federated" class="secondary">Load the Federated example</button>
|
|
</div>
|
|
<p class="help">The Federated example is the 21 open source applications on a Federated Core, as partners.</p>
|
|
</form>
|
|
{{end}}{{end}}
|