Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

8.5 KB
Raw Blame
<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>PR #3539 · PowerShell PermissionPrompt UI evidence preview</title>
    <style>
      * { box-sizing: border-box; }
      html, body { min-height: 100%; }
      body {
        margin: 0;
        background: #ecece8;
        color: #1a1a1a;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
        -webkit-font-smoothing: antialiased;
      }
      button, kbd { font: inherit; }
      .page {
        width: min(1360px, calc(100vw - 64px));
        margin: 0 auto;
        padding: 42px 0 48px;
      }
      .evidence-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 24px;
        margin-bottom: 24px;
      }
      .eyebrow {
        margin: 0 0 7px;
        color: #666661;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .04em;
        line-height: 16px;
        text-transform: uppercase;
      }
      h1 {
        margin: 0;
        font-size: 24px;
        font-weight: 650;
        letter-spacing: -.02em;
        line-height: 32px;
      }
      .summary {
        max-width: 780px;
        margin: 8px 0 0;
        color: #666661;
        font-size: 13px;
        line-height: 20px;
      }
      .preview-badge {
        flex: 0 0 auto;
        padding: 7px 10px;
        border: 1px solid #c9a751;
        border-radius: 999px;
        background: #fff8df;
        color: #6f5414;
        font-size: 12px;
        font-weight: 600;
        line-height: 16px;
      }
      .comparison {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: hidden;
        border: 1px solid #d1d1cc;
        border-radius: 18px;
        box-shadow: 0 18px 48px rgba(36, 36, 32, .10);
      }
      .scene {
        min-width: 0;
        padding: 28px;
      }
      .scene + .scene { border-left: 1px solid #d1d1cc; }
      .scene.light {
        --surface: hsl(60 12.5% 97%);
        --chat-input-bg: #fff;
        --chat-input-border: #d7d7d4;
        --chat-input-text: #000;
        --status-bar-meta: #737373;
        --perm-code-bg: #f5f5f5;
        --perm-code-border: #d7d7d4;
        --perm-allow-btn-bg: #fff;
        --perm-allow-btn-text: #262626;
        --perm-allow-kbd-bg: #f5f5f5;
        --perm-allow-kbd-border: #d7d7d4;
        background: var(--surface);
        color: var(--chat-input-text);
      }
      .scene.dark {
        --surface: hsl(60 2% 12%);
        --chat-input-bg: #2c2c2a;
        --chat-input-border: #3c3c3a;
        --chat-input-text: #d4d4d4;
        --status-bar-meta: #a3a3a3;
        --perm-code-bg: #1f1f1e;
        --perm-code-border: #3c3c3a;
        --perm-allow-btn-bg: #fff;
        --perm-allow-btn-text: #262626;
        --perm-allow-kbd-bg: #e5e5e5;
        --perm-allow-kbd-border: #d7d7d4;
        background: var(--surface);
        color: var(--chat-input-text);
      }
      .scene-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 40px;
        color: var(--status-bar-meta);
        font-size: 12px;
        line-height: 16px;
      }
      .scene-label strong {
        color: var(--chat-input-text);
        font-weight: 600;
      }
      .stage {
        display: flex;
        min-height: 300px;
        align-items: flex-end;
      }
      .permission-prompt {
        width: 100%;
        max-width: 914px;
        padding: 16px;
        border: 1px solid var(--chat-input-border);
        border-radius: 12px;
        background: var(--chat-input-bg);
      }
      .permission-title {
        margin: 0;
        color: var(--chat-input-text);
        font-size: 15px;
        font-weight: 600;
        line-height: 18.75px;
      }
      .code-block {
        max-height: 120px;
        margin-top: 12px;
        overflow: auto;
        padding: 10px 14px;
        border: 1px solid var(--perm-code-border);
        border-radius: 8px;
        background: var(--perm-code-bg);
        color: var(--chat-input-text);
        font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
        font-size: 13px;
        line-height: 1.625;
      }
      pre {
        margin: 0;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
      }
      .actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        margin-top: 16px;
      }
      .action {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 34px;
        padding: 7px 12px;
        border: 1px solid var(--chat-input-border);
        border-radius: 8px;
        background: transparent;
        color: var(--chat-input-text);
        font-size: 13px;
        font-weight: 500;
        line-height: 16px;
      }
      .action.primary {
        border-color: var(--chat-input-border);
        background: var(--perm-allow-btn-bg);
        color: var(--perm-allow-btn-text);
      }
      kbd {
        padding: 1px 6px;
        border: 1px solid var(--chat-input-border);
        border-radius: 4px;
        background: var(--perm-code-bg);
        color: var(--status-bar-meta);
        font-size: 11px;
        font-weight: 400;
        line-height: 14px;
      }
      .primary kbd {
        border-color: var(--perm-allow-kbd-border);
        background: var(--perm-allow-kbd-bg);
        color: var(--perm-allow-btn-text);
        opacity: .7;
      }
      .evidence-note {
        margin: 18px 2px 0;
        color: #666661;
        font-size: 12px;
        line-height: 18px;
      }
      code {
        font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
        font-size: 11px;
      }
      @media (max-width: 900px) {
        .page { width: min(680px, calc(100vw - 32px)); padding-top: 24px; }
        .evidence-header { flex-direction: column; }
        .comparison { grid-template-columns: 1fr; }
        .scene + .scene { border-top: 1px solid #d1d1cc; border-left: 0; }
      }
    </style>
  </head>
  <body>
    <main class="page">
      <header class="evidence-header">
        <div>
          <p class="eyebrow">PR #3539 · UI evidence</p>
          <h1>PowerShell 审批提示显示 command 正文</h1>
          <p class="summary">复用现有 PermissionPrompt 的真实布局、颜色 token、字号与中文按钮文案;本预览仅用于审阅从 JSON 回退改为命令正文后的用户可见结果。</p>
        </div>
        <div class="preview-badge">预览 · 非 Windows 实机</div>
      </header>

      <section class="comparison" aria-label="PermissionPrompt Light 与 Dark 预览">
        <article class="scene light">
          <div class="scene-label"><strong>Light</strong><span>Desktop 预览 · Windows 命令示例</span></div>
          <div class="stage">
            <section class="permission-prompt" aria-label="Light PermissionPrompt">
              <p class="permission-title">允许 powershell?</p>
              <div class="code-block"><pre>Get-Content -LiteralPath "C:\Users\Public\Documents\release-notes.txt"</pre></div>
              <div class="actions">
                <button class="action" type="button"><span>拒绝</span><kbd>Esc</kbd></button>
                <button class="action primary" type="button"><span>允许一次</span><kbd>Enter</kbd></button>
              </div>
            </section>
          </div>
        </article>

        <article class="scene dark">
          <div class="scene-label"><strong>Dark</strong><span>Desktop 预览 · Windows 命令示例</span></div>
          <div class="stage">
            <section class="permission-prompt" aria-label="Dark PermissionPrompt">
              <p class="permission-title">允许 powershell?</p>
              <div class="code-block"><pre>Get-Content -LiteralPath "C:\Users\Public\Documents\release-notes.txt"</pre></div>
              <div class="actions">
                <button class="action" type="button"><span>拒绝</span><kbd>Esc</kbd></button>
                <button class="action primary" type="button"><span>允许一次</span><kbd>Enter</kbd></button>
              </div>
            </section>
          </div>
        </article>
      </section>

      <p class="evidence-note">证据属性:<strong>高保真 HTML 预览,非 Windows 实机截图</strong>。样式依据 <code>PermissionPrompt.tsx</code> 与现有 Light/Dark token;未新增产品状态、交互或视觉设计。</p>
    </main>
  </body>
</html>