feat: add bundled plugin tab icons

This commit is contained in:
Federico Jaramillo Martinez
2026-06-03 22:38:55 +02:00
parent 08f69d09c0
commit 76302a4e5f
4 changed files with 29 additions and 4 deletions
+8 -1
View File
@@ -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`
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="9"></circle>
<path d="M12 11v5"></path>
<path d="M12 8h.01"></path>
</svg>
`,
order: 1000,
render: (context) => html`
<section class="toolbar"><strong>Info</strong></section>
+9 -1
View File
@@ -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`
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 6v5h-5"></path>
<path d="M4 18v-5h5"></path>
<path d="M18.4 9A7 7 0 0 0 6.1 6.7L4 8.8"></path>
<path d="M5.6 15A7 7 0 0 0 17.9 17.3L20 15.2"></path>
</svg>
`,
order: 100,
visible: (context) => shouldShowStatusPanel(context.state),
badge: (context) => {
@@ -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`
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 6h11"></path>
<path d="M9 12h11"></path>
<path d="M9 18h11"></path>
<path d="m4 6 .8 .8L6.5 5"></path>
<path d="m4 12 .8 .8 1.7-1.8"></path>
<path d="m4 18 .8 .8 1.7-1.8"></path>
</svg>
`,
order: 40,
badge: ({ workspace }) => tasksPanelBadge(workspace),
render: (context) => html`<pi-web-workspace-tasks-panel .workspace=${context.workspace} .terminalCommandRuns=${terminalCommandRunsFromContext(context)} .openTerminal=${context.openTerminal}></pi-web-workspace-tasks-panel>`,