feat(app-store): category filter bar and custom registry settings

- TemplateService: static LSIO_CATEGORY_MAP covers ~80 well-known apps
  across Automation, Downloaders, Media, Monitoring, Networking,
  Security, Development, Productivity, Utilities, and Other. Category
  lookup is O(1) and runs once at cache-fill time. Adds source field
  ('linuxserver' | 'custom') to Template for future per-source UX.
  Portainer v2 registries pass their native categories through unchanged.
  Adds clearCache() method wired to POST /api/templates/refresh-cache.

- AppStoreView: category pill bar (All + sorted dynamic categories)
  rendered between search and grid; active pill fills on click; clicking
  a category badge on a card also sets the active filter; app count
  updates reactively; filter composed with existing search query.

- SettingsModal: new App Store section (local-node only) exposes a
  custom Portainer v2 JSON URL input with Save & Refresh (saves setting
  then busts the 24h template cache) and Reset to Default.
This commit is contained in:
SaelixCode
2026-03-20 15:19:32 -04:00
parent 18314119b0
commit 34cad76d45
5 changed files with 306 additions and 12 deletions
+5
View File
@@ -1482,6 +1482,11 @@ app.get('/api/templates', async (req: Request, res: Response) => {
}
});
app.post('/api/templates/refresh-cache', authMiddleware, (req: Request, res: Response) => {
templateService.clearCache();
res.json({ success: true });
});
app.post('/api/templates/deploy', async (req: Request, res: Response) => {
try {
const { stackName, template, envVars } = req.body;