dsh-quick-phrases 0.5.0 → 0.6.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 CHANGED
@@ -18,8 +18,8 @@
18
18
  - **一排短语按钮**:显示名称与发送内容分离,默认四条:继续 / 提交 / 推送 / 发版。
19
19
  - **点按行为可选**:默认「直接发送」——输入框为空时一次点按就发出;输入框里已有文字或附件时,任何模式都改为插到光标处,不会覆盖正在写的内容。
20
20
  - **显示位置可选**:输入框下方(默认)、输入框上方、工具行右侧,切换即时生效。
21
- - **可以收起**:行尾一个「收起」动作;也可以让输入框一有内容就自动收起(默认),整排缩成一个小胶囊,点一下临时展开,不挡住正在写的字。
22
- - **整排可以彻底隐藏**:设置里关掉「显示短语行」后,整排从界面**完全消失**——连胶囊都不留,界面上什么都不显示;只有回到 **设置 → 快捷短语** 重新打开开关才恢复。
21
+ - **整排三态可选**:设置里的「短语行显示」一档搞定——**显示整排**常驻;**收成胶囊**只留一个小胶囊,点开可临时展开;**彻底隐藏**则把整排从界面完全移除(连胶囊都不留),只能回到 **设置 → 快捷短语** 恢复。
22
+ - **管理入口可换**:行尾的「管理」可以保持文字按钮、换成齿轮图标,或直接隐藏;隐藏后管理页仍从 **设置 → 快捷短语** 进入。
23
23
  - **单条短语可隐藏**:管理页每张卡片有一个眼睛开关,隐藏后这条按钮从短语行消失,卡片仍留在管理页并标注「已隐藏」。
24
24
  - **管理页**:拖动手柄排序、直接在卡片上改名、实时按钮预览与字数、两步确认删除、一键恢复默认。
25
25
  - **零依赖**:纯前端一个 `client.js`,不联网、不读写文件、不引入 npm 包,数据只存在本机 `localStorage`。
@@ -66,7 +66,7 @@ Plugins → Add plugin → 选择本仓库目录;或让 DSH 里的 agent 执
66
66
 
67
67
  ### 管理页
68
68
 
69
- 设置 → **快捷短语**:上面四项决定位置、点按行为、短语行是否显示、以及输入框有内容时怎么收起;下面一条短语一张卡片。
69
+ 设置 → **快捷短语**:上面五项决定位置、点按行为、短语行的显示形态、管理入口样式、以及输入框有内容时怎么收起;下面一条短语一张卡片。
70
70
 
71
71
  ![管理页(示意图 · 深色)](docs/images/manager-dark.png)
72
72
 
@@ -74,7 +74,8 @@ Plugins → Add plugin → 选择本仓库目录;或让 DSH 里的 agent 执
74
74
  - 卡片顶部那行是**显示名称**,直接点进去改;下面大框是**发送内容**。
75
75
  - 卡片底部实时显示按钮预览和字数,名称太长一眼就能看出来。
76
76
  - 每张卡片右上角的**眼睛**开关这条短语的显隐:关掉后按钮从短语行消失,卡片留在管理页并标上「已隐藏」,再点一次恢复。
77
- - 页面上方的**显示短语行**开关:关掉 = 整排彻底隐藏(界面上连胶囊都没有),开关旁标出「整排已隐藏」;重新打开时顺带清掉之前「收起」留下的折叠状态,直接回到整排。
77
+ - 页面上方的**短语行显示**下拉:**显示整排** / **收成胶囊** / **彻底隐藏**。选「彻底隐藏」时界面里什么都不渲染(连胶囊都没有),下拉旁标出「整排已隐藏」;改回前两项即可恢复,不必重启。选「显示整排」会顺带清掉之前「收起」留下的折叠状态。
78
+ - **管理入口**下拉:行尾的「管理」可以是**文字按钮**、**齿轮图标**(无障碍名称仍是「管理」),或**隐藏**。隐藏后行尾不再出现管理按钮,但短语行照常可用,管理页仍可从 **设置 → 快捷短语** 进入。
78
79
  - `✕` 第一次只进入「确认」态(4 秒后自动撤回),再点一次才真正删除。
79
80
  - **新增短语**会追加空卡片并聚焦名称;**恢复默认**在左侧,点一次进入确认态,再点一次恢复内置四条。
80
81
 
@@ -82,7 +83,7 @@ Plugins → Add plugin → 选择本仓库目录;或让 DSH 里的 agent 执
82
83
 
83
84
  ### 收起与隐藏
84
85
 
85
- 短语行占地方,但不该挡着打字。两种收起方式:
86
+ 短语行占地方,但不该挡着打字。可以临时收起,也可以在设置里选它常驻的形态:
86
87
 
87
88
  - 点行尾的 **收起**(`收起 ▾`)—— 立刻收成一个小胶囊,再点胶囊临时展开;
88
89
  - 设置里把「输入框有内容时」保持默认的 **自动收起**:输入框里一有文字或附件,整排自动缩成胶囊;也可以改成「保持显示」。
@@ -91,16 +92,19 @@ Plugins → Add plugin → 选择本仓库目录;或让 DSH 里的 agent 执
91
92
 
92
93
  ![输入框有草稿时自动收起(示意图)](docs/images/folded-dark.png)
93
94
 
94
- **收起和彻底隐藏不是一回事**:
95
+ 设置里的 **短语行显示** 把整排的形态收成一个三态下拉:
95
96
 
96
- - **收起**只把整排折成小胶囊,胶囊还在输入框旁,点一下就回来;
97
- - **彻底隐藏**是设置里的「显示短语行」开关关掉:整排从界面完全消失,连胶囊都不留,界面上什么都不显示。恢复只能回到 **设置 → 快捷短语** 把开关打开(打开时会顺带清掉折叠状态,直接回到整排)。
97
+ - **显示整排**:常驻一整排,行尾「收起」还能临时折叠;
98
+ - **收成胶囊**:整排只留一个小胶囊,胶囊就在输入框旁,点一下展开;
99
+ - **彻底隐藏**:整排从界面完全消失,连胶囊都不留,界面上什么都不显示。恢复只能回到 **设置 → 快捷短语** 把下拉改回前两项。
100
+
101
+ 行尾「收起 ▾」等价于选「收成胶囊」;下拉选「显示整排」时会顺带清掉折叠状态,直接回到整排。「短语行显示」没有单独的状态键,读写的就是下面表里的 `hidden` 与 `collapsed` 两个键。
98
102
 
99
103
  单条短语则在管理页用眼睛开关隐藏;短语行的从左到右顺序与卡片顺序保持一致。
100
104
 
101
105
  ## 数据与隐私
102
106
 
103
- 短语、位置、点按行为、收起状态、自动收起选项与「整排彻底隐藏」状态分别存在 `localStorage` 的六个键里:
107
+ 短语、位置、点按行为、收起状态、自动收起选项、整排彻底隐藏状态与管理入口样式分别存在 `localStorage` 的七个键里:
104
108
 
105
109
  | 键 | 内容 |
106
110
  | --- | --- |
@@ -110,6 +114,9 @@ Plugins → Add plugin → 选择本仓库目录;或让 DSH 里的 agent 执
110
114
  | `dsh.quick-phrases.collapsed.v1` | 整排是否收起(`1` / `0`) |
111
115
  | `dsh.quick-phrases.autohide.v1` | 输入框有内容时收起还是保持显示 |
112
116
  | `dsh.quick-phrases.hidden.v1` | 整排是否彻底隐藏(`1` / `0`,`1` 时什么都不渲染) |
117
+ | `dsh.quick-phrases.manage.v1` | 管理入口样式(`text` / `icon` / `hidden`,缺省 `text`) |
118
+
119
+ 「短语行显示」下拉不占新键:它读取上面 `hidden` 与 `collapsed` 两个键,选**彻底隐藏**写 `hidden='1'`,选**收成胶囊**写 `hidden='0'`、`collapsed='1'`,选**显示整排**两个都写 `'0'`。
113
120
 
114
121
  按 DSH Web 端的站点存储隔离;换机器或清空站点数据会丢。插件没有网络请求、没有 `eval`、不读写文件,也不向 Host 注册任何服务。
115
122
 
package/client.js CHANGED
@@ -30,6 +30,7 @@ window.__ModuleLoader__.load({
30
30
  var COLLAPSE_KEY = 'dsh.quick-phrases.collapsed.v1'
31
31
  var AUTOHIDE_KEY = 'dsh.quick-phrases.autohide.v1'
32
32
  var HIDDEN_KEY = 'dsh.quick-phrases.hidden.v1'
33
+ var MANAGE_KEY = 'dsh.quick-phrases.manage.v1'
33
34
  var SECTION_ID = 'quick-phrases'
34
35
  var DOCK_ORDER = 5
35
36
  var SECTION_ORDER = 26
@@ -66,6 +67,21 @@ window.__ModuleLoader__.load({
66
67
  var AUTO_HIDE_MODES = ['fold', 'keep']
67
68
  var DEFAULT_AUTO_HIDE = 'fold'
68
69
 
70
+ /**
71
+ * What the end of the row shows for opening the manager: the original text
72
+ * chip, a gear icon keeping the same accessible name, or nothing at all
73
+ * (Settings → Quick phrases is still reachable).
74
+ */
75
+ var MANAGE_MODES = ['text', 'icon', 'hidden']
76
+ var DEFAULT_MANAGE = 'text'
77
+
78
+ /**
79
+ * The settings dropdown that exposes the row's two visibility toggles as one
80
+ * three-way choice. There is deliberately no storage key of its own: the
81
+ * value is derived from `hidden` (wins) and `collapsed`.
82
+ */
83
+ var ROW_MODES = ['full', 'pill', 'hidden']
84
+
69
85
  var DICTS = {
70
86
  zh: {
71
87
  'section.title': '快捷短语',
@@ -100,10 +116,18 @@ window.__ModuleLoader__.load({
100
116
  'manager.clickSend': '直接发送',
101
117
  'manager.clickInsert': '填入输入框',
102
118
  'manager.clickHint': '「直接发送」在输入框为空时一次点按就发出这条短语;输入框里已有文字或附件时会改为插到光标处,不会覆盖你正在写的内容。',
103
- 'manager.visible': '显示短语行',
104
- 'manager.visibleHint': '关掉后整排会从界面彻底消失,连小胶囊都不留;之后只能在「设置 → 快捷短语」里重新打开。',
105
- 'manager.visibleHintOff': '整排已完全隐藏,界面里不再显示任何按钮或胶囊。重新打开请在「设置 → 快捷短语」里打开这个开关。',
119
+ 'manager.rowMode': '短语行显示',
120
+ 'manager.rowModeFull': '显示整排',
121
+ 'manager.rowModePill': '收成胶囊',
122
+ 'manager.rowModeHidden': '彻底隐藏',
123
+ 'manager.rowModeHint': '控制短语行出现的形态:「收成胶囊」只留一个可展开的小胶囊;「彻底隐藏」把整排从界面移除,连胶囊都不留。输入框有内容时是否自动收起由下面一项决定。',
124
+ 'manager.rowModeHintOff': '整排已完全隐藏,界面里不再显示任何按钮或胶囊。把这一项改回「显示整排」或「收成胶囊」即可恢复,不必重启。',
106
125
  'manager.rowHiddenBadge': '整排已隐藏',
126
+ 'manager.manageEntry': '管理入口',
127
+ 'manager.manageText': '文字按钮',
128
+ 'manager.manageIcon': '齿轮图标',
129
+ 'manager.manageHidden': '隐藏入口',
130
+ 'manager.manageHint': '短语行末尾的「管理」可以保持文字、换成齿轮图标,或直接隐藏;隐藏后只能从「设置 → 快捷短语」进入管理。',
107
131
  'manager.autoHide': '输入框有内容时',
108
132
  'manager.autoHideFold': '自动收起',
109
133
  'manager.autoHideKeep': '保持显示',
@@ -161,10 +185,18 @@ window.__ModuleLoader__.load({
161
185
  'manager.clickSend': 'Send right away',
162
186
  'manager.clickInsert': 'Fill the composer',
163
187
  'manager.clickHint': '“Send right away” fires the phrase with one click while the composer is empty; when it already holds text or attachments the phrase is inserted at the caret instead, so nothing you were writing is lost.',
164
- 'manager.visible': 'Show the phrase row',
165
- 'manager.visibleHint': 'When off, the row disappears from the UI completely — not even the small pill stays. It can only be turned back on in Settings → Quick phrases.',
166
- 'manager.visibleHintOff': 'The whole row is hidden: no chips and no pill are rendered anywhere. Turn this switch back on under Settings → Quick phrases to restore it.',
188
+ 'manager.rowMode': 'Phrase row',
189
+ 'manager.rowModeFull': 'Show the full row',
190
+ 'manager.rowModePill': 'Fold into a pill',
191
+ 'manager.rowModeHidden': 'Hide completely',
192
+ 'manager.rowModeHint': 'Controls the shape of the row: “Fold into a pill” leaves one expandable pill, while “Hide completely” removes the whole row, pill included. The option below still decides whether a draft folds it automatically.',
193
+ 'manager.rowModeHintOff': 'The whole row is completely hidden: no chips and no pill are rendered anywhere. Switch this back to “Show the full row” or “Fold into a pill” to restore it — no restart needed.',
167
194
  'manager.rowHiddenBadge': 'Row hidden',
195
+ 'manager.manageEntry': 'Manage button',
196
+ 'manager.manageText': 'Text button',
197
+ 'manager.manageIcon': 'Gear icon',
198
+ 'manager.manageHidden': 'Hidden',
199
+ 'manager.manageHint': 'The “Manage” chip at the end of the row can stay text, become a gear icon, or be left out entirely; once hidden it can only be reached in Settings → Quick phrases.',
168
200
  'manager.autoHide': 'When the composer has text',
169
201
  'manager.autoHideFold': 'Fold automatically',
170
202
  'manager.autoHideKeep': 'Keep it visible',
@@ -547,6 +579,7 @@ window.__ModuleLoader__.load({
547
579
  var collapseStore = makeEnumStore(COLLAPSE_KEY, ['0', '1'], '0', 'collapsed state')
548
580
  var autoHideStore = makeEnumStore(AUTOHIDE_KEY, AUTO_HIDE_MODES, DEFAULT_AUTO_HIDE, 'auto-hide mode')
549
581
  var hiddenStore = makeEnumStore(HIDDEN_KEY, ['0', '1'], '0', 'row hidden state')
582
+ var manageStore = makeEnumStore(MANAGE_KEY, MANAGE_MODES, DEFAULT_MANAGE, 'manage entry mode')
550
583
 
551
584
  function useCollapsed() {
552
585
  return collapseStore.use() === '1'
@@ -573,6 +606,42 @@ window.__ModuleLoader__.load({
573
606
  hiddenStore.set(value ? '1' : '0')
574
607
  }
575
608
 
609
+ /** `text` | `icon` | `hidden`, default `text`. */
610
+ function useManageEntry() {
611
+ return manageStore.use()
612
+ }
613
+
614
+ function setManageEntry(value) {
615
+ manageStore.set(value)
616
+ }
617
+
618
+ /** Derives the settings dropdown value: hidden wins over a leftover fold. */
619
+ function rowModeOf(hidden, collapsed) {
620
+ if (hidden) return 'hidden'
621
+ if (collapsed) return 'pill'
622
+ return 'full'
623
+ }
624
+
625
+ /**
626
+ * Writes the two existing keys instead of adding a third. `full` and `pill`
627
+ * clear the hidden flag first; `hidden` leaves the collapsed value alone so
628
+ * a folded row cannot reappear as a pill while it is hidden.
629
+ */
630
+ function setRowMode(mode) {
631
+ if (mode === 'hidden') {
632
+ setHidden(true)
633
+ return
634
+ }
635
+ if (mode === 'pill') {
636
+ setHidden(false)
637
+ setCollapsed(true)
638
+ return
639
+ }
640
+ if (mode !== 'full') return
641
+ setHidden(false)
642
+ setCollapsed(false)
643
+ }
644
+
576
645
  /* ------------------------------------------------------------------ *
577
646
  * Styles: local to each component, removed on unmount.
578
647
  * ------------------------------------------------------------------ */
@@ -598,6 +667,8 @@ window.__ModuleLoader__.load({
598
667
  '.dqp-chip:active{background:var(--dsw-alias-interactive-bg-hover-solid,rgba(255,255,255,.12))}' +
599
668
  '.dqp-chip:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-brand-primary,#4c6fff));outline-offset:2px}' +
600
669
  '.dqp-chip-manage{color:var(--dsw-alias-label-tertiary,#9a9a9a);border-style:dashed;background:transparent}' +
670
+ '.dqp-chip-manage-icon{padding:0 7px}' +
671
+ '.dqp-chip-manage svg{display:block}' +
601
672
  '.dqp-chip-collapse{color:var(--dsw-alias-label-caption,#7d7d7d);border-style:dashed;background:transparent}' +
602
673
  '.dqp-chip-collapse:hover{color:var(--dsw-alias-label-secondary,#b9b9b9)}' +
603
674
  '.dqp-pill{gap:4px;color:var(--dsw-alias-label-tertiary,#9a9a9a);border-style:dashed;background:transparent}' +
@@ -631,16 +702,6 @@ window.__ModuleLoader__.load({
631
702
  'color:var(--dsw-alias-label-primary,#eee);font:inherit;font-size:12px;line-height:1;appearance:none;-webkit-appearance:none;cursor:pointer}' +
632
703
  '.dqp-select:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08))}' +
633
704
  '.dqp-select:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-brand-primary,#4c6fff));outline-offset:1px}' +
634
- '.dqp-switch{box-sizing:border-box;position:relative;flex:0 0 auto;width:36px;height:20px;padding:0;border:.5px solid var(--dsw-alias-border-l2,#494949);' +
635
- 'border-radius:999px;background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,.06));cursor:pointer;' +
636
- 'transition:background-color .15s ease,border-color .15s ease}' +
637
- '.dqp-switch:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.1))}' +
638
- '.dqp-switch:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-brand-primary,#4c6fff));outline-offset:2px}' +
639
- '.dqp-switch-thumb{position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;' +
640
- 'background:var(--dsw-alias-label-tertiary,#9a9a9a);transition:transform .15s ease,background-color .15s ease}' +
641
- '.dqp-switch-on{border-color:transparent;background:var(--dsw-alias-button-primary-fill,#4c6fff)}' +
642
- '.dqp-switch-on:hover{background:var(--dsw-alias-button-primary-hover,#3f5fe0)}' +
643
- '.dqp-switch-on .dqp-switch-thumb{transform:translateX(16px);background:var(--dsw-alias-label-primary-foreground,#fff)}' +
644
705
  '.dqp-row-muted .dqp-body{opacity:.55}' +
645
706
  '.dqp-badge-hidden{margin-left:2px;border:.5px solid var(--dsw-alias-border-l2,#494949);' +
646
707
  'background:transparent;color:var(--dsw-alias-label-secondary,#b9b9b9)}' +
@@ -777,6 +838,7 @@ window.__ModuleLoader__.load({
777
838
  var collapsed = useCollapsed()
778
839
  var autoHide = useAutoHide()
779
840
  var hidden = useHidden()
841
+ var manageEntry = useManageEntry()
780
842
  var peekState = React.useState(false)
781
843
  var peeked = peekState[0]
782
844
  var setPeeked = peekState[1]
@@ -908,12 +970,23 @@ window.__ModuleLoader__.load({
908
970
  },
909
971
  t('dock.collapse'),
910
972
  h('span', { className: 'dqp-caret', 'aria-hidden': true }, '\u25be')),
911
- h('button', {
973
+ manageEntry === 'hidden' ? null : h('button', {
912
974
  key: 'manage',
913
975
  type: 'button',
914
- className: 'dqp-chip dqp-chip-manage',
976
+ className: 'dqp-chip dqp-chip-manage' + (manageEntry === 'icon' ? ' dqp-chip-manage-icon' : ''),
977
+ title: t('dock.manage'),
978
+ 'aria-label': t('dock.manage'),
915
979
  onClick: handleManage,
916
- }, t('dock.manage')),
980
+ }, manageEntry === 'icon'
981
+ ? h('svg', { width: 14, height: 14, viewBox: '0 0 24 24', fill: 'none', 'aria-hidden': true },
982
+ h('circle', { cx: 12, cy: 12, r: 3, stroke: 'currentColor', strokeWidth: 1.6 }),
983
+ h('path', {
984
+ d: 'M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1Z',
985
+ stroke: 'currentColor',
986
+ strokeWidth: 1.4,
987
+ strokeLinejoin: 'round',
988
+ }))
989
+ : t('dock.manage')),
917
990
  ))
918
991
  }
919
992
  if (showHint[0]) {
@@ -933,6 +1006,9 @@ window.__ModuleLoader__.load({
933
1006
  var placementNow = usePlacement()
934
1007
  var clickNow = useClickMode()
935
1008
  var rowHidden = useHidden()
1009
+ var rowFolded = useCollapsed()
1010
+ var rowMode = rowModeOf(rowHidden, rowFolded)
1011
+ var manageNow = useManageEntry()
936
1012
  var autoHideNow = useAutoHide()
937
1013
 
938
1014
  var resetState = React.useState(false)
@@ -1160,37 +1236,51 @@ window.__ModuleLoader__.load({
1160
1236
  ),
1161
1237
  )
1162
1238
 
1163
- var visibleOption = h('div', { className: 'dqp-option' },
1239
+ var rowModeOption = h('div', { className: 'dqp-option' },
1164
1240
  h('div', { className: 'dqp-option-text' },
1165
1241
  h('div', { className: 'dqp-option-label-row' },
1166
- h('span', { className: 'dqp-option-label', id: 'dqp-visible-label' }, t('manager.visible')),
1242
+ h('label', { className: 'dqp-option-label', htmlFor: 'dqp-rowmode' }, t('manager.rowMode')),
1167
1243
  rowHidden
1168
1244
  ? h('span', { className: 'dqp-badge dqp-badge-row-hidden' }, t('manager.rowHiddenBadge'))
1169
1245
  : null,
1170
1246
  ),
1171
1247
  h('span', {
1172
1248
  className: 'dqp-option-hint' + (rowHidden ? ' dqp-option-hint-warn' : ''),
1173
- }, rowHidden ? t('manager.visibleHintOff') : t('manager.visibleHint')),
1249
+ }, rowHidden ? t('manager.rowModeHintOff') : t('manager.rowModeHint')),
1174
1250
  ),
1175
- h('button', {
1176
- type: 'button',
1177
- id: 'dqp-visible',
1178
- className: 'dqp-switch' + (rowHidden ? '' : ' dqp-switch-on'),
1179
- role: 'switch',
1180
- 'aria-checked': !rowHidden,
1181
- 'aria-labelledby': 'dqp-visible-label',
1182
- onClick: function () {
1183
- // Off means "gone from the UI": nothing renders, not even the pill.
1184
- // On always lands on the full row, so a folded state left behind by
1185
- // the 收起 chip is cleared at the same time.
1186
- if (rowHidden) {
1187
- setHidden(false)
1188
- setCollapsed(false)
1189
- return
1190
- }
1191
- setHidden(true)
1251
+ h('div', { className: 'dqp-select-wrap' },
1252
+ h('select', {
1253
+ id: 'dqp-rowmode',
1254
+ className: 'dqp-select',
1255
+ value: rowMode,
1256
+ onChange: function (event) { setRowMode(event.target.value) },
1192
1257
  },
1193
- }, h('span', { className: 'dqp-switch-thumb' })),
1258
+ ROW_MODES.map(function (value) {
1259
+ return h('option', { key: value, value: value },
1260
+ t(value === 'full' ? 'manager.rowModeFull' : value === 'pill' ? 'manager.rowModePill' : 'manager.rowModeHidden'))
1261
+ }),
1262
+ ),
1263
+ ),
1264
+ )
1265
+
1266
+ var manageOption = h('div', { className: 'dqp-option' },
1267
+ h('div', { className: 'dqp-option-text' },
1268
+ h('label', { className: 'dqp-option-label', htmlFor: 'dqp-manage' }, t('manager.manageEntry')),
1269
+ h('span', { className: 'dqp-option-hint' }, t('manager.manageHint')),
1270
+ ),
1271
+ h('div', { className: 'dqp-select-wrap' },
1272
+ h('select', {
1273
+ id: 'dqp-manage',
1274
+ className: 'dqp-select',
1275
+ value: manageNow,
1276
+ onChange: function (event) { setManageEntry(event.target.value) },
1277
+ },
1278
+ MANAGE_MODES.map(function (value) {
1279
+ return h('option', { key: value, value: value },
1280
+ t(value === 'text' ? 'manager.manageText' : value === 'icon' ? 'manager.manageIcon' : 'manager.manageHidden'))
1281
+ }),
1282
+ ),
1283
+ ),
1194
1284
  )
1195
1285
 
1196
1286
  var autoHideOption = h('div', { className: 'dqp-option' },
@@ -1222,7 +1312,7 @@ window.__ModuleLoader__.load({
1222
1312
  ),
1223
1313
  h('span', { className: 'dqp-badge' }, t('manager.count').replace('{n}', String(phrases.length))),
1224
1314
  ),
1225
- h('div', { className: 'dqp-options' }, placementOption, clickOption, visibleOption, autoHideOption),
1315
+ h('div', { className: 'dqp-options' }, placementOption, clickOption, rowModeOption, manageOption, autoHideOption),
1226
1316
  h('div', { className: 'dqp-section' },
1227
1317
  h('div', { className: 'dqp-section-head' },
1228
1318
  h('h3', { className: 'dqp-section-title' }, t('manager.phrases')),
@@ -52,7 +52,7 @@ return {
52
52
 
53
53
  ## 数据层
54
54
 
55
- 六个 store 都是模块级状态 + `localStorage`,不经过 Host:
55
+ 七个 store 都是模块级状态 + `localStorage`,不经过 Host:
56
56
 
57
57
  | store | 存储键 | 读写 |
58
58
  | --- | --- | --- |
@@ -62,10 +62,13 @@ return {
62
62
  | 整排收起 | `dsh.quick-phrases.collapsed.v1` | `'1'` / `'0'`,缺省 `'0'` |
63
63
  | 自动收起选项 | `dsh.quick-phrases.autohide.v1` | `'fold'` / `'keep'`,缺省 `'fold'` |
64
64
  | 整排彻底隐藏 | `dsh.quick-phrases.hidden.v1` | `'1'` / `'0'`,缺省 `'0'`;`'1'` 时三个位置都不渲染 |
65
+ | 管理入口 | `dsh.quick-phrases.manage.v1` | `'text'` / `'icon'` / `'hidden'`,缺省 `'text'`;`hidden` 时行尾不渲染管理按钮 |
65
66
 
66
- 后三个(整排收起 / 自动收起 / 整排彻底隐藏)用同一个工厂 `makeEnumStore(key, values, fallback, label)` 造出来:读取时白名单外的值一律回落 fallback,写入前也做同样校验,所以旧版本留下的脏值或手改的 `localStorage` 不会让界面进入未定义状态。新增一个类似开关时优先复用它,不要再手写第三份 read/ensure/set/use(显示位置 / 点按行为两处仍是手写实现)。
67
+ 整排收起 / 自动收起 / 整排彻底隐藏 / 管理入口这四个都用同一个工厂 `makeEnumStore(key, values, fallback, label)` 造出来:读取时白名单外的值一律回落 fallback,写入前也做同样校验,所以旧版本留下的脏值或手改的 `localStorage` 不会让界面进入未定义状态。新增一个类似开关时优先复用它,不要再手写第三份 read/ensure/set/use(显示位置 / 点按行为两处仍是手写实现)。
67
68
 
68
- `usePhrases()` / `usePlacement()` / `useClickMode()` / `useCollapsed()` / `useAutoHide()` / `useHidden()` 是 `useState` + `subscribe` 的小包装,同时监听 `storage` 事件,多窗口之间也能同步。首次使用时按当前界面语言写入四条默认短语。
69
+ 设置页的「短语行显示」下拉**没有自己的存储键**:`rowModeOf(hidden, collapsed)` 按 `hidden → 'hidden'`、`collapsed → 'pill'`、否则 `'full'` 推导当前值;`setRowMode(mode)` 组合写两个既有键(`hidden` 优先,选 `full` / `pill` 时先清 `hidden`),所以旧版本、多窗口和「收起」chip 写下的状态始终是同一份真相。
70
+
71
+ `usePhrases()` / `usePlacement()` / `useClickMode()` / `useCollapsed()` / `useAutoHide()` / `useHidden()` / `useManageEntry()` 是 `useState` + `subscribe` 的小包装,同时监听 `storage` 事件,多窗口之间也能同步。首次使用时按当前界面语言写入四条默认短语。
69
72
 
70
73
  短语条目里除了 `id` / `label` / `text` 还有一个 `hidden` 布尔值(`normalize()` 缺成 `false`)。短语行渲染前会滤掉 `hidden === true` 的条目,管理页则照常渲染并用 `dqp-row-muted` 变暗、加「已隐藏」徽标。
71
74
 
@@ -78,7 +81,9 @@ hasDraft = draft.trim() !== '' || attachments > 0
78
81
  folded = collapsed || (autoHide === 'fold' && hasDraft && !peeked)
79
82
  ```
80
83
 
81
- `hidden` 优先于折叠:即使之前用「收起」写过 `collapsed='1'`,隐藏后也不会冒出胶囊。管理页开关打开时同时 `setHidden(false)` 与 `setCollapsed(false)`,直接回到整排。
84
+ `hidden` 优先于折叠:即使之前用「收起」写过 `collapsed='1'`,隐藏后也不会冒出胶囊。设置页下拉选「显示整排」时同时 `setHidden(false)` 与 `setCollapsed(false)`,直接回到整排;选「收成胶囊」写 `hidden='0'`、`collapsed='1'`;选「彻底隐藏」只写 `hidden='1'`。
85
+
86
+ 管理入口在同一个 `DockChips` 里按 `manage.v1` 渲染:`text` 是原来的「管理」文字 chip,`icon` 是同样点击行为的齿轮 `svg`(`aria-label` 仍取 `dock.manage`),`hidden` 连按钮都不渲染。三种模式都不影响短语 chips、「收起」chip 和管理页本身。
82
87
 
83
88
  `peeked` 是组件内部的临时状态:点胶囊时置 `true` 并同时展开(`setCollapsed(false)`),这样"临时看一眼"不会写进 `localStorage`,草稿清空后 `useEffect` 会把它清掉。手动收起(`setCollapsed(true)`)是持久状态,跨会话保留。
84
89
 
@@ -113,9 +118,9 @@ margin: 0 auto;
113
118
 
114
119
  `test/smoke.mjs` 把真实的 `client.js` 放进 `vm` 沙箱,用最小假 React(按组件名分配 hook 单元)和假 ModuleLoader 跑起来,直接调组件自己的 `onClick` / `onChange`,断言落在 `localStorage` 和渲染树上的结果。改行为时先改这里——它是唯一能在没有宿主的情况下验证「显示与发送分离」「位置切换」「拖动排序」「收起与隐藏」是否还成立的护栏。
115
120
 
116
- 与收起/隐藏相关的断言:点「收起」写入 `collapsed.v1='1'` 且只剩 `.dqp-pill`;点胶囊回到 `'0'` 并恢复六个 chip;草稿出现时默认折成胶囊、展开后点第二条仍插到光标处;`autohide` 切到 `keep` 后草稿不再折叠;`#dqp-visible` 关掉后写入 `hidden.v1='1'` 且整排组件返回 `null`(折叠状态下点关也一样,胶囊不回来),管理页显示「整排已隐藏」徽标与恢复提示;再打开后 `hidden='0'`、`collapsed='0'`、六个 chip 全部回来;隐藏一条后短语行少一个 chip、管理页仍是四张卡片且第一张带 `dqp-row-muted`。
121
+ 与收起/隐藏相关的断言:点「收起」写入 `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 键集合完全对称的断言。
117
122
 
118
- `test/preview.mjs` 把组件渲染成静态 HTML,拼上宿主主题 CSS,可用无头 Chromium 截图,用来肉眼核对深浅两套主题;它还会渲染「整排完全隐藏」的管理页状态,并断言隐藏时短语行序列化出来是空字符串。`docs/images/` 下的图就是它产出的**界面示意图**(图内带「界面示意图」标题),不是真机截屏。
123
+ `test/preview.mjs` 把组件渲染成静态 HTML,拼上宿主主题 CSS,可用无头 Chromium 截图,用来肉眼核对深浅两套主题;它还会渲染「整排完全隐藏」的管理页状态和三态短语行 / 三态管理入口的状态页(`/tmp/dqp-modes-*.html`),并断言隐藏时短语行序列化出来是空字符串。`docs/images/` 下的图就是它产出的**界面示意图**(图内带「界面示意图」标题),不是真机截屏。
119
124
 
120
125
  ## 兼容性注意
121
126
 
package/docs/DETAIL.en.md CHANGED
@@ -25,29 +25,33 @@ All three rows stay registered, but only the selected one renders — switching
25
25
 
26
26
  ## Folding and hiding
27
27
 
28
- The row should never get in the way of typing, so it can fold in two ways:
28
+ The row should never get in the way of typing, so it can fold on demand and its resting shape is a setting:
29
29
 
30
30
  - **Fold by hand**: click `收起 ▾` at the end of the row and it collapses into a small `▸ 快捷短语` pill; click the pill to expand it temporarily, and 「收起」 to fold it again.
31
31
  - **Fold automatically** (default): with "When the composer has text" set to "Fold automatically", the row collapses into the pill as soon as the composer holds text or attachments, and expands again once the draft is cleared. Pick "Keep it visible" to keep the full row instead.
32
32
 
33
33
  Clicking a phrase after expanding the pill behaves exactly as before: when the composer already has content the text is inserted at the caret instead of replacing it.
34
34
 
35
- 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.
35
+ The **Phrase row** dropdown in Settings turns the resting shape into a three-way choice:
36
+
37
+ - **Show the full row**: the whole row stays, and the fold chip still folds it temporarily;
38
+ - **Fold into a pill**: only the small pill remains next to the composer; click it to expand;
39
+ - **Hide completely**: the row leaves the UI entirely — **not even the pill stays**, nothing at all is rendered. The only way back is Settings → Quick phrases, where the dropdown is marked "Row hidden"; choosing "Show the full row" there also clears any leftover folded state and restores the full row.
36
40
 
37
- Folding and hiding the whole row are two different things:
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.
38
42
 
39
- - **Folding** only shrinks the row into the small pill, which stays next to the composer; click it to expand.
40
- - **Hiding completely** is what the "Show the phrase row" switch does when turned off: the row leaves the UI entirely — **not even the pill stays**, nothing at all is rendered. The only way back is Settings → Quick phrases, where the switch is marked "Row hidden"; turning it on also clears any leftover folded state and restores the full row.
43
+ 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.
41
44
 
42
45
  ## Managing phrases
43
46
 
44
- Open **Settings → Quick phrases**. The page has two layers: behaviour options on top, the phrase list below.
47
+ Open **Settings → Quick phrases**. The page has two layers: five behaviour options on top, the phrase list below.
45
48
 
46
49
  **Behaviour options** (applied on selection):
47
50
 
48
51
  - **Position**: switch between the three positions above.
49
52
  - **On click**: pick "Send right away" or "Fill the composer"; the default is sending right away.
50
- - **Show the phrase row**: switch the whole row on or off. Off hides it completely — nothing at all is rendered, not even the pill — and only this page can bring it back; turning it on also clears the folded state so the full row returns.
53
+ - **Phrase row**: a three-way dropdown. **Show the full row** keeps the whole row; **Fold into a pill** leaves only the small expandable pill; **Hide completely** removes the row from the UI entirely (not even the pill), and only this page can bring it back; picking "Show the full row" also clears the folded state.
54
+ - **Manage button**: the style of the "Manage" chip at the end of the row. **Text button** is the current look; **Gear icon** swaps in a settings icon (its accessible name stays "Manage" and clicking behaves the same); **Hidden** renders no manage button while the phrase row keeps working, and this page stays reachable.
51
55
  - **When the composer has text**: pick "Fold automatically" (default) or "Keep it visible" to decide whether the row folds into the pill while a draft or attachments exist.
52
56
 
53
57
  **Phrase list** (one card per phrase):
@@ -60,11 +64,11 @@ Open **Settings → Quick phrases**. The page has two layers: behaviour options
60
64
  - **✕**: the first click only arms the delete ("Confirm"), a second click within four seconds removes the phrase.
61
65
  - **Add phrase** appends an empty card and focuses its caption; **Restore defaults** arms on the first click and restores the four built-in phrases on the second.
62
66
 
63
- Changes save and apply immediately, no restart. The list lives in local browser storage (`localStorage` key `dsh.quick-phrases.v1`; the position is `dsh.quick-phrases.placement.v1`, the click behaviour `dsh.quick-phrases.click.v1`, the folded state `dsh.quick-phrases.collapsed.v1`, the auto-fold option `dsh.quick-phrases.autohide.v1`, the complete-hide state `dsh.quick-phrases.hidden.v1`), scoped to the DSH Web origin — a different machine or cleared site data loses it.
67
+ Changes save and apply immediately, no restart. The list lives in local browser storage (`localStorage` key `dsh.quick-phrases.v1`; the position is `dsh.quick-phrases.placement.v1`, the click behaviour `dsh.quick-phrases.click.v1`, the folded state `dsh.quick-phrases.collapsed.v1`, the auto-fold option `dsh.quick-phrases.autohide.v1`, the complete-hide state `dsh.quick-phrases.hidden.v1`, the manage-entry style `dsh.quick-phrases.manage.v1`), scoped to the DSH Web origin — a different machine or cleared site data loses it. The "Phrase row" dropdown adds no key of its own: it reads and writes `hidden.v1` and `collapsed.v1`.
64
68
 
65
69
  ## Opening it from the composer
66
70
 
67
- The **Manage** chip at the end of the row jumps to the same settings page (expand the pill first when the row is folded). If the settings entry is not mounted in this UI yet, it says "请在『设置 — 快捷短语』中管理" instead.
71
+ The **Manage** chip at the end of the row jumps to the same settings page (expand the pill first when the row is folded). It can be switched to a gear icon or hidden in Settings; once hidden the row shows no manage button and Settings → Quick phrases is the way in. If the settings entry is not mounted in this UI yet, it says "请在『设置 — 快捷短语』中管理" instead.
68
72
 
69
73
  ## Styling
70
74
 
package/docs/DETAIL.md CHANGED
@@ -25,29 +25,33 @@
25
25
 
26
26
  ## 收起与隐藏
27
27
 
28
- 短语行不该挡着打字,所以有两种收起方式:
28
+ 短语行不该挡着打字,所以可以临时收起,也可以在设置里选它常驻的形态:
29
29
 
30
30
  - **手动收起**:点行尾的 `收起 ▾`,整排缩成一个小胶囊 `▸ 快捷短语`;点胶囊临时展开,再点「收起」收回去。
31
31
  - **自动收起**(默认):设置里「输入框有内容时」选「自动收起」——输入框里一有文字或附件就缩成胶囊,草稿清空后自动展开;也可以选「保持显示」,让整排常驻。
32
32
 
33
33
  收起状态下点开胶囊再点短语,行为和展开时完全一样:输入框里已有内容时仍然插到光标处,不会覆盖草稿。
34
34
 
35
- 单条短语可以在管理页用每张卡片右上角的**眼睛**开关隐藏:隐藏后这条按钮不再出现在短语行,卡片仍留在管理页并标注「已隐藏」,再点一次恢复显示。
35
+ 设置里的 **短语行显示** 把整排的形态收成一个三态下拉:
36
+
37
+ - **显示整排**:常驻一整排,行尾「收起」仍可临时折叠;
38
+ - **收成胶囊**:整排只留一个小胶囊,胶囊仍在输入框旁,点一下就能展开;
39
+ - **彻底隐藏**:整排从界面完全消失,**连胶囊都不留**,界面上什么都不显示。之后只能回到 **设置 → 快捷短语** 把下拉改回前两项(选「彻底隐藏」时旁边会标出「整排已隐藏」);改回「显示整排」时会顺带清掉折叠状态,直接回到整排。
36
40
 
37
- 「收起」和「彻底隐藏」是两件事:
41
+ 行尾「收起 ▾」等价于选「收成胶囊」。这个三态下拉不另存状态键:它由 `dsh.quick-phrases.hidden.v1`(优先)与 `dsh.quick-phrases.collapsed.v1` 推出,切换时组合写这两个既有键。
38
42
 
39
- - **收起**只把整排折成小胶囊,胶囊仍在输入框旁,点一下就能展开;
40
- - **彻底隐藏**是设置里的「显示短语行」开关关掉:整排从界面完全消失,**连胶囊都不留**,界面上什么都不显示。之后只能回到 **设置 → 快捷短语** 重新打开这个开关(开关旁会标出「整排已隐藏」);打开时会顺带清掉折叠状态,直接回到整排。
43
+ 单条短语可以在管理页用每张卡片右上角的**眼睛**开关隐藏:隐藏后这条按钮不再出现在短语行,卡片仍留在管理页并标注「已隐藏」,再点一次恢复显示。
41
44
 
42
45
  ## 管理短语
43
46
 
44
- 打开 **设置 → 快捷短语**。页面分两层:上面是四项行为设置,下面是短语列表。
47
+ 打开 **设置 → 快捷短语**。页面分两层:上面是五项行为设置,下面是短语列表。
45
48
 
46
49
  **行为设置**(选中或点一下即生效):
47
50
 
48
51
  - **显示位置**:在上面三个位置之间切换。
49
52
  - **点按短语时**:选择「直接发送」或「填入输入框」。默认直接发送。
50
- - **显示短语行**:开关整排的显示。关掉 = 整排彻底隐藏,界面上什么都不渲染(连胶囊都没有),只能回到本页重新打开;打开时同时清掉折叠状态,回到整排。
53
+ - **短语行显示**:三态下拉。**显示整排**常驻一整排;**收成胶囊**只留一个小胶囊,点开可临时展开;**彻底隐藏**则整排从界面完全消失(连胶囊都没有),只能回到本页改回前两项;选「显示整排」时会同时清掉折叠状态。
54
+ - **管理入口**:行尾「管理」的样式。**文字按钮**为现状;**齿轮图标**换成设置图标(无障碍名称仍是「管理」,点击行为不变);**隐藏入口**则行尾不再渲染管理按钮,但短语行照常使用,管理页仍可从本页进入。
51
55
  - **输入框有内容时**:选「自动收起」(默认)或「保持显示」,决定草稿/附件出现时整排是否缩成胶囊。
52
56
 
53
57
  **短语列表**(一条短语一张卡片):
@@ -60,11 +64,11 @@
60
64
  - **✕**:第一次点击只是把按钮变成「确认」,4 秒内再点一次才真正删除,避免误删。
61
65
  - **新增短语**:追加一条空卡片并自动把光标放到名称上;**恢复默认**点一次进入确认态,再点一次恢复为内置的四条短语。
62
66
 
63
- 改动即时保存、即时生效,无需重启。短语保存在本机浏览器存储里(`localStorage` 键 `dsh.quick-phrases.v1`,位置存在 `dsh.quick-phrases.placement.v1`,点按行为存在 `dsh.quick-phrases.click.v1`,收起状态存在 `dsh.quick-phrases.collapsed.v1`,自动收起选项存在 `dsh.quick-phrases.autohide.v1`,整排彻底隐藏的状态存在 `dsh.quick-phrases.hidden.v1`),按 DSH 的 Web 端存储隔离,换机器或清空站点数据会丢失。
67
+ 改动即时保存、即时生效,无需重启。短语保存在本机浏览器存储里(`localStorage` 键 `dsh.quick-phrases.v1`,位置存在 `dsh.quick-phrases.placement.v1`,点按行为存在 `dsh.quick-phrases.click.v1`,收起状态存在 `dsh.quick-phrases.collapsed.v1`,自动收起选项存在 `dsh.quick-phrases.autohide.v1`,整排彻底隐藏的状态存在 `dsh.quick-phrases.hidden.v1`,管理入口样式存在 `dsh.quick-phrases.manage.v1`),按 DSH 的 Web 端存储隔离,换机器或清空站点数据会丢失。「短语行显示」下拉不占新键,读写的就是 `hidden.v1` 与 `collapsed.v1`。
64
68
 
65
69
  ## 在输入框旁直接打开
66
70
 
67
- 短语行最右侧的 **管理** 会跳到同一页设置(收起成胶囊时,先点胶囊展开)。如果当前界面还没装上设置入口,会提示「请在『设置 — 快捷短语』中管理」。
71
+ 短语行最右侧的 **管理** 会跳到同一页设置(收起成胶囊时,先点胶囊展开)。管理入口可以在设置里换成齿轮图标或隐藏;隐藏后行尾不再出现管理按钮,从 **设置 → 快捷短语** 进入即可。如果当前界面还没装上设置入口,会提示「请在『设置 — 快捷短语』中管理」。
68
72
 
69
73
  ## 样式
70
74
 
Binary file
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-quick-phrases",
3
- "version": "0.5.0",
4
- "description": "DSH 快捷短语:输入框旁一排短语按钮,点按即发送;输入框有内容时自动收起成小胶囊,整排可彻底隐藏(连胶囊都不留)并从设置页恢复,单条短语可隐藏;管理页可增删改、拖动排序,显示名称与发送内容分离,显示位置可选。",
3
+ "version": "0.6.0",
4
+ "description": "DSH 快捷短语:输入框旁一排短语按钮,点按即发送;短语行支持显示整排 / 收成胶囊 / 彻底隐藏三态,管理入口可换齿轮图标或隐藏,输入框有内容时自动收起,单条短语可隐藏;管理页可增删改、拖动排序,显示名称与发送内容分离,显示位置可选。",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "pengtang1024",