| 1 | <!doctype html> |
| 2 | <html lang="zh-CN"> |
| 3 | <head> |
| 4 | <meta charset="utf-8" /> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 6 | <title>Reasonix Approval Mock 1</title> |
| 7 | <style> |
| 8 | :root { |
| 9 | color-scheme: dark; |
| 10 | --bg: #101113; |
| 11 | --panel: #1b1e22; |
| 12 | --panel-2: #242930; |
| 13 | --border: #3b424b; |
| 14 | --muted: #a8b0ba; |
| 15 | --text: #f5f7fa; |
| 16 | --mono: "SFMono-Regular", Menlo, Consolas, monospace; |
| 17 | --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; |
| 18 | } |
| 19 | * { box-sizing: border-box; } |
| 20 | body { |
| 21 | margin: 0; |
| 22 | min-height: 100vh; |
| 23 | display: grid; |
| 24 | place-items: center; |
| 25 | padding: 36px; |
| 26 | background: |
| 27 | radial-gradient(circle at 20% 20%, rgba(244, 168, 75, .12), transparent 32%), |
| 28 | linear-gradient(135deg, #101113, #171a1d); |
| 29 | color: var(--text); |
| 30 | font-family: var(--sans); |
| 31 | } |
| 32 | .mock { |
| 33 | width: min(880px, 100%); |
| 34 | border: 1px solid var(--border); |
| 35 | border-radius: 18px; |
| 36 | background: linear-gradient(#202327, #1a1d20); |
| 37 | box-shadow: 0 28px 80px rgba(0,0,0,.42); |
| 38 | overflow: hidden; |
| 39 | } |
| 40 | .mock__head { |
| 41 | padding: 22px 28px; |
| 42 | background: var(--panel-2); |
| 43 | border-bottom: 1px solid var(--border); |
| 44 | } |
| 45 | .mock__title { |
| 46 | margin: 0; |
| 47 | font-size: 25px; |
| 48 | font-weight: 750; |
| 49 | letter-spacing: 0; |
| 50 | } |
| 51 | .mock__body { padding: 30px 28px 28px; } |
| 52 | .eyebrow { |
| 53 | margin: 0 0 14px; |
| 54 | color: var(--muted); |
| 55 | font-size: 15px; |
| 56 | } |
| 57 | .subject { |
| 58 | margin-bottom: 28px; |
| 59 | padding: 17px 18px; |
| 60 | border: 1px solid #333942; |
| 61 | border-radius: 10px; |
| 62 | background: #15181b; |
| 63 | font: 500 16px/1.5 var(--mono); |
| 64 | color: #dbe3ea; |
| 65 | } |
| 66 | .actions { |
| 67 | display: flex; |
| 68 | flex-wrap: wrap; |
| 69 | gap: 16px; |
| 70 | } |
| 71 | .action { |
| 72 | display: inline-flex; |
| 73 | align-items: center; |
| 74 | gap: 13px; |
| 75 | min-height: 64px; |
| 76 | padding: 12px 17px; |
| 77 | border: 1px solid #4a5360; |
| 78 | border-radius: 10px; |
| 79 | background: #20252b; |
| 80 | color: #f6f8fa; |
| 81 | } |
| 82 | .action--once { |
| 83 | background: #5f4630; |
| 84 | border-color: #ca8b45; |
| 85 | } |
| 86 | .action--prefix { |
| 87 | background: #263328; |
| 88 | border-color: #62a66e; |
| 89 | } |
| 90 | .action--deny { |
| 91 | min-height: 54px; |
| 92 | background: #302328; |
| 93 | border-color: #8a4c58; |
| 94 | } |
| 95 | .key { |
| 96 | display: grid; |
| 97 | place-items: center; |
| 98 | flex: 0 0 auto; |
| 99 | width: 28px; |
| 100 | height: 28px; |
| 101 | border-radius: 999px; |
| 102 | background: #aeb7c2; |
| 103 | color: #141516; |
| 104 | font: 800 13px/1 var(--mono); |
| 105 | } |
| 106 | .action--once .key { background: #f4a84b; } |
| 107 | .action--prefix .key { background: #76d083; } |
| 108 | .action--deny .key { background: #ef6b7c; } |
| 109 | .copy { |
| 110 | display: grid; |
| 111 | gap: 5px; |
| 112 | min-width: 0; |
| 113 | } |
| 114 | .label { |
| 115 | font-size: 15px; |
| 116 | font-weight: 700; |
| 117 | line-height: 1.25; |
| 118 | } |
| 119 | code { |
| 120 | font: 600 13px/1.35 var(--mono); |
| 121 | color: #fff; |
| 122 | overflow-wrap: anywhere; |
| 123 | } |
| 124 | .note { |
| 125 | margin: 26px 0 0; |
| 126 | color: var(--muted); |
| 127 | font-size: 14px; |
| 128 | line-height: 1.6; |
| 129 | } |
| 130 | </style> |
| 131 | </head> |
| 132 | <body> |
| 133 | <main class="mock" aria-label="Reasonix approval mock 1"> |
| 134 | <header class="mock__head"> |
| 135 | <h1 class="mock__title">1. Bash:精简为前缀授权</h1> |
| 136 | </header> |
| 137 | <section class="mock__body"> |
| 138 | <p class="eyebrow">Allow tool call</p> |
| 139 | <div class="subject">bash - go test ./...</div> |
| 140 | <div class="actions"> |
| 141 | <button class="action action--once"> |
| 142 | <span class="key">1</span> |
| 143 | <span class="copy"><span class="label">允许一次</span></span> |
| 144 | </button> |
| 145 | <button class="action"> |
| 146 | <span class="key">2</span> |
| 147 | <span class="copy"> |
| 148 | <span class="label">本会话允许</span> |
| 149 | <code>Bash(go test:*)</code> |
| 150 | </span> |
| 151 | </button> |
| 152 | <button class="action action--prefix"> |
| 153 | <span class="key">3</span> |
| 154 | <span class="copy"> |
| 155 | <span class="label">总是允许(保存)</span> |
| 156 | <code>Bash(go test:*)</code> |
| 157 | </span> |
| 158 | </button> |
| 159 | <button class="action action--deny"> |
| 160 | <span class="key">4</span> |
| 161 | <span class="copy"><span class="label">拒绝</span></span> |
| 162 | </button> |
| 163 | </div> |
| 164 | <p class="note">效果:选择 2/3 后,后续 <code>go test ./internal/control</code> 这类相似命令不再重复弹审批;选择 1 只允许本次。</p> |
| 165 | </section> |
| 166 | </main> |
| 167 | </body> |
| 168 | </html> |
| 169 |