@laraveladmin/dsh-stay-awake 0.3.5 → 0.4.2
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/CHANGELOG.md +38 -0
- package/README.en.md +5 -4
- package/README.md +5 -4
- package/client.js +1108 -198
- package/docs/REQUIREMENTS.md +13 -0
- package/docs/VERIFICATION.md +38 -0
- package/i18n/ar.json +66 -0
- package/i18n/de.json +65 -0
- package/i18n/en.json +65 -0
- package/i18n/es.json +65 -0
- package/i18n/fr.json +65 -0
- package/i18n/hi.json +65 -0
- package/i18n/id.json +65 -0
- package/i18n/it.json +65 -0
- package/i18n/ja.json +65 -0
- package/i18n/ko.json +65 -0
- package/i18n/nl.json +65 -0
- package/i18n/pl.json +65 -0
- package/i18n/pt.json +65 -0
- package/i18n/ru.json +65 -0
- package/i18n/tr.json +65 -0
- package/i18n/vi.json +65 -0
- package/i18n/zh-Hant.json +65 -0
- package/i18n/zh.json +65 -0
- package/locale/ar.json +6 -0
- package/locale/de.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/hi.json +6 -0
- package/locale/id.json +6 -0
- package/locale/it.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/ko.json +6 -0
- package/locale/nl.json +6 -0
- package/locale/pl.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/tr.json +6 -0
- package/locale/vi.json +6 -0
- package/market/index.json +2 -2
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# 变更记录 · Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.2 — 2026-12-06
|
|
4
|
+
|
|
5
|
+
### 修复
|
|
6
|
+
|
|
7
|
+
- 设置弹层里的**开关(toggle)圆点没有真正上下居中**:轨道 34×18、圆点 12px,原来 `top/left: 2px`
|
|
8
|
+
导致上边距 2px、下边距 4px,打开状态右边距也比左边宽 2px。改为 `top/left: 3px`(2×(3+12+3)=34/18,
|
|
9
|
+
`translateX(16px)` 保持对称),关闭与打开两个状态四周边距都严格相等。
|
|
10
|
+
- 纯样式改动,刷新页面即生效;不影响功能与其它组件。
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## 0.4.1 — 2026-12-06
|
|
14
|
+
|
|
15
|
+
### 改进
|
|
16
|
+
|
|
17
|
+
- **阿拉伯语 RTL 布局**:弹层与状态栏指示器按当前语言切换 `dir="rtl"`,CSS 对齐改用逻辑属性
|
|
18
|
+
(`text-align: start/end`)使标签、数值、开关整行镜像;弹层定位改为锚定触发点右缘再按视口夹紧,
|
|
19
|
+
从右往左展开;`v0.4.0`、`cordis.patch.yml`、计数等拉丁/数字片段加 `dir="auto"` 保持自身方向。
|
|
20
|
+
- RTL 语言由翻译源声明(`i18n/ar.json` 的 `"rtl": true`),构建脚本生成 `RTL_LOCALES`;新增 1 项测试
|
|
21
|
+
锁定「声明 → 生成 → 客户端 dir 切换」这条链路,单测 125 → **126 全绿**。
|
|
22
|
+
- 纯客户端改动,刷新页面即生效。
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 0.4.0 — 2026-12-03
|
|
26
|
+
|
|
27
|
+
### 新功能:18 种语言
|
|
28
|
+
|
|
29
|
+
- 界面新增 **15 种语言**:日本語、한국어、Deutsch、Español、Français、Italiano、Português、Русский、
|
|
30
|
+
Nederlands、Polski、Türkçe、हिन्दी、Bahasa Indonesia、Tiếng Việt、العربية;连同原有简体中文、繁體中文、
|
|
31
|
+
English 共 **18 种**。
|
|
32
|
+
- 其中 `ja/es/fr/de/ru/pt` 是 DSH 自带语言,切换即完整生效;其余 9 种通过 `ctx.locale.addLanguage`
|
|
33
|
+
贡献语言项(繁中回退简中,其余回退英文),插件文案完整翻译、DSH 其余界面按回退链显示。
|
|
34
|
+
- 翻译源改为 `i18n/<locale>.json`(一语言一文件),新增 `scripts/build-i18n.mjs` 生成内嵌字典与
|
|
35
|
+
`locale/<locale>.json`;`npm run i18n` 生成,`npm test` 校验同步与键集合一致。
|
|
36
|
+
- 新增 5 项 i18n 测试(键集合、标签唯一性、回退链、拉丁语系无 CJK 残留、生成同步、内嵌与贡献列表),
|
|
37
|
+
单测 120 → **125 全绿**。
|
|
38
|
+
- 说明:翻译为 AI 初译,未经过母语者审校;README 中英已注明并欢迎社区 PR 修正。
|
|
39
|
+
|
|
40
|
+
|
|
3
41
|
## 0.3.5 — 2026-12-03
|
|
4
42
|
|
|
5
43
|
### 修复
|
package/README.en.md
CHANGED
|
@@ -264,10 +264,11 @@ systemd-inhibit --list
|
|
|
264
264
|
|
|
265
265
|
## Internationalization
|
|
266
266
|
|
|
267
|
-
- The indicator
|
|
268
|
-
-
|
|
269
|
-
-
|
|
270
|
-
-
|
|
267
|
+
- The indicator, the panel and the plugin-manager copy follow the active DSH locale and ship **18 languages**: Simplified Chinese, Traditional Chinese, English, Japanese, Korean, German, Spanish, French, Italian, Portuguese, Russian, Dutch, Polish, Turkish, Hindi, Indonesian, Vietnamese and Arabic.
|
|
268
|
+
- `zh / en / ja / es / fr / de / ru / pt` are DSH's own locales, so they apply completely. `zh-Hant / ko / it / nl / pl / tr / hi / id / vi / ar` are **contributed** by the plugin through `ctx.locale.addLanguage` (Traditional Chinese falls back to Simplified, the rest to English): the plugin's copy is fully translated while the rest of the GUI follows the fallback chain.
|
|
269
|
+
- Translations live in `i18n/<locale>.json` (one file per language); `npm run i18n` generates the embedded dictionaries and `locale/<locale>.json`, and `npm test` enforces an identical key set, no empty values, no CJK leftovers in Latin-script locales, and that the generated bundle matches the sources.
|
|
270
|
+
- **Arabic is laid out right-to-left**: the panel and the composer indicator switch to `dir="rtl"`, rows mirror (labels, values, switches) and the panel grows from the trigger's right edge; Latin fragments such as `v0.4.0` or `cordis.patch.yml` keep their own direction through `dir="auto"`. RTL locales are declared with `"rtl": true` in `i18n/<locale>.json` and generated from it.
|
|
271
|
+
- **Translations are AI-produced first drafts**, not reviewed by native speakers; corrections via a PR to the matching `i18n/<locale>.json` (then `npm run i18n`) are welcome.
|
|
271
272
|
|
|
272
273
|
## Development
|
|
273
274
|
|
package/README.md
CHANGED
|
@@ -267,10 +267,11 @@ systemd-inhibit --list
|
|
|
267
267
|
|
|
268
268
|
## 多语言
|
|
269
269
|
|
|
270
|
-
-
|
|
271
|
-
- DSH
|
|
272
|
-
-
|
|
273
|
-
-
|
|
270
|
+
- 状态栏指示器、弹层与插件管理器文案跟随 DSH 当前语言,内置 **18 种语言**:简体中文、繁體中文、English、日本語、한국어、Deutsch、Español、Français、Italiano、Português、Русский、Nederlands、Polski、Türkçe、हिन्दी、Bahasa Indonesia、Tiếng Việt、العربية。
|
|
271
|
+
- 其中 `zh / en / ja / es / fr / de / ru / pt` 是 DSH 自带语言,切换即完整生效;`zh-Hant / ko / it / nl / pl / tr / hi / id / vi / ar` 由插件通过 `ctx.locale.addLanguage` **贡献**到语言列表(回退:繁中→简中,其余→英文)。选中这些语言时插件文案是完整母语,DSH 其余界面按回退链显示,仍然可用。
|
|
272
|
+
- 翻译源文件在 `i18n/<locale>.json`(一种语言一个文件),`npm run i18n` 生成内嵌字典与 `locale/<locale>.json`;`npm test` 会校验「键集合一致、无空值、拉丁语系无中日韩残留、生成结果与源同步」。
|
|
273
|
+
- **阿拉伯语按 RTL 布局**:弹层与状态栏指示器会切到 `dir="rtl"`,标签/数值/开关整行镜像、弹层从触发点右缘向左展开;`v0.4.0`、`cordis.patch.yml` 这类拉丁内容用 `dir="auto"` 保持自身方向。RTL 语言由 `i18n/<locale>.json` 的 `"rtl": true` 声明并生成。
|
|
274
|
+
- **翻译为 AI 初译**,未经过母语者审校;发现措辞问题欢迎提交 PR 修改对应的 `i18n/<locale>.json` 后跑一次 `npm run i18n`。
|
|
274
275
|
|
|
275
276
|
## 开发
|
|
276
277
|
|