跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

mobile.css

209 行 · 15.7 KB历史下载
1:root {
2 color-scheme: light dark;
3 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
4 color: var(--ink);
5 background: var(--surround);
6 --ink: #303231;
7 --muted: #626661;
8 --paper: #fff;
9 --surround: #f4f5f3;
10 --soft: #f3f4f0;
11 --line: #dedfd9;
12 --selected: #e9ede6;
13 --focus: #42734f;
14 --green: #426745;
15 --error: #a23228;
16 --button-ink: #fff;
17}
18@media (prefers-color-scheme: dark) {
19 :root {
20 --ink: #e6e7e3; --muted: #abb0a8; --paper: #1e201e; --surround: #171917;
21 --soft: #292d29; --line: #414640; --selected: #364438; --focus: #95bc98;
22 --green: #a0c8a4; --error: #ffa49b; --button-ink: #1e201e;
23 }
24}
25* { box-sizing: border-box; }
26body { margin: 0; }
27button, textarea { font: inherit; color: inherit; }
28button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
29button:disabled { opacity: .48; cursor: default; }
30:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
31.mobile-app {
32 display: flex; flex-direction: column; width: min(100%, 780px); margin: auto;
33 height: 100vh; height: min(100dvh, var(--mobile-height, 100dvh)); overflow: hidden;
34 background: var(--paper);
35}
36.mobile-app:not(.native-phone) { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
37.mobile-app.native-phone { --safe-bottom: 0px; }
38.topbar {
39 position: relative; z-index: 3;
40 display: flex; align-items: center; justify-content: space-between; gap: 12px;
41 min-height: 52px; padding: 4px 16px; flex: none; border-bottom: 1px solid var(--line);
42}
43.top-actions, .row-heading, .title-line, .status-label, .action, .icon-button, .center-message { display: flex; align-items: center; }
44.brand-mark { width: 28px; height: 28px; flex: none; }
45.top-actions { gap: 4px; min-width: 0; flex: 1; justify-content: flex-end; }
46.connection-host { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); }
47.connection-host span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
48.connection-host svg, .status-label { flex: none; }
49.top-actions a { text-decoration: none; color: var(--ink); }
50.icon-button, .action {
51 justify-content: center; gap: 7px; border: 1px solid transparent; background: transparent;
52 border-radius: 9px; min-height: 44px; padding: 0 10px; font-size: 14px; font-weight: 560;
53}
54.icon-button { width: 44px; padding: 0; flex: none; }
55.icon-button:hover, .action:hover { background: var(--soft); }
56.action.primary { background: var(--ink); color: var(--button-ink); }
57.action.secondary { border-color: var(--line); }
58.page-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 24px; }
59.mobile-session-settings { display: flex; flex-direction: column; gap: 22px; }
60.mobile-session-settings > button { align-self: flex-start; }
61h1, h2, p { margin: 0; }
62h1 { font-size: clamp(26px, 5vw, 35px); line-height: 1.2; letter-spacing: -.04em; font-weight: 645; }
63h2 { font-size: 17px; line-height: 1.45; font-weight: 620; }
64.project-field { display: grid; }
65.inline-select { position: relative; min-width: 0; }
66.inline-select-trigger { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 44px; border: 0; background: transparent; padding: 0; color: var(--muted); font-size: 13px; }
67.inline-select-trigger > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
68.inline-select-trigger svg { flex: none; }
69.inline-select-trigger[aria-expanded="true"] > svg:last-child { transform: rotate(180deg); }
70.inline-select-popover { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: var(--paper); color: var(--ink); overflow: auto; box-shadow: 0 8px 24px #00000020; overscroll-behavior: contain; }
71.inline-select-options { max-height: min(280px, 38vh); overflow-y: auto; }
72.inline-select-options [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
73.inline-select-options [role="option"] svg { flex: none; }
74.inline-select-options [aria-selected="true"] { background: var(--selected); }
75.inline-select-options [data-active="true"] { outline: 1px solid var(--focus); outline-offset: -1px; }
76.inline-select-hint { padding: 10px 12px 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
77.project-field .inline-select-trigger { color: var(--ink); border: 1px solid var(--line); background: var(--soft); border-radius: 9px; padding: 9px 12px; min-height: 46px; font-size: 15px; }
78.row-heading { margin: 16px 0 4px; justify-content: space-between; gap: 10px; }
79.row-heading .action { min-height: 44px; padding-inline: 12px; }
80.session-list { list-style: none; margin: 0; padding: 0; }
81.session-row { display: flex; align-items: center; text-align: left; gap: 12px; width: 100%; min-height: 68px; padding: 11px 1px; background: none; border: 0; border-bottom: 1px solid var(--line); }
82.session-row:hover { background: var(--soft); }
83.session-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: none; background: var(--soft); border-radius: 10px; }
84.row-detail { display: grid; min-width: 0; flex: 1; gap: 4px; }
85.row-detail strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
86.row-detail small, .status-label, .note { color: var(--muted); font-size: 13px; }
87.status-label { gap: 5px; }
88.status-label.live { color: var(--green); }
89.status-label.bad { color: var(--error); }
90.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
91.note { line-height: 1.65; overflow-wrap: anywhere; }
92.notice { padding: 12px 16px; background: var(--soft); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
93.notice .action { margin-top: 8px; }
94.mobile-app > .notice { flex: none; max-height: 27vh; overflow-y: auto; }
95.center-message { flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; padding: 48px 16px; }
96.center-message svg { color: var(--muted); }
97.center-message strong { font-size: 16px; }
98.chat-header { flex: none; padding: 12px 16px; border-bottom: 1px solid var(--line); }
99.title-line { justify-content: space-between; gap: 12px; }
100.title-line h1 { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; letter-spacing: -.02em; }
101.title-line .icon-button { width: 32px; min-height: 32px; margin-left: -8px; }
102.chat-header .note { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
103.transcript { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 19px 24px; }
104.message { margin: 0 0 18px; overflow-wrap: anywhere; }
105.message-body { font-size: 16px; line-height: 1.65; white-space: pre-wrap; }
106.message.user { margin-left: clamp(12px, 7%, 58px); }
107.message.user .message-body { padding: 10px 13px; background: var(--soft); border-radius: 11px 11px 3px 11px; }
108.message.system .message-body { color: var(--muted); font-size: 14px; }
109.message.error .message-body { color: var(--error); }
110.turn-error, .turn-tools { margin-top: 6px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
111.turn-error { color: var(--error); }
112.turn-tools { color: var(--muted); }
113.turn-tools span { display: block; font-family: ui-monospace, monospace; }
114.approval { margin-top: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
115.approval h2 { font-size: 16px; }
116.approval pre { margin: 8px 0; padding: 10px; border-radius: 6px; background: var(--soft); font: 13px/1.55 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: min(15rem, 32vh); }
117.approval-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 10px; }
118.compose { flex: none; border-top: 1px solid var(--line); padding: 10px 16px max(10px, var(--safe-bottom, env(safe-area-inset-bottom))); }
119.composer-field { display: flex; align-items: center; gap: 8px; min-height: 56px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); padding: 5px 5px 5px 18px; }
120.composer-field:focus-within { border-color: var(--focus); }
121.compose textarea { display: block; flex: 1; min-width: 0; width: 100%; height: 24px; resize: none; background: transparent; border: 0; border-radius: 0; outline: none; font-size: 16px; line-height: 24px; padding: 0; }
122.compose textarea::placeholder { color: var(--muted); }
123.composer-action { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: var(--button-ink); }
124.compose > .note { margin-bottom: 8px; }
125.compose .notice { margin: 0 0 8px; border-radius: 7px; max-height: 18vh; overflow-y: auto; }
126.spin { animation: spin .9s linear infinite; }
127@keyframes spin { to { transform: rotate(1turn); } }
128@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
129@media (min-width: 800px) { .mobile-app { border-inline: 1px solid var(--line); } .page-scroll, .transcript, .chat-header { padding-inline: 28px; } }
130@media (max-height: 490px) {
131 .topbar { min-height: 42px; padding-block: 0; } .topbar .icon-button { min-height: 40px; }
132 .chat-header { padding-block: 5px; } .compose { padding-top: 5px; }
133}
134.workspace-tool-icon { display: flex; align-items: center; justify-content: center; flex: none; }
135.workspace-topbar { gap: 3px; padding-inline: 7px 15px; }
136.workspace-topbar .top-actions { margin-left: auto; }
137.workspace-drawer {
138 position: fixed; top: 0; bottom: auto; left: max(0px, calc((100vw - 780px)/2)); margin: 0;
139 width: min(326px, calc(100vw - 42px)); max-width: none; height: min(100dvh, var(--mobile-height, 100dvh));
140 max-height: none; padding: 0; border: 0; border-right: 1px solid var(--line); color: var(--ink);
141 background: var(--paper); box-shadow: 5px 0 24px #0002; overflow: auto; overscroll-behavior: contain;
142 transform: translateX(-100%); transition: transform 220ms ease;
143}
144.workspace-drawer[data-visible="true"] { transform: translateX(0); }
145.workspace-drawer::backdrop { background: #19211e00; transition: background-color 220ms ease; }
146.workspace-drawer[data-visible="true"]::backdrop { background: #19211e66; }
147@media (prefers-reduced-motion: reduce) {
148 .workspace-drawer, .workspace-drawer::backdrop { transition: none; }
149}
150.drawer-heading { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 18px; border-bottom: 1px solid var(--line); min-height: 52px; }
151.drawer-heading h2 { font-size: 16px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; flex: 1; }
152.drawer-heading svg, .session-row > svg { flex: none; }
153.drawer-content { padding: 12px 14px max(18px, env(safe-area-inset-bottom)); }
154.workspace-tools { display: grid; gap: 3px; }
155.tool-link, .nav-new { display: flex; align-items: center; color: var(--ink); background: transparent; cursor: pointer; border: 0; }
156.tool-link { width: 100%; min-height: 46px; gap: 13px; padding: 9px 12px; text-align: left; font-weight: 560; border-radius: 8px; }
157.tool-link[aria-current="page"], .session-row[aria-current="page"] { background: var(--selected); }
158.tool-link:hover, .nav-new:hover { background: var(--soft); }
159.nav-new { gap: 5px; min-height: 42px; padding: 6px 10px; font-size: 14px; border-radius: 7px; }
160.nav-note { padding: 11px 2px; color: var(--muted); font-size: 14px; }
161
162.workspace-drawer[open] { display: flex; flex-direction: column; overflow: hidden; }
163.drawer-heading, .drawer-footer { flex: none; }
164.drawer-content { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 12px; }
165.drawer-footer { border-top: 1px solid var(--line); padding: 6px 14px max(6px, env(safe-area-inset-bottom)); }
166.drawer-exit { display:flex; align-items:center; gap:12px; padding: 8px 12px; min-height:44px; width:100%; border:0; background:transparent; font-size:15px; border-radius:8px; color:var(--ink); text-decoration:none; }
167.drawer-exit:hover, .tree-folder:hover, .tree-sessions button:hover { background: var(--soft); }
168.project-tree { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
169.project-tree h2 { margin:0 0 7px 10px; color:var(--muted); font-weight:550; font-size:14px; }
170.tree-row, .tree-folder, .tree-sessions button { display:flex; align-items:center; }
171.tree-row { gap:3px; }
172.tree-folder, .tree-sessions button { min-height:44px; gap:7px; padding:5px 8px; border:0; background:transparent; text-align:left; border-radius:8px; }
173.tree-folder { flex:1; min-width:0; font-size:15px; font-weight:550; }
174.tree-folder svg, .tree-sessions svg { flex:none; color:var(--muted); }
175.tree-folder span, .tree-sessions span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
176.tree-new { width:40px; }
177.tree-sessions { margin:0 0 5px 16px; padding:0 0 0 8px; border-left:1px solid var(--line); list-style:none; }
178.tree-sessions button { width:100%; min-height:40px; font-size:14px; }
179.tree-sessions button[aria-current="page"] { background:var(--selected); }
180.tree-empty { padding:7px 8px 10px; font-size:13px; color:var(--muted); }
181.workspace-placeholder { display:grid; place-content:center; justify-items:center; gap:14px; flex:1; padding:16px; color:var(--muted); text-align:center; }
182
183.phone-workspace { width: 100%; border: 0; }
184.phone-workspace .workspace-drawer { left: 0; }
185
186.swipe-session { position:relative; overflow:hidden; border-radius:8px; list-style:none; }
187.session-slide { display:flex; position:relative; background:var(--paper); transition:width 180ms ease; touch-action:pan-y; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
188.session-slide .session-select { display:flex; flex:1; min-width:0; align-items:center; gap:7px; min-height:44px; padding:6px 8px; border:0; border-radius:8px; background:var(--paper); text-align:left; }
189.session-select .row-detail { flex:1; min-width:0; }
190.session-select strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:400; }
191.session-select[aria-current="page"] { background:var(--selected); }
192.session-slide .session-more { width:32px; flex:none; display:grid; place-content:center; padding:4px; border:0; background:var(--paper); }
193.session-actions { position:absolute; inset:0 0 0 auto; display:flex; align-items:center; width:var(--session-reveal); background:var(--paper); }
194.session-actions[hidden] { display:none; }
195.session-actions button { flex:0 0 40px; width:40px; min-height:44px; padding:4px; display:grid; place-content:center; border:0; background:transparent; border-radius:8px; }
196.session-delete { color:var(--error); }
197.session-actions .session-delete { color:var(--muted); }
198.session-actions .session-delete:hover, .session-actions .session-delete:hover svg { color:var(--error); }
199.session-list .session-select { min-height:64px; }
200.session-dialog { width:min(360px, calc(100% - 32px)); margin:auto; border:1px solid var(--line); border-radius:16px; padding:20px; background:var(--paper); color:var(--ink); }
201.session-dialog::backdrop { background:#0006; }
202.session-dialog h2 { margin:0 0 16px; font-size:18px; }
203.session-dialog p { font-size:14px; line-height:1.65; }
204.session-dialog label { display:grid; gap:8px; font-size:14px; }
205.session-dialog input { width:100%; min-height:44px; padding:8px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:var(--soft); font:inherit; }
206.session-dialog footer { display:flex; justify-content:flex-end; gap:12px; margin-top:20px; }
207.session-dialog button { border:1px solid var(--line); border-radius:8px; background:var(--soft); padding:9px 14px; }
208.session-action-error { color:var(--error); }
209@media (prefers-reduced-motion: reduce) { .session-slide { transition:none; } }