dsh-plugin-ipsenav-browser 0.0.0-stage → 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/LICENSE +232 -0
- package/README.md +122 -2
- package/assets/brand/logo-horizontal-banner.svg +7 -0
- package/assets/brand/logo-horizontal-small.svg +4 -0
- package/assets/brand/logo-horizontal-white.svg +4 -0
- package/assets/brand/logo-horizontal.svg +4 -0
- package/assets/brand/logo-loader-mark-white.svg +15 -0
- package/assets/brand/logo-loader-mark.svg +15 -0
- package/assets/brand/logo-loader-white.svg +21 -0
- package/assets/brand/logo-loader.svg +21 -0
- package/assets/brand/logo-lockup-white.svg +4 -0
- package/assets/brand/logo-lockup.svg +4 -0
- package/assets/brand/logo-mark-solid-white.svg +5 -0
- package/assets/brand/logo-mark-solid.svg +5 -0
- package/assets/brand/logo-mark-white.svg +6 -0
- package/assets/brand/logo-mark.svg +6 -0
- package/assets/brand/logo-stacked-white.svg +4 -0
- package/assets/brand/logo-stacked.svg +4 -0
- package/client.js +471 -0
- package/cordis.patch.yml +4 -0
- package/icon.svg +24 -0
- package/index.js +1114 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +64 -4
- package/skills/ipsenav-browser/SKILL.md +154 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 481.08 119" width="481.08" height="119" role="img" aria-labelledby="t">
|
|
2
|
+
<title id="t">42ANS Workshop</title>
|
|
3
|
+
<g transform="translate(-10.17 6)"><g transform="translate(0 -8.5) scale(0.31)"><path d="M200,60 L299,299 L60,200 L299,101 L200,340 L101,101 L340,200 L101,299 Z" fill="none" stroke="currentColor" stroke-width="6" stroke-linejoin="miter" stroke-miterlimit="4"/></g><rect x="150" y="0" width="1.86" height="107" fill="currentColor" opacity=".45"/><path d="M223.05 0 L223.05 44.47 L232.95 44.47 L232.95 55.09 L223.05 55.09 L223.05 70 L209.76 70 L209.76 55.09 L178.49 55.09 L178.49 44.38 Q188.21 33.53 196.7 21.42 Q205.2 9.31 209.54 0 Z M191.42 44.47 L209.76 44.47 L209.76 18.8 Q207.59 22.87 203.55 28.65 Q199.5 34.44 191.42 44.47 Z M254.27 57.84 L283.96 57.84 L283.96 70 L237.41 70 L237.41 64.8 Q237.41 59.34 239.42 54.82 Q241.43 50.3 244.96 46.39 Q248.48 42.48 255.89 37.24 Q262.67 32.18 265.38 28.27 Q268.1 24.36 268.1 19.97 Q268.1 10.53 257.79 10.53 Q248.75 10.53 240.53 17.76 L240.53 4.74 Q249.7 -1.17 261.14 -1.17 Q271.62 -1.17 277.72 4.18 Q283.82 9.54 283.82 18.93 Q283.82 24.18 282.06 28.4 Q280.3 32.63 276.95 36.33 Q273.61 40.04 266.24 45.24 Q259.15 50.3 256.71 53.05 Q254.27 55.81 254.27 57.84 Z M356.98 70 L340.71 70 L335.47 53.96 L310.02 53.96 L304.87 70 L288.69 70 L314.32 0 L331.85 0 Z M331.94 42.43 L323.99 18.17 Q323.22 15.86 322.9 12.07 L322.5 12.07 Q322.22 15.14 321.28 17.99 L313.28 42.43 Z M426.56 70 L411.29 70 L381.64 24.72 Q379.34 21.19 378.3 19.03 L378.07 19.03 Q378.48 22.64 378.48 30.19 L378.48 70 L364.33 70 L364.33 0 L380.6 0 L409.16 44.02 Q412.01 48.4 412.64 49.57 L412.87 49.57 Q412.42 47.04 412.42 39.9 L412.42 0 L426.56 0 Z M438.12 52.38 Q446.57 59.38 457.33 59.38 Q463.43 59.38 466.5 57.28 Q469.57 55.18 469.57 51.88 Q469.57 49.03 467.13 46.5 Q464.69 43.97 454.25 39.63 Q437.85 32.67 437.85 19.39 Q437.85 9.63 445.28 4.23 Q452.72 -1.17 464.96 -1.17 Q475.22 -1.17 482.18 1.49 L482.18 15.5 Q475.13 10.71 465.69 10.71 Q460.17 10.71 456.87 12.72 Q453.58 14.73 453.58 18.12 Q453.58 20.83 455.84 23.11 Q458.09 25.4 467 29.28 Q477.44 33.76 481.35 38.73 Q485.25 43.7 485.25 50.57 Q485.25 60.65 478.11 65.93 Q470.97 71.22 457.82 71.22 Q445.8 71.22 438.12 67.33 Z" fill="currentColor"/><path d="M217.5 86 L211.62 107 L208.46 107 L204.23 91.87 Q203.94 90.84 203.89 89.7 L203.83 89.7 Q203.75 90.83 203.46 91.84 L199.18 107 L196.05 107 L189.97 86 L192.96 86 L197.25 101.86 Q197.53 102.93 197.59 104.02 L197.67 104.02 Q197.73 103.2 198.11 101.86 L202.66 86 L205.33 86 L209.66 101.98 Q209.88 102.77 210.02 103.99 L210.07 103.99 Q210.14 103.11 210.46 101.93 L214.59 86 Z M231.81 96.75 Q231.81 91.67 234.56 88.66 Q237.31 85.65 242.02 85.65 Q246.4 85.65 249.07 88.59 Q251.74 91.53 251.74 96.25 Q251.74 101.36 249 104.36 Q246.26 107.35 241.68 107.35 Q237.2 107.35 234.51 104.41 Q231.81 101.47 231.81 96.75 Z M234.66 96.53 Q234.66 100.34 236.6 102.64 Q238.55 104.94 241.68 104.94 Q245.04 104.94 246.96 102.74 Q248.88 100.53 248.88 96.57 Q248.88 92.51 247 90.3 Q245.12 88.09 241.85 88.09 Q238.64 88.09 236.65 90.42 Q234.66 92.75 234.66 96.53 Z M283.72 107 L280.52 107 L277.04 101.17 Q276 99.42 275.13 98.79 Q274.26 98.16 273.06 98.16 L271.1 98.16 L271.1 107 L268.39 107 L268.39 86 L274.79 86 Q277.85 86 279.59 87.48 Q281.32 88.96 281.32 91.61 Q281.32 95.98 276.66 97.28 L276.66 97.35 Q277.53 97.71 278.16 98.39 Q278.79 99.07 279.79 100.71 Z M271.1 88.37 L271.1 95.79 L274.3 95.79 Q276.16 95.79 277.32 94.7 Q278.48 93.62 278.48 91.86 Q278.48 90.22 277.42 89.29 Q276.36 88.37 274.34 88.37 Z M314.06 107 L310.34 107 L302.45 97.46 Q302.05 96.95 301.9 96.67 L301.83 96.67 L301.83 107 L299.12 107 L299.12 86 L301.83 86 L301.83 95.88 L301.9 95.88 Q302.13 95.52 302.45 95.11 L310.07 86 L313.42 86 L304.61 96.07 Z M328.37 103.05 Q329.33 103.9 330.94 104.44 Q332.55 104.98 334.01 104.98 Q338.42 104.98 338.42 101.83 Q338.42 100.95 337.95 100.25 Q337.48 99.54 336.65 99 Q335.82 98.46 333.54 97.33 Q330.39 95.76 329.38 94.41 Q328.38 93.06 328.38 91.33 Q328.38 88.71 330.48 87.18 Q332.58 85.65 335.78 85.65 Q338.91 85.65 340.38 86.41 L340.38 89.36 Q338.48 88.05 335.58 88.05 Q333.65 88.05 332.44 88.85 Q331.23 89.66 331.23 91.1 Q331.23 92.37 332.07 93.17 Q332.91 93.97 335.71 95.35 Q338.8 96.83 340.04 98.31 Q341.27 99.79 341.27 101.63 Q341.27 104.4 339.27 105.87 Q337.26 107.35 333.69 107.35 Q332.45 107.35 330.79 107.01 Q329.12 106.66 328.37 106.15 Z M374.02 107 L371.31 107 L371.31 97.54 L360.68 97.54 L360.68 107 L357.97 107 L357.97 86 L360.68 86 L360.68 95.12 L371.31 95.12 L371.31 86 L374.02 86 Z M390.68 96.75 Q390.68 91.67 393.44 88.66 Q396.19 85.65 400.89 85.65 Q405.27 85.65 407.94 88.59 Q410.61 91.53 410.61 96.25 Q410.61 101.36 407.88 104.36 Q405.14 107.35 400.55 107.35 Q396.08 107.35 393.38 104.41 Q390.68 101.47 390.68 96.75 Z M393.53 96.53 Q393.53 100.34 395.48 102.64 Q397.42 104.94 400.55 104.94 Q403.92 104.94 405.83 102.74 Q407.75 100.53 407.75 96.57 Q407.75 92.51 405.88 90.3 Q404 88.09 400.73 88.09 Q397.52 88.09 395.52 90.42 Q393.53 92.75 393.53 96.53 Z M429.98 99.15 L429.98 107 L427.27 107 L427.27 86 L433.23 86 Q436.64 86 438.51 87.64 Q440.39 89.28 440.39 92.33 Q440.39 95.42 438.19 97.34 Q436 99.26 432.7 99.15 Z M429.98 88.39 L429.98 96.76 L432.49 96.76 Q434.97 96.76 436.26 95.65 Q437.54 94.53 437.54 92.44 Q437.54 88.39 432.74 88.39 Z" fill="currentColor"/></g>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 40 320 320" width="16" height="16" role="img" aria-labelledby="t">
|
|
2
|
+
<title id="t">42ANS Workshop 标志(小尺寸实心版)</title>
|
|
3
|
+
<!-- 小尺寸是重画不是缩小:16–32px 用实心;四周留 20 单位安全区 -->
|
|
4
|
+
<path d="M200,60 L299,299 L60,200 L299,101 L200,340 L101,101 L340,200 L101,299 Z" fill="#ffffff"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 40 320 320" width="16" height="16" role="img" aria-labelledby="t">
|
|
2
|
+
<title id="t">42ANS Workshop 标志(小尺寸实心版)</title>
|
|
3
|
+
<!-- 小尺寸是重画不是缩小:16–32px 用实心;四周留 20 单位安全区 -->
|
|
4
|
+
<path d="M200,60 L299,299 L60,200 L299,101 L200,340 L101,101 L340,200 L101,299 Z" fill="currentColor"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400" width="400" height="400" role="img" aria-labelledby="t">
|
|
2
|
+
<title id="t">42ANS Workshop 标志</title>
|
|
3
|
+
<!-- 八角星 {8/3}:外接圆 R=140,圆心 (200,200),400 网格 -->
|
|
4
|
+
<!-- stroke-width 4.5 ≈ 标志宽度的 1.1%,建议尺寸 ≥ 160px;更小请用 logo-mark-solid -->
|
|
5
|
+
<path d="M200,60 L299,299 L60,200 L299,101 L200,340 L101,101 L340,200 L101,299 Z" fill="none" stroke="#ffffff" stroke-width="4.5" stroke-linejoin="miter" stroke-miterlimit="4"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400" width="400" height="400" role="img" aria-labelledby="t">
|
|
2
|
+
<title id="t">42ANS Workshop 标志</title>
|
|
3
|
+
<!-- 八角星 {8/3}:外接圆 R=140,圆心 (200,200),400 网格 -->
|
|
4
|
+
<!-- stroke-width 4.5 ≈ 标志宽度的 1.1%,建议尺寸 ≥ 160px;更小请用 logo-mark-solid -->
|
|
5
|
+
<path d="M200,60 L299,299 L60,200 L299,101 L200,340 L101,101 L340,200 L101,299 Z" fill="none" stroke="currentColor" stroke-width="4.5" stroke-linejoin="miter" stroke-miterlimit="4"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 238.15 193.82" width="238.15" height="193.82" role="img" aria-labelledby="t">
|
|
2
|
+
<title id="t">42ANS Workshop</title>
|
|
3
|
+
<g transform="translate(77.67 8.64) scale(0.207)"><path d="M200,60 L299,299 L60,200 L299,101 L200,340 L101,101 L340,200 L101,299 Z" fill="none" stroke="#ffffff" stroke-width="6" stroke-linejoin="miter" stroke-miterlimit="4"/></g><path d="M40.72 111.6 L40.72 143.62 L47.85 143.62 L47.85 151.26 L40.72 151.26 L40.72 162 L31.16 162 L31.16 151.26 L8.64 151.26 L8.64 143.55 Q15.64 135.74 21.75 127.02 Q27.87 118.3 30.99 111.6 Z M17.95 143.62 L31.16 143.62 L31.16 125.14 Q29.59 128.06 26.68 132.23 Q23.77 136.39 17.95 143.62 Z M63.2 153.25 L84.58 153.25 L84.58 162 L51.06 162 L51.06 158.26 Q51.06 154.32 52.51 151.07 Q53.96 147.81 56.5 145 Q59.03 142.18 64.37 138.41 Q69.25 134.77 71.2 131.95 Q73.15 129.14 73.15 125.98 Q73.15 119.18 65.74 119.18 Q59.23 119.18 53.31 124.39 L53.31 115.02 Q59.91 110.75 68.14 110.75 Q75.69 110.75 80.09 114.61 Q84.48 118.47 84.48 125.23 Q84.48 129.01 83.21 132.05 Q81.94 135.09 79.53 137.76 Q77.12 140.43 71.82 144.17 Q66.71 147.81 64.96 149.8 Q63.2 151.78 63.2 153.25 Z M137.15 162 L125.44 162 L121.66 150.45 L103.34 150.45 L99.63 162 L87.99 162 L106.43 111.6 L119.06 111.6 Z M119.12 142.15 L113.4 124.68 Q112.84 123.02 112.62 120.29 L112.32 120.29 Q112.13 122.5 111.44 124.55 L105.69 142.15 Z M187.25 162 L176.25 162 L154.91 129.4 Q153.25 126.86 152.5 125.3 L152.34 125.3 Q152.63 127.9 152.63 133.33 L152.63 162 L142.45 162 L142.45 111.6 L154.16 111.6 L174.72 143.29 Q176.77 146.45 177.23 147.29 L177.39 147.29 Q177.07 145.47 177.07 140.33 L177.07 111.6 L187.25 111.6 Z M195.57 149.31 Q201.66 154.35 209.4 154.35 Q213.79 154.35 216.01 152.84 Q218.22 151.33 218.22 148.95 Q218.22 146.9 216.46 145.08 Q214.71 143.26 207.19 140.14 Q195.38 135.12 195.38 125.56 Q195.38 118.53 200.73 114.64 Q206.08 110.75 214.9 110.75 Q222.29 110.75 227.3 112.67 L227.3 122.76 Q222.22 119.31 215.42 119.31 Q211.45 119.31 209.08 120.76 Q206.7 122.21 206.7 124.65 Q206.7 126.6 208.33 128.24 Q209.95 129.89 216.36 132.68 Q223.88 135.91 226.69 139.48 Q229.51 143.06 229.51 148.01 Q229.51 155.26 224.37 159.07 Q219.23 162.88 209.76 162.88 Q201.1 162.88 195.57 160.08 Z" fill="#ffffff"/><path d="M59.43 172.08 L55.76 185.18 L53.79 185.18 L51.15 175.74 Q50.97 175.1 50.94 174.39 L50.91 174.39 Q50.86 175.09 50.67 175.73 L48.01 185.18 L46.05 185.18 L42.25 172.08 L44.12 172.08 L46.8 181.98 Q46.97 182.65 47.01 183.32 L47.06 183.32 Q47.1 182.82 47.34 181.98 L50.17 172.08 L51.84 172.08 L54.54 182.05 Q54.68 182.54 54.76 183.31 L54.8 183.31 Q54.84 182.76 55.04 182.02 L57.62 172.08 Z M67.99 178.79 Q67.99 175.62 69.71 173.74 Q71.42 171.86 74.36 171.86 Q77.09 171.86 78.76 173.7 Q80.42 175.53 80.42 178.48 Q80.42 181.66 78.71 183.53 Q77.01 185.4 74.15 185.4 Q71.36 185.4 69.67 183.57 Q67.99 181.73 67.99 178.79 Z M69.76 178.65 Q69.76 181.03 70.98 182.46 Q72.19 183.9 74.15 183.9 Q76.24 183.9 77.44 182.52 Q78.64 181.15 78.64 178.68 Q78.64 176.14 77.47 174.76 Q76.3 173.38 74.26 173.38 Q72.25 173.38 71.01 174.84 Q69.76 176.29 69.76 178.65 Z M100.01 185.18 L98.01 185.18 L95.84 181.55 Q95.19 180.46 94.65 180.06 Q94.1 179.67 93.35 179.67 L92.13 179.67 L92.13 185.18 L90.44 185.18 L90.44 172.08 L94.43 172.08 Q96.35 172.08 97.43 173 Q98.51 173.92 98.51 175.58 Q98.51 178.31 95.6 179.12 L95.6 179.16 Q96.14 179.39 96.54 179.81 Q96.93 180.24 97.56 181.26 Z M92.13 173.56 L92.13 178.19 L94.13 178.19 Q95.29 178.19 96.01 177.51 Q96.74 176.83 96.74 175.73 Q96.74 174.71 96.08 174.14 Q95.42 173.56 94.15 173.56 Z M118.56 185.18 L116.24 185.18 L111.32 179.23 Q111.07 178.92 110.97 178.74 L110.93 178.74 L110.93 185.18 L109.24 185.18 L109.24 172.08 L110.93 172.08 L110.93 178.25 L110.97 178.25 Q111.12 178.02 111.32 177.76 L116.08 172.08 L118.16 172.08 L112.67 178.37 Z M127.12 182.72 Q127.72 183.25 128.72 183.59 Q129.73 183.92 130.64 183.92 Q133.39 183.92 133.39 181.96 Q133.39 181.41 133.1 180.97 Q132.8 180.53 132.29 180.19 Q131.77 179.85 130.35 179.15 Q128.38 178.17 127.75 177.33 Q127.12 176.49 127.12 175.4 Q127.12 173.77 128.44 172.82 Q129.75 171.86 131.74 171.86 Q133.7 171.86 134.61 172.33 L134.61 174.18 Q133.43 173.36 131.62 173.36 Q130.42 173.36 129.66 173.86 Q128.9 174.36 128.9 175.26 Q128.9 176.06 129.43 176.56 Q129.95 177.05 131.7 177.92 Q133.63 178.84 134.4 179.76 Q135.17 180.68 135.17 181.83 Q135.17 183.56 133.92 184.48 Q132.67 185.4 130.44 185.4 Q129.66 185.4 128.63 185.19 Q127.59 184.97 127.12 184.65 Z M155.23 185.18 L153.54 185.18 L153.54 179.28 L146.9 179.28 L146.9 185.18 L145.21 185.18 L145.21 172.08 L146.9 172.08 L146.9 177.77 L153.54 177.77 L153.54 172.08 L155.23 172.08 Z M165.25 178.79 Q165.25 175.62 166.97 173.74 Q168.69 171.86 171.62 171.86 Q174.36 171.86 176.02 173.7 Q177.69 175.53 177.69 178.48 Q177.69 181.66 175.98 183.53 Q174.27 185.4 171.41 185.4 Q168.62 185.4 166.94 183.57 Q165.25 181.73 165.25 178.79 Z M167.03 178.65 Q167.03 181.03 168.25 182.46 Q169.46 183.9 171.41 183.9 Q173.51 183.9 174.71 182.52 Q175.91 181.15 175.91 178.68 Q175.91 176.14 174.73 174.76 Q173.56 173.38 171.52 173.38 Q169.52 173.38 168.27 174.84 Q167.03 176.29 167.03 178.65 Z M189.4 180.29 L189.4 185.18 L187.71 185.18 L187.71 172.08 L191.43 172.08 Q193.55 172.08 194.73 173.1 Q195.9 174.13 195.9 176.03 Q195.9 177.96 194.53 179.16 Q193.16 180.35 191.1 180.29 Z M189.4 173.57 L189.4 178.8 L190.96 178.8 Q192.51 178.8 193.32 178.1 Q194.12 177.4 194.12 176.1 Q194.12 173.57 191.13 173.57 Z" fill="#ffffff"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 238.15 193.82" width="238.15" height="193.82" role="img" aria-labelledby="t">
|
|
2
|
+
<title id="t">42ANS Workshop</title>
|
|
3
|
+
<g transform="translate(77.67 8.64) scale(0.207)"><path d="M200,60 L299,299 L60,200 L299,101 L200,340 L101,101 L340,200 L101,299 Z" fill="none" stroke="currentColor" stroke-width="6" stroke-linejoin="miter" stroke-miterlimit="4"/></g><path d="M40.72 111.6 L40.72 143.62 L47.85 143.62 L47.85 151.26 L40.72 151.26 L40.72 162 L31.16 162 L31.16 151.26 L8.64 151.26 L8.64 143.55 Q15.64 135.74 21.75 127.02 Q27.87 118.3 30.99 111.6 Z M17.95 143.62 L31.16 143.62 L31.16 125.14 Q29.59 128.06 26.68 132.23 Q23.77 136.39 17.95 143.62 Z M63.2 153.25 L84.58 153.25 L84.58 162 L51.06 162 L51.06 158.26 Q51.06 154.32 52.51 151.07 Q53.96 147.81 56.5 145 Q59.03 142.18 64.37 138.41 Q69.25 134.77 71.2 131.95 Q73.15 129.14 73.15 125.98 Q73.15 119.18 65.74 119.18 Q59.23 119.18 53.31 124.39 L53.31 115.02 Q59.91 110.75 68.14 110.75 Q75.69 110.75 80.09 114.61 Q84.48 118.47 84.48 125.23 Q84.48 129.01 83.21 132.05 Q81.94 135.09 79.53 137.76 Q77.12 140.43 71.82 144.17 Q66.71 147.81 64.96 149.8 Q63.2 151.78 63.2 153.25 Z M137.15 162 L125.44 162 L121.66 150.45 L103.34 150.45 L99.63 162 L87.99 162 L106.43 111.6 L119.06 111.6 Z M119.12 142.15 L113.4 124.68 Q112.84 123.02 112.62 120.29 L112.32 120.29 Q112.13 122.5 111.44 124.55 L105.69 142.15 Z M187.25 162 L176.25 162 L154.91 129.4 Q153.25 126.86 152.5 125.3 L152.34 125.3 Q152.63 127.9 152.63 133.33 L152.63 162 L142.45 162 L142.45 111.6 L154.16 111.6 L174.72 143.29 Q176.77 146.45 177.23 147.29 L177.39 147.29 Q177.07 145.47 177.07 140.33 L177.07 111.6 L187.25 111.6 Z M195.57 149.31 Q201.66 154.35 209.4 154.35 Q213.79 154.35 216.01 152.84 Q218.22 151.33 218.22 148.95 Q218.22 146.9 216.46 145.08 Q214.71 143.26 207.19 140.14 Q195.38 135.12 195.38 125.56 Q195.38 118.53 200.73 114.64 Q206.08 110.75 214.9 110.75 Q222.29 110.75 227.3 112.67 L227.3 122.76 Q222.22 119.31 215.42 119.31 Q211.45 119.31 209.08 120.76 Q206.7 122.21 206.7 124.65 Q206.7 126.6 208.33 128.24 Q209.95 129.89 216.36 132.68 Q223.88 135.91 226.69 139.48 Q229.51 143.06 229.51 148.01 Q229.51 155.26 224.37 159.07 Q219.23 162.88 209.76 162.88 Q201.1 162.88 195.57 160.08 Z" fill="currentColor"/><path d="M59.43 172.08 L55.76 185.18 L53.79 185.18 L51.15 175.74 Q50.97 175.1 50.94 174.39 L50.91 174.39 Q50.86 175.09 50.67 175.73 L48.01 185.18 L46.05 185.18 L42.25 172.08 L44.12 172.08 L46.8 181.98 Q46.97 182.65 47.01 183.32 L47.06 183.32 Q47.1 182.82 47.34 181.98 L50.17 172.08 L51.84 172.08 L54.54 182.05 Q54.68 182.54 54.76 183.31 L54.8 183.31 Q54.84 182.76 55.04 182.02 L57.62 172.08 Z M67.99 178.79 Q67.99 175.62 69.71 173.74 Q71.42 171.86 74.36 171.86 Q77.09 171.86 78.76 173.7 Q80.42 175.53 80.42 178.48 Q80.42 181.66 78.71 183.53 Q77.01 185.4 74.15 185.4 Q71.36 185.4 69.67 183.57 Q67.99 181.73 67.99 178.79 Z M69.76 178.65 Q69.76 181.03 70.98 182.46 Q72.19 183.9 74.15 183.9 Q76.24 183.9 77.44 182.52 Q78.64 181.15 78.64 178.68 Q78.64 176.14 77.47 174.76 Q76.3 173.38 74.26 173.38 Q72.25 173.38 71.01 174.84 Q69.76 176.29 69.76 178.65 Z M100.01 185.18 L98.01 185.18 L95.84 181.55 Q95.19 180.46 94.65 180.06 Q94.1 179.67 93.35 179.67 L92.13 179.67 L92.13 185.18 L90.44 185.18 L90.44 172.08 L94.43 172.08 Q96.35 172.08 97.43 173 Q98.51 173.92 98.51 175.58 Q98.51 178.31 95.6 179.12 L95.6 179.16 Q96.14 179.39 96.54 179.81 Q96.93 180.24 97.56 181.26 Z M92.13 173.56 L92.13 178.19 L94.13 178.19 Q95.29 178.19 96.01 177.51 Q96.74 176.83 96.74 175.73 Q96.74 174.71 96.08 174.14 Q95.42 173.56 94.15 173.56 Z M118.56 185.18 L116.24 185.18 L111.32 179.23 Q111.07 178.92 110.97 178.74 L110.93 178.74 L110.93 185.18 L109.24 185.18 L109.24 172.08 L110.93 172.08 L110.93 178.25 L110.97 178.25 Q111.12 178.02 111.32 177.76 L116.08 172.08 L118.16 172.08 L112.67 178.37 Z M127.12 182.72 Q127.72 183.25 128.72 183.59 Q129.73 183.92 130.64 183.92 Q133.39 183.92 133.39 181.96 Q133.39 181.41 133.1 180.97 Q132.8 180.53 132.29 180.19 Q131.77 179.85 130.35 179.15 Q128.38 178.17 127.75 177.33 Q127.12 176.49 127.12 175.4 Q127.12 173.77 128.44 172.82 Q129.75 171.86 131.74 171.86 Q133.7 171.86 134.61 172.33 L134.61 174.18 Q133.43 173.36 131.62 173.36 Q130.42 173.36 129.66 173.86 Q128.9 174.36 128.9 175.26 Q128.9 176.06 129.43 176.56 Q129.95 177.05 131.7 177.92 Q133.63 178.84 134.4 179.76 Q135.17 180.68 135.17 181.83 Q135.17 183.56 133.92 184.48 Q132.67 185.4 130.44 185.4 Q129.66 185.4 128.63 185.19 Q127.59 184.97 127.12 184.65 Z M155.23 185.18 L153.54 185.18 L153.54 179.28 L146.9 179.28 L146.9 185.18 L145.21 185.18 L145.21 172.08 L146.9 172.08 L146.9 177.77 L153.54 177.77 L153.54 172.08 L155.23 172.08 Z M165.25 178.79 Q165.25 175.62 166.97 173.74 Q168.69 171.86 171.62 171.86 Q174.36 171.86 176.02 173.7 Q177.69 175.53 177.69 178.48 Q177.69 181.66 175.98 183.53 Q174.27 185.4 171.41 185.4 Q168.62 185.4 166.94 183.57 Q165.25 181.73 165.25 178.79 Z M167.03 178.65 Q167.03 181.03 168.25 182.46 Q169.46 183.9 171.41 183.9 Q173.51 183.9 174.71 182.52 Q175.91 181.15 175.91 178.68 Q175.91 176.14 174.73 174.76 Q173.56 173.38 171.52 173.38 Q169.52 173.38 168.27 174.84 Q167.03 176.29 167.03 178.65 Z M189.4 180.29 L189.4 185.18 L187.71 185.18 L187.71 172.08 L191.43 172.08 Q193.55 172.08 194.73 173.1 Q195.9 174.13 195.9 176.03 Q195.9 177.96 194.53 179.16 Q193.16 180.35 191.1 180.29 Z M189.4 173.57 L189.4 178.8 L190.96 178.8 Q192.51 178.8 193.32 178.1 Q194.12 177.4 194.12 176.1 Q194.12 173.57 191.13 173.57 Z" fill="currentColor"/>
|
|
4
|
+
</svg>
|
package/client.js
ADDED
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ipsenav 浏览器插件的设置页(DSH Web Client 半)。
|
|
3
|
+
*
|
|
4
|
+
* 注册在 Plugins 页的 `plugins.row.config` 槽:行页面负责标题、图标和面包屑,
|
|
5
|
+
* 这里只画表单。字段都是 volatile:保存后立即生效,Host 不重挂插件;浏览器会话
|
|
6
|
+
* 会按新设置重建(关闭旧的、下次调用时用新配置打开)。表单只在点「保存设置」时
|
|
7
|
+
* 写入,离开页面即丢弃草稿。
|
|
8
|
+
*
|
|
9
|
+
* License: GPL-3.0-or-later
|
|
10
|
+
* Copyright (C) 2026 42ANS WORKSHOP
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
window.__ModuleLoader__.load({
|
|
14
|
+
id: 'dsh-plugin-ipsenav-browser',
|
|
15
|
+
factory(require) {
|
|
16
|
+
const React = require('react')
|
|
17
|
+
const h = React.createElement
|
|
18
|
+
const NS = 'ipsenav.browser'
|
|
19
|
+
|
|
20
|
+
const ZH = {
|
|
21
|
+
summary: '配置 Ipsenav 浏览器的核心路径、Profile 与默认行为。',
|
|
22
|
+
intro: '设置保存在当前 Profile 的插件配置里。保存后立即生效,不需要重启插件;正在使用的浏览器会话会按新设置重建。',
|
|
23
|
+
connection: '连接',
|
|
24
|
+
connectionHint: '插件用哪个核心目录启动浏览器,以及会话默认使用哪个持久 Profile。',
|
|
25
|
+
repoLabel: '核心目录(可选)',
|
|
26
|
+
repoHint: '本机核心包(ipsenav-browser-core)所在目录的绝对路径。留空时自动使用随插件安装的 core,找不到再读 IPSENAV_DSH_REPO。',
|
|
27
|
+
profileLabel: '默认 Profile',
|
|
28
|
+
profileHint: '登录态、Cookie 与扩展数据保存在这个 Profile 里。留空时使用 IPSENAV_DSH_PROFILE,未设置时用 work。',
|
|
29
|
+
mediaDirLabel: '截图与录屏目录',
|
|
30
|
+
mediaDirHint: '绝对路径。留空时使用 IPSENAV_DSH_MEDIA_DIR,未设置时保存到系统临时目录下的 ipsenav-dsh。',
|
|
31
|
+
behavior: '默认行为',
|
|
32
|
+
behaviorHint: '单次 ipsenav_act 的超时,以及插件加载后是否先打开浏览器。',
|
|
33
|
+
actTimeoutLabel: '动作超时',
|
|
34
|
+
actTimeoutHint: '单次 ipsenav_act 的最长执行时间,10 到 600 秒,默认 180 秒。',
|
|
35
|
+
seconds: '秒',
|
|
36
|
+
openOnStartLabel: '加载插件时打开浏览器',
|
|
37
|
+
openOnStartHint: '开启后,保存设置或加载插件时立即打开浏览器会话;关闭时等第一次工具调用。',
|
|
38
|
+
save: '保存设置',
|
|
39
|
+
saving: '保存中…',
|
|
40
|
+
reset: '撤销修改',
|
|
41
|
+
noChanges: '没有需要保存的修改。',
|
|
42
|
+
saved: '已保存。新设置已生效,浏览器会话会按新设置重建。',
|
|
43
|
+
saveFailed: '保存失败:DSH 拒绝了这些设置。请重试。',
|
|
44
|
+
saveError: '保存失败:{message}',
|
|
45
|
+
errorSummary: '有 {count} 项设置需要修正。',
|
|
46
|
+
errorRepo: '请填写绝对路径,例如 D:\\tools\\ipsenav-browser-core。',
|
|
47
|
+
errorMedia: '请填写绝对路径,例如 D:\\ipsenav-media。',
|
|
48
|
+
errorTimeout: '请填写 10 到 600 之间的整数。',
|
|
49
|
+
loading: '正在读取设置…',
|
|
50
|
+
unavailable: '当前页面读不到这组设置。请回到插件行重新打开设置页。',
|
|
51
|
+
readOnly: '当前配置不可写,这些控件只能查看。',
|
|
52
|
+
licenseName: 'GPL-3.0-or-later',
|
|
53
|
+
licenseNote: 'Ipsenav 以 GNU GPL v3 或更高版本发布;分支可以按 GPLv3 或任何更高版本再分发。',
|
|
54
|
+
brand: '42ANS WORKSHOP',
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const EN = {
|
|
58
|
+
summary: 'Configure the Ipsenav Browser core path, profile, and default behavior.',
|
|
59
|
+
intro: 'These settings are stored in the current profile\'s plugin configuration. Saving applies them immediately without restarting the plugin. The plugin rebuilds the running browser session to match: it reopens immediately when open-on-start is on, and on the next tool call otherwise.',
|
|
60
|
+
connection: 'Connection',
|
|
61
|
+
connectionHint: 'Which core directory the plugin uses to launch the browser, and which persistent profile the browser session uses by default.',
|
|
62
|
+
repoLabel: 'Core directory (optional)',
|
|
63
|
+
repoHint: 'Absolute path to the ipsenav-browser-core directory. Leave blank to use the core installed with this plugin, then IPSENAV_DSH_REPO.',
|
|
64
|
+
profileLabel: 'Default profile',
|
|
65
|
+
profileHint: 'Logins, cookies, and extension data persist in this profile. Leave blank to use IPSENAV_DSH_PROFILE or the work profile.',
|
|
66
|
+
mediaDirLabel: 'Screenshot and recording folder',
|
|
67
|
+
mediaDirHint: 'Absolute path. Leave blank to use IPSENAV_DSH_MEDIA_DIR or the system temporary directory.',
|
|
68
|
+
behavior: 'Default behavior',
|
|
69
|
+
behaviorHint: 'The timeout for ipsenav_act calls, and whether the plugin opens the browser when it loads.',
|
|
70
|
+
actTimeoutLabel: 'Action timeout',
|
|
71
|
+
actTimeoutHint: 'Maximum run time for one ipsenav_act call, 10 to 600 seconds, default 180.',
|
|
72
|
+
seconds: 's',
|
|
73
|
+
openOnStartLabel: 'Open the browser when the plugin loads',
|
|
74
|
+
openOnStartHint: 'When on, saving settings or loading the plugin opens the browser session immediately. When off, the first tool call opens it.',
|
|
75
|
+
save: 'Save settings',
|
|
76
|
+
saving: 'Saving…',
|
|
77
|
+
reset: 'Discard changes',
|
|
78
|
+
noChanges: 'No changes to save.',
|
|
79
|
+
saved: 'Saved. The new settings are active; the browser session will rebuild to match.',
|
|
80
|
+
saveFailed: 'Couldn\'t save: the plugin host rejected these settings. Try again.',
|
|
81
|
+
saveError: 'Couldn\'t save: {message}',
|
|
82
|
+
errorSummary: 'Fix {count} of these settings.',
|
|
83
|
+
errorRepo: 'Enter an absolute path, for example D:\\tools\\ipsenav-browser-core.',
|
|
84
|
+
errorMedia: 'Enter an absolute path, for example D:\\ipsenav-media.',
|
|
85
|
+
errorTimeout: 'Enter a whole number from 10 to 600.',
|
|
86
|
+
loading: 'Reading settings…',
|
|
87
|
+
unavailable: 'This page cannot read these settings. Reopen the settings page from the plugin row.',
|
|
88
|
+
readOnly: 'This configuration is read-only, so these controls cannot change it.',
|
|
89
|
+
licenseName: 'GPL-3.0-or-later',
|
|
90
|
+
licenseNote: 'Ipsenav is released under the GNU GPL v3 or later; forks may be redistributed under GPLv3 or any later version.',
|
|
91
|
+
brand: '42ANS WORKSHOP',
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// 42ANS WORKSHOP 单行版,路径取自品牌资源 logo-horizontal.svg。
|
|
95
|
+
const BRAND_MARK = "M200,60 L299,299 L60,200 L299,101 L200,340 L101,101 L340,200 L101,299 Z"
|
|
96
|
+
const BRAND_WORD = "M219.05 21 L219.05 65.47 L228.95 65.47 L228.95 76.09 L219.05 76.09 L219.05 91 L205.76 91 L205.76 76.09 L174.49 76.09 L174.49 65.38 Q184.21 54.53 192.7 42.42 Q201.2 30.31 205.54 21 Z M187.42 65.47 L205.76 65.47 L205.76 39.8 Q203.59 43.87 199.55 49.65 Q195.5 55.44 187.42 65.47 Z M250.27 78.84 L279.96 78.84 L279.96 91 L233.41 91 L233.41 85.8 Q233.41 80.34 235.42 75.82 Q237.43 71.3 240.96 67.39 Q244.48 63.48 251.89 58.24 Q258.67 53.18 261.38 49.27 Q264.1 45.36 264.1 40.97 Q264.1 31.53 253.79 31.53 Q244.75 31.53 236.53 38.76 L236.53 25.74 Q245.7 19.83 257.14 19.83 Q267.62 19.83 273.72 25.18 Q279.82 30.54 279.82 39.93 Q279.82 45.18 278.06 49.4 Q276.3 53.63 272.95 57.33 Q269.61 61.04 262.24 66.24 Q255.15 71.3 252.71 74.05 Q250.27 76.81 250.27 78.84 Z M352.98 91 L336.71 91 L331.47 74.96 L306.02 74.96 L300.87 91 L284.69 91 L310.32 21 L327.85 21 Z M327.94 63.43 L319.99 39.17 Q319.22 36.86 318.9 33.07 L318.5 33.07 Q318.22 36.14 317.28 38.99 L309.28 63.43 Z M422.56 91 L407.29 91 L377.64 45.72 Q375.34 42.19 374.3 40.03 L374.07 40.03 Q374.48 43.64 374.48 51.19 L374.48 91 L360.33 91 L360.33 21 L376.6 21 L405.16 65.02 Q408.01 69.4 408.64 70.57 L408.87 70.57 Q408.42 68.04 408.42 60.9 L408.42 21 L422.56 21 Z M434.12 73.38 Q442.57 80.38 453.33 80.38 Q459.43 80.38 462.5 78.28 Q465.57 76.18 465.57 72.88 Q465.57 70.03 463.13 67.5 Q460.69 64.97 450.25 60.63 Q433.85 53.67 433.85 40.39 Q433.85 30.63 441.28 25.23 Q448.72 19.83 460.96 19.83 Q471.22 19.83 478.18 22.49 L478.18 36.5 Q471.13 31.71 461.69 31.71 Q456.17 31.71 452.87 33.72 Q449.58 35.73 449.58 39.12 Q449.58 41.83 451.84 44.11 Q454.09 46.4 463 50.28 Q473.44 54.76 477.35 59.73 Q481.25 64.7 481.25 71.57 Q481.25 81.65 474.11 86.93 Q466.97 92.22 453.82 92.22 Q441.8 92.22 434.12 88.33 Z"
|
|
97
|
+
const BRAND_SUB = "M556.54 63.8 L549.87 87.6 L546.29 87.6 L541.49 70.45 Q541.17 69.29 541.11 67.99 L541.05 67.99 Q540.96 69.27 540.62 70.42 L535.78 87.6 L532.23 87.6 L525.33 63.8 L528.73 63.8 L533.58 81.78 Q533.9 82.99 533.96 84.22 L534.06 84.22 Q534.13 83.3 534.56 81.78 L539.71 63.8 L542.74 63.8 L547.65 81.92 Q547.9 82.81 548.05 84.19 L548.12 84.19 Q548.19 83.19 548.56 81.85 L553.23 63.8 Z M570.03 75.98 Q570.03 70.22 573.15 66.81 Q576.27 63.4 581.6 63.4 Q586.56 63.4 589.59 66.73 Q592.62 70.07 592.62 75.42 Q592.62 81.21 589.51 84.6 Q586.41 88 581.22 88 Q576.15 88 573.09 84.67 Q570.03 81.33 570.03 75.98 Z M573.26 75.74 Q573.26 80.06 575.46 82.66 Q577.67 85.26 581.22 85.26 Q585.03 85.26 587.2 82.77 Q589.38 80.27 589.38 75.78 Q589.38 71.18 587.25 68.67 Q585.12 66.17 581.42 66.17 Q577.78 66.17 575.52 68.81 Q573.26 71.45 573.26 75.74 Z M626.15 87.6 L622.52 87.6 L618.57 80.99 Q617.39 79.01 616.41 78.3 Q615.42 77.58 614.06 77.58 L611.84 77.58 L611.84 87.6 L608.77 87.6 L608.77 63.8 L616.02 63.8 Q619.5 63.8 621.46 65.47 Q623.43 67.15 623.43 70.16 Q623.43 75.11 618.14 76.58 L618.14 76.66 Q619.13 77.08 619.84 77.84 Q620.56 78.61 621.69 80.47 Z M611.84 66.49 L611.84 74.89 L615.47 74.89 Q617.58 74.89 618.89 73.66 Q620.2 72.43 620.2 70.44 Q620.2 68.58 619 67.53 Q617.81 66.49 615.52 66.49 Z M657.81 87.6 L653.6 87.6 L644.65 76.78 Q644.19 76.21 644.02 75.89 L643.95 75.89 L643.95 87.6 L640.87 87.6 L640.87 63.8 L643.95 63.8 L643.95 75 L644.02 75 Q644.29 74.59 644.65 74.13 L653.29 63.8 L657.08 63.8 L647.1 75.22 Z M671.3 83.13 Q672.39 84.08 674.22 84.7 Q676.05 85.31 677.69 85.31 Q682.7 85.31 682.7 81.75 Q682.7 80.75 682.17 79.95 Q681.63 79.15 680.69 78.53 Q679.75 77.92 677.17 76.64 Q673.59 74.86 672.45 73.33 Q671.32 71.81 671.32 69.84 Q671.32 66.87 673.7 65.14 Q676.08 63.4 679.71 63.4 Q683.26 63.4 684.92 64.26 L684.92 67.61 Q682.76 66.12 679.48 66.12 Q677.29 66.12 675.92 67.03 Q674.54 67.95 674.54 69.58 Q674.54 71.02 675.5 71.93 Q676.45 72.83 679.63 74.4 Q683.13 76.08 684.53 77.75 Q685.93 79.43 685.93 81.52 Q685.93 84.65 683.66 86.32 Q681.38 88 677.34 88 Q675.93 88 674.04 87.61 Q672.16 87.22 671.3 86.63 Z M720.32 87.6 L717.25 87.6 L717.25 76.88 L705.2 76.88 L705.2 87.6 L702.13 87.6 L702.13 63.8 L705.2 63.8 L705.2 74.14 L717.25 74.14 L717.25 63.8 L720.32 63.8 Z M736.49 75.98 Q736.49 70.22 739.61 66.81 Q742.73 63.4 748.06 63.4 Q753.02 63.4 756.05 66.73 Q759.08 70.07 759.08 75.42 Q759.08 81.21 755.97 84.6 Q752.87 88 747.68 88 Q742.61 88 739.55 84.67 Q736.49 81.33 736.49 75.98 Z M739.72 75.74 Q739.72 80.06 741.92 82.66 Q744.13 85.26 747.68 85.26 Q751.49 85.26 753.66 82.77 Q755.84 80.27 755.84 75.78 Q755.84 71.18 753.71 68.67 Q751.58 66.17 747.88 66.17 Q744.23 66.17 741.98 68.81 Q739.72 71.45 739.72 75.74 Z M778.3 78.7 L778.3 87.6 L775.23 87.6 L775.23 63.8 L781.99 63.8 Q785.85 63.8 787.98 65.66 Q790.1 67.52 790.1 70.98 Q790.1 74.48 787.62 76.65 Q785.13 78.83 781.39 78.7 Z M778.3 66.5 L778.3 76 L781.15 76 Q783.96 76 785.42 74.73 Q786.88 73.46 786.88 71.1 Q786.88 66.5 781.44 66.5 Z"
|
|
98
|
+
|
|
99
|
+
// frontend-atlas: RU-SP-03 FDP-02 FDP-03 FDP-06 IDP-16 WCAG-09
|
|
100
|
+
const CSS = `
|
|
101
|
+
.ipsenav-settings { box-sizing: border-box; max-width: 720px; color: var(--dsw-alias-label-primary); font-size: 15px; line-height: 1.6; }
|
|
102
|
+
.ipsenav-settings *, .ipsenav-settings *::before, .ipsenav-settings *::after { box-sizing: border-box; }
|
|
103
|
+
.ipsenav-intro { margin: 0 0 20px; color: var(--dsw-alias-label-secondary); font-size: 15px; }
|
|
104
|
+
.ipsenav-alert { margin: 0 0 16px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 35%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 9%, transparent); color: var(--dsw-alias-state-error-primary); font-size: 12px; }
|
|
105
|
+
.ipsenav-panel { margin: 0 0 16px; padding: 4px 18px; border: 1px solid var(--dsw-alias-border-l1); border-radius: 12px; background: var(--dsw-alias-bg-layer-1); }
|
|
106
|
+
.ipsenav-panel-head { padding: 14px 0 6px; }
|
|
107
|
+
.ipsenav-panel-title { margin: 0; font-size: 15px; font-weight: 600; }
|
|
108
|
+
.ipsenav-panel-hint { margin: 2px 0 0; color: var(--dsw-alias-label-secondary); font-size: 12px; }
|
|
109
|
+
.ipsenav-field { padding: 12px 0 16px; }
|
|
110
|
+
.ipsenav-field + .ipsenav-field { border-top: 1px solid var(--dsw-alias-border-l1); }
|
|
111
|
+
.ipsenav-label { display: block; margin: 0 0 2px; font-size: 15px; font-weight: 600; }
|
|
112
|
+
.ipsenav-hint { margin: 0 0 8px; color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 1.5; }
|
|
113
|
+
.ipsenav-error { margin: 0 0 8px; color: var(--dsw-alias-state-error-primary); font-size: 12px; font-weight: 500; }
|
|
114
|
+
.ipsenav-input { display: block; width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--dsw-alias-border-l2); border-radius: 8px; background: var(--dsw-specific-input-major); color: inherit; font: inherit; font-size: 15px; }
|
|
115
|
+
.ipsenav-input:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; border-color: var(--dsw-alias-brand-primary); }
|
|
116
|
+
.ipsenav-input:disabled { opacity: .6; cursor: not-allowed; }
|
|
117
|
+
.ipsenav-number { max-width: 160px; }
|
|
118
|
+
.ipsenav-switch { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
|
|
119
|
+
.ipsenav-switch-text { min-width: 0; }
|
|
120
|
+
.ipsenav-checkbox { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--dsw-alias-brand-primary); }
|
|
121
|
+
.ipsenav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 4px 0 0; }
|
|
122
|
+
.ipsenav-button { height: 34px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
|
|
123
|
+
.ipsenav-button:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }
|
|
124
|
+
.ipsenav-button:disabled { opacity: .55; cursor: not-allowed; }
|
|
125
|
+
.ipsenav-button-secondary { border-color: var(--dsw-alias-border-l2); background: transparent; color: var(--dsw-alias-label-secondary); }
|
|
126
|
+
.ipsenav-button-secondary:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); }
|
|
127
|
+
.ipsenav-button-primary { background: var(--dsw-alias-brand-primary); color: var(--dsw-alias-label-primary-inverted); }
|
|
128
|
+
.ipsenav-button-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover); }
|
|
129
|
+
.ipsenav-notice { margin: 12px 0 10px; padding: 10px 12px; border-radius: 8px; font-size: 12px; }
|
|
130
|
+
.ipsenav-notice-info { background: var(--dsw-alias-bg-layer-2); color: var(--dsw-alias-label-secondary); }
|
|
131
|
+
.ipsenav-notice-success { background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent); color: var(--dsw-alias-state-success-primary); }
|
|
132
|
+
.ipsenav-notice-error { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 9%, transparent); color: var(--dsw-alias-state-error-primary); }
|
|
133
|
+
.ipsenav-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--dsw-alias-border-l1); }
|
|
134
|
+
.ipsenav-brand { flex: none; width: auto; height: 24px; color: var(--dsw-alias-label-secondary); }
|
|
135
|
+
.ipsenav-legal { min-width: 0; }
|
|
136
|
+
.ipsenav-legal p { margin: 0; }
|
|
137
|
+
.ipsenav-license { color: var(--dsw-alias-label-secondary); font-size: 12px; font-weight: 600; }
|
|
138
|
+
.ipsenav-legal p + p { margin-top: 2px; color: var(--dsw-alias-label-tertiary); font-size: 12px; }
|
|
139
|
+
.ipsenav-state { margin: 0; padding: 16px 0; color: var(--dsw-alias-label-secondary); font-size: 15px; }
|
|
140
|
+
@media (max-width: 520px) {
|
|
141
|
+
.ipsenav-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
|
|
142
|
+
.ipsenav-actions { justify-content: stretch; }
|
|
143
|
+
.ipsenav-actions .ipsenav-button { flex: 1; }
|
|
144
|
+
}
|
|
145
|
+
`
|
|
146
|
+
|
|
147
|
+
const FIELDS = ['repo', 'profile', 'mediaDir', 'actTimeoutSeconds', 'openOnStart']
|
|
148
|
+
|
|
149
|
+
function toDraft(value) {
|
|
150
|
+
const source = value && typeof value === 'object' ? value : {}
|
|
151
|
+
return {
|
|
152
|
+
repo: typeof source.repo === 'string' ? source.repo : '',
|
|
153
|
+
profile: typeof source.profile === 'string' ? source.profile : 'work',
|
|
154
|
+
mediaDir: typeof source.mediaDir === 'string' ? source.mediaDir : '',
|
|
155
|
+
actTimeoutSeconds: String(source.actTimeoutSeconds ?? 180),
|
|
156
|
+
openOnStart: source.openOnStart === true,
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function toConfig(draft) {
|
|
161
|
+
return {
|
|
162
|
+
repo: draft.repo.trim(),
|
|
163
|
+
profile: draft.profile.trim(),
|
|
164
|
+
mediaDir: draft.mediaDir.trim(),
|
|
165
|
+
actTimeoutSeconds: Number(draft.actTimeoutSeconds),
|
|
166
|
+
openOnStart: draft.openOnStart === true,
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function isAbsolute(value) {
|
|
171
|
+
return /^[a-zA-Z]:[\\/]/.test(value) || /^\\\\/.test(value) || value.startsWith('/')
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function validate(draft, t) {
|
|
175
|
+
const errors = {}
|
|
176
|
+
if (draft.repo.trim() && !isAbsolute(draft.repo.trim())) errors.repo = t('errorRepo')
|
|
177
|
+
if (draft.mediaDir.trim() && !isAbsolute(draft.mediaDir.trim())) errors.mediaDir = t('errorMedia')
|
|
178
|
+
const seconds = Number(draft.actTimeoutSeconds)
|
|
179
|
+
if (!Number.isInteger(seconds) || seconds < 10 || seconds > 600) errors.actTimeoutSeconds = t('errorTimeout')
|
|
180
|
+
return errors
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function Brand() {
|
|
184
|
+
return h('svg', {
|
|
185
|
+
className: 'ipsenav-brand',
|
|
186
|
+
viewBox: '0 0 787.68 95.16',
|
|
187
|
+
role: 'img',
|
|
188
|
+
'aria-label': '42ANS Workshop',
|
|
189
|
+
},
|
|
190
|
+
h('g', { transform: 'translate(-8.42 -8.42)' },
|
|
191
|
+
h('g', { transform: 'translate(0 0) scale(0.28)' },
|
|
192
|
+
h('path', {
|
|
193
|
+
d: BRAND_MARK,
|
|
194
|
+
fill: 'none',
|
|
195
|
+
stroke: 'currentColor',
|
|
196
|
+
strokeWidth: 6.5,
|
|
197
|
+
strokeLinejoin: 'miter',
|
|
198
|
+
strokeMiterlimit: 4,
|
|
199
|
+
}),
|
|
200
|
+
),
|
|
201
|
+
h('rect', { x: 142, y: 21, width: 1.82, height: 70, fill: 'currentColor', opacity: 0.45 }),
|
|
202
|
+
h('path', { d: BRAND_WORD, fill: 'currentColor' }),
|
|
203
|
+
h('path', { d: BRAND_SUB, fill: 'currentColor' }),
|
|
204
|
+
),
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function Field({ id, label, hint, error, children }) {
|
|
209
|
+
const hintId = `${id}-hint`
|
|
210
|
+
const errorId = `${id}-error`
|
|
211
|
+
const describedBy = [hint ? hintId : null, error ? errorId : null].filter(Boolean).join(' ')
|
|
212
|
+
const control = React.cloneElement(children, {
|
|
213
|
+
'aria-describedby': describedBy || undefined,
|
|
214
|
+
'aria-invalid': error ? true : undefined,
|
|
215
|
+
})
|
|
216
|
+
return h('div', { className: 'ipsenav-field' },
|
|
217
|
+
h('label', { className: 'ipsenav-label', htmlFor: id }, label),
|
|
218
|
+
hint ? h('p', { className: 'ipsenav-hint', id: hintId }, hint) : null,
|
|
219
|
+
error ? h('p', { className: 'ipsenav-error', id: errorId }, error) : null,
|
|
220
|
+
h('div', { className: 'ipsenav-control' }, control),
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function SwitchRow({ id, label, hint, checked, disabled, onChange }) {
|
|
225
|
+
const hintId = `${id}-hint`
|
|
226
|
+
return h('div', { className: 'ipsenav-field ipsenav-switch' },
|
|
227
|
+
h('div', { className: 'ipsenav-switch-text' },
|
|
228
|
+
h('label', { className: 'ipsenav-label', htmlFor: id }, label),
|
|
229
|
+
hint ? h('p', { className: 'ipsenav-hint', id: hintId }, hint) : null,
|
|
230
|
+
),
|
|
231
|
+
h('input', {
|
|
232
|
+
id,
|
|
233
|
+
className: 'ipsenav-checkbox',
|
|
234
|
+
type: 'checkbox',
|
|
235
|
+
checked,
|
|
236
|
+
disabled,
|
|
237
|
+
onChange,
|
|
238
|
+
'aria-describedby': hint ? hintId : undefined,
|
|
239
|
+
}),
|
|
240
|
+
)
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function SettingsPage({ t, view, form }) {
|
|
244
|
+
const tr = typeof t === 'function' ? t : (key) => key
|
|
245
|
+
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, '') || 'ipsenav'
|
|
246
|
+
const state = form && form.state
|
|
247
|
+
const [draft, setDraft] = React.useState(() => toDraft(state && state.value))
|
|
248
|
+
const [errors, setErrors] = React.useState({})
|
|
249
|
+
const [saving, setSaving] = React.useState(false)
|
|
250
|
+
const [notice, setNotice] = React.useState(null)
|
|
251
|
+
const focusFirst = React.useRef(false)
|
|
252
|
+
const revision = state && state.revision
|
|
253
|
+
const status = state && state.status
|
|
254
|
+
|
|
255
|
+
React.useEffect(() => {
|
|
256
|
+
if (status !== 'ready') return
|
|
257
|
+
setDraft(toDraft(state && state.value))
|
|
258
|
+
setErrors({})
|
|
259
|
+
setNotice(null)
|
|
260
|
+
}, [revision, status])
|
|
261
|
+
|
|
262
|
+
React.useEffect(() => {
|
|
263
|
+
if (!focusFirst.current) return
|
|
264
|
+
focusFirst.current = false
|
|
265
|
+
const first = ['repo', 'mediaDir', 'actTimeoutSeconds'].find((key) => errors[key])
|
|
266
|
+
if (first && typeof document !== 'undefined') document.getElementById(`${uid}-${first}`)?.focus()
|
|
267
|
+
}, [errors])
|
|
268
|
+
|
|
269
|
+
if (view !== 'page') return h('span', null, tr('summary'))
|
|
270
|
+
|
|
271
|
+
if (!state || status === 'loading') {
|
|
272
|
+
return h('div', { className: 'ipsenav-settings' },
|
|
273
|
+
h('style', null, CSS),
|
|
274
|
+
h('p', { className: 'ipsenav-state', role: 'status' }, tr('loading')),
|
|
275
|
+
)
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// form 缺失说明 Host 没有把这组 Config 暴露成 volatile 表单;别让它永远停在“正在读取”。
|
|
279
|
+
if (!form || status === 'unavailable' || !state.value) {
|
|
280
|
+
return h('div', { className: 'ipsenav-settings' },
|
|
281
|
+
h('style', null, CSS),
|
|
282
|
+
h('p', { className: 'ipsenav-state' }, tr('unavailable')),
|
|
283
|
+
)
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const writable = state.writable !== false
|
|
287
|
+
const errorCount = Object.keys(errors).length
|
|
288
|
+
const update = (key) => (event) => {
|
|
289
|
+
const value = event.target.type === 'checkbox' ? event.target.checked : event.target.value
|
|
290
|
+
setDraft((current) => ({ ...current, [key]: value }))
|
|
291
|
+
if (errors[key]) {
|
|
292
|
+
setErrors((current) => {
|
|
293
|
+
const next = { ...current }
|
|
294
|
+
delete next[key]
|
|
295
|
+
return next
|
|
296
|
+
})
|
|
297
|
+
}
|
|
298
|
+
if (notice) setNotice(null)
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
const reset = () => {
|
|
302
|
+
setDraft(toDraft(state.value))
|
|
303
|
+
setErrors({})
|
|
304
|
+
setNotice(null)
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const save = async () => {
|
|
308
|
+
if (saving || !writable) return
|
|
309
|
+
const nextErrors = validate(draft, tr)
|
|
310
|
+
if (Object.keys(nextErrors).length > 0) {
|
|
311
|
+
setErrors(nextErrors)
|
|
312
|
+
setNotice(null)
|
|
313
|
+
focusFirst.current = true
|
|
314
|
+
return
|
|
315
|
+
}
|
|
316
|
+
const next = toConfig(draft)
|
|
317
|
+
const base = toConfig(toDraft(state.value))
|
|
318
|
+
const ops = []
|
|
319
|
+
for (const key of FIELDS) {
|
|
320
|
+
if (next[key] !== base[key]) ops.push({ op: 'set', path: [key], value: next[key] })
|
|
321
|
+
}
|
|
322
|
+
if (ops.length === 0) {
|
|
323
|
+
setNotice({ kind: 'info', text: tr('noChanges') })
|
|
324
|
+
return
|
|
325
|
+
}
|
|
326
|
+
setSaving(true)
|
|
327
|
+
setNotice(null)
|
|
328
|
+
try {
|
|
329
|
+
const accepted = await form.mutate(ops, state.revision)
|
|
330
|
+
setNotice(accepted
|
|
331
|
+
? { kind: 'success', text: tr('saved') }
|
|
332
|
+
: { kind: 'error', text: tr('saveFailed') })
|
|
333
|
+
} catch (error) {
|
|
334
|
+
setNotice({ kind: 'error', text: tr('saveError', { message: error && error.message ? error.message : String(error) }) })
|
|
335
|
+
} finally {
|
|
336
|
+
setSaving(false)
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
const repoId = `${uid}-repo`
|
|
341
|
+
const profileId = `${uid}-profile`
|
|
342
|
+
const mediaId = `${uid}-mediaDir`
|
|
343
|
+
const timeoutId = `${uid}-actTimeoutSeconds`
|
|
344
|
+
const openId = `${uid}-openOnStart`
|
|
345
|
+
|
|
346
|
+
return h('div', { className: 'ipsenav-settings' },
|
|
347
|
+
h('style', null, CSS),
|
|
348
|
+
h('p', { className: 'ipsenav-intro' }, tr('intro')),
|
|
349
|
+
!writable ? h('p', { className: 'ipsenav-hint' }, tr('readOnly')) : null,
|
|
350
|
+
errorCount > 0
|
|
351
|
+
? h('div', { className: 'ipsenav-alert', role: 'alert' }, tr('errorSummary', { count: errorCount }))
|
|
352
|
+
: null,
|
|
353
|
+
|
|
354
|
+
h('section', { className: 'ipsenav-panel', 'aria-labelledby': `${uid}-connection` },
|
|
355
|
+
h('div', { className: 'ipsenav-panel-head' },
|
|
356
|
+
h('h3', { className: 'ipsenav-panel-title', id: `${uid}-connection` }, tr('connection')),
|
|
357
|
+
h('p', { className: 'ipsenav-panel-hint' }, tr('connectionHint')),
|
|
358
|
+
),
|
|
359
|
+
h(Field, { id: repoId, label: tr('repoLabel'), hint: tr('repoHint'), error: errors.repo },
|
|
360
|
+
h('input', {
|
|
361
|
+
id: repoId,
|
|
362
|
+
className: 'ipsenav-input',
|
|
363
|
+
type: 'text',
|
|
364
|
+
value: draft.repo,
|
|
365
|
+
onChange: update('repo'),
|
|
366
|
+
disabled: !writable,
|
|
367
|
+
spellCheck: false,
|
|
368
|
+
autoComplete: 'off',
|
|
369
|
+
}),
|
|
370
|
+
),
|
|
371
|
+
h(Field, { id: profileId, label: tr('profileLabel'), hint: tr('profileHint'), error: errors.profile },
|
|
372
|
+
h('input', {
|
|
373
|
+
id: profileId,
|
|
374
|
+
className: 'ipsenav-input',
|
|
375
|
+
type: 'text',
|
|
376
|
+
value: draft.profile,
|
|
377
|
+
onChange: update('profile'),
|
|
378
|
+
disabled: !writable,
|
|
379
|
+
spellCheck: false,
|
|
380
|
+
autoComplete: 'off',
|
|
381
|
+
}),
|
|
382
|
+
),
|
|
383
|
+
h(Field, { id: mediaId, label: tr('mediaDirLabel'), hint: tr('mediaDirHint'), error: errors.mediaDir },
|
|
384
|
+
h('input', {
|
|
385
|
+
id: mediaId,
|
|
386
|
+
className: 'ipsenav-input',
|
|
387
|
+
type: 'text',
|
|
388
|
+
value: draft.mediaDir,
|
|
389
|
+
onChange: update('mediaDir'),
|
|
390
|
+
disabled: !writable,
|
|
391
|
+
spellCheck: false,
|
|
392
|
+
autoComplete: 'off',
|
|
393
|
+
}),
|
|
394
|
+
),
|
|
395
|
+
),
|
|
396
|
+
|
|
397
|
+
h('section', { className: 'ipsenav-panel', 'aria-labelledby': `${uid}-behavior` },
|
|
398
|
+
h('div', { className: 'ipsenav-panel-head' },
|
|
399
|
+
h('h3', { className: 'ipsenav-panel-title', id: `${uid}-behavior` }, tr('behavior')),
|
|
400
|
+
h('p', { className: 'ipsenav-panel-hint' }, tr('behaviorHint')),
|
|
401
|
+
),
|
|
402
|
+
h(Field, { id: timeoutId, label: tr('actTimeoutLabel'), hint: tr('actTimeoutHint'), error: errors.actTimeoutSeconds },
|
|
403
|
+
h('input', {
|
|
404
|
+
id: timeoutId,
|
|
405
|
+
className: 'ipsenav-input ipsenav-number',
|
|
406
|
+
type: 'number',
|
|
407
|
+
min: 10,
|
|
408
|
+
max: 600,
|
|
409
|
+
step: 1,
|
|
410
|
+
inputMode: 'numeric',
|
|
411
|
+
value: draft.actTimeoutSeconds,
|
|
412
|
+
onChange: update('actTimeoutSeconds'),
|
|
413
|
+
disabled: !writable,
|
|
414
|
+
}),
|
|
415
|
+
),
|
|
416
|
+
h(SwitchRow, {
|
|
417
|
+
id: openId,
|
|
418
|
+
label: tr('openOnStartLabel'),
|
|
419
|
+
hint: tr('openOnStartHint'),
|
|
420
|
+
checked: draft.openOnStart,
|
|
421
|
+
disabled: !writable,
|
|
422
|
+
onChange: update('openOnStart'),
|
|
423
|
+
}),
|
|
424
|
+
),
|
|
425
|
+
|
|
426
|
+
notice
|
|
427
|
+
? h('p', {
|
|
428
|
+
className: `ipsenav-notice ipsenav-notice-${notice.kind}`,
|
|
429
|
+
role: notice.kind === 'error' ? 'alert' : 'status',
|
|
430
|
+
}, notice.text)
|
|
431
|
+
: null,
|
|
432
|
+
|
|
433
|
+
h('div', { className: 'ipsenav-actions' },
|
|
434
|
+
h('button', {
|
|
435
|
+
className: 'ipsenav-button ipsenav-button-secondary',
|
|
436
|
+
type: 'button',
|
|
437
|
+
onClick: reset,
|
|
438
|
+
disabled: saving,
|
|
439
|
+
}, tr('reset')),
|
|
440
|
+
h('button', {
|
|
441
|
+
className: 'ipsenav-button ipsenav-button-primary',
|
|
442
|
+
type: 'button',
|
|
443
|
+
onClick: save,
|
|
444
|
+
disabled: saving || !writable,
|
|
445
|
+
}, saving ? tr('saving') : tr('save')),
|
|
446
|
+
),
|
|
447
|
+
|
|
448
|
+
h('footer', { className: 'ipsenav-footer' },
|
|
449
|
+
h(Brand),
|
|
450
|
+
h('div', { className: 'ipsenav-legal' },
|
|
451
|
+
h('p', { className: 'ipsenav-license' }, tr('licenseName')),
|
|
452
|
+
h('p', null, tr('licenseNote')),
|
|
453
|
+
),
|
|
454
|
+
),
|
|
455
|
+
)
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
return {
|
|
459
|
+
inject: ['slots', 'locale'],
|
|
460
|
+
apply(ctx) {
|
|
461
|
+
const t = ctx.locale.bind(NS)
|
|
462
|
+
ctx.effect(() => ctx.locale.register(NS, { zh: ZH, en: EN }), 'ipsenav-browser: dictionaries')
|
|
463
|
+
ctx.effect(() => ctx.slots.inject('plugins.row.config', () => ctx.slots.register({
|
|
464
|
+
name: 'plugins.row.config',
|
|
465
|
+
key: 'dsh-plugin-ipsenav-browser#ipsenav-browser',
|
|
466
|
+
locale: NS,
|
|
467
|
+
}, SettingsPage)), 'ipsenav-browser: settings page')
|
|
468
|
+
},
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
})
|
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<!--
|
|
3
|
+
Ipsenav browser plugin icon (original artwork).
|
|
4
|
+
A browser window with a pointer: the agent observes the page and acts on it,
|
|
5
|
+
while the session behind it belongs to the user.
|
|
6
|
+
-->
|
|
7
|
+
<defs>
|
|
8
|
+
<linearGradient id="ipsenav-browser-stroke" x1="8" y1="8" x2="27" y2="26" gradientUnits="userSpaceOnUse">
|
|
9
|
+
<stop stop-color="#86B8F5" />
|
|
10
|
+
<stop offset="1" stop-color="#5269E1" />
|
|
11
|
+
</linearGradient>
|
|
12
|
+
<mask id="ipsenav-browser-knockout" maskUnits="userSpaceOnUse" x="0" y="0" width="36" height="36">
|
|
13
|
+
<rect width="36" height="36" fill="#fff" />
|
|
14
|
+
<path d="M16.5 13.5 L27.5 20.7 L22.9 21.4 L25.5 26.1 L23.4 27.4 L20.9 22.7 L18.1 24.9 Z" fill="#000" stroke="#000" stroke-width="2.4" stroke-linejoin="round" />
|
|
15
|
+
</mask>
|
|
16
|
+
</defs>
|
|
17
|
+
<g mask="url(#ipsenav-browser-knockout)">
|
|
18
|
+
<rect x="6.5" y="7.5" width="21" height="18.5" rx="3.2" stroke="url(#ipsenav-browser-stroke)" stroke-width="2.2" />
|
|
19
|
+
<path d="M6.5 13.2h21" stroke="url(#ipsenav-browser-stroke)" stroke-width="2.2" />
|
|
20
|
+
<circle cx="10" cy="10.35" r="1.05" fill="#86B8F5" />
|
|
21
|
+
<circle cx="13.4" cy="10.35" r="1.05" fill="#86B8F5" />
|
|
22
|
+
</g>
|
|
23
|
+
<path d="M16.5 13.5 L27.5 20.7 L22.9 21.4 L25.5 26.1 L23.4 27.4 L20.9 22.7 L18.1 24.9 Z" fill="url(#ipsenav-browser-stroke)" stroke="url(#ipsenav-browser-stroke)" stroke-width="1.2" stroke-linejoin="round" />
|
|
24
|
+
</svg>
|