@eum-agent/system-notifications 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/ui/ui.js +16 -5
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "en-US": "System Notifications",
5
5
  "zh-CN": "系统通知"
6
6
  },
7
- "version": "1.0.1",
7
+ "version": "1.1.0",
8
8
  "type": "module",
9
9
  "description": "System reminders for completed tasks and pending requests",
10
10
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "i18next": "^26.4.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@eum-agent/plugin": "1.0.1",
25
+ "@eum-agent/plugin": "1.1.0",
26
26
  "@types/react": "^19.2.18",
27
27
  "@types/react-dom": "^19.2.5",
28
28
  "react": "^19.2.0",
package/ui/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Alert, Button, Disclosure, DisclosureSummary, NavEntryBody, Panel, Popover, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipTrigger, goToSession, isOnline, localeLeaves, navEntryClass, onInboxCandidates, openInbox, pageKey, sessionTitle, useConnection, useFailureToast, useGateway, useInbox, useNotices, useOpenSession, usePage, usePendingRequests, usePlugins, useSessions, useTranslation, useTriggers } from "@eum-agent/host/framework";
1
+ import { Alert, Button, Disclosure, DisclosureSummary, NavEntryBody, Panel, Popover, Segmented, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipTrigger, goToSession, isOnline, localeLeaves, navEntryClass, onInboxCandidates, openInbox, pageKey, sessionTitle, useConnection, useFailureToast, useGateway, useInbox, useNotices, useOpenSession, usePage, usePendingRequests, usePlugins, useSessions, useTranslation, useTriggers } from "@eum-agent/host/framework";
2
2
  import React, { createContext, createElement, forwardRef, useContext, useEffect, useMemo, useState } from "react";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region ui-src/activation.ts
@@ -139,6 +139,8 @@ var en_US_default = {
139
139
  },
140
140
  requests: { "approvalOf": "{{tool}} asks for permission" },
141
141
  common: {
142
+ "on": "On",
143
+ "off": "Off",
142
144
  "working": "Working…",
143
145
  "retry": "Retry"
144
146
  }
@@ -246,6 +248,8 @@ var zh_CN_default = {
246
248
  },
247
249
  requests: { "approvalOf": "{{tool}} 请求授权" },
248
250
  common: {
251
+ "on": "开启",
252
+ "off": "关闭",
249
253
  "working": "处理中……",
250
254
  "retry": "重试"
251
255
  }
@@ -495,11 +499,18 @@ function NotificationsPanel() {
495
499
  inline: true,
496
500
  children: /* @__PURE__ */ jsx("div", {
497
501
  className: "flex min-w-0 justify-end",
498
- children: /* @__PURE__ */ jsx(Switch, {
499
- "aria-label": t("notifications.enabled"),
500
- checked: enabled,
502
+ children: /* @__PURE__ */ jsx(Segmented, {
503
+ label: t("notifications.enabled"),
504
+ value: enabled ? "on" : "off",
505
+ options: [{
506
+ value: "off",
507
+ label: t("common.off")
508
+ }, {
509
+ value: "on",
510
+ label: t("common.on")
511
+ }],
501
512
  disabled: !initialized || pending || permission === "unsupported",
502
- onCheckedChange: toggle
513
+ onSelect: (value) => toggle(value === "on")
503
514
  })
504
515
  })
505
516
  }),