dsh-quick-phrases 0.9.1 → 0.10.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.
- package/README.md +16 -1
- package/client.js +298 -21
- package/docs/ARCHITECTURE.md +23 -3
- package/docs/DETAIL.de.md +14 -0
- package/docs/DETAIL.en.md +14 -0
- package/docs/DETAIL.es.md +14 -0
- package/docs/DETAIL.fr.md +14 -0
- package/docs/DETAIL.md +14 -0
- package/docs/DETAIL.pt.md +14 -0
- package/docs/DETAIL.ru.md +14 -0
- package/locale/de.json +1 -1
- package/locale/en.json +1 -1
- package/locale/es.json +1 -1
- package/locale/fr.json +1 -1
- package/locale/pt.json +1 -1
- package/locale/ru.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
- **整排三态可选**:设置里的「短语行显示」一档搞定——**显示整排**常驻;**收成胶囊**只留一个小胶囊,点开可临时展开;**彻底隐藏**则把整排从界面完全移除(连胶囊都不留),只能回到 **设置 → 快捷短语** 恢复。
|
|
24
24
|
- **管理入口可换**:行尾的「管理」可以保持文字按钮、换成齿轮图标,或直接隐藏;隐藏后管理页仍从 **设置 → 快捷短语** 进入。
|
|
25
25
|
- **单条短语可隐藏**:管理页每张卡片有一个眼睛开关,隐藏后这条按钮从短语行消失,卡片仍留在管理页并标注「已隐藏」。
|
|
26
|
+
- **窄屏自动舍弃**:短语行按**实际可用宽度**自动降级——先丢行尾「收起」,再丢「管理」,再从末尾往前逐个丢短语;极窄时只保留第一条可用短语,不会丢光,也不新增设置项。
|
|
26
27
|
- **管理页**:拖动手柄排序、直接在卡片上改名、实时按钮预览与字数、两步确认删除、一键恢复默认。
|
|
27
28
|
- **零依赖**:纯前端一个 `client.js`,不联网、不读写文件、不引入 npm 包,数据只存在本机 `localStorage`。
|
|
28
29
|
|
|
29
30
|
## 安装
|
|
30
31
|
|
|
31
|
-
前置:DSH 桌面端或 Web
|
|
32
|
+
前置:DSH 桌面端或 Web 端,支持版本 `^0.2.2-rc.3`(0.2.2-rc.3 起,不含 0.3.0 及以上)——与包内 `engines.dsh` 及市场索引 `versions[].engines.dsh` 一致。插件分类为**界面增强(UI Enhancements)**,与市场索引 `metadata.categories.ui` / `metadata.category: ui` 一致。插件没有运行时依赖,也没有构建步骤。
|
|
32
33
|
|
|
33
34
|
**方式 A(npm,推荐)**
|
|
34
35
|
|
|
@@ -70,6 +71,8 @@ Plugins → Add plugin → 选择本仓库目录;或让 DSH 里的 agent 执
|
|
|
70
71
|
|
|
71
72
|
设置 → **快捷短语**:上面五项决定位置、点按行为、短语行的显示形态、管理入口样式、以及输入框有内容时怎么收起,选中即生效、无需重启;下面一条短语一张卡片。
|
|
72
73
|
|
|
74
|
+
> **小屏设计优化**:设置 / 管理页在窄屏(≤560px)有一套纯排版优化——选项标签与下拉同行、说明文字完整保留、触控目标放大(按钮 36px、textarea 52px)、区块头按钮平分一行、页边距收紧、长文本任意处换行;**不删任何元素、不改功能**。这与短语行的「按宽度舍弃」(见下文「窄屏自动舍弃」)是两套完全不同的逻辑:那里按实际宽度逐个舍弃控件,这里一个元素都不删。
|
|
75
|
+
|
|
73
76
|
| 配置项 | 可选值 | 默认值 |
|
|
74
77
|
| --- | --- | --- |
|
|
75
78
|
| 显示位置 | 输入框下方 / 输入框上方 / 工具行右侧 | 输入框下方 |
|
|
@@ -112,6 +115,18 @@ Plugins → Add plugin → 选择本仓库目录;或让 DSH 里的 agent 执
|
|
|
112
115
|
|
|
113
116
|
行尾「收起 ▾」等价于选「收成胶囊」;下拉选「显示整排」时会顺带清掉折叠状态,直接回到整排。「短语行显示」没有单独的状态键,读写的就是下面表里的 `hidden` 与 `collapsed` 两个键。
|
|
114
117
|
|
|
118
|
+
### 窄屏自动舍弃
|
|
119
|
+
|
|
120
|
+
宽度不够时,短语行会按可用宽度**自动依次舍弃**控件,不用改任何设置,也不是固定像素断点(用 `ResizeObserver` 量容器实际宽度 + 缓存每个胶囊的实测宽度来计算,长短名称都能正确降级):
|
|
121
|
+
|
|
122
|
+
1. 先丢行尾的 **收起**(最不重要);
|
|
123
|
+
2. 再丢 **管理**入口;
|
|
124
|
+
3. 再从末尾往前逐个丢**短语胶囊**,顺序与上面的列表顺序一致,靠前的短语优先留下。
|
|
125
|
+
|
|
126
|
+
极窄时**只保留第一条可用短语**,绝不把短语丢光;若一条短语都没有,收起与管理两个入口仍然可达。
|
|
127
|
+
|
|
128
|
+
「收起」在窄屏被自动舍弃后不用慌:输入框出现草稿时仍会按「自动收起」把整排折成胶囊;也可以在设置里把「短语行显示」选成「收成胶囊」折叠整排。窗口变宽后控件按同样的规则自动回来。管理入口若在窄屏被舍弃,仍可从 **设置 → 快捷短语** 进入管理页。三态 full/pill/hidden、自动收起、单条隐藏等既有行为都不变。
|
|
129
|
+
|
|
115
130
|
单条短语则在管理页用眼睛开关隐藏;短语行的从左到右顺序与卡片顺序保持一致。
|
|
116
131
|
|
|
117
132
|
## 数据与隐私
|
package/client.js
CHANGED
|
@@ -1000,6 +1000,114 @@ window.__ModuleLoader__.load({
|
|
|
1000
1000
|
setCollapsed(false)
|
|
1001
1001
|
}
|
|
1002
1002
|
|
|
1003
|
+
/* ------------------------------------------------------------------ *
|
|
1004
|
+
* Width fitting: shed the least important chips first. Driven by the
|
|
1005
|
+
* row's real content width (ResizeObserver), never by a fixed px
|
|
1006
|
+
* breakpoint, so short and long captions both degrade correctly.
|
|
1007
|
+
* ------------------------------------------------------------------ */
|
|
1008
|
+
|
|
1009
|
+
var CHIP_GAP = 6
|
|
1010
|
+
|
|
1011
|
+
function finitePx(value) {
|
|
1012
|
+
return typeof value === 'number' && isFinite(value) ? value : null
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
function widthOf(value) {
|
|
1016
|
+
var px = finitePx(value)
|
|
1017
|
+
return px === null || px < 0 ? 0 : px
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Pure, DOM-free fitter. Return the chips that survive at `available` px.
|
|
1022
|
+
* Priority: collapse (least important) -> manage -> phrase chips from the
|
|
1023
|
+
* end. The first usable phrase chip is never dropped; with no phrase at
|
|
1024
|
+
* all both trailing controls stay reachable.
|
|
1025
|
+
*
|
|
1026
|
+
* options: { phraseWidths, collapseWidth, manageWidth, manage, gap }
|
|
1027
|
+
* returns: { phraseCount, collapse, manage }
|
|
1028
|
+
*/
|
|
1029
|
+
function fitRowToWidth(available, options) {
|
|
1030
|
+
var opts = options && typeof options === 'object' ? options : {}
|
|
1031
|
+
var widths = Array.isArray(opts.phraseWidths) ? opts.phraseWidths : []
|
|
1032
|
+
var gap = widthOf(opts.gap)
|
|
1033
|
+
if (gap === 0) gap = CHIP_GAP
|
|
1034
|
+
var collapseWidth = widthOf(opts.collapseWidth)
|
|
1035
|
+
var manageWidth = widthOf(opts.manageWidth)
|
|
1036
|
+
var manage = opts.manage !== false
|
|
1037
|
+
var plan = { phraseCount: widths.length, collapse: true, manage: manage }
|
|
1038
|
+
var px = finitePx(available)
|
|
1039
|
+
|
|
1040
|
+
if (px === null || px <= 0 || widths.length === 0) return plan
|
|
1041
|
+
|
|
1042
|
+
function used(candidate) {
|
|
1043
|
+
var total = 0
|
|
1044
|
+
var count = 0
|
|
1045
|
+
for (var i = 0; i < candidate.phraseCount; i += 1) {
|
|
1046
|
+
total += widthOf(widths[i])
|
|
1047
|
+
count += 1
|
|
1048
|
+
}
|
|
1049
|
+
if (candidate.collapse) { total += collapseWidth; count += 1 }
|
|
1050
|
+
if (candidate.manage) { total += manageWidth; count += 1 }
|
|
1051
|
+
if (count > 1) total += gap * (count - 1)
|
|
1052
|
+
return total
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
while (used(plan) > px) {
|
|
1056
|
+
if (plan.collapse) plan.collapse = false
|
|
1057
|
+
else if (plan.manage) plan.manage = false
|
|
1058
|
+
else if (plan.phraseCount > 1) plan.phraseCount -= 1
|
|
1059
|
+
else break
|
|
1060
|
+
}
|
|
1061
|
+
return plan
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* Test seam: the smoke-test sandbox has no DOM / ResizeObserver, so it can
|
|
1066
|
+
* pin the available width and the per-chip measured widths here. It is
|
|
1067
|
+
* inert until a test explicitly opts in (any setter flips `enabled`), so a
|
|
1068
|
+
* production render never consults a stale global left by another session.
|
|
1069
|
+
* `reset()` turns it off again and restores real DOM measurement.
|
|
1070
|
+
*/
|
|
1071
|
+
var widthFitProbe = {
|
|
1072
|
+
enabled: false,
|
|
1073
|
+
available: null,
|
|
1074
|
+
phrases: null,
|
|
1075
|
+
collapseWidth: null,
|
|
1076
|
+
manageWidth: null,
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
function probeIsActive() {
|
|
1080
|
+
return widthFitProbe.enabled === true
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
window.__DQP_WIDTH_FIT__ = {
|
|
1084
|
+
fit: fitRowToWidth,
|
|
1085
|
+
// Explicit opt-in helpers; the setters below also opt in so existing
|
|
1086
|
+
// probe-driven tests keep working without a separate enable() call.
|
|
1087
|
+
enable: function () { widthFitProbe.enabled = true },
|
|
1088
|
+
disable: function () { widthFitProbe.enabled = false },
|
|
1089
|
+
setAvailableWidth: function (value) {
|
|
1090
|
+
widthFitProbe.enabled = true
|
|
1091
|
+
widthFitProbe.available = finitePx(value)
|
|
1092
|
+
},
|
|
1093
|
+
setChipWidths: function (widths) {
|
|
1094
|
+
widthFitProbe.enabled = true
|
|
1095
|
+
widthFitProbe.phrases = Array.isArray(widths) ? widths.slice() : null
|
|
1096
|
+
},
|
|
1097
|
+
setTrailingWidths: function (collapse, manage) {
|
|
1098
|
+
widthFitProbe.enabled = true
|
|
1099
|
+
widthFitProbe.collapseWidth = finitePx(collapse)
|
|
1100
|
+
widthFitProbe.manageWidth = finitePx(manage)
|
|
1101
|
+
},
|
|
1102
|
+
reset: function () {
|
|
1103
|
+
widthFitProbe.enabled = false
|
|
1104
|
+
widthFitProbe.available = null
|
|
1105
|
+
widthFitProbe.phrases = null
|
|
1106
|
+
widthFitProbe.collapseWidth = null
|
|
1107
|
+
widthFitProbe.manageWidth = null
|
|
1108
|
+
},
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1003
1111
|
/* ------------------------------------------------------------------ *
|
|
1004
1112
|
* Styles: local to each component, removed on unmount.
|
|
1005
1113
|
* ------------------------------------------------------------------ */
|
|
@@ -1204,23 +1312,48 @@ window.__ModuleLoader__.load({
|
|
|
1204
1312
|
'transition:border-color .14s ease,box-shadow .14s ease}' +
|
|
1205
1313
|
'.dqp-input::placeholder{color:var(--dsw-alias-label-caption,#7d7d7d)}' +
|
|
1206
1314
|
'.dqp-input:focus{outline:none;border-color:var(--dsw-alias-brand-primary,#4c6fff);box-shadow:0 0 0 2px rgba(0,0,0,.12)}' +
|
|
1207
|
-
/* Narrow viewports
|
|
1208
|
-
|
|
1315
|
+
/* Narrow viewports. Nothing is shed: every picker keeps its label, its
|
|
1316
|
+
full explanation and its control. The picker sits beside the label in
|
|
1317
|
+
one row (long labels simply wrap), with the complete explanation kept
|
|
1318
|
+
below it — five options cost five compact blocks, not ten.
|
|
1319
|
+
Phrase cards give the name field its own line, lift every control to a
|
|
1320
|
+
36px touch target, and wrap the preview instead of ellipsing it. */
|
|
1209
1321
|
'@media (max-width:560px){' +
|
|
1210
|
-
'.dqp-page{padding:
|
|
1211
|
-
'.dqp-inner{gap:
|
|
1212
|
-
'.dqp-head{padding-left:10px}' +
|
|
1322
|
+
'.dqp-page{padding:12px 12px 18px}' +
|
|
1323
|
+
'.dqp-inner{gap:12px}' +
|
|
1324
|
+
'.dqp-head{flex-wrap:wrap;gap:8px;padding-left:10px}' +
|
|
1213
1325
|
'.dqp-title{font-size:17px;line-height:24px}' +
|
|
1214
|
-
'.dqp-
|
|
1215
|
-
'.dqp-
|
|
1216
|
-
'.dqp-
|
|
1217
|
-
'
|
|
1218
|
-
'.dqp-
|
|
1219
|
-
'
|
|
1220
|
-
'.dqp-label-
|
|
1221
|
-
'.dqp-
|
|
1222
|
-
'.dqp-
|
|
1223
|
-
'.dqp-
|
|
1326
|
+
'.dqp-desc{overflow-wrap:anywhere}' +
|
|
1327
|
+
'.dqp-options{border-radius:8px}' +
|
|
1328
|
+
'.dqp-option{display:flex;flex-direction:row;align-items:flex-start;gap:8px;' +
|
|
1329
|
+
'padding:7px 12px;min-height:0}' +
|
|
1330
|
+
'.dqp-option-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:row;' +
|
|
1331
|
+
'align-items:center;flex-wrap:wrap;gap:2px 8px}' +
|
|
1332
|
+
'.dqp-option-label,.dqp-option-label-row{min-width:0;overflow-wrap:anywhere}' +
|
|
1333
|
+
'.dqp-option-hint{flex:1 1 100%;width:100%;min-width:0;line-height:15px;overflow-wrap:anywhere}' +
|
|
1334
|
+
'.dqp-select-wrap{flex:0 0 44%;width:44%;min-width:0}' +
|
|
1335
|
+
'.dqp-select{width:100%;min-width:0;height:36px;font-size:13px}' +
|
|
1336
|
+
'.dqp-btn{height:auto;min-height:36px;padding:6px 12px;line-height:16px}' +
|
|
1337
|
+
'.dqp-section-head{gap:6px 8px}' +
|
|
1338
|
+
'.dqp-section-title{flex:1 1 100%;min-width:0}' +
|
|
1339
|
+
'.dqp-section-head .dqp-btn{flex:1 1 auto;min-width:0}' +
|
|
1340
|
+
'.dqp-list{gap:8px}' +
|
|
1341
|
+
'.dqp-row{gap:6px;padding:8px 10px 8px 2px;flex-wrap:nowrap;align-items:flex-start}' +
|
|
1342
|
+
'.dqp-grip{flex:0 0 28px;width:28px;height:36px}' +
|
|
1343
|
+
'.dqp-row-head{flex-wrap:wrap;gap:6px}' +
|
|
1344
|
+
'.dqp-label-input{flex:1 1 100%;min-width:0;height:34px;font-size:14px}' +
|
|
1345
|
+
'.dqp-row-actions{margin-left:auto;gap:4px;flex-wrap:wrap;justify-content:flex-end}' +
|
|
1346
|
+
'.dqp-icon{width:36px;height:36px}' +
|
|
1347
|
+
'.dqp-icon-confirm{width:auto;min-width:36px;padding:0 10px}' +
|
|
1348
|
+
'.dqp-textarea{min-height:52px;padding:7px 10px;font-size:13px;line-height:19px}' +
|
|
1349
|
+
'.dqp-row-meta{align-items:flex-start;gap:6px;line-height:16px}' +
|
|
1350
|
+
'.dqp-preview{display:block;flex:1 1 auto;min-width:0;max-width:none;height:auto;' +
|
|
1351
|
+
'min-height:22px;padding:2px 8px;overflow:visible;text-overflow:clip;' +
|
|
1352
|
+
'white-space:normal;overflow-wrap:anywhere}' +
|
|
1353
|
+
'.dqp-meta-grow{flex:1 1 4px;min-width:4px}' +
|
|
1354
|
+
'.dqp-row-meta>span:last-child{flex:0 0 auto;white-space:nowrap}' +
|
|
1355
|
+
'.dqp-foot,.dqp-star{line-height:17px;overflow-wrap:anywhere}' +
|
|
1356
|
+
'.dqp-star-link{min-height:36px;padding:6px 10px}' +
|
|
1224
1357
|
'}'
|
|
1225
1358
|
|
|
1226
1359
|
/* ------------------------------------------------------------------ *
|
|
@@ -1310,6 +1443,12 @@ window.__ModuleLoader__.load({
|
|
|
1310
1443
|
var showHint = React.useState(false)
|
|
1311
1444
|
var setShowHint = showHint[1]
|
|
1312
1445
|
var hintTimer = React.useRef(null)
|
|
1446
|
+
// Width fitting state. These hooks are unconditional so the hook count
|
|
1447
|
+
// never changes with the placement, folded state, or fitted chip count.
|
|
1448
|
+
var widthTickState = React.useState(0)
|
|
1449
|
+
var bumpWidth = widthTickState[1]
|
|
1450
|
+
var rowRef = React.useRef(null)
|
|
1451
|
+
var metricsRef = React.useRef({ available: null, phrases: {} })
|
|
1313
1452
|
var hasDraft = draft.trim() !== '' || attachments > 0
|
|
1314
1453
|
var folded = collapsed || (autoHide === 'fold' && hasDraft && !peeked)
|
|
1315
1454
|
var usable = phrases.filter(function (phrase) {
|
|
@@ -1328,6 +1467,106 @@ window.__ModuleLoader__.load({
|
|
|
1328
1467
|
}
|
|
1329
1468
|
}, [])
|
|
1330
1469
|
|
|
1470
|
+
// Re-measure on every render so changes in caption/phrase list update
|
|
1471
|
+
// the fit. ResizeObserver adds a nudge when the container changes without
|
|
1472
|
+
// a React update. A first paint often reports clientWidth === 0 before
|
|
1473
|
+
// layout settles, so also schedule bounded deferred re-measures: a
|
|
1474
|
+
// static session must still descend from the full row even when no
|
|
1475
|
+
// ResizeObserver exists and no further React render happens.
|
|
1476
|
+
React.useEffect(function () {
|
|
1477
|
+
function measure() {
|
|
1478
|
+
var node = rowRef.current
|
|
1479
|
+
if (node === null || node === undefined) return
|
|
1480
|
+
var available = finitePx(node.clientWidth)
|
|
1481
|
+
if (available === null) return
|
|
1482
|
+
// Shed chips must keep their cached widths; otherwise dropping one
|
|
1483
|
+
// would free an estimated 0px next render and make the row oscillate.
|
|
1484
|
+
// Cache is keyed by phrase.id, never by DOM index: a shed chip leaves
|
|
1485
|
+
// a hole in node.children, and the folded pill / trailing controls
|
|
1486
|
+
// must never be mistaken for a phrase.
|
|
1487
|
+
var phrases = {}
|
|
1488
|
+
for (var key in metricsRef.current.phrases) {
|
|
1489
|
+
if (Object.prototype.hasOwnProperty.call(metricsRef.current.phrases, key)) {
|
|
1490
|
+
phrases[key] = metricsRef.current.phrases[key]
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
var collapseWidth = metricsRef.current.collapseWidth
|
|
1494
|
+
var manageWidth = metricsRef.current.manageWidth
|
|
1495
|
+
for (var i = 0; i < node.children.length; i += 1) {
|
|
1496
|
+
var child = node.children[i]
|
|
1497
|
+
if (child === null || child === undefined || typeof child.className !== 'string') continue
|
|
1498
|
+
var value = finitePx(child.getBoundingClientRect ? child.getBoundingClientRect().width : child.offsetWidth)
|
|
1499
|
+
if (value === null) continue
|
|
1500
|
+
var cls = child.className
|
|
1501
|
+
if (cls.indexOf('dqp-chip-collapse') >= 0) { collapseWidth = value; continue }
|
|
1502
|
+
if (cls.indexOf('dqp-chip-manage') >= 0) { manageWidth = value; continue }
|
|
1503
|
+
if (cls.indexOf('dqp-pill') >= 0 || cls.indexOf('dqp-chip') < 0) continue
|
|
1504
|
+
var phraseId = typeof child.getAttribute === 'function'
|
|
1505
|
+
? child.getAttribute('data-dqp-phrase-id')
|
|
1506
|
+
: null
|
|
1507
|
+
if (phraseId === null || phraseId === undefined || phraseId === '') continue
|
|
1508
|
+
phrases[phraseId] = value
|
|
1509
|
+
}
|
|
1510
|
+
var prev = metricsRef.current
|
|
1511
|
+
var changed = prev.available !== available || prev.collapseWidth !== collapseWidth ||
|
|
1512
|
+
prev.manageWidth !== manageWidth
|
|
1513
|
+
if (!changed) {
|
|
1514
|
+
for (var nextKey in phrases) {
|
|
1515
|
+
if (Object.prototype.hasOwnProperty.call(phrases, nextKey) && prev.phrases[nextKey] !== phrases[nextKey]) {
|
|
1516
|
+
changed = true
|
|
1517
|
+
break
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
if (changed) {
|
|
1522
|
+
metricsRef.current = { available: available, phrases: phrases, collapseWidth: collapseWidth, manageWidth: manageWidth }
|
|
1523
|
+
bumpWidth(function (value) { return value + 1 })
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
measure()
|
|
1527
|
+
var node = rowRef.current
|
|
1528
|
+
if (node === null || node === undefined) return undefined
|
|
1529
|
+
|
|
1530
|
+
var disposed = false
|
|
1531
|
+
var deferredId = null
|
|
1532
|
+
var hasRaf = typeof window.requestAnimationFrame === 'function'
|
|
1533
|
+
function later() {
|
|
1534
|
+
if (disposed) return
|
|
1535
|
+
deferredId = null
|
|
1536
|
+
measure()
|
|
1537
|
+
scheduleDeferred()
|
|
1538
|
+
}
|
|
1539
|
+
function scheduleDeferred() {
|
|
1540
|
+
if (disposed || deferredId !== null) return
|
|
1541
|
+
// Only retry while the width is still unusable; a real width means
|
|
1542
|
+
// the synchronous measure already did its job. Bound the chain so a
|
|
1543
|
+
// permanently hidden/zero-width row cannot spin rAF forever.
|
|
1544
|
+
var width = finitePx(node.clientWidth)
|
|
1545
|
+
if (width !== null && width > 0) return
|
|
1546
|
+
if (deferredCount >= 3) return
|
|
1547
|
+
deferredCount += 1
|
|
1548
|
+
deferredId = hasRaf
|
|
1549
|
+
? window.requestAnimationFrame(later)
|
|
1550
|
+
: window.setTimeout(later, 0)
|
|
1551
|
+
}
|
|
1552
|
+
var deferredCount = 0
|
|
1553
|
+
scheduleDeferred()
|
|
1554
|
+
|
|
1555
|
+
var observer = null
|
|
1556
|
+
if (typeof window.ResizeObserver === 'function') {
|
|
1557
|
+
observer = new window.ResizeObserver(measure)
|
|
1558
|
+
observer.observe(node)
|
|
1559
|
+
}
|
|
1560
|
+
return function () {
|
|
1561
|
+
disposed = true
|
|
1562
|
+
if (deferredId !== null) {
|
|
1563
|
+
if (hasRaf && typeof window.cancelAnimationFrame === 'function') window.cancelAnimationFrame(deferredId)
|
|
1564
|
+
else window.clearTimeout(deferredId)
|
|
1565
|
+
}
|
|
1566
|
+
if (observer !== null) observer.disconnect()
|
|
1567
|
+
}
|
|
1568
|
+
})
|
|
1569
|
+
|
|
1331
1570
|
if (current !== spec.value) return null
|
|
1332
1571
|
|
|
1333
1572
|
// A completely hidden row leaves nothing on screen — no chips, no pill,
|
|
@@ -1389,6 +1628,43 @@ window.__ModuleLoader__.load({
|
|
|
1389
1628
|
if (spec.compact) rowClass += ' dqp-dock-tool'
|
|
1390
1629
|
if (spec.inset) rowClass += ' dqp-dock-inset'
|
|
1391
1630
|
|
|
1631
|
+
// Available width comes from the real DOM measurement. The test probe is
|
|
1632
|
+
// only consulted when a test has explicitly enabled it, so a stale
|
|
1633
|
+
// global cannot change a production render in another session. Without
|
|
1634
|
+
// either measurement we render the full row — safe degradation.
|
|
1635
|
+
var probeActive = probeIsActive()
|
|
1636
|
+
var available = probeActive && widthFitProbe.available !== null
|
|
1637
|
+
? widthFitProbe.available
|
|
1638
|
+
: finitePx(metricsRef.current.available)
|
|
1639
|
+
// Probe widths are an array indexed by usable position (test contract);
|
|
1640
|
+
// the DOM cache is keyed by phrase.id so shedding cannot shift indices.
|
|
1641
|
+
var measured = probeActive ? widthFitProbe.phrases : null
|
|
1642
|
+
var phraseWidths = usable.map(function (phrase, index) {
|
|
1643
|
+
if (measured !== null && finitePx(measured[index]) !== null) return widthOf(measured[index])
|
|
1644
|
+
var fromDom = finitePx(metricsRef.current.phrases[phrase.id])
|
|
1645
|
+
if (fromDom !== null) return widthOf(fromDom)
|
|
1646
|
+
var caption = phraseCaption(phrase)
|
|
1647
|
+
var units = 0
|
|
1648
|
+
for (var ci = 0; ci < caption.length; ci += 1) {
|
|
1649
|
+
units += caption.charCodeAt(ci) > 255 ? 12 : 7
|
|
1650
|
+
}
|
|
1651
|
+
return Math.min(spec.compact ? 130 : 200, units + (spec.compact ? 22 : 26))
|
|
1652
|
+
})
|
|
1653
|
+
var collapseWidth = probeActive && widthFitProbe.collapseWidth !== null
|
|
1654
|
+
? widthFitProbe.collapseWidth
|
|
1655
|
+
: widthOf(metricsRef.current.collapseWidth) || 24
|
|
1656
|
+
var manageWidth = probeActive && widthFitProbe.manageWidth !== null
|
|
1657
|
+
? widthFitProbe.manageWidth
|
|
1658
|
+
: widthOf(metricsRef.current.manageWidth) || 24
|
|
1659
|
+
var plan = fitRowToWidth(available, {
|
|
1660
|
+
phraseWidths: phraseWidths,
|
|
1661
|
+
collapseWidth: collapseWidth,
|
|
1662
|
+
manageWidth: manageWidth,
|
|
1663
|
+
manage: manageEntry !== 'hidden',
|
|
1664
|
+
gap: CHIP_GAP,
|
|
1665
|
+
})
|
|
1666
|
+
var visiblePhrases = usable.slice(0, plan.phraseCount)
|
|
1667
|
+
|
|
1392
1668
|
var children = [h('style', { key: 'style' }, DOCK_CSS)]
|
|
1393
1669
|
if (folded) {
|
|
1394
1670
|
// One pill keeps the caret-insertion path reachable: opening it is a
|
|
@@ -1408,18 +1684,19 @@ window.__ModuleLoader__.load({
|
|
|
1408
1684
|
}, dockIcon('expand')),
|
|
1409
1685
|
))
|
|
1410
1686
|
} else {
|
|
1411
|
-
children.push(h('div', { key: 'row', className: rowClass },
|
|
1412
|
-
|
|
1687
|
+
children.push(h('div', { key: 'row', ref: rowRef, className: rowClass },
|
|
1688
|
+
visiblePhrases.map(function (phrase, index) {
|
|
1413
1689
|
return h('button', {
|
|
1414
1690
|
key: phrase.id + ':' + index,
|
|
1415
1691
|
type: 'button',
|
|
1416
1692
|
className: 'dqp-chip',
|
|
1693
|
+
'data-dqp-phrase-id': phrase.id,
|
|
1417
1694
|
title: phrase.text,
|
|
1418
1695
|
'aria-label': phraseCaption(phrase) + ' — ' + t('dock.tooltip'),
|
|
1419
1696
|
onClick: function () { activate(phrase) },
|
|
1420
1697
|
}, phraseCaption(phrase))
|
|
1421
1698
|
}),
|
|
1422
|
-
h('button', {
|
|
1699
|
+
plan.collapse ? h('button', {
|
|
1423
1700
|
key: 'collapse',
|
|
1424
1701
|
type: 'button',
|
|
1425
1702
|
className: 'dqp-chip dqp-chip-icon dqp-chip-collapse',
|
|
@@ -1430,15 +1707,15 @@ window.__ModuleLoader__.load({
|
|
|
1430
1707
|
setPeeked(false)
|
|
1431
1708
|
setCollapsed(true)
|
|
1432
1709
|
},
|
|
1433
|
-
}, dockIcon('collapse')),
|
|
1434
|
-
manageEntry
|
|
1710
|
+
}, dockIcon('collapse')) : null,
|
|
1711
|
+
plan.manage && manageEntry !== 'hidden' ? h('button', {
|
|
1435
1712
|
key: 'manage',
|
|
1436
1713
|
type: 'button',
|
|
1437
1714
|
className: 'dqp-chip dqp-chip-manage dqp-chip-icon' + (manageEntry === 'text' ? ' dqp-chip-manage-icon' : ''),
|
|
1438
1715
|
title: t('dock.manage'),
|
|
1439
1716
|
'aria-label': t('dock.manage'),
|
|
1440
1717
|
onClick: handleManage,
|
|
1441
|
-
}, dockIcon('manage')),
|
|
1718
|
+
}, dockIcon('manage')) : null,
|
|
1442
1719
|
))
|
|
1443
1720
|
}
|
|
1444
1721
|
if (showHint[0]) {
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -72,18 +72,30 @@ return {
|
|
|
72
72
|
|
|
73
73
|
短语条目里除了 `id` / `label` / `text` 还有一个 `hidden` 布尔值(`normalize()` 缺成 `false`)。短语行渲染前会滤掉 `hidden === true` 的条目,管理页则照常渲染并用 `dqp-row-muted` 变暗、加「已隐藏」徽标。
|
|
74
74
|
|
|
75
|
-
可见性判断也在 `DockChips` 里,顺序固定:先把 hook
|
|
75
|
+
可见性判断也在 `DockChips` 里,顺序固定:先把 hook 全部跑完(数量不随状态变化),再依次判断位置、彻底隐藏、折叠、宽度降级:
|
|
76
76
|
|
|
77
77
|
```
|
|
78
78
|
if (current !== spec.value) return null // 只有选中位置的那一行渲染
|
|
79
79
|
if (hidden) return null // 彻底隐藏:什么都不渲染,连胶囊都不留
|
|
80
80
|
hasDraft = draft.trim() !== '' || attachments > 0
|
|
81
81
|
folded = collapsed || (autoHide === 'fold' && hasDraft && !peeked)
|
|
82
|
+
plan = fitRowToWidth(available, {...}) // 只在未折叠时按可用宽度决定渲染哪些控件
|
|
82
83
|
```
|
|
83
84
|
|
|
84
85
|
`hidden` 优先于折叠:即使之前用「收起」写过 `collapsed='1'`,隐藏后也不会冒出胶囊。设置页下拉选「显示整排」时同时 `setHidden(false)` 与 `setCollapsed(false)`,直接回到整排;选「收成胶囊」写 `hidden='0'`、`collapsed='1'`;选「彻底隐藏」只写 `hidden='1'`。
|
|
85
86
|
|
|
86
|
-
|
|
87
|
+
### 宽度降级(按实际宽度逐级舍弃)
|
|
88
|
+
|
|
89
|
+
短语行不再靠固定 px 断点,而是测「实际可用宽度」后动态舍弃控件:
|
|
90
|
+
|
|
91
|
+
- `measure()` 读 `node.clientWidth` 并缓存每个胶囊的实测宽度(`metricsRef`),每次渲染同步测一遍;`ResizeObserver` 存在时再观察整行节点,容器无 React 更新地变化时补一次测量。没有 DOM 或拿不到宽度就渲染整排(安全降级)。
|
|
92
|
+
- **首帧兜底**:首帧常报 `clientWidth === 0`(真机 WebView 尤其常见),单靠 `ResizeObserver` 不保证补测。首次挂载时若宽度仍为 0,用 `requestAnimationFrame`(缺失时降级 `setTimeout(0)`)排有界延迟补测——只在宽度仍不可用时重试,最多 3 次;即使 `ResizeObserver` 不存在也会完成二次测量。只有测量值(available / 尾部宽度 / 短语宽度)真变化才更新 `metricsRef` 并 `bumpWidth` 触发重渲染,避免假变化抖动;组件卸载时置 `disposed` 并清掉待执行的 rAF / timeout 与 observer,防止跨会话残留。
|
|
93
|
+
- **按 `phrase.id` 缓存**:短语 chip 带 `data-dqp-phrase-id`,`metricsRef.current.phrases` 的键就是 `phrase.id`,读取时用 `metricsRef.current.phrases[phrase.id]`;被舍弃的短语保留其缓存宽度,否则丢一个后下一帧估算成 0px 会让行来回抖动。测量遍历子节点时按类名分流:`.dqp-chip-collapse` / `.dqp-chip-manage` 的宽度单独记到 `collapseWidth` / `manageWidth`,`.dqp-pill` 与非 `.dqp-chip` 子节点直接跳过,没有有效 `data-dqp-phrase-id` 的不写入短语缓存——避免按下标缓存时被折叠 pill 与空洞污染,导致同一宽度下舍弃结果漂移。
|
|
94
|
+
- 无 DOM 的纯函数 `fitRowToWidth(available, options)` 计算存活方案 `{ phraseCount, collapse, manage }`:先算当前总占用(各胶囊宽 + 间距),超宽时按固定优先级舍弃——**收起按钮(`.dqp-chip-collapse`)→ 管理按钮(`.dqp-chip-manage`)→ 短语从末尾往前逐个(`phraseCount--`)**;**第一条可用短语永不丢弃**,一条短语都没有时收起与管理仍可达。管理入口设为 `hidden` 时 `manage` 从一开始就是 `false`。
|
|
95
|
+
- 宽度来源:生产渲染只读真实 DOM 测量(`metricsRef.current.available` / 按 id 的短语缓存);测试探针仅在显式启用后才参与(见下文「测试」)。短语宽度依次取探针(启用时,按可用位置下标,属测试契约)→ DOM 缓存(按 `phrase.id`)→ 按标题字数估算(工具行封顶 130px,普通行 200px)。窗口变宽后同一套规则会把控件自动加回来。
|
|
96
|
+
- 窄屏自动舍弃是纯渲染层行为,不写任何 `localStorage` 键、不新增设置项;三态 full/pill/hidden、自动收起 / peek、单条隐藏、管理入口三态等既有行为不变。「收起」在窄屏不可见时,仍可通过草稿自动收起或设置页「短语行显示 = 收成胶囊」折叠整排,管理入口不可见时仍可从设置页进入。
|
|
97
|
+
|
|
98
|
+
管理入口在同一个 `DockChips` 里按 `manage.v1` 渲染:`text` 是原来的「管理」文字 chip,`icon` 是同样点击行为的齿轮 `svg`(`aria-label` 仍取 `dock.manage`),`hidden` 连按钮都不渲染。三种模式都不影响短语 chips、「收起」chip 和管理页本身;`hidden` 模式下宽度拟合的 `plan.manage` 恒为 `false`,不再为已隐藏的入口预留宽度。
|
|
87
99
|
|
|
88
100
|
`peeked` 是组件内部的临时状态:点胶囊时置 `true` 并同时展开(`setCollapsed(false)`),这样"临时看一眼"不会写进 `localStorage`,草稿清空后 `useEffect` 会把它清掉。手动收起(`setCollapsed(true)`)是持久状态,跨会话保留。
|
|
89
101
|
|
|
@@ -106,6 +118,10 @@ folded = collapsed || (autoHide === 'fold' && hasDraft && !peeked)
|
|
|
106
118
|
|
|
107
119
|
不要写死颜色,也不要用 `prefers-color-scheme` 判断主题——DSH 用 `data-ds-dark-theme` 切换,硬编码会两边都对不上。
|
|
108
120
|
|
|
121
|
+
短语行的宽度拟合相关样式:`DOCK_CSS` 里 `.dqp-dock` 用 `display:flex; flex-wrap:wrap; gap:6px; min-width:0`,`.dqp-chip` 是 `flex:0 0 auto` 并带 `max-width`(普通行 200px / 工具行 130px)——胶囊不收缩、超出就换行,实测宽度才稳定可缓存;`CHIP_GAP = 6` 与 CSS 的 `gap:6px` 保持一致,拟合计算才和实际占用对得上。工具行 `.dqp-dock-tool` 另有 `flex-wrap:nowrap; overflow-x:auto`,窄屏在滚动之上仍先按上述顺序舍弃控件。
|
|
122
|
+
|
|
123
|
+
设置 / 管理页(`MANAGER_CSS`)另有一套小屏排版优化, `@media (max-width:560px)` 段:选项标签与下拉同行(长标签自然换行)、每项说明完整保留在控件下方、所有按钮与图标触控目标 ≥36px、textarea 最小高度 52px、预览改为 `white-space:normal` 可换行不再省略号截断、区块标题与两个按钮平分一行、`.dqp-page` 页边距收紧到 `12px`,所有长文本加 `overflow-wrap:anywhere` 防溢出。**这套规则纯 CSS、只改排版,不删任何 DOM 元素、不改任何状态或功能。** 它与上面的短语行宽度降级是两套独立逻辑:`fitRowToWidth` 按实际宽度逐级舍弃控件(渲染层行为),而管理页小屏优化从不舍弃元素——二者不可混为一谈。
|
|
124
|
+
|
|
109
125
|
「输入框上方」的位置需要复制宿主 dock 的几何,否则会贴在会话栏左缘:
|
|
110
126
|
|
|
111
127
|
```css
|
|
@@ -120,7 +136,11 @@ margin: 0 auto;
|
|
|
120
136
|
|
|
121
137
|
与收起/隐藏相关的断言:点「收起」写入 `collapsed.v1='1'` 且只剩 `.dqp-pill`;点胶囊回到 `'0'` 并恢复六个 chip;草稿出现时默认折成胶囊、展开后点第二条仍插到光标处;`autohide` 切到 `keep` 后草稿不再折叠;`#dqp-rowmode` 默认 `full`、选 `pill` 写 `collapsed='1'` 且 dock 只剩一个 `.dqp-pill`、选 `hidden` 写 `hidden='1'` 且整排组件返回 `null`(连胶囊都没有)、hidden 时改选 `pill` 会清掉 `hidden` 并折回胶囊、再选 `full` 把两个键都写成 `'0'` 并恢复六个 chip;管理页在 hidden 时显示「整排已隐藏」徽标与恢复提示。`#dqp-manage` 默认 `text`(显示「管理」chip)、`icon` 渲染含 `svg` 且无文字、`aria-label` 仍是「管理」、`hidden` 时行尾没有管理 chip 但短语 chips 照常渲染,且三态分别持久化到 `manage.v1`。隐藏一条后短语行少一个 chip、管理页仍是四张卡片且第一张带 `dqp-row-muted`;字典还有一条 zh/en 键集合完全对称的断言。
|
|
122
138
|
|
|
123
|
-
`
|
|
139
|
+
与宽度降级相关的断言走测试探针 `window.__DQP_WIDTH_FIT__`(`fit` 纯函数 + `setAvailableWidth` / `setChipWidths` / `setTrailingWidths` 注入宽度 + `reset` 复位;沙箱没有 DOM / ResizeObserver,由探针代替真实测量):纯函数 `fit` 依次覆盖**四级**——够宽全部保留 → 稍窄先丢 `collapse` → 更窄丢 `manage` → 再窄短语从末尾往前逐个减少 → 极窄只剩 1 个短语且两个尾部控件都没了;另测 `manage:false` 入参恒不渲染管理、无短语时收起与管理仍可达。DOM 渲染段用探针固定每个胶囊宽度,按几个宽度档位(渲染名前缀 `wf-`)断言存活 chip 的数量与顺序,末尾 `reset()` 恢复真实测量。
|
|
140
|
+
|
|
141
|
+
探针状态收在 `factory` 闭包内、默认 `enabled = false`:生产渲染不看它,避免别的会话在全局 `window` 上留下的旧值污染本次渲染。三个 setter(`setAvailableWidth` / `setChipWidths` / `setTrailingWidths`)调用时自动置 `enabled = true`,测试无需额外调用;另有 `enable()` / `disable()` 显式开关,`reset()` 会同时置 `false` 并清空全部注入值。探针的短语宽度数组仍按可用位置下标(测试契约),与生产缓存按 `phrase.id` 索引互不干扰。
|
|
142
|
+
|
|
143
|
+
`test/preview.mjs` 把组件渲染成静态 HTML,拼上宿主主题 CSS,可用无头 Chromium 截图,用来肉眼核对深浅两套主题;它还会渲染「整排完全隐藏」的管理页状态和三态短语行 / 三态管理入口的状态页(`/tmp/dqp-modes-*.html`),并断言隐藏时短语行序列化出来是空字符串;另有一组「窄屏宽度降级」预览(宽 / 中 / 窄 / 极窄四档),便于肉眼核对舍弃顺序。`docs/images/` 下的图就是它产出的**界面示意图**(图内带「界面示意图」标题),不是真机截屏。
|
|
124
144
|
|
|
125
145
|
## 兼容性注意
|
|
126
146
|
|
package/docs/DETAIL.de.md
CHANGED
|
@@ -40,12 +40,26 @@ Der Dropdown **Phrasenzeile anzeigen** in den Einstellungen fasst die dauerhafte
|
|
|
40
40
|
|
|
41
41
|
Die Schaltfläche `收起 ▾` am Zeilenende entspricht der Wahl von „Zur Pille einklappen". Dieser Dropdown speichert keinen eigenen Zustand: Sein Wert wird aus `dsh.quick-phrases.hidden.v1` (hat Vorrang) und `dsh.quick-phrases.collapsed.v1` abgeleitet; beim Umschalten werden diese beiden vorhandenen Schlüssel gemeinsam geschrieben.
|
|
42
42
|
|
|
43
|
+
### Automatisches Ausblenden auf schmalen Bildschirmen
|
|
44
|
+
|
|
45
|
+
Wird das Fenster schmaler, gibt die Zeile ihre Elemente **nacheinander entsprechend der tatsächlich verfügbaren Breite** auf — ohne Einstellung und ohne festen Pixel-Schwellenwert (die Berechnung nutzt die gemessene Breite, sodass kurze und lange Beschriftungen gleichermaßen korrekt abgestuft werden):
|
|
46
|
+
|
|
47
|
+
1. zuerst die Schaltfläche **收起** (am wenigsten wichtig);
|
|
48
|
+
2. dann der Zugang **Verwalten**;
|
|
49
|
+
3. dann die Phrasen **von der letzten nach vorn**, die vorderen bleiben am längsten.
|
|
50
|
+
|
|
51
|
+
Bei extrem geringer Breite **bleibt nur die erste verwendbare Phrase**; die Zeile wird nie leer, und ohne Phrasen bleiben Einklappen- und Verwalten-Zugang erreichbar. Beim Verbreitern des Fensters kommen die Elemente nach denselben Regeln zurück.
|
|
52
|
+
|
|
53
|
+
Auch wenn die Einklappen-Schaltfläche auf schmalen Bildschirmen entfällt, lässt sich die Zeile weiter einklappen: ein Entwurf faltet sie mit „Automatisch einklappen" zur Pille, oder Sie wählen „Zur Pille einklappen" im Dropdown „Phrasenzeile anzeigen". Entfällt der Verwalten-Zugang, öffnet **Einstellungen → Schnellphrasen** weiterhin den Verwaltungsbereich. Die drei Zustände, das automatische Einklappen und das Verbergen einzelner Phrasen bleiben unverändert.
|
|
54
|
+
|
|
43
55
|
Eine einzelne Phrase lässt sich im Verwaltungsbereich über den **Augen**-Schalter auf ihrer Karte verbergen: Danach erscheint ihre Schaltfläche nicht mehr in der Zeile, die Karte bleibt im Verwaltungsbereich und ist mit „已隐藏" markiert; ein weiterer Klick stellt sie wieder sichtbar.
|
|
44
56
|
|
|
45
57
|
## Phrasen verwalten
|
|
46
58
|
|
|
47
59
|
Öffne **Einstellungen → Schnellphrasen**. Die Seite hat zwei Ebenen: oben fünf Verhaltensoptionen, unten die Phrasenliste.
|
|
48
60
|
|
|
61
|
+
> **Optimierung für kleine Bildschirme**: Auf schmalen Bildschirmen (≤560px) wird im Verwalter nur das Layout angepasst — Beschriftung und Dropdown stehen in einer Zeile, Erklärungen bleiben vollständig, Touch-Ziele werden größer, Abschnittsbuttons teilen sich eine Zeile, Ränder werden enger und langer Text umbricht an beliebiger Stelle; **es wird kein Element entfernt und keine Funktion geändert** (ein anderer Mechanismus als das breitenbasierte Ausblenden der Zeile, siehe oben).
|
|
62
|
+
|
|
49
63
|
**Verhaltensoptionen** (gelten sofort nach Auswahl, kein Neustart nötig). Werte, Standardwert und Wirkung der fünf Optionen:
|
|
50
64
|
|
|
51
65
|
| Option | Werte | Standardwert | Wirkung |
|
package/docs/DETAIL.en.md
CHANGED
|
@@ -40,12 +40,26 @@ The **Phrase row** dropdown in Settings turns the resting shape into a three-way
|
|
|
40
40
|
|
|
41
41
|
The `收起 ▾` chip is equivalent to picking "Fold into a pill". This dropdown stores no state of its own: its value is derived from `dsh.quick-phrases.hidden.v1` (which wins) and `dsh.quick-phrases.collapsed.v1`, and switching composes writes to those two existing keys.
|
|
42
42
|
|
|
43
|
+
### Automatic shedding on narrow screens
|
|
44
|
+
|
|
45
|
+
When the window or container gets narrow, the row sheds its controls **one by one by actual available width** — no setting to touch, and no fixed pixel breakpoint (the fit is computed from the real width, so short and long captions both degrade correctly):
|
|
46
|
+
|
|
47
|
+
1. The **Fold** chip at the end goes first (least important);
|
|
48
|
+
2. then the **Manage** entry;
|
|
49
|
+
3. then phrase chips are dropped **from the end backwards** — earlier phrases stay longest.
|
|
50
|
+
|
|
51
|
+
At extreme narrowness **only the first usable phrase remains**; the row never empties, and with no phrases at all the fold and manage entries stay reachable. Widen the window and the controls come back under the same rules.
|
|
52
|
+
|
|
53
|
+
Even when the Fold chip is shed on a narrow screen, the row can still be folded: a draft folds it into a pill under the default "Fold automatically", or you can pick "Fold into a pill" from the "Phrase row" dropdown in Settings. When the Manage entry is shed, Settings → Quick phrases still opens the manager. The three-way dropdown, automatic folding and single-phrase hiding are all unchanged.
|
|
54
|
+
|
|
43
55
|
A single phrase can be hidden with the **eye** toggle on its card in the manager: the chip disappears from the row while the card stays in the manager marked "Hidden"; click again to bring it back.
|
|
44
56
|
|
|
45
57
|
## Managing phrases
|
|
46
58
|
|
|
47
59
|
Open **Settings → Quick phrases**. The page has two layers: five behaviour options on top, the phrase list below.
|
|
48
60
|
|
|
61
|
+
> **Small-screen design polish**: on narrow screens (≤560px) the manager only refines layout — labels sit beside their dropdowns, explanations stay complete, touch targets grow, section buttons share a row, margins tighten and long text wraps anywhere; **no element is removed and no behaviour changes** (a different mechanism from the row's width-based shedding above).
|
|
62
|
+
|
|
49
63
|
**Behaviour options** (applied on selection, no restart needed). Each option's values, default and effect:
|
|
50
64
|
|
|
51
65
|
| Option | Values | Default | Effect |
|
package/docs/DETAIL.es.md
CHANGED
|
@@ -40,12 +40,26 @@ El desplegable **Mostrar fila de frases** de los ajustes unifica la forma habitu
|
|
|
40
40
|
|
|
41
41
|
El botón `收起 ▾` del final equivale a elegir «Plegar en una píldora». Este desplegable no guarda un estado propio: su valor se deriva de `dsh.quick-phrases.hidden.v1` (que tiene prioridad) y `dsh.quick-phrases.collapsed.v1`, y al cambiarlo se escriben ambas claves existentes.
|
|
42
42
|
|
|
43
|
+
### Descarte automático en pantallas estrechas
|
|
44
|
+
|
|
45
|
+
Al estrecharse la ventana, la fila descarta sus controles **uno por uno según el ancho real disponible**, sin ajustes y sin un punto fijo en píxeles (el cálculo usa el ancho medido, así que funciona igual con nombres cortos y largos):
|
|
46
|
+
|
|
47
|
+
1. primero el botón **收起** (el menos importante);
|
|
48
|
+
2. después el acceso **Gestionar**;
|
|
49
|
+
3. y luego las frases **de la última hacia atrás**, conservando las primeras.
|
|
50
|
+
|
|
51
|
+
En una extensión extrema **solo queda la primera frase útil**, la fila nunca se vacía y, si no hay frases, los accesos de plegar y gestionar siguen disponibles. Al ensanchar la ventana, los controles vuelven según las mismas reglas.
|
|
52
|
+
|
|
53
|
+
Aunque el botón de plegar desaparezca en pantallas estrechas, la fila aún se puede plegar: un borrador la reduce a la píldora con «Plegar automáticamente», o puedes elegir «Plegar en una píldora» en el desplegable «Mostrar fila de frases». Si el acceso de gestión desaparece, **Ajustes → Frases rápidas** sigue abriendo el administrador. Los tres estados, el plegado automático y la ocultación de frases no cambian.
|
|
54
|
+
|
|
43
55
|
Una frase concreta se puede ocultar con el interruptor del **ojo** en su tarjeta del administrador: al ocultarla, su botón deja de aparecer en la fila, pero la tarjeta sigue en el administrador marcada como «已隐藏»; vuelve a hacer clic para mostrarla de nuevo.
|
|
44
56
|
|
|
45
57
|
## Gestionar frases
|
|
46
58
|
|
|
47
59
|
Abre **Ajustes → Frases rápidas**. La página tiene dos partes: arriba, cinco ajustes de comportamiento; abajo, la lista de frases.
|
|
48
60
|
|
|
61
|
+
> **Mejora de diseño en pantallas estrechas**: en pantallas estrechas (≤560px) el administrador solo ajusta el diseño: la etiqueta va junto al desplegable, las explicaciones se conservan completas, los objetivos táctiles crecen, los botones de sección comparten fila, los márgenes se reducen y el texto largo se ajusta en cualquier punto; **no se elimina ningún elemento ni cambia la función** (mecanismo distinto del descarte por anchura de la fila, descrito más arriba).
|
|
62
|
+
|
|
49
63
|
**Ajustes de comportamiento** (se aplican al seleccionarlos, sin reiniciar). Valores, valor predeterminado y efecto de los cinco:
|
|
50
64
|
|
|
51
65
|
| Opción | Valores | Valor predeterminado | Efecto |
|
package/docs/DETAIL.fr.md
CHANGED
|
@@ -40,12 +40,26 @@ Le menu déroulant **Affichage de la rangée** des paramètres réduit la forme
|
|
|
40
40
|
|
|
41
41
|
Le bouton `收起 ▾` à la fin équivaut à choisir «Replier en pastille». Ce menu déroulant ne stocke aucun état propre : sa valeur est dérivée de `dsh.quick-phrases.hidden.v1` (prioritaire) et de `dsh.quick-phrases.collapsed.v1` ; le changement écrit ces deux clés existantes.
|
|
42
42
|
|
|
43
|
+
### Suppression automatique sur écran étroit
|
|
44
|
+
|
|
45
|
+
Quand la fenêtre se rétrécit, la rangée supprime ses contrôles **les uns après les autres selon la largeur réellement disponible**, sans réglage et sans seuil fixe en pixels (le calcul utilise la largeur mesurée : les libellés courts comme longs se dégradent correctement) :
|
|
46
|
+
|
|
47
|
+
1. d'abord le bouton **收起** (le moins important) ;
|
|
48
|
+
2. puis l'accès **Gérer** ;
|
|
49
|
+
3. puis les phrases **de la dernière vers le début**, en gardant les premières.
|
|
50
|
+
|
|
51
|
+
À largeur extrême **seule la première phrase utilisable reste** ; la rangée ne se vide jamais et, sans aucune phrase, les accès Replier et Gérer restent disponibles. Élargir la fenêtre ramène les contrôles selon les mêmes règles.
|
|
52
|
+
|
|
53
|
+
Même si le bouton Replier disparaît sur écran étroit, la rangée peut toujours être repliée : un brouillon la réduit en pastille avec «Replier automatiquement», ou vous pouvez choisir «Replier en pastille» dans le menu «Affichage de la rangée». Si l'accès Gérer disparaît, **Paramètres → Phrases rapides** ouvre toujours le gestionnaire. Les trois états, le repli automatique et le masquage d'une phrase restent inchangés.
|
|
54
|
+
|
|
43
55
|
Une phrase précise peut être masquée avec l'interrupteur **œil** sur sa carte dans le gestionnaire : son bouton disparaît de la rangée, mais la carte reste dans le gestionnaire marquée «已隐藏» ; recliquez pour la réafficher.
|
|
44
56
|
|
|
45
57
|
## Gérer les phrases
|
|
46
58
|
|
|
47
59
|
Ouvrez **Paramètres → Phrases rapides**. La page comporte deux parties : cinq paramètres de comportement en haut, la liste des phrases en bas.
|
|
48
60
|
|
|
61
|
+
> **Ajustement de conception pour petits écrans** : sur les écrans étroits (≤560px), le gestionnaire ne modifie que la mise en page — l'étiquette accompagne son menu déroulant, les explications restent complètes, les cibles tactiles s'agrandissent, les boutons de section partagent une ligne, les marges se resserrent et le long texte passe à la ligne n'importe où ; **aucun élément n'est supprimé et aucune fonction ne change** (mécanisme distinct de la suppression selon la largeur de la rangée, décrite plus haut).
|
|
62
|
+
|
|
49
63
|
**Paramètres de comportement** (appliqués dès la sélection, sans redémarrage). Valeurs, valeur par défaut et effet des cinq paramètres :
|
|
50
64
|
|
|
51
65
|
| Paramètre | Valeurs | Valeur par défaut | Effet |
|
package/docs/DETAIL.md
CHANGED
|
@@ -40,12 +40,26 @@
|
|
|
40
40
|
|
|
41
41
|
行尾「收起 ▾」等价于选「收成胶囊」。这个三态下拉不另存状态键:它由 `dsh.quick-phrases.hidden.v1`(优先)与 `dsh.quick-phrases.collapsed.v1` 推出,切换时组合写这两个既有键。
|
|
42
42
|
|
|
43
|
+
### 窄屏自动舍弃
|
|
44
|
+
|
|
45
|
+
窗口或容器变窄时,短语行会按**实际可用宽度**自动依次舍弃控件,不需要任何设置,也不是固定像素断点(按真实宽度计算,长短名称都能正确降级):
|
|
46
|
+
|
|
47
|
+
1. 先丢行尾的 **收起**(最不重要);
|
|
48
|
+
2. 再丢 **管理**入口;
|
|
49
|
+
3. 再从末尾往前逐个丢**短语胶囊**,靠前的短语优先留下。
|
|
50
|
+
|
|
51
|
+
极窄时**只保留第一条可用短语**,不会丢光;一条短语都没有时收起与管理入口仍然可达。窗口变宽后,控件按同样的规则自动回来。
|
|
52
|
+
|
|
53
|
+
「收起」在窄屏被舍弃后仍可折叠整排:输入框有草稿时按默认的「自动收起」缩成胶囊,或在设置里把「短语行显示」选成「收成胶囊」。管理入口在窄屏不可见时,仍可从 **设置 → 快捷短语** 进入管理页。三态下拉、自动收起、单条隐藏等既有行为都不变。
|
|
54
|
+
|
|
43
55
|
单条短语可以在管理页用每张卡片右上角的**眼睛**开关隐藏:隐藏后这条按钮不再出现在短语行,卡片仍留在管理页并标注「已隐藏」,再点一次恢复显示。
|
|
44
56
|
|
|
45
57
|
## 管理短语
|
|
46
58
|
|
|
47
59
|
打开 **设置 → 快捷短语**。页面分两层:上面是五项行为设置,下面是短语列表。
|
|
48
60
|
|
|
61
|
+
> **小屏设计优化**:管理页在窄屏(≤560px)只调整排版——标签与下拉同行、说明完整保留、触控目标放大、区块按钮平分一行、页边距收紧、长文本任意处换行;**不删任何元素、不改功能**(与上文短语行的「按宽度舍弃」是两套不同的逻辑)。
|
|
62
|
+
|
|
49
63
|
**行为设置**(选中即生效,无需重启)。五项的可选值、默认值与作用如下:
|
|
50
64
|
|
|
51
65
|
| 配置项 | 可选值 | 默认值 | 作用 |
|
package/docs/DETAIL.pt.md
CHANGED
|
@@ -40,12 +40,26 @@ O menu suspenso **Exibição da linha de frases** nas configurações resume a f
|
|
|
40
40
|
|
|
41
41
|
O botão `收起 ▾` no fim da linha equivale a escolher «Recolher em pílula». Esse menu não armazena estado próprio: seu valor é derivado de `dsh.quick-phrases.hidden.v1` (que tem prioridade) e `dsh.quick-phrases.collapsed.v1`, e a troca grava ambas as chaves existentes.
|
|
42
42
|
|
|
43
|
+
### Descarte automático em telas estreitas
|
|
44
|
+
|
|
45
|
+
Ao estreitar a janela, a linha descarta seus controles **um por um conforme a largura realmente disponível**, sem configuração e sem um limite fixo em pixels (o cálculo usa a largura medida, então rótulos curtos e longos degradam corretamente):
|
|
46
|
+
|
|
47
|
+
1. primeiro o botão **收起** (o menos importante);
|
|
48
|
+
2. depois o acesso **Gerenciar**;
|
|
49
|
+
3. depois as frases **da última para trás**, mantendo as primeiras.
|
|
50
|
+
|
|
51
|
+
Em largura extrema **apenas a primeira frase utilizável permanece** — a linha nunca fica vazia e, se não houver frases, os acessos recolher e gerenciar continuam disponíveis. Ao alargar a janela, os controles voltam pelas mesmas regras.
|
|
52
|
+
|
|
53
|
+
Mesmo que o botão recolher desapareça em telas estreitas, a linha ainda pode ser recolhida: um rascunho a reduz à pílula com «Recolher automaticamente», ou você escolhe «Recolher em pílula» no menu «Exibição da linha de frases». Se o acesso de gerenciamento desaparecer, **Configurações → Frases rápidas** continua abrindo o gerenciador. Os três estados, o recolhimento automático e a ocultação de frases não mudam.
|
|
54
|
+
|
|
43
55
|
Uma frase específica pode ser ocultada pelo interruptor de **olho** em seu cartão no gerenciador: o botão desaparece da linha, mas o cartão permanece no gerenciador marcado como «已隐藏»; clique novamente para restaurá-la.
|
|
44
56
|
|
|
45
57
|
## Gerenciar frases
|
|
46
58
|
|
|
47
59
|
Abra **Configurações → Frases rápidas**. A página tem duas partes: cinco configurações de comportamento em cima, a lista de frases embaixo.
|
|
48
60
|
|
|
61
|
+
> **Ajuste de design para telas pequenas**: em telas estreitas (≤560px) o gerenciador apenas refina o layout — o rótulo fica ao lado do menu suspenso, as explicações permanecem completas, os alvos de toque crescem, os botões da seção dividem uma linha, as margens são reduzidas e o texto longo quebra em qualquer ponto; **nenhum elemento é removido e nenhuma funcionalidade muda** (mecanismo diferente do descarte por largura da fila, descrito acima).
|
|
62
|
+
|
|
49
63
|
**Configurações de comportamento** (aplicadas ao selecionar, sem reiniciar). Valores, valor padrão e efeito das cinco:
|
|
50
64
|
|
|
51
65
|
| Opção | Valores | Padrão | Efeito |
|
package/docs/DETAIL.ru.md
CHANGED
|
@@ -40,12 +40,26 @@
|
|
|
40
40
|
|
|
41
41
|
Кнопка `收起 ▾` в конце ряда эквивалентна выбору «Свернуть в пилюлю». Этот список не хранит собственное состояние: его значение выводится из `dsh.quick-phrases.hidden.v1` (имеет приоритет) и `dsh.quick-phrases.collapsed.v1`, а при переключении оба этих существующих ключа записываются вместе.
|
|
42
42
|
|
|
43
|
+
### Автоматическое удаление элементов на узком экране
|
|
44
|
+
|
|
45
|
+
Когда окно сужается, ряд **по очереди убирает свои элементы по фактически доступной ширине** — без настроек и без фиксированного порога в пикселях (расчёт использует измеренную ширину, поэтому короткие и длинные подписи понижаются одинаково корректно):
|
|
46
|
+
|
|
47
|
+
1. сначала кнопка **收起** (самая неважная);
|
|
48
|
+
2. затем доступ **Управление**;
|
|
49
|
+
3. затем фразы **с последней назад**, при этом первые остаются дольше всего.
|
|
50
|
+
|
|
51
|
+
При крайней узости **остаётся только первая пригодная фраза** — ряд никогда не становится пустым, а если фраз нет, доступы свернуть и управлять всё равно доступны. При расширении окна элементы возвращаются по тем же правилам.
|
|
52
|
+
|
|
53
|
+
Даже если на узком экране кнопка свернуть исчезла, ряд всё равно можно свернуть: черновик сворачивает его в пилюлю при «Сворачивать автоматически», либо выберите «Свернуть в пилюлю» в списке «Отображение ряда фраз». Если исчез доступ к управлению, **Настройки → Быстрые фразы** по-прежнему открывают менеджер. Три состояния, автосворачивание и скрытие отдельных фраз не меняются.
|
|
54
|
+
|
|
43
55
|
Отдельную фразу можно скрыть переключателем **глаза** на её карточке в менеджере: после скрытия её кнопка исчезает из ряда, но карточка остаётся в менеджере с пометкой «已隐藏»; повторный нажатие возвращает её.
|
|
44
56
|
|
|
45
57
|
## Управление фразами
|
|
46
58
|
|
|
47
59
|
Откройте **Настройки → Быстрые фразы**. Страница состоит из двух частей: сверху пять параметров поведения, снизу список фраз.
|
|
48
60
|
|
|
61
|
+
> **Оптимизация для узких экранов**: на узких экранах (≤560px) в менеджере меняется только вёрстка — подпись и выпадающий список находятся в одной строке, пояснения сохраняются полностью, элементы управления для касания увеличиваются, кнопки раздела делят одну строку, поля сужаются, длинный текст переносится в любом месте; **ни один элемент не удаляется и функциональность не меняется** (это другой механизм, не зависящее от ширины скрытие элементов строки, описанное выше).
|
|
62
|
+
|
|
49
63
|
**Параметры поведения** (применяются сразу при выборе, без перезапуска). Значения, значение по умолчанию и действие каждого из пяти:
|
|
50
64
|
|
|
51
65
|
| Параметр | Значения | По умолчанию | Действие |
|
package/locale/de.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Schnellphrasen",
|
|
4
|
-
"description": "Eine Reihe von Schnellphrasen-Schaltflächen neben dem Eingabefeld; Beschriftung und gesendeter Text jeder Schaltfläche werden getrennt bearbeitet. Unter „Einstellungen → Schnellphrasen“ lassen sich fünf Optionen umschalten: Position (unter dem Eingabefeld / über dem Eingabefeld / rechts in der Werkzeugleiste, Standard: unter dem Eingabefeld), Beim Klick auf eine Phrase (sofort senden / in das Eingabefeld einfügen, Standard: sofort senden), Phrasenreihe (ganze Reihe anzeigen / zu einer Pille einklappen / vollständig ausblenden, Standard: ganze Reihe anzeigen), Verwaltungszugang (Textschaltfläche / Zahnrad-Symbol / ausgeblendet, Standard: Textschaltfläche) und Wenn das Eingabefeld Inhalt hat (automatisch einklappen / sichtbar lassen, Standard: automatisch einklappen).",
|
|
4
|
+
"description": "Eine Reihe von Schnellphrasen-Schaltflächen neben dem Eingabefeld; Beschriftung und gesendeter Text jeder Schaltfläche werden getrennt bearbeitet. Unter „Einstellungen → Schnellphrasen“ lassen sich fünf Optionen umschalten: Position (unter dem Eingabefeld / über dem Eingabefeld / rechts in der Werkzeugleiste, Standard: unter dem Eingabefeld), Beim Klick auf eine Phrase (sofort senden / in das Eingabefeld einfügen, Standard: sofort senden), Phrasenreihe (ganze Reihe anzeigen / zu einer Pille einklappen / vollständig ausblenden, Standard: ganze Reihe anzeigen), Verwaltungszugang (Textschaltfläche / Zahnrad-Symbol / ausgeblendet, Standard: Textschaltfläche) und Wenn das Eingabefeld Inhalt hat (automatisch einklappen / sichtbar lassen, Standard: automatisch einklappen). Unterstützt DSH ^0.2.2-rc.3 (ab 0.2.2-rc.3, vor 0.3.0); Kategorie: UI Enhancements (Oberflächenverbesserungen).",
|
|
5
5
|
"detail": "docs/DETAIL.de.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/locale/en.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Quick phrases",
|
|
4
|
-
"description": "A row of phrase chips next to the composer; each chip's caption and sent text are edited separately. Under Settings → Quick phrases, five options are available: Position (below the composer / above the composer / composer tool row, default below), On click (send right away / fill the composer, default send right away), Phrase row (show the full row / fold into a pill / hide completely, default show the full row), Manage button (text button / gear icon / hidden, default text button), and When the composer has text (fold automatically / keep it visible, default fold automatically).",
|
|
4
|
+
"description": "A row of phrase chips next to the composer; each chip's caption and sent text are edited separately. Under Settings → Quick phrases, five options are available: Position (below the composer / above the composer / composer tool row, default below), On click (send right away / fill the composer, default send right away), Phrase row (show the full row / fold into a pill / hide completely, default show the full row), Manage button (text button / gear icon / hidden, default text button), and When the composer has text (fold automatically / keep it visible, default fold automatically). Supports DSH ^0.2.2-rc.3 (from 0.2.2-rc.3 up to, but not including, 0.3.0); category: UI Enhancements.",
|
|
5
5
|
"detail": "docs/DETAIL.en.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/locale/es.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Frases rápidas",
|
|
4
|
-
"description": "Una fila de botones de frases rápidas junto al campo de entrada; el texto del botón y el contenido que se envía se editan por separado. En «Ajustes → Frases rápidas» se pueden cambiar cinco opciones: Posición (debajo del campo de entrada / encima del campo de entrada / a la derecha de la barra de herramientas, por defecto debajo del campo de entrada), Al pulsar una frase (enviar de inmediato / rellenar el campo de entrada, por defecto enviar de inmediato), Fila de frases (mostrar la fila completa / plegarla en una pastilla / ocultarla por completo, por defecto mostrar la fila completa), Botón de gestión (botón de texto / icono de engranaje / oculto, por defecto botón de texto) y Cuando el campo de entrada tiene contenido (plegar automáticamente / mantener visible, por defecto plegar automáticamente).",
|
|
4
|
+
"description": "Una fila de botones de frases rápidas junto al campo de entrada; el texto del botón y el contenido que se envía se editan por separado. En «Ajustes → Frases rápidas» se pueden cambiar cinco opciones: Posición (debajo del campo de entrada / encima del campo de entrada / a la derecha de la barra de herramientas, por defecto debajo del campo de entrada), Al pulsar una frase (enviar de inmediato / rellenar el campo de entrada, por defecto enviar de inmediato), Fila de frases (mostrar la fila completa / plegarla en una pastilla / ocultarla por completo, por defecto mostrar la fila completa), Botón de gestión (botón de texto / icono de engranaje / oculto, por defecto botón de texto) y Cuando el campo de entrada tiene contenido (plegar automáticamente / mantener visible, por defecto plegar automáticamente). Admite DSH ^0.2.2-rc.3 (desde 0.2.2-rc.3 hasta antes de 0.3.0); categoría: UI Enhancements (mejoras de interfaz).",
|
|
5
5
|
"detail": "docs/DETAIL.es.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/locale/fr.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Phrases rapides",
|
|
4
|
-
"description": "Une rangée de boutons de phrases rapides à côté du champ de saisie ; le libellé du bouton et le texte envoyé sont modifiés séparément. Dans « Paramètres → Phrases rapides », cinq options sont disponibles : Position (sous le champ de saisie / au-dessus du champ de saisie / à droite de la barre d'outils, par défaut sous le champ de saisie), Au clic sur une phrase (envoyer immédiatement / insérer dans le champ de saisie, par défaut envoyer immédiatement), Affichage de la rangée (afficher toute la rangée / replier en pastille / masquer complètement, par défaut afficher toute la rangée), Bouton de gestion (bouton texte / icône d'engrenage / masqué, par défaut bouton texte) et Quand le champ de saisie contient du texte (replier automatiquement / garder visible, par défaut replier automatiquement).",
|
|
4
|
+
"description": "Une rangée de boutons de phrases rapides à côté du champ de saisie ; le libellé du bouton et le texte envoyé sont modifiés séparément. Dans « Paramètres → Phrases rapides », cinq options sont disponibles : Position (sous le champ de saisie / au-dessus du champ de saisie / à droite de la barre d'outils, par défaut sous le champ de saisie), Au clic sur une phrase (envoyer immédiatement / insérer dans le champ de saisie, par défaut envoyer immédiatement), Affichage de la rangée (afficher toute la rangée / replier en pastille / masquer complètement, par défaut afficher toute la rangée), Bouton de gestion (bouton texte / icône d'engrenage / masqué, par défaut bouton texte) et Quand le champ de saisie contient du texte (replier automatiquement / garder visible, par défaut replier automatiquement). Prend en charge DSH ^0.2.2-rc.3 (depuis 0.2.2-rc.3 et avant 0.3.0) ; catégorie : UI Enhancements (améliorations de l’interface).",
|
|
5
5
|
"detail": "docs/DETAIL.fr.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/locale/pt.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Frases rápidas",
|
|
4
|
-
"description": "Uma linha de botões de frases rápidas ao lado do campo de entrada; a legenda do botão e o texto enviado são editados separadamente. Em «Configurações → Frases rápidas», cinco opções podem ser alternadas: Posição (abaixo do campo de entrada / acima do campo de entrada / à direita da barra de ferramentas, por padrão abaixo do campo de entrada), Ao clicar na frase (enviar imediatamente / preencher o campo de entrada, por padrão enviar imediatamente), Linha de frases (mostrar a linha inteira / recolher em uma pílula / ocultar completamente, por padrão mostrar a linha inteira), Entrada de gerenciamento (botão de texto / ícone de engrenagem / oculto, por padrão botão de texto) e Quando o campo de entrada tem conteúdo (recolher automaticamente / manter visível, por padrão recolher automaticamente).",
|
|
4
|
+
"description": "Uma linha de botões de frases rápidas ao lado do campo de entrada; a legenda do botão e o texto enviado são editados separadamente. Em «Configurações → Frases rápidas», cinco opções podem ser alternadas: Posição (abaixo do campo de entrada / acima do campo de entrada / à direita da barra de ferramentas, por padrão abaixo do campo de entrada), Ao clicar na frase (enviar imediatamente / preencher o campo de entrada, por padrão enviar imediatamente), Linha de frases (mostrar a linha inteira / recolher em uma pílula / ocultar completamente, por padrão mostrar a linha inteira), Entrada de gerenciamento (botão de texto / ícone de engrenagem / oculto, por padrão botão de texto) e Quando o campo de entrada tem conteúdo (recolher automaticamente / manter visível, por padrão recolher automaticamente). Suporta DSH ^0.2.2-rc.3 (a partir de 0.2.2-rc.3 e antes de 0.3.0); categoria: UI Enhancements (melhorias de interface).",
|
|
5
5
|
"detail": "docs/DETAIL.pt.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/locale/ru.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Быстрые фразы",
|
|
4
|
-
"description": "Ряд кнопок быстрых фраз рядом с полем ввода; надпись кнопки и отправляемый текст редактируются отдельно. В разделе «Настройки → Быстрые фразы» можно переключить пять параметров: Положение (под полем ввода / над полем ввода / справа в строке инструментов, по умолчанию под полем ввода), При нажатии на фразу (отправить сразу / вставить в поле ввода, по умолчанию отправить сразу), Отображение строки фраз (показывать всю строку / свернуть в пилюлю / полностью скрыть, по умолчанию показывать всю строку), Вход в управление (текстовая кнопка / значок шестерни / скрыть, по умолчанию текстовая кнопка) и Когда в поле ввода есть текст (сворачивать автоматически / оставлять видимой, по умолчанию сворачивать автоматически).",
|
|
4
|
+
"description": "Ряд кнопок быстрых фраз рядом с полем ввода; надпись кнопки и отправляемый текст редактируются отдельно. В разделе «Настройки → Быстрые фразы» можно переключить пять параметров: Положение (под полем ввода / над полем ввода / справа в строке инструментов, по умолчанию под полем ввода), При нажатии на фразу (отправить сразу / вставить в поле ввода, по умолчанию отправить сразу), Отображение строки фраз (показывать всю строку / свернуть в пилюлю / полностью скрыть, по умолчанию показывать всю строку), Вход в управление (текстовая кнопка / значок шестерни / скрыть, по умолчанию текстовая кнопка) и Когда в поле ввода есть текст (сворачивать автоматически / оставлять видимой, по умолчанию сворачивать автоматически). Поддерживает DSH ^0.2.2-rc.3 (начиная с 0.2.2-rc.3 и до 0.3.0); категория: UI Enhancements (улучшения интерфейса).",
|
|
5
5
|
"detail": "docs/DETAIL.ru.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/locale/zh.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "快捷短语",
|
|
4
|
-
"description": "在会话输入框旁放一排快捷短语按钮,按钮文字与发送内容分开编辑。在「设置 →
|
|
4
|
+
"description": "在会话输入框旁放一排快捷短语按钮,按钮文字与发送内容分开编辑。在「设置 → 快捷短语」可切换五项行为:显示位置(输入框下方/输入框上方/工具行右侧,默认输入框下方)、点按短语时(直接发送/填入输入框,默认直接发送)、短语行显示(显示整排/收成胶囊/彻底隐藏,默认显示整排)、管理入口(文字按钮/齿轮图标/隐藏入口,默认文字按钮)、输入框有内容时(自动收起/保持显示,默认自动收起)。支持 DSH ^0.2.2-rc.3(0.2.2-rc.3 起、0.3.0 之前),分类:界面增强。",
|
|
5
5
|
"detail": "docs/DETAIL.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/package.json
CHANGED