diff --git a/.changeset/mobile-tab-icons.md b/.changeset/mobile-tab-icons.md index 812276b..ad794bc 100644 --- a/.changeset/mobile-tab-icons.md +++ b/.changeset/mobile-tab-icons.md @@ -2,4 +2,4 @@ "@jmfederico/pi-web": patch --- -Use compact icons, initials, and inline badges for the mobile main tab bar so tabs are easier to fit without losing horizontal scrolling, and let workspace panel plugins provide custom SVG tab icons. +Use compact icons, initials, and inline badges for the mobile main tab bar so tabs are easier to fit without losing horizontal scrolling; let workspace panel plugins provide custom SVG tab icons; and add icons for bundled Info, Updates, and Tasks plugin panels. diff --git a/pi-web-plugins/info/pi-web-plugin.ts b/pi-web-plugins/info/pi-web-plugin.ts index 52dc709..a04be40 100644 --- a/pi-web-plugins/info/pi-web-plugin.ts +++ b/pi-web-plugins/info/pi-web-plugin.ts @@ -3,7 +3,7 @@ import type { PiWebPlugin } from "../../src/client/src/plugins/types"; const plugin: PiWebPlugin = { apiVersion: 1, name: "Info Plugin", - activate: ({ html }) => ({ + activate: ({ html, svg }) => ({ contributions: { actions: [ { @@ -28,6 +28,13 @@ const plugin: PiWebPlugin = { { id: "workspace.info", title: "Info", + icon: svg` + + + + + + `, order: 1000, render: (context) => html`
Info
diff --git a/pi-web-plugins/pi-web/pi-web-plugin.ts b/pi-web-plugins/pi-web/pi-web-plugin.ts index bf78596..800c276 100644 --- a/pi-web-plugins/pi-web/pi-web-plugin.ts +++ b/pi-web-plugins/pi-web/pi-web-plugin.ts @@ -149,12 +149,20 @@ function renderStatusPanel(html: HtmlTemplateTag, state: AppState): TemplateResu const plugin: PiWebPlugin = { apiVersion: 1, name: "PI WEB Updates", - activate: ({ html }) => ({ + activate: ({ html, svg }) => ({ contributions: { workspacePanels: [ { id: "workspace.status", title: "Updates", + icon: svg` + + + + + + + `, order: 100, visible: (context) => shouldShowStatusPanel(context.state), badge: (context) => { diff --git a/pi-web-plugins/workspace-tasks/pi-web-plugin.ts b/pi-web-plugins/workspace-tasks/pi-web-plugin.ts index aca7657..6f5a031 100644 --- a/pi-web-plugins/workspace-tasks/pi-web-plugin.ts +++ b/pi-web-plugins/workspace-tasks/pi-web-plugin.ts @@ -6,7 +6,7 @@ import { terminalCommandRunsFromContext } from "./piWebInternal.js"; const plugin: PiWebPlugin = { apiVersion: 1, name: "Workspace Tasks", - activate: ({ pluginId, html }) => { + activate: ({ pluginId, html, svg }) => { defineTasksPanelElement(); return { @@ -28,6 +28,16 @@ const plugin: PiWebPlugin = { { id: "workspace.tasks", title: "Tasks", + icon: svg` + + + + + + + + + `, order: 40, badge: ({ workspace }) => tasksPanelBadge(workspace), render: (context) => html``,