@wu529778790/open-im 1.9.3-beta.10 → 1.9.3-beta.11

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.
@@ -8,6 +8,7 @@ export declare const PAGE_TEXTS: {
8
8
  readonly heroKicker: "Local AI bridge";
9
9
  readonly langButton: "中文";
10
10
  readonly darkModeToggle: "Toggle dark mode";
11
+ readonly headerToolbarAria: "Bridge: validate, save, start, stop";
11
12
  readonly controlCenter: "Control center";
12
13
  readonly sidebarNoteTitle: "Local workflow";
13
14
  readonly sidebarNoteBody: "Configure at least one platform, save the config, then start the bridge from Service.";
@@ -180,6 +181,7 @@ export declare const PAGE_TEXTS: {
180
181
  readonly heroKicker: "本地 AI 桥接";
181
182
  readonly langButton: "EN";
182
183
  readonly darkModeToggle: "切换暗黑模式";
184
+ readonly headerToolbarAria: "桥接:校验、保存、启动、停止";
183
185
  readonly controlCenter: "控制中心";
184
186
  readonly sidebarNoteTitle: "本地工作流";
185
187
  readonly sidebarNoteBody: "至少配置一个平台,保存配置,然后在服务控制区启动桥接。";
@@ -8,6 +8,7 @@ export const PAGE_TEXTS = {
8
8
  heroKicker: "Local AI bridge",
9
9
  langButton: "\u4e2d\u6587",
10
10
  darkModeToggle: "Toggle dark mode",
11
+ headerToolbarAria: "Bridge: validate, save, start, stop",
11
12
  controlCenter: "Control center",
12
13
  sidebarNoteTitle: "Local workflow",
13
14
  sidebarNoteBody: "Configure at least one platform, save the config, then start the bridge from Service.",
@@ -180,6 +181,7 @@ export const PAGE_TEXTS = {
180
181
  heroKicker: "\u672c\u5730 AI \u6865\u63a5",
181
182
  langButton: "EN",
182
183
  darkModeToggle: "\u5207\u6362\u6697\u9ed1\u6a21\u5f0f",
184
+ headerToolbarAria: "\u6865\u63a5\uff1a\u6821\u9a8c\u3001\u4fdd\u5b58\u3001\u542f\u52a8\u3001\u505c\u6b62",
183
185
  controlCenter: "\u63a7\u5236\u4e2d\u5fc3",
184
186
  sidebarNoteTitle: "\u672c\u5730\u5de5\u4f5c\u6d41",
185
187
  sidebarNoteBody: "\u81f3\u5c11\u914d\u7f6e\u4e00\u4e2a\u5e73\u53f0\uff0c\u4fdd\u5b58\u914d\u7f6e\uff0c\u7136\u540e\u5728\u670d\u52a1\u63a7\u5236\u533a\u542f\u52a8\u6865\u63a5\u3002",
@@ -107,7 +107,17 @@ export const PAGE_SCRIPT = String.raw ` const platformDefinitions = [
107
107
 
108
108
  // Button state
109
109
  const setBusy = (busy) => {
110
- ["validateButton","saveButton","startButton","stopButton","langButton"].forEach((id) => {
110
+ [
111
+ "validateButton",
112
+ "saveButton",
113
+ "startButton",
114
+ "stopButton",
115
+ "headerValidateButton",
116
+ "headerSaveButton",
117
+ "headerStartButton",
118
+ "headerStopButton",
119
+ "langButton",
120
+ ].forEach((id) => {
111
121
  const node = el(id);
112
122
  if (node) node.disabled = busy;
113
123
  });
@@ -254,6 +264,10 @@ export const PAGE_SCRIPT = String.raw ` const platformDefinitions = [
254
264
  { id: "saveButton", key: "save" },
255
265
  { id: "startButton", key: "start" },
256
266
  { id: "stopButton", key: "stop" },
267
+ { id: "headerValidateButton", key: "validate" },
268
+ { id: "headerSaveButton", key: "save" },
269
+ { id: "headerStartButton", key: "start" },
270
+ { id: "headerStopButton", key: "stop" },
257
271
  ],
258
272
  testButtons: [
259
273
  { prefix: "test-", key: "test" },
@@ -344,6 +358,9 @@ export const PAGE_SCRIPT = String.raw ` const platformDefinitions = [
344
358
  const darkModeToggle = el("darkModeToggle");
345
359
  if (darkModeToggle) darkModeToggle.setAttribute("aria-label", t("darkModeToggle"));
346
360
 
361
+ const headerToolbar = el("headerToolbar");
362
+ if (headerToolbar) headerToolbar.setAttribute("aria-label", t("headerToolbarAria"));
363
+
347
364
  const readmeLink = el("onboardingReadmeLink");
348
365
  if (readmeLink && readmeLink instanceof HTMLAnchorElement) {
349
366
  readmeLink.href = isZh
@@ -817,19 +834,25 @@ export const PAGE_SCRIPT = String.raw ` const platformDefinitions = [
817
834
  el("darkModeToggle").onclick = toggleDarkMode;
818
835
  updateDarkMode(); // Initialize dark mode on load
819
836
 
820
- // Service buttons
821
- el("validateButton").onclick = validate;
822
- el("saveButton").onclick = async () => {
837
+ // Service buttons (page footer + sticky header toolbar)
838
+ const onSaveClick = async () => {
823
839
  if (!validateClientSideOrAbort()) return;
824
840
  await saveClaudeSettings();
825
841
  await save();
826
842
  };
827
- el("startButton").onclick = async () => {
843
+ const onStartClick = async () => {
828
844
  if (!validateClientSideOrAbort()) return;
829
845
  await saveClaudeSettings();
830
846
  await startService();
831
847
  };
848
+ el("validateButton").onclick = validate;
849
+ el("headerValidateButton").onclick = validate;
850
+ el("saveButton").onclick = onSaveClick;
851
+ el("headerSaveButton").onclick = onSaveClick;
852
+ el("startButton").onclick = onStartClick;
853
+ el("headerStartButton").onclick = onStartClick;
832
854
  el("stopButton").onclick = stopService;
855
+ el("headerStopButton").onclick = stopService;
833
856
 
834
857
  // Platform test buttons
835
858
  platformKeys.forEach((platform) => {
@@ -209,12 +209,39 @@ export const PAGE_HTML_PREFIX = String.raw `<!doctype html>
209
209
  }
210
210
 
211
211
  .main-header {
212
+ position: sticky;
213
+ top: 0;
214
+ z-index: 30;
212
215
  background: var(--bg-primary);
213
216
  border-bottom: 1px solid var(--border-subtle);
214
- padding: 16px 32px;
217
+ padding: 16px 32px 14px;
218
+ display: flex;
219
+ flex-direction: column;
220
+ align-items: stretch;
221
+ gap: 12px;
222
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
223
+ }
224
+ :root.dark .main-header {
225
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
226
+ }
227
+ .main-header-top {
215
228
  display: flex;
216
229
  justify-content: space-between;
217
230
  align-items: center;
231
+ gap: 16px;
232
+ flex-wrap: wrap;
233
+ }
234
+ .main-header-toolbar {
235
+ display: flex;
236
+ flex-wrap: wrap;
237
+ gap: 8px;
238
+ align-items: center;
239
+ padding-top: 12px;
240
+ margin: 0 -2px;
241
+ border-top: 1px solid var(--border-subtle);
242
+ }
243
+ .main-header-toolbar .btn {
244
+ flex: 0 1 auto;
218
245
  }
219
246
 
220
247
  .main-title {
@@ -953,27 +980,35 @@ export const PAGE_HTML_PREFIX = String.raw `<!doctype html>
953
980
  <!-- Main Content -->
954
981
  <main class="main">
955
982
  <header class="main-header">
956
- <div>
957
- <h1 class="main-title" id="mainTitle">Dashboard</h1>
958
- <p class="main-subtitle" id="mainSubtitle">Platform status and setup progress</p>
983
+ <div class="main-header-top">
984
+ <div>
985
+ <h1 class="main-title" id="mainTitle">Dashboard</h1>
986
+ <p class="main-subtitle" id="mainSubtitle">Platform status and setup progress</p>
987
+ </div>
988
+ <div class="header-actions">
989
+ <a href="https://github.com/wu529778790/open-im" target="_blank" class="btn btn-ghost btn-sm">
990
+ <svg style="width:16px;height:16px" viewBox="0 0 16 16" fill="currentColor">
991
+ <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/>
992
+ </svg>
993
+ <span id="footerGithubText">GitHub</span>
994
+ </a>
995
+ <button class="dark-mode-toggle" id="darkModeToggle" type="button" aria-label="Toggle dark mode">
996
+ <svg class="sun-icon" style="width:16px;height:16px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
997
+ <circle cx="12" cy="12" r="5"/>
998
+ <path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/>
999
+ </svg>
1000
+ <svg class="moon-icon" style="width:16px;height:16px;display:none" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
1001
+ <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
1002
+ </svg>
1003
+ </button>
1004
+ <button class="lang-button" id="langButton">中文</button>
1005
+ </div>
959
1006
  </div>
960
- <div class="header-actions">
961
- <a href="https://github.com/wu529778790/open-im" target="_blank" class="btn btn-ghost btn-sm">
962
- <svg style="width:16px;height:16px" viewBox="0 0 16 16" fill="currentColor">
963
- <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/>
964
- </svg>
965
- <span id="footerGithubText">GitHub</span>
966
- </a>
967
- <button class="dark-mode-toggle" id="darkModeToggle" type="button" aria-label="Toggle dark mode">
968
- <svg class="sun-icon" style="width:16px;height:16px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
969
- <circle cx="12" cy="12" r="5"/>
970
- <path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/>
971
- </svg>
972
- <svg class="moon-icon" style="width:16px;height:16px;display:none" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
973
- <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
974
- </svg>
975
- </button>
976
- <button class="lang-button" id="langButton">中文</button>
1007
+ <div class="main-header-toolbar" id="headerToolbar" role="toolbar" aria-label="Bridge controls">
1008
+ <button type="button" id="headerValidateButton" class="btn btn-warning btn-sm">Validate</button>
1009
+ <button type="button" id="headerSaveButton" class="btn btn-secondary btn-sm">Save config</button>
1010
+ <button type="button" id="headerStartButton" class="btn btn-primary btn-sm">Start bridge</button>
1011
+ <button type="button" id="headerStopButton" class="btn btn-danger btn-sm">Stop bridge</button>
977
1012
  </div>
978
1013
  </header>
979
1014
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wu529778790/open-im",
3
- "version": "1.9.3-beta.10",
3
+ "version": "1.9.3-beta.11",
4
4
  "description": "Multi-platform IM bridge for AI CLI tools (Claude, Codex, CodeBuddy)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",