mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 05:56:53 +00:00
feat(plugins): redesign the admin plugins page — search, filters, cleaner cards
The panel was cramped and hard to scan. Rebuilt it as a proper management surface: - A segmented Installed/Discover switch with counts, and a real toolbar: search, filter by type, filter by status (active/off/update/error), and sort (name/recent/updates first). - An "N updates available · Update all" bar. - Installed rows are tidied up: a single health dot on the icon tile instead of a wall of badges, and capability chips underneath that show what each plugin can actually reach at a glance (reads your trips, dashboard widget, the hosts it talks to) — the reach is now visible without opening anything. Update, toggle and a ⋯ menu (restart, errors, source, uninstall) sit on the right. - The registry browser is now an App-Store-style card grid: screenshot with the plugin's icon chip, a reviewed badge, consistent heights. - The detail dialog gained "What it can access", "Connects to" and a details grid (version, size, requires, reviewed). To feed the capability chips, the installed list now returns each plugin's declared permissions and capabilities. New copy is in all 22 locales.
This commit is contained in:
@@ -25,6 +25,10 @@ export interface PluginListItem {
|
||||
last_error: string | null;
|
||||
reviewed_at: string | null;
|
||||
source_repo: string | null;
|
||||
/** Declared permissions (JSON string) — drives the "what this can access" chips. */
|
||||
permissions: string;
|
||||
/** Declared capabilities (JSON string) — e.g. widget slot. */
|
||||
capabilities: string;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@@ -32,7 +36,8 @@ export class PluginsService {
|
||||
list(): { enabled: boolean; plugins: PluginListItem[] } {
|
||||
const plugins = db
|
||||
.prepare(
|
||||
`SELECT id, name, description, type, icon, version, status, enabled, last_error, reviewed_at, source_repo
|
||||
`SELECT id, name, description, type, icon, version, status, enabled, last_error, reviewed_at, source_repo,
|
||||
permissions, capabilities
|
||||
FROM plugins
|
||||
ORDER BY sort_order, name`,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user