@goodandready/dsh-cron 0.2.17 → 0.2.18
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.
- package/README.md +5 -0
- package/README.ru.md +5 -0
- package/README.zh.md +5 -0
- package/lib/client.js +21 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -392,6 +392,11 @@ Developer-facing, no behaviour change. `parseScheduleExpression` was split into
|
|
|
392
392
|
|
|
393
393
|
|
|
394
394
|
|
|
395
|
+
### 30. Updater Localization in English & Chinese (v0.2.18, #160)
|
|
396
|
+
- **Settings Card Updater Localization (#160)**: Added native translations for all 10 in-app updater keys (`updater.title`, `updater.btnCheck`, `updater.checking`, `updater.btnUpdate`, `updater.updating`, `updater.desc`, `updater.current`, `updater.available`, `updater.upToDate`, `updater.success`) into English (`en`) and Chinese (`zh`) dictionaries in `lib/client-src/10-locales.js`. In accordance with DSH core plugin architecture, Russian localization is maintained externally via `dsh-russian-lang`.
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
395
400
|
### 29. Client Modular Decomposition & Theme Standardization (v0.2.17, #149, #150)
|
|
396
401
|
- **Modular Client Architecture (#150)**: Decomposed monolithic `lib/client.js` (~3950 lines) into 14 focused, single-responsibility fragments under `lib/client-src/` (none exceeding 580 lines). Integrated zero-dependency build script `scripts/build-client.mjs` wired into `package.json` (`build:client`, `pretest`). Development fragments are excluded from npm distribution via `"files": ["lib/*.js", ...]`.
|
|
397
402
|
- **DSH Theme Tokens & Visual Standardization (#149)**: Replaced inline styles on task type badges (`onSuccess`, `onFailure`, `heartbeat`, `targetSession`, `preflight`) with dedicated `.dsh-cron-tag-*` CSS classes powered by semantic `--dsh-cron-*` theme variables. Modal overlay now adapts dynamically using `var(--dsw-alias-bg-mask, rgba(0, 0, 0, 0.75))`, and keyframe pulse animations use theme variables without hardcoded RGBA.
|
package/README.ru.md
CHANGED
|
@@ -268,6 +268,11 @@ cron_create_task({
|
|
|
268
268
|
|
|
269
269
|
|
|
270
270
|
|
|
271
|
+
### 30. Локализация автообновления на английский и китайский языки (v0.2.18, #160)
|
|
272
|
+
- **Локализация карточки обновления (#160)**: Добавлены нативные переводы для всех 10 ключей модуля автообновления (`updater.title`, `updater.btnCheck`, `updater.checking`, `updater.btnUpdate`, `updater.updating`, `updater.desc`, `updater.current`, `updater.available`, `updater.upToDate`, `updater.success`) в словари английского (`en`) и китайского (`zh`) языков в `lib/client-src/10-locales.js`. В соответствии со стандартами ядра DSH плагин поставляется с EN и ZH словарями, а русская локализация обслуживается через системный плагин `dsh-russian-lang`.
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
271
276
|
### 29. Модульная декомпозиция клиента и стандартизация тем оформления (v0.2.17, #149, #150)
|
|
272
277
|
- **Модульная архитектура клиентской части (#150)**: Монолитный файл `lib/client.js` (~3950 строк) декомпозирован на 14 независимых специализированных модулей в каталоге `lib/client-src/` (каждый строго <= 580 строк). Сборка `lib/client.js` выполняется легковесным скриптом `scripts/build-client.mjs` перед запуском тестов и сборки. Исходные фрагменты исключены из npm-дистрибутива через `"files": ["lib/*.js", ...]`.
|
|
273
278
|
- **Семантические токены тем DSH (#149)**: Инлайн-стили тегов типа задач (`onSuccess`, `onFailure`, `heartbeat`, `targetSession`, `preflight`) переведены на выделенные CSS-классы `.dsh-cron-tag-*` на базе переменных темы `--dsh-cron-*`. Оверлей модальных окон переведен на адаптивную маску `var(--dsw-alias-bg-mask, rgba(0, 0, 0, 0.75))`, а анимация пульсации избавлена от захардкоженных значений RGBA.
|
package/README.zh.md
CHANGED
|
@@ -391,6 +391,11 @@ bash deploy.sh verify [exact-version]
|
|
|
391
391
|
|
|
392
392
|
|
|
393
393
|
|
|
394
|
+
### 30. 自更新模块英文与中文多语言支持 (v0.2.18, #160)
|
|
395
|
+
- **设置面板自更新多语言 (#160)**:在 `lib/client-src/10-locales.js` 的英文 (`en`) 与中文 (`zh`) 字典中补全了全部 10 个自更新键值 (`updater.title`, `updater.btnCheck`, `updater.checking`, `updater.btnUpdate`, `updater.updating`, `updater.desc`, `updater.current`, `updater.available`, `updater.upToDate`, `updater.success`)。遵循 DSH 插件规范,插件核心内置英文与中文,俄语多语言由 `dsh-russian-lang` 统一扩展。
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
394
399
|
### 29. 客户端模块化解耦与原生主题标准化 (v0.2.17, #149, #150)
|
|
395
400
|
- **客户端模块化架构 (#150)**: 将庞大的单文件 `lib/client.js` (约 3950 行) 拆分为 `lib/client-src/` 下的 14 个高内聚模块文件 (各模块严格 <= 580 行)。集成零依赖构建脚本 `scripts/build-client.mjs` 并接入 `package.json` (`build:client`, `pretest`),通过 `"files": ["lib/*.js", ...]` 避免开发源码冗余打包进 npm 发布包。
|
|
396
401
|
- **DSH 语义化主题变量对齐 (#149)**: 将任务类型标签 (`onSuccess`, `onFailure`, `heartbeat`, `targetSession`, `preflight`) 的内联样式全部替换为基于主题变量的 `.dsh-cron-tag-*` 类;模态框遮罩层接入自适应主题遮罩变量 `var(--dsw-alias-bg-mask, rgba(0, 0, 0, 0.75))`,移除脉冲动画关键帧中的硬编码 RGBA。
|
package/lib/client.js
CHANGED
|
@@ -294,6 +294,16 @@ window.__ModuleLoader__.load({
|
|
|
294
294
|
'settings.saved': '✓ Saved',
|
|
295
295
|
'settings.saveError': 'Save failed: {error}',
|
|
296
296
|
'settings.saveErrorUnknown': 'unknown error',
|
|
297
|
+
'updater.title': 'Plugin Auto-Updater',
|
|
298
|
+
'updater.btnCheck': 'Check for updates',
|
|
299
|
+
'updater.checking': 'Checking...',
|
|
300
|
+
'updater.btnUpdate': 'Update to v{version}',
|
|
301
|
+
'updater.updating': 'Updating...',
|
|
302
|
+
'updater.desc': 'Check npm registry and install plugin updates in-place without SSH access.',
|
|
303
|
+
'updater.current': 'Current version: v{version}',
|
|
304
|
+
'updater.available': 'Update available: v{version}',
|
|
305
|
+
'updater.upToDate': 'Up to date',
|
|
306
|
+
'updater.success': 'Successfully updated to v{version}. Please restart DSH or reload profile to apply changes.',
|
|
297
307
|
'dsh.modalTitle': 'Schedule a task with the DSH agent',
|
|
298
308
|
'dsh.descLabel': 'Describe the task and the desired frequency:',
|
|
299
309
|
'dsh.placeholder': 'For example: check free disk space and failed systemd services every 2 hours, and alert only if something is wrong...',
|
|
@@ -574,6 +584,16 @@ window.__ModuleLoader__.load({
|
|
|
574
584
|
'settings.saved': '✓ 已保存',
|
|
575
585
|
'settings.saveError': '保存失败: {error}',
|
|
576
586
|
'settings.saveErrorUnknown': '未知错误',
|
|
587
|
+
'updater.title': '插件自更新',
|
|
588
|
+
'updater.btnCheck': '检查更新',
|
|
589
|
+
'updater.checking': '正在检查...',
|
|
590
|
+
'updater.btnUpdate': '升级至 v{version}',
|
|
591
|
+
'updater.updating': '正在更新...',
|
|
592
|
+
'updater.desc': '通过 npm 仓库在线检查并就地升级插件,无需 SSH 终端操作。',
|
|
593
|
+
'updater.current': '当前版本: v{version}',
|
|
594
|
+
'updater.available': '发现新版本: v{version}',
|
|
595
|
+
'updater.upToDate': '已是最新版本',
|
|
596
|
+
'updater.success': '已成功升级至 v{version}。请重启 DSH 或重载配置以应用更新。',
|
|
577
597
|
'dsh.modalTitle': '让 DSH 智能体创建任务',
|
|
578
598
|
'dsh.descLabel': '请描述你的任务目标和执行频率:',
|
|
579
599
|
'dsh.placeholder': '例如: 每两小时检查一次磁盘空间和失败的 systemd 守护进程,并在异常时报警...',
|
|
@@ -3326,7 +3346,7 @@ window.__ModuleLoader__.load({
|
|
|
3326
3346
|
const [updateState, setUpdateState] = React.useState({
|
|
3327
3347
|
checking: false,
|
|
3328
3348
|
updating: false,
|
|
3329
|
-
currentVersion: '0.2.
|
|
3349
|
+
currentVersion: '0.2.18',
|
|
3330
3350
|
latestVersion: undefined,
|
|
3331
3351
|
updateAvailable: false,
|
|
3332
3352
|
notice: null,
|