@yokira404/dsh-git-guard 0.0.0-stage → 1.0.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.
@@ -0,0 +1,79 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 590 280" width="590" height="280" font-family="ui-sans-serif, system-ui, 'Segoe UI', 'Microsoft YaHei', sans-serif">
2
+ <title>两个开关在会话标题栏中的位置、两种状态,以及各自负责的仓库</title>
3
+
4
+ <defs>
5
+ <!--
6
+ The marks are the plugin's own, at the plugin's own geometry: a 32-unit grid,
7
+ the bare repository while a guard is off, and the ring plus stroke the reference
8
+ uses for "forbidden" added once it is on.
9
+ -->
10
+ <g id="gg-cyl">
11
+ <g fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round">
12
+ <path d="M9.9 10.55v10.9c0 1.41 2.73 2.55 6.1 2.55s6.1-1.14 6.1-2.55V10.55"/>
13
+ <ellipse cx="16" cy="10.55" rx="6.1" ry="2.55"/>
14
+ <path d="M9.9 13.2c0 1.41 2.73 2.55 6.1 2.55s6.1-1.14 6.1-2.55"/>
15
+ <path d="M9.9 16c0 1.41 2.73 2.55 6.1 2.55s6.1-1.14 6.1-2.55"/>
16
+ <path d="M9.9 18.8c0 1.41 2.73 2.55 6.1 2.55s6.1-1.14 6.1-2.55"/>
17
+ </g>
18
+ </g>
19
+ <g id="gg-mark">
20
+ <g transform="translate(6.8 6.8) scale(0.18775510204081633)">
21
+ <path fill="currentColor" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"/>
22
+ </g>
23
+ </g>
24
+ <!-- What switching a guard on adds: the ring, and the stroke through it. -->
25
+ <g id="gg-guard" fill="none" stroke="currentColor" stroke-width="1.5">
26
+ <circle cx="16" cy="16" r="10.6"/>
27
+ <path d="M8.6 23.4 23.4 8.6" stroke-width="1.9" stroke-linecap="round"/>
28
+ </g>
29
+ <g id="gg-local-off" color="#545557"><use href="#gg-cyl"/></g>
30
+ <g id="gg-local-on" color="#545557"><use href="#gg-cyl"/><use href="#gg-guard"/></g>
31
+ <g id="gg-remote-off" color="#545557"><use href="#gg-mark"/></g>
32
+ <g id="gg-remote-on" color="#545557"><use href="#gg-mark"/><use href="#gg-guard"/></g>
33
+ </defs>
34
+
35
+ <rect width="590" height="280" fill="#ffffff"/>
36
+
37
+ <!-- ── the Session header row, as DSH draws it ── -->
38
+ <text x="24" y="26" font-size="11.5" fill="#8a8a8f">会话标题栏 Session header</text>
39
+ <rect x="24" y="34" width="542" height="44" rx="8" fill="#f6f6f7" stroke="#e2e2e5"/>
40
+ <text x="42" y="61" font-size="13" fill="#1c1c1f">我的会话</text>
41
+ <text x="104" y="61" font-size="11.5" fill="#a0a0a6">PTC 模式</text>
42
+ <!-- At the right end of the header's utilities row: the pair sits beside the window
43
+ controls, with the hairline rule that divides the group from the rest of the row
44
+ on its left, and no fill of its own — the state is carried by the icon. -->
45
+ <rect x="485" y="47" width="1" height="16" fill="#0000001f"/>
46
+ <g transform="translate(496 40) scale(0.875)"><use href="#gg-local-on"/></g>
47
+ <g transform="translate(524 40) scale(0.875)"><use href="#gg-remote-on"/></g>
48
+ <!-- The window controls, drawn for reference at the frame's own right edge. -->
49
+ <g fill="none" stroke="#8a8a8f" stroke-width="1.1">
50
+ <rect x="550" y="48" width="9" height="9" rx="1"/>
51
+ <rect x="564" y="48" width="9" height="9" rx="1"/>
52
+ </g>
53
+
54
+ <!-- ── the two states of each switch ── -->
55
+ <text x="42" y="104" font-size="11" fill="#8a8a8f">关(只有图标)</text>
56
+ <text x="42" y="156" font-size="11" fill="#8a8a8f">开(加上圈与斜线)</text>
57
+
58
+ <g transform="translate(44 110)"><use href="#gg-local-off"/></g>
59
+ <text x="84" y="130" font-size="12.5" fill="#1c1c1f">本地仓库</text>
60
+ <text x="84" y="146" font-size="10.5" fill="#a0a0a6">本地写入不放行也不拦</text>
61
+
62
+ <g transform="translate(44 162)"><use href="#gg-local-on"/></g>
63
+ <text x="84" y="182" font-size="12.5" fill="#1c1c1f">本地仓库</text>
64
+ <text x="84" y="198" font-size="10.5" fill="#a0a0a6">拦住 add · commit · reset · tag</text>
65
+
66
+ <g transform="translate(300 110)"><use href="#gg-remote-off"/></g>
67
+ <text x="340" y="130" font-size="12.5" fill="#1c1c1f">远端仓库</text>
68
+ <text x="340" y="146" font-size="10.5" fill="#a0a0a6">上传不放行也不拦</text>
69
+
70
+ <g transform="translate(300 162)"><use href="#gg-remote-on"/></g>
71
+ <text x="340" y="182" font-size="12.5" fill="#1c1c1f">远端仓库</text>
72
+ <text x="340" y="198" font-size="10.5" fill="#a0a0a6">拦住上传 · 远端配置 · GitHub 命令</text>
73
+
74
+ <!-- ── the rule that connects them ── -->
75
+ <line x1="24" y1="222" x2="550" y2="222" stroke="#e2e2e5"/>
76
+ <text x="24" y="238" font-size="11" fill="#6b6b70">位置:会话标题栏右侧工具区的最右端,紧挨窗口控制按钮;左边那条竖线把这一组与同排其它控件分开。</text>
77
+ <text x="24" y="252" font-size="11" fill="#6b6b70">默认两个都开。点左边:本地取反,本地变成开时右边跟着开;点右边:远端取反,远端变成关时左边跟着关。</text>
78
+ <text x="24" y="266" font-size="11" fill="#6b6b70">打开一侧永远不会关掉另一侧;四种状态都可达;两个按钮永远不会被禁用;右侧控件增减时这一组跟着移动。</text>
79
+ </svg>
package/icon.svg ADDED
@@ -0,0 +1,25 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36" fill="none" role="img" aria-label="Git repository guard">
2
+ <title>Git 仓库保护</title>
3
+ <!--
4
+ The icon the Plugins page reads from `package.json.icon`, so it is drawn for that
5
+ page and not for the header: the shipped plugin icons are 36-grid drawings whose
6
+ art fills about four fifths of the box (auto-review's shield spans 7.5 to 30), and
7
+ this one matches — the ring's outer edge lands at 14.94 of 18 units, 83%.
8
+
9
+ It is the plugin's own art at the plugin's own coordinates: one transform maps the
10
+ 32-unit grid the header glyph is drawn on onto this 36-unit box, centred, scaled by
11
+ 36/32. Nothing inside is re-typed, so the two stay the same picture — the header
12
+ keeps the smaller of the two, which is what its row calls for.
13
+ -->
14
+ <g transform="translate(18 18) scale(1.125) translate(-16 -16)">
15
+ <g fill="none" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round">
16
+ <path d="M9.9 10.55v10.9c0 1.41 2.73 2.55 6.1 2.55s6.1-1.14 6.1-2.55V10.55"/>
17
+ <ellipse cx="16" cy="10.55" rx="6.1" ry="2.55"/>
18
+ <path d="M9.9 13.2c0 1.41 2.73 2.55 6.1 2.55s6.1-1.14 6.1-2.55"/>
19
+ <path d="M9.9 16c0 1.41 2.73 2.55 6.1 2.55s6.1-1.14 6.1-2.55"/>
20
+ <path d="M9.9 18.8c0 1.41 2.73 2.55 6.1 2.55s6.1-1.14 6.1-2.55"/>
21
+ </g>
22
+ <circle cx="16" cy="16" r="10.6" fill="none" stroke="currentColor" stroke-width="1.5"/>
23
+ <path d="M8.6 23.4 23.4 8.6" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"/>
24
+ </g>
25
+ </svg>