@windypro-rourou/dsh-logcat 0.5.0-preview.0 → 0.5.0-preview.1

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.
Files changed (2) hide show
  1. package/lib/client.js +15 -3
  2. package/package.json +48 -48
package/lib/client.js CHANGED
@@ -35,8 +35,10 @@ window.__ModuleLoader__.load({
35
35
  [data-dsh-logcat-entry] .lc-entry-label { font-size: 13px; line-height: 1.2; opacity: .92; }
36
36
  .dsh-logcat-view { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 94vw); display: flex; flex-direction: column; background: var(--lc-bg, #ffffff); border-left: 1px solid rgba(128,128,128,.3); box-shadow: -10px 0 28px rgba(0,0,0,.18); z-index: 9999; }
37
37
  .dsh-logcat-view[hidden] { display: none !important; }
38
- .dsh-logcat-resize { position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; cursor: col-resize; z-index: 2; }
39
- .dsh-logcat-resize:hover, .dsh-logcat-resize[data-drag] { background: rgba(128,128,128,.28); }
38
+ .dsh-logcat-resize { position: absolute; left: -6px; top: 0; bottom: 0; width: 12px; cursor: col-resize; z-index: 2; display: flex; align-items: center; justify-content: center; }
39
+ .dsh-logcat-resize::before { content: ""; width: 3px; height: 48px; border-radius: 2px; background: rgba(128,128,128,.35); transition: background .15s, height .15s; }
40
+ .dsh-logcat-resize:hover::before, .dsh-logcat-resize[data-drag]::before { background: rgba(128,128,128,.75); height: 72px; }
41
+ .dsh-logcat-resize:hover, .dsh-logcat-resize[data-drag] { background: rgba(128,128,128,.16); }
40
42
  .lc-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }
41
43
  .lc-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid rgba(128,128,128,.25); flex: none; }
42
44
  .lc-back { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; font-size: 13px; }
@@ -665,6 +667,16 @@ window.__ModuleLoader__.load({
665
667
  };
666
668
  const onDown = (e) => {
667
669
  e.preventDefault();
670
+ if (drag !== null) return;
671
+ // double-click on the handle resets to the default width
672
+ const now = Date.now();
673
+ if (now - (handle?._lastClick ?? 0) < 350) {
674
+ handle._lastClick = 0;
675
+ container.style.width = Math.min(DEFAULT_WIDTH, Math.max(MIN_WIDTH, window.innerWidth - 80)) + "px";
676
+ try { localStorage.setItem("dsh-logcat-width", String(Math.min(DEFAULT_WIDTH, Math.max(MIN_WIDTH, window.innerWidth - 80)))); } catch { /* private */ }
677
+ return;
678
+ }
679
+ handle._lastClick = now;
668
680
  drag = { startX: e.clientX, startWidth: container.getBoundingClientRect().width };
669
681
  handle?.setAttribute("data-drag", "");
670
682
  window.addEventListener("mousemove", onMove);
@@ -684,7 +696,7 @@ window.__ModuleLoader__.load({
684
696
  container.hidden = true; // side-drawer: hidden until the sidebar entry is clicked
685
697
  handle = document.createElement("div");
686
698
  handle.className = "dsh-logcat-resize";
687
- handle.title = "拖拽调整宽度";
699
+ handle.title = "拖拽调整宽度(双击重置)";
688
700
  handle.addEventListener("mousedown", onDown);
689
701
  container.appendChild(handle);
690
702
  document.body.appendChild(container);
package/package.json CHANGED
@@ -1,48 +1,48 @@
1
- {
2
- "name": "@windypro-rourou/dsh-logcat",
3
- "description": "Android Logcat viewer for the dsh web GUI: auto-connects to any adb device in debug mode, live logcat stream with level/keyword filters, pause/clear/export, plus agent tools (logcat_recent). Hot-pluggable — mounted via ~/.dsh/cordis.patch.yml + a profile node_modules copy, no dsh source changes.",
4
- "version": "0.5.0-preview.0",
5
- "type": "module",
6
- "packageManager": "pnpm@11.22.0",
7
- "engines": {
8
- "node": "^22.19.0 || >=24.0.0"
9
- },
10
- "main": "lib/index.js",
11
- "exports": {
12
- ".": {
13
- "default": "./lib/index.js"
14
- },
15
- "./client": {
16
- "default": "./lib/client.js"
17
- },
18
- "./package.json": "./package.json"
19
- },
20
- "dsh": {
21
- "bundle": {
22
- "patch": "./cordis.patch.yml"
23
- },
24
- "client": {
25
- "inject": [
26
- "@deepseek-ai/dsh-client-runtime"
27
- ],
28
- "platform": "web"
29
- }
30
- },
31
- "dependencies": {
32
- "ws": "^8.18.0"
33
- },
34
- "peerDependencies": {
35
- "react": "^18.2.0",
36
- "react-dom": "^18.2.0"
37
- },
38
- "files": [
39
- "lib/**/*.js",
40
- "cordis.patch.yml",
41
- "README.md"
42
- ],
43
- "license": "Apache-2.0",
44
- "repository": {
45
- "type": "git",
46
- "url": "https://github.com/zhu1090093659/dsh-web-ui.git"
47
- }
48
- }
1
+ {
2
+ "name": "@windypro-rourou/dsh-logcat",
3
+ "description": "Android Logcat viewer for the dsh web GUI: auto-connects to any adb device in debug mode, live logcat stream with level/keyword filters, pause/clear/export, plus agent tools (logcat_recent). Hot-pluggable — mounted via ~/.dsh/cordis.patch.yml + a profile node_modules copy, no dsh source changes.",
4
+ "version": "0.5.0-preview.1",
5
+ "type": "module",
6
+ "packageManager": "pnpm@11.22.0",
7
+ "engines": {
8
+ "node": "^22.19.0 || >=24.0.0"
9
+ },
10
+ "main": "lib/index.js",
11
+ "exports": {
12
+ ".": {
13
+ "default": "./lib/index.js"
14
+ },
15
+ "./client": {
16
+ "default": "./lib/client.js"
17
+ },
18
+ "./package.json": "./package.json"
19
+ },
20
+ "dsh": {
21
+ "bundle": {
22
+ "patch": "./cordis.patch.yml"
23
+ },
24
+ "client": {
25
+ "inject": [
26
+ "@deepseek-ai/dsh-client-runtime"
27
+ ],
28
+ "platform": "web"
29
+ }
30
+ },
31
+ "dependencies": {
32
+ "ws": "^8.18.0"
33
+ },
34
+ "peerDependencies": {
35
+ "react": "^18.2.0",
36
+ "react-dom": "^18.2.0"
37
+ },
38
+ "files": [
39
+ "lib/**/*.js",
40
+ "cordis.patch.yml",
41
+ "README.md"
42
+ ],
43
+ "license": "Apache-2.0",
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "https://github.com/WindyPro-rourou/dsh-logcat.git"
47
+ }
48
+ }