|
1 | | -// campaign_addons.templ renders the per-campaign features & content packs page. |
2 | | -// Campaign owners use this to enable/disable features for their campaign. |
| 1 | +// campaign_addons.templ renders per-campaign addon list fragments. |
| 2 | +// The full features page is now handled by the campaigns plugin's Plugin Hub |
| 3 | +// at /campaigns/:id/plugins. This file provides fragments for the Customization Hub. |
3 | 4 |
|
4 | 5 | package addons |
5 | 6 |
|
6 | 7 | import ( |
7 | 8 | "fmt" |
8 | | - "github.com/keyxmakerx/chronicle/internal/templates/layouts" |
9 | 9 | ) |
10 | 10 |
|
11 | | -// CampaignAddonsPageTempl renders the full campaign addons settings page. |
12 | | -templ CampaignAddonsPageTempl(campaignID string, addons []CampaignAddon, csrfToken string) { |
13 | | - @layouts.App("Features & Content Packs") { |
14 | | - <div class="max-w-3xl mx-auto space-y-6"> |
15 | | - <div class="flex items-center justify-between"> |
16 | | - <div> |
17 | | - <h1 class="text-2xl font-bold text-fg">Features & Content Packs</h1> |
18 | | - <p class="text-sm text-fg-secondary mt-1"> |
19 | | - Enable or disable features and content packs for this campaign. |
20 | | - </p> |
21 | | - </div> |
22 | | - <a href={ templ.SafeURL(fmt.Sprintf("/campaigns/%s/edit", campaignID)) } class="btn-secondary text-sm"> |
23 | | - Back to Settings |
24 | | - </a> |
25 | | - </div> |
26 | | - |
27 | | - <div id="addons-list"> |
28 | | - @CampaignAddonsListFragment(campaignID, addons, csrfToken) |
29 | | - </div> |
30 | | - |
31 | | - // Info panel. |
32 | | - <div class="card p-6"> |
33 | | - <div class="flex items-start gap-4"> |
34 | | - <span class="w-10 h-10 rounded-lg bg-accent/10 flex items-center justify-center shrink-0"> |
35 | | - <i class="fa-solid fa-circle-info text-accent"></i> |
36 | | - </span> |
37 | | - <div> |
38 | | - <h3 class="text-sm font-semibold text-fg mb-1">About Features & Content Packs</h3> |
39 | | - <p class="text-sm text-fg-secondary leading-relaxed"> |
40 | | - Features add optional capabilities to your campaign like calendars, maps, and timelines. |
41 | | - Content packs provide pre-made entity types, tag sets, and reference data. |
42 | | - Toggle them on or off at any time — disabling does not delete your data. |
43 | | - </p> |
44 | | - </div> |
45 | | - </div> |
46 | | - </div> |
47 | | - </div> |
48 | | - } |
49 | | -} |
50 | | - |
51 | 11 | // CampaignAddonsListFragment renders just the addon list (for HTMX swaps). |
52 | 12 | templ CampaignAddonsListFragment(campaignID string, addons []CampaignAddon, csrfToken string) { |
53 | 13 | // Group by category. |
|
0 commit comments