@spunto/brand-kit 0.8.0 → 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/package.json +1 -1
- package/src/home/check.ts +6 -0
- package/src/home/editions/desktop.json +386 -0
- package/src/home/editions/foyer.json +329 -0
- package/src/home/editions.ts +2 -2
- package/src/home/guide.ts +3 -2
- package/src/home/home.tsx +9 -3
- package/src/home/showcase/catalog.ts +67 -3
- package/src/home/showcase/desktop/desk.tsx +195 -0
- package/src/home/showcase/desktop/drive.tsx +71 -0
- package/src/home/showcase/desktop/handoff.tsx +94 -0
- package/src/home/showcase/desktop/launcher.tsx +161 -0
- package/src/home/showcase/desktop/parts.tsx +388 -0
- package/src/home/showcase/desktop/sample.ts +157 -0
- package/src/home/showcase/desktop/wall.tsx +85 -0
- package/src/home/showcase/foyer/book.tsx +149 -0
- package/src/home/showcase/foyer/pantry.tsx +159 -0
- package/src/home/showcase/foyer/parts.tsx +226 -0
- package/src/home/showcase/foyer/phone.tsx +256 -0
- package/src/home/showcase/foyer/sample.ts +174 -0
- package/src/home/showcase/foyer/week.tsx +204 -0
- package/src/home/showcase/stage.tsx +28 -12
- package/src/home/showcase/view.tsx +16 -0
- package/src/home/types.ts +3 -0
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import type { CSSProperties, ReactNode } from "react"
|
|
4
|
+
import { FONT, hexAlpha } from "../../../theme"
|
|
5
|
+
import { Icon, INK, LINE, MUTED, u, type IconId, type StageColors } from "../stage"
|
|
6
|
+
import { DeskBrowser, SpuntoMark, type Held } from "./desk"
|
|
7
|
+
import { DESK, LEASES, SITE, UI } from "./sample"
|
|
8
|
+
|
|
9
|
+
/* What the Desktop screens share: the app's shell (sidebar, the head of the « Postes » page), the card
|
|
10
|
+
of a desktop on the wall — head, live screen, lease — and the pages its browser is on.
|
|
11
|
+
Positions are the window's design pixels. */
|
|
12
|
+
|
|
13
|
+
export type Lang = "en" | "fr"
|
|
14
|
+
|
|
15
|
+
/** The app's window on the 920-wide board, and the one a whole desktop is opened in. */
|
|
16
|
+
export const WIN = { x: 24, y: 30, w: 872 }
|
|
17
|
+
export const DESK_WIN = { x: 40, y: 32, w: 840 }
|
|
18
|
+
export const SIDEBAR = 124
|
|
19
|
+
export const PAD = 16
|
|
20
|
+
/** Where the cards start under the page's head, and the room they share. */
|
|
21
|
+
export const CARDS_TOP = 96
|
|
22
|
+
export const ROOM = WIN.w - SIDEBAR - PAD * 2
|
|
23
|
+
|
|
24
|
+
const RED = "#d13b3b"
|
|
25
|
+
const GREEN = "#1d8a55"
|
|
26
|
+
const BLUE = "#2f6fd0"
|
|
27
|
+
const NIGHT = "#161226"
|
|
28
|
+
|
|
29
|
+
const NAV_ICON: IconId[] = ["monitor", "layers", "history", "card", "key", "people", "book"]
|
|
30
|
+
|
|
31
|
+
/** The sidebar and the head of the page. `handoffs`: desktops waiting for a human — the count turns into a red badge. */
|
|
32
|
+
export function AppShell({ colors, count, handoffs = 0, children }: { colors: StageColors; count: number; handoffs?: number; children: ReactNode }) {
|
|
33
|
+
return (
|
|
34
|
+
<>
|
|
35
|
+
<div style={{ position: "absolute", left: 0, top: 0, bottom: 0, width: u(SIDEBAR), background: "#f6f5f9", borderRight: `1px solid ${LINE}` }}>
|
|
36
|
+
<div style={{ display: "flex", alignItems: "center", gap: u(6), margin: `${u(14)} ${u(10)} 0`, fontFamily: FONT.display, fontSize: u(10.6), whiteSpace: "nowrap" }}>
|
|
37
|
+
<SpuntoMark size={15} tile={colors.signal} ink={colors.field} alt={colors.field} style={{ borderRadius: u(3) }} />
|
|
38
|
+
{UI.brand}
|
|
39
|
+
</div>
|
|
40
|
+
<div style={{ display: "flex", alignItems: "center", gap: u(6), height: u(26), margin: `${u(11)} ${u(9)} 0`, padding: `0 ${u(7)}`, border: `1px solid ${LINE}`, borderRadius: u(5), background: "#ffffff", fontSize: u(10.4), fontWeight: 550 }}>
|
|
41
|
+
<span style={{ display: "flex", alignItems: "center", justifyContent: "center", width: u(14), height: u(14), borderRadius: u(3), background: colors.tone, color: "#ffffff", fontSize: u(8.4), fontWeight: 650 }}>{UI.org[0]}</span>
|
|
42
|
+
{UI.org}
|
|
43
|
+
<Icon id="chevron" size={10} color={MUTED} style={{ marginLeft: "auto" }} />
|
|
44
|
+
</div>
|
|
45
|
+
<div style={{ margin: `${u(13)} ${u(9)} 0`, display: "flex", flexDirection: "column", gap: u(1) }}>
|
|
46
|
+
{UI.nav.map((label, i) => (
|
|
47
|
+
<div key={label} style={{ display: "flex", alignItems: "center", gap: u(7), height: u(23), padding: `0 ${u(7)}`, borderRadius: u(5), background: i === 0 ? hexAlpha(colors.tone, 0.1) : "transparent", fontSize: u(10.4), fontWeight: i === 0 ? 550 : 450, color: i === 0 ? INK : MUTED, whiteSpace: "nowrap" }}>
|
|
48
|
+
<Icon id={NAV_ICON[i]} size={11} color={i === 0 ? colors.tone : MUTED} />
|
|
49
|
+
{label}
|
|
50
|
+
{i === 0 && (
|
|
51
|
+
<span
|
|
52
|
+
style={{
|
|
53
|
+
marginLeft: "auto",
|
|
54
|
+
padding: handoffs ? `0 ${u(4.5)}` : 0,
|
|
55
|
+
borderRadius: u(8),
|
|
56
|
+
background: handoffs ? RED : "transparent",
|
|
57
|
+
color: handoffs ? "#ffffff" : MUTED,
|
|
58
|
+
fontFamily: FONT.mono,
|
|
59
|
+
fontSize: u(8.6),
|
|
60
|
+
fontWeight: 400,
|
|
61
|
+
transition: "background 0.3s ease, color 0.3s ease",
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
{handoffs || count}
|
|
65
|
+
</span>
|
|
66
|
+
)}
|
|
67
|
+
</div>
|
|
68
|
+
))}
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div style={{ position: "absolute", left: u(SIDEBAR + PAD), top: 0, width: u(ROOM), height: "100%" }}>
|
|
72
|
+
<div style={{ position: "absolute", top: u(17), fontFamily: FONT.display, fontSize: u(24), lineHeight: 1.1, letterSpacing: "-0.01em" }}>{UI.title}</div>
|
|
73
|
+
<div style={{ position: "absolute", top: u(50), width: u(470), fontSize: u(9.6), lineHeight: 1.45, color: MUTED }}>{UI.description}</div>
|
|
74
|
+
<div style={{ position: "absolute", right: 0, top: u(52) }}>
|
|
75
|
+
<Btn kind="primary" tone={colors.tone}>
|
|
76
|
+
<Icon id="plus" size={10} />
|
|
77
|
+
{UI.create}
|
|
78
|
+
</Btn>
|
|
79
|
+
</div>
|
|
80
|
+
{children}
|
|
81
|
+
</div>
|
|
82
|
+
</>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function Btn({ kind = "outline", tone, pressed, children }: { kind?: "primary" | "outline" | "ghost"; tone: string; pressed?: boolean; children: ReactNode }) {
|
|
87
|
+
return (
|
|
88
|
+
<span
|
|
89
|
+
style={{
|
|
90
|
+
display: "inline-flex",
|
|
91
|
+
alignItems: "center",
|
|
92
|
+
gap: u(4),
|
|
93
|
+
flexShrink: 0,
|
|
94
|
+
height: u(20),
|
|
95
|
+
padding: `0 ${u(7.5)}`,
|
|
96
|
+
borderRadius: u(4.5),
|
|
97
|
+
border: `1px solid ${kind === "outline" ? LINE : "transparent"}`,
|
|
98
|
+
background: kind === "primary" ? tone : kind === "outline" ? "#ffffff" : "transparent",
|
|
99
|
+
color: kind === "primary" ? "#ffffff" : INK,
|
|
100
|
+
fontSize: u(9.2),
|
|
101
|
+
fontWeight: 550,
|
|
102
|
+
whiteSpace: "nowrap",
|
|
103
|
+
transform: pressed ? "scale(0.95)" : "none",
|
|
104
|
+
filter: pressed ? "brightness(0.9)" : "none",
|
|
105
|
+
transition: "transform 0.15s ease, filter 0.15s ease",
|
|
106
|
+
}}
|
|
107
|
+
>
|
|
108
|
+
{children}
|
|
109
|
+
</span>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type Status = "running" | "paused" | "waking"
|
|
114
|
+
|
|
115
|
+
const PILL: Record<Status, { bg: string; fg: string }> = {
|
|
116
|
+
running: { bg: hexAlpha(GREEN, 0.12), fg: GREEN },
|
|
117
|
+
paused: { bg: "#eeedf2", fg: MUTED },
|
|
118
|
+
waking: { bg: hexAlpha(BLUE, 0.12), fg: BLUE },
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function StatusPill({ status }: { status: Status }) {
|
|
122
|
+
const p = PILL[status]
|
|
123
|
+
return (
|
|
124
|
+
<span style={{ display: "inline-flex", alignItems: "center", gap: u(4), flexShrink: 0, height: u(16), padding: `0 ${u(5.5)}`, borderRadius: u(9), background: p.bg, color: p.fg, fontSize: u(8.2), fontWeight: 550, whiteSpace: "nowrap", transition: "background 0.3s ease, color 0.3s ease" }}>
|
|
125
|
+
{status === "waking" ? <Spinner size={7.5} color={p.fg} /> : <span style={{ width: u(4.5), height: u(4.5), borderRadius: "50%", background: "currentColor" }} />}
|
|
126
|
+
{UI.status[status]}
|
|
127
|
+
</span>
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function Spinner({ size, color }: { size: number; color: string }) {
|
|
132
|
+
return (
|
|
133
|
+
<svg viewBox="0 0 16 16" fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" style={{ display: "block", flexShrink: 0, width: u(size), height: u(size) }}>
|
|
134
|
+
<circle cx="8" cy="8" r="6" opacity="0.25" />
|
|
135
|
+
<path d="M8 2a6 6 0 0 1 6 6" />
|
|
136
|
+
</svg>
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export type CardLease = { kind: "agent" | "human"; holder: string; purpose: string | null; taken: string; left: string }
|
|
141
|
+
|
|
142
|
+
/** A lease of the sample, as a card prints it. */
|
|
143
|
+
export const leaseOf = (key: keyof typeof LEASES, lang: Lang, taken: string, left: string): CardLease => {
|
|
144
|
+
const l = LEASES[key]
|
|
145
|
+
return { kind: l.kind, holder: l.holder[lang], purpose: l.purpose ? l.purpose[lang] : null, taken, left }
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** What the desktop's own taskbar says of the same lease. */
|
|
149
|
+
export const heldBy = (lease: CardLease | null, minutes: number): Held => (lease ? { kind: lease.kind, holder: lease.holder, minutes } : null)
|
|
150
|
+
|
|
151
|
+
/** The card of a desktop on the wall: its head, its screen (4:3, the image inside as it comes), an alert when its
|
|
152
|
+
holder hands over, and who holds it — or what one can do with it when nobody does. */
|
|
153
|
+
export function DesktopCard({
|
|
154
|
+
x,
|
|
155
|
+
y,
|
|
156
|
+
w,
|
|
157
|
+
name,
|
|
158
|
+
tag,
|
|
159
|
+
size,
|
|
160
|
+
status,
|
|
161
|
+
lease,
|
|
162
|
+
tone,
|
|
163
|
+
screen,
|
|
164
|
+
alert,
|
|
165
|
+
ringed,
|
|
166
|
+
foot = 62,
|
|
167
|
+
}: {
|
|
168
|
+
x: number
|
|
169
|
+
y: number
|
|
170
|
+
w: number
|
|
171
|
+
name: string
|
|
172
|
+
tag: string
|
|
173
|
+
size: string
|
|
174
|
+
status: Status
|
|
175
|
+
lease: CardLease | null
|
|
176
|
+
tone: string
|
|
177
|
+
/** The desktop's screen while it runs: the wall reloads its image every two seconds. */
|
|
178
|
+
screen: ReactNode
|
|
179
|
+
/** What comes between the screen and the lease: the hand-off's alert. `ringed`: the card says it is waiting for someone. */
|
|
180
|
+
alert?: ReactNode
|
|
181
|
+
ringed?: boolean
|
|
182
|
+
foot?: number
|
|
183
|
+
}) {
|
|
184
|
+
const live = w * 0.75
|
|
185
|
+
return (
|
|
186
|
+
<div
|
|
187
|
+
style={{
|
|
188
|
+
position: "absolute",
|
|
189
|
+
left: u(x),
|
|
190
|
+
top: u(y),
|
|
191
|
+
width: u(w),
|
|
192
|
+
borderRadius: u(8),
|
|
193
|
+
border: `1px solid ${ringed ? RED : LINE}`,
|
|
194
|
+
boxShadow: `0 0 0 ${u(2.5)} ${hexAlpha(RED, ringed ? 0.28 : 0)}`,
|
|
195
|
+
background: "#ffffff",
|
|
196
|
+
overflow: "hidden",
|
|
197
|
+
transition: "border-color 0.3s ease, box-shadow 0.3s ease",
|
|
198
|
+
}}
|
|
199
|
+
>
|
|
200
|
+
<div style={{ display: "flex", alignItems: "center", gap: u(4), height: u(36), padding: `0 ${u(8)}` }}>
|
|
201
|
+
<Icon id="monitor" size={11} color={MUTED} />
|
|
202
|
+
<span style={{ fontSize: u(10.4), fontWeight: 550, whiteSpace: "nowrap" }}>{name}</span>
|
|
203
|
+
<span style={{ padding: `${u(1)} ${u(4)}`, borderRadius: u(3.5), background: "#eeedf2", fontSize: u(7.8), fontWeight: 550, whiteSpace: "nowrap" }}>{tag}</span>
|
|
204
|
+
<span style={{ fontFamily: FONT.mono, fontSize: u(7.4), color: MUTED }}>{size}</span>
|
|
205
|
+
<span style={{ marginLeft: "auto" }} />
|
|
206
|
+
<StatusPill status={status} />
|
|
207
|
+
<Icon id="more" size={10} color={MUTED} width={2.6} style={{ marginLeft: u(-1) }} />
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
<div style={{ position: "relative", height: u(live), background: NIGHT, overflow: "hidden" }}>
|
|
211
|
+
<div style={{ position: "absolute", left: 0, top: u((live - w * 0.5625) / 2), opacity: status === "running" ? 1 : 0, transition: "opacity 0.35s ease" }}>{screen}</div>
|
|
212
|
+
<div style={{ position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", gap: u(6), padding: `0 ${u(16)}`, textAlign: "center", fontSize: u(9.6), lineHeight: 1.45, color: "rgba(255,255,255,0.62)", opacity: status === "running" ? 0 : 1, transition: "opacity 0.3s ease" }}>
|
|
213
|
+
{status === "waking" ? (
|
|
214
|
+
<>
|
|
215
|
+
<Spinner size={10} color="rgba(255,255,255,0.7)" />
|
|
216
|
+
{UI.waking}
|
|
217
|
+
</>
|
|
218
|
+
) : (
|
|
219
|
+
<span>
|
|
220
|
+
{UI.paused[0]}
|
|
221
|
+
<br />
|
|
222
|
+
{UI.paused[1]}
|
|
223
|
+
</span>
|
|
224
|
+
)}
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
{alert}
|
|
229
|
+
|
|
230
|
+
<div style={{ display: "flex", flexDirection: "column", justifyContent: "center", gap: u(5), height: u(foot), padding: `0 ${u(10)}`, borderTop: `1px solid ${LINE}`, fontSize: u(9.8) }}>
|
|
231
|
+
{lease ? (
|
|
232
|
+
<>
|
|
233
|
+
<span style={{ display: "flex", alignItems: "center", gap: u(5), whiteSpace: "nowrap" }}>
|
|
234
|
+
<Icon id={lease.kind === "human" ? "person" : "bot"} size={11.5} color={MUTED} />
|
|
235
|
+
<span style={{ fontWeight: 550 }}>{lease.holder}</span>
|
|
236
|
+
{lease.purpose && <span style={{ color: MUTED }}>· {lease.purpose}</span>}
|
|
237
|
+
</span>
|
|
238
|
+
<span style={{ display: "flex", alignItems: "center", gap: u(3.5), fontSize: u(8.4), color: MUTED, whiteSpace: "nowrap" }}>
|
|
239
|
+
<Icon id="clock" size={8.5} />
|
|
240
|
+
{UI.taken(lease.taken, lease.left)}
|
|
241
|
+
<span style={{ marginLeft: "auto" }} />
|
|
242
|
+
<Btn tone={tone}>{UI.release}</Btn>
|
|
243
|
+
</span>
|
|
244
|
+
</>
|
|
245
|
+
) : (
|
|
246
|
+
<>
|
|
247
|
+
<span style={{ display: "flex", alignItems: "center", gap: u(6), whiteSpace: "nowrap" }}>
|
|
248
|
+
<span style={{ color: MUTED }}>{status === "running" ? UI.free : UI.freePaused}</span>
|
|
249
|
+
<span style={{ marginLeft: "auto" }} />
|
|
250
|
+
{status !== "running" && <Btn kind="ghost" tone={tone}>{UI.wake}</Btn>}
|
|
251
|
+
</span>
|
|
252
|
+
<span style={{ display: "flex", justifyContent: "flex-end", gap: u(6) }}>
|
|
253
|
+
<Btn tone={tone}>
|
|
254
|
+
<Icon id="external" size={9.5} />
|
|
255
|
+
{UI.open}
|
|
256
|
+
</Btn>
|
|
257
|
+
<Btn kind="primary" tone={tone}>
|
|
258
|
+
{UI.take}
|
|
259
|
+
</Btn>
|
|
260
|
+
</span>
|
|
261
|
+
</>
|
|
262
|
+
)}
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
)
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/** The alert under a desktop's screen when its holder hands over. */
|
|
269
|
+
export function HandoffAlert({ holder, message, tone, pressed, show }: { holder: string; message: string; tone: string; pressed?: "open" | "back"; show: boolean }) {
|
|
270
|
+
return (
|
|
271
|
+
<div style={{ maxHeight: show ? u(90) : 0, overflow: "hidden", transition: "max-height 0.45s cubic-bezier(0.3, 0.7, 0.2, 1)" }}>
|
|
272
|
+
<div style={{ padding: `${u(10)} ${u(12)} ${u(11)}`, borderTop: `1px solid ${hexAlpha(RED, 0.35)}`, background: hexAlpha(RED, 0.06) }}>
|
|
273
|
+
<div style={{ fontSize: u(10.8), fontWeight: 650, color: RED }}>{UI.handsOver(holder)}</div>
|
|
274
|
+
<div style={{ marginTop: u(2), fontSize: u(10), color: INK }}>{message}</div>
|
|
275
|
+
<div style={{ display: "flex", gap: u(6), marginTop: u(7) }}>
|
|
276
|
+
<Btn kind="primary" tone={tone} pressed={pressed === "open"}>
|
|
277
|
+
<Icon id="external" size={9.5} />
|
|
278
|
+
{UI.openDesktop}
|
|
279
|
+
</Btn>
|
|
280
|
+
<Btn tone={tone} pressed={pressed === "back"}>
|
|
281
|
+
{UI.giveBack}
|
|
282
|
+
</Btn>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
)
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
const bar = (w: number, style?: CSSProperties) => <span style={{ display: "block", width: u(w), height: u(3.4), borderRadius: u(2), background: "#e3e2ea", ...style }} />
|
|
290
|
+
|
|
291
|
+
/** A page nobody needs to read: whatever site a desktop is on. */
|
|
292
|
+
export function PlainPage({ feed }: { feed?: boolean }) {
|
|
293
|
+
return (
|
|
294
|
+
<div style={{ padding: `${u(12)} ${u(14)}`, display: "flex", flexDirection: "column", gap: u(6) }}>
|
|
295
|
+
{bar(70, { height: u(7), background: "#cfcdda" })}
|
|
296
|
+
{feed ? (
|
|
297
|
+
[0, 1, 2, 3].map((i) => (
|
|
298
|
+
<span key={i} style={{ display: "flex", alignItems: "center", gap: u(7), marginTop: u(3) }}>
|
|
299
|
+
<span style={{ width: u(26), height: u(20), borderRadius: u(2.5), background: "#eceaf3" }} />
|
|
300
|
+
<span style={{ display: "flex", flexDirection: "column", gap: u(4) }}>
|
|
301
|
+
{bar([118, 96, 132, 104][i], { background: "#d6d4e0" })}
|
|
302
|
+
{bar([150, 164, 122, 140][i])}
|
|
303
|
+
</span>
|
|
304
|
+
</span>
|
|
305
|
+
))
|
|
306
|
+
) : (
|
|
307
|
+
<>
|
|
308
|
+
{[150, 132, 160, 96].map((w, i) => (
|
|
309
|
+
<span key={i}>{bar(w)}</span>
|
|
310
|
+
))}
|
|
311
|
+
<span style={{ display: "flex", gap: u(6), marginTop: u(4) }}>
|
|
312
|
+
{[0, 1, 2].map((i) => (
|
|
313
|
+
<span key={i} style={{ width: u(46), height: u(30), borderRadius: u(3), background: "#eceaf3" }} />
|
|
314
|
+
))}
|
|
315
|
+
</span>
|
|
316
|
+
</>
|
|
317
|
+
)}
|
|
318
|
+
</div>
|
|
319
|
+
)
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/** The page the agent works on: a back office where the member signed in — invoices, and an export behind a button. */
|
|
323
|
+
export function InvoicesPage({ lang, aim, pressed, downloaded }: { lang: Lang; aim?: boolean; pressed?: boolean; downloaded?: boolean }) {
|
|
324
|
+
return (
|
|
325
|
+
<>
|
|
326
|
+
<div style={{ display: "flex", alignItems: "center", gap: u(6), padding: `${u(9)} ${u(12)} ${u(7)}` }}>
|
|
327
|
+
<span style={{ fontSize: u(10), fontWeight: 650, letterSpacing: "-0.01em" }}>{SITE.title[lang]}</span>
|
|
328
|
+
<span style={{ display: "flex", alignItems: "center", gap: u(3), padding: `${u(1)} ${u(4.5)}`, borderRadius: u(6), background: "#e4f5ea", color: "#17693f", fontSize: u(4.8), fontWeight: 600 }}>
|
|
329
|
+
<span style={{ width: u(3), height: u(3), borderRadius: "50%", background: "currentColor" }} />
|
|
330
|
+
{SITE.signedIn[lang]}
|
|
331
|
+
</span>
|
|
332
|
+
<span style={{ marginLeft: "auto", display: "flex", alignItems: "center", height: u(11), padding: `0 ${u(6)}`, borderRadius: u(2.5), background: "#1c1b22", color: "#ffffff", fontSize: u(5.2), fontWeight: 600, transform: pressed ? "scale(0.92)" : "none", boxShadow: aim || pressed ? `0 0 0 ${u(1.2)} #ffffff, 0 0 0 ${u(2.6)} ${DESK.primary}, 0 0 0 ${u(pressed ? 8 : 5)} ${hexAlpha(DESK.primary, 0.22)}` : `0 0 0 0 #ffffff, 0 0 0 0 ${DESK.primary}, 0 0 0 0 ${hexAlpha(DESK.primary, 0)}`, transition: "transform 0.15s ease, box-shadow 0.3s ease" }}>{SITE.export[lang]}</span>
|
|
333
|
+
</div>
|
|
334
|
+
<div style={{ margin: `0 ${u(12)}`, border: "1px solid #e3e2ea", borderRadius: u(3) }}>
|
|
335
|
+
{[SITE.columns[lang], ...SITE.rows].map((row, i) => (
|
|
336
|
+
<div key={i} style={{ display: "flex", alignItems: "center", height: u(11.5), padding: `0 ${u(7)}`, borderTop: i ? "1px solid #eceaf1" : "none", background: i ? "transparent" : "#f5f4f8", fontSize: u(5.2), fontWeight: i ? 450 : 600, color: i ? "#1c1b22" : "#6a6878", fontVariantNumeric: "tabular-nums" }}>
|
|
337
|
+
<span style={{ width: u(46) }}>{row[0]}</span>
|
|
338
|
+
<span style={{ flex: 1, fontFamily: i ? FONT.mono : "inherit", fontSize: i ? u(4.9) : "inherit" }}>{row[1]}</span>
|
|
339
|
+
<span>{row[2]}</span>
|
|
340
|
+
</div>
|
|
341
|
+
))}
|
|
342
|
+
</div>
|
|
343
|
+
<div style={{ position: "absolute", left: 0, right: 0, bottom: 0, height: u(15), display: "flex", alignItems: "center", padding: `0 ${u(8)}`, background: "#f1f0f5", borderTop: "1px solid #dddbe6", transform: downloaded ? "none" : "translateY(100%)", transition: "transform 0.35s ease" }}>
|
|
344
|
+
<span style={{ display: "flex", alignItems: "center", gap: u(4), height: u(10), padding: `0 ${u(6)}`, borderRadius: u(2.5), border: "1px solid #d6d4e0", background: "#ffffff", fontSize: u(5.2), fontWeight: 550 }}>
|
|
345
|
+
<Icon id="download" size={6} color="#2f6fe0" width={2.4} />
|
|
346
|
+
{SITE.file[lang]}
|
|
347
|
+
</span>
|
|
348
|
+
</div>
|
|
349
|
+
</>
|
|
350
|
+
)
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** The page that stops an agent: a code sent to the member's phone. `typed`: how many of its six digits are in. */
|
|
354
|
+
export function TwoFactorPage({ lang, typed }: { lang: Lang; typed: number }) {
|
|
355
|
+
return (
|
|
356
|
+
<div style={{ display: "flex", flexDirection: "column", alignItems: "center", gap: u(6), paddingTop: u(20), textAlign: "center" }}>
|
|
357
|
+
<span style={{ fontSize: u(12), fontWeight: 650, letterSpacing: "-0.01em" }}>{SITE.twoFactor[lang]}</span>
|
|
358
|
+
<span style={{ fontSize: u(6.6), color: "#6a6878" }}>{SITE.twoFactorText[lang]}</span>
|
|
359
|
+
<span style={{ display: "flex", gap: u(5), marginTop: u(7) }}>
|
|
360
|
+
{"481502".split("").map((d, i) => (
|
|
361
|
+
<span key={i} style={{ display: "flex", alignItems: "center", justifyContent: "center", width: u(21), height: u(27), borderRadius: u(3), border: `1px solid ${i === typed ? "#2f6fe0" : "#d6d4e0"}`, boxShadow: i === typed ? `0 0 0 ${u(1.6)} rgba(47,111,224,0.2)` : "none", fontFamily: FONT.mono, fontSize: u(13), fontWeight: 600 }}>
|
|
362
|
+
<span style={{ opacity: i < typed ? 1 : 0, transition: "opacity 0.15s ease" }}>{d}</span>
|
|
363
|
+
</span>
|
|
364
|
+
))}
|
|
365
|
+
</span>
|
|
366
|
+
<span style={{ display: "flex", alignItems: "center", height: u(16), marginTop: u(8), padding: `0 ${u(16)}`, borderRadius: u(3), background: typed >= 6 ? "#1c1b22" : "#b9b7c4", color: "#ffffff", fontSize: u(6.8), fontWeight: 600, transition: "background 0.3s ease" }}>{SITE.confirm[lang]}</span>
|
|
367
|
+
</div>
|
|
368
|
+
)
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/** The desktop's browser on the agent's site: on its invoices unless told otherwise. */
|
|
372
|
+
export function SiteBrowser({ x, y, w, h, lang, tab, path = "/invoices", show, children }: { x: number; y: number; w: number; h: number; lang: Lang; tab?: string; path?: string; show?: boolean; children: ReactNode }) {
|
|
373
|
+
return (
|
|
374
|
+
<DeskBrowser x={x} y={y} w={w} h={h} tab={tab ?? SITE.tab[lang]} address={SITE.host + path} show={show}>
|
|
375
|
+
{children}
|
|
376
|
+
</DeskBrowser>
|
|
377
|
+
)
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/** The notification a hand-off puts on the desktop's own screen (`/ops/notify`: its title and the agent's message). */
|
|
381
|
+
export function DeskNotice({ title, body, show }: { title: string; body: string; show: boolean }) {
|
|
382
|
+
return (
|
|
383
|
+
<div style={{ position: "absolute", right: u(8), top: u(8), width: u(150), zIndex: 5, padding: `${u(7)} ${u(9)}`, borderRadius: u(4), background: DESK.panel, boxShadow: `0 ${u(8)} ${u(20)} ${u(-6)} rgba(0,0,0,0.7), 0 0 0 1px ${hexAlpha(DESK.signal, 0.5)}`, opacity: show ? 1 : 0, transform: show ? "none" : `translateX(${u(12)})`, transition: "opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2)" }}>
|
|
384
|
+
<div style={{ fontSize: u(6.4), fontWeight: 650, color: DESK.text }}>{title}</div>
|
|
385
|
+
<div style={{ marginTop: u(2), fontSize: u(5.8), color: DESK.muted }}>{body}</div>
|
|
386
|
+
</div>
|
|
387
|
+
)
|
|
388
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// What the Desktop screens show: the product's own words and colours, not invented ones.
|
|
2
|
+
//
|
|
3
|
+
// Copied from coderhammer/spunto-desktop@36a6c26 — the wall of desktops (web/src/app/Desktops.tsx,
|
|
4
|
+
// Shell.tsx), the desktop's branding (desktop/branding: wallpaper.svg, panel-status, launcher/index.html,
|
|
5
|
+
// docs/branding/*.png) and the agents' API as its documentation writes it (server/docs.ts).
|
|
6
|
+
//
|
|
7
|
+
// The app, the taskbar and the launcher exist in French only: their labels (`UI`, `LAUNCHER`) are
|
|
8
|
+
// printed as the product prints them, on the English page too — as the product's own English landing
|
|
9
|
+
// shows its French captures. What follows the page's language is what the product doesn't write:
|
|
10
|
+
// what an agent says of itself (holder, purpose, hand-off message), the page it visits, and the
|
|
11
|
+
// comments of the requests. When the app or the image changes, this file is what to refresh.
|
|
12
|
+
|
|
13
|
+
import type { Words } from "../../../facts"
|
|
14
|
+
|
|
15
|
+
/** The desktop image's own colours (desktop/branding/launcher/index.html `:root`, wallpaper.svg, spunto.svg). */
|
|
16
|
+
export const DESK = {
|
|
17
|
+
field: "#281f45",
|
|
18
|
+
glow: "#3a2b66",
|
|
19
|
+
deep: "#17112a",
|
|
20
|
+
panel: "#1c1532",
|
|
21
|
+
signal: "#fdcd5c",
|
|
22
|
+
lavender: "#a99be0",
|
|
23
|
+
primary: "#6646b7",
|
|
24
|
+
text: "#edeaff",
|
|
25
|
+
muted: "#a4a2b6",
|
|
26
|
+
line: "rgba(255,255,255,0.08)",
|
|
27
|
+
free: "#7ee0a1",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** The app's labels (French, as desktop.spunto.net prints them). */
|
|
31
|
+
export const UI = {
|
|
32
|
+
brand: "Spunto Desktop",
|
|
33
|
+
org: "Acme",
|
|
34
|
+
nav: ["Postes", "Configurations", "Activité", "Abonnement", "Clés d'API", "Équipe", "Documentation"],
|
|
35
|
+
title: "Postes",
|
|
36
|
+
description: "Chaque poste est un ordinateur à part (Ubuntu + Chrome, dans une microVM) : connectez-vous une fois à vos comptes, les sessions restent. Les agents le réservent par l'API, vous le voyez en direct.",
|
|
37
|
+
create: "Nouveau poste",
|
|
38
|
+
foot: (n: number, quota: number) => `${n} / ${quota} postes · images rafraîchies toutes les 2 s · cliquer un écran ouvre le bureau complet`,
|
|
39
|
+
status: { running: "En marche", paused: "En pause", waking: "Réveil" },
|
|
40
|
+
paused: ["En pause : la mémoire est gardée, Chrome reprend où il en était.", "Cliquer pour le réveiller."],
|
|
41
|
+
waking: "Réveil du poste…",
|
|
42
|
+
free: "Libre",
|
|
43
|
+
freePaused: "Libre, en pause",
|
|
44
|
+
wake: "Réveiller",
|
|
45
|
+
open: "Ouvrir",
|
|
46
|
+
take: "Prendre le poste",
|
|
47
|
+
renew: "Prolonger",
|
|
48
|
+
release: "Libérer",
|
|
49
|
+
taken: (ago: string, left: string) => `pris ${ago}, encore ${left}`,
|
|
50
|
+
justNow: "à l'instant",
|
|
51
|
+
handsOver: (holder: string) => `${holder} vous passe la main`,
|
|
52
|
+
openDesktop: "Ouvrir le poste",
|
|
53
|
+
giveBack: "C'est fait, rendre la main",
|
|
54
|
+
taskbarFree: "libre",
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type DesktopId = "poste-1" | "poste-2" | "poste-3"
|
|
58
|
+
|
|
59
|
+
/** The organisation's desktops. Names and tags are the app's own placeholders (`poste-1`, `auto, conversation`). */
|
|
60
|
+
export const DESKTOPS: { name: DesktopId; tag: string; size: string }[] = [
|
|
61
|
+
{ name: "poste-1", tag: "conversation", size: "small" },
|
|
62
|
+
{ name: "poste-2", tag: "auto", size: "small" },
|
|
63
|
+
{ name: "poste-3", tag: "auto", size: "small" },
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
/** Who holds what. The agent's lease is the documentation's example (`"holder": "tâche 42", "purpose": "exporter les factures"`). */
|
|
67
|
+
export const LEASES = {
|
|
68
|
+
human: { kind: "human" as const, holder: { en: "Mathieu", fr: "Mathieu" }, purpose: null },
|
|
69
|
+
agent: { kind: "agent" as const, holder: { en: "task 42", fr: "tâche 42" }, purpose: { en: "export invoices", fr: "exporter les factures" } },
|
|
70
|
+
watch: { kind: "agent" as const, holder: { en: "task 17", fr: "tâche 17" }, purpose: { en: "news watch", fr: "veille" } },
|
|
71
|
+
} satisfies Record<string, { kind: "agent" | "human"; holder: Words; purpose: Words | null }>
|
|
72
|
+
|
|
73
|
+
/** The hand-off message, as the landing's own request writes it. */
|
|
74
|
+
export const HANDOFF: Words = { en: "Type the code you got by SMS", fr: "Entre le code reçu par SMS" }
|
|
75
|
+
|
|
76
|
+
/** The page the agent works on — the landing's `console.example.com`, signed in by the member beforehand. */
|
|
77
|
+
export const SITE = {
|
|
78
|
+
host: "console.example.com",
|
|
79
|
+
url: "https://console.example.com/invoices",
|
|
80
|
+
tab: { en: "Invoices", fr: "Factures" },
|
|
81
|
+
title: { en: "Invoices", fr: "Factures" },
|
|
82
|
+
signedIn: { en: "Signed in", fr: "Connecté" },
|
|
83
|
+
export: { en: "Export CSV", fr: "Exporter en CSV" },
|
|
84
|
+
file: { en: "invoices-2026-10.csv", fr: "factures-2026-10.csv" },
|
|
85
|
+
columns: { en: ["Date", "Number", "Amount"], fr: ["Date", "Numéro", "Montant"] },
|
|
86
|
+
rows: [
|
|
87
|
+
["31/10", "F-2026-118", "1 240,00 €"],
|
|
88
|
+
["24/10", "F-2026-117", "380,00 €"],
|
|
89
|
+
["17/10", "F-2026-116", "2 015,50 €"],
|
|
90
|
+
["10/10", "F-2026-115", "96,00 €"],
|
|
91
|
+
["03/10", "F-2026-114", "640,00 €"],
|
|
92
|
+
],
|
|
93
|
+
twoFactor: { en: "Two-step verification", fr: "Vérification en deux étapes" },
|
|
94
|
+
twoFactorText: { en: "Enter the 6-digit code we sent by SMS.", fr: "Saisissez le code à 6 chiffres reçu par SMS." },
|
|
95
|
+
confirm: { en: "Confirm", fr: "Valider" },
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** What the kit says around the screens (not the product's words). */
|
|
99
|
+
export const CAPTION = {
|
|
100
|
+
agent: { en: "Your agent", fr: "Votre agent" },
|
|
101
|
+
onDesktop: { en: "On the desktop · its taskbar", fr: "Sur le poste · sa barre des tâches" },
|
|
102
|
+
screenshot: { en: "screen.png", fr: "ecran.png" },
|
|
103
|
+
opened: { en: "The whole desktop, in a tab", fr: "Le bureau complet, dans un onglet" },
|
|
104
|
+
keyboard: { en: "On the keyboard", fr: "Au clavier" },
|
|
105
|
+
lease: {
|
|
106
|
+
en: ['# An "auto" desktop: a paused one counts as free', "# 201: the lease"],
|
|
107
|
+
fr: ["# Un poste « auto » : en pause, il compte comme libre", "# 201 : le bail"],
|
|
108
|
+
},
|
|
109
|
+
drive: {
|
|
110
|
+
en: ["# Open a page: the session is already there", "# A real mouse click, on what the button says", "# What the browser downloaded", "# The whole screen, as a PNG"],
|
|
111
|
+
fr: ["# Ouvrir une page : la session est déjà là", "# Un vrai clic de souris, sur le texte du bouton", "# Ce que le navigateur a téléchargé", "# Tout l'écran, en PNG"],
|
|
112
|
+
},
|
|
113
|
+
handoff: {
|
|
114
|
+
en: ["# An SMS code: hand over to a human", "# …and wait until `handoff` is null again"],
|
|
115
|
+
fr: ["# Un code SMS : passer la main à un humain", "# …et attendre que `handoff` redevienne null"],
|
|
116
|
+
},
|
|
117
|
+
} satisfies Record<string, Words | { en: string[]; fr: string[] }>
|
|
118
|
+
|
|
119
|
+
/** The launcher's tiles (desktop/branding/launcher/index.html), a desktop where Chrome isn't installed yet. */
|
|
120
|
+
export const LAUNCHER = {
|
|
121
|
+
title: "Spunto",
|
|
122
|
+
placeholder: "Ouvrir une application, un site, une action…",
|
|
123
|
+
escape: "Échap",
|
|
124
|
+
sections: ["Applications", "Spunto"],
|
|
125
|
+
apps: [
|
|
126
|
+
{ id: "browser", ico: "🌐", name: "Navigateur web", desc: "Vos comptes et sessions, gardés sur ce poste" },
|
|
127
|
+
{ id: "terminal", ico: "⌨️", name: "Terminal", desc: "Un shell sur le poste" },
|
|
128
|
+
{ id: "files", ico: "📁", name: "Fichiers", desc: "Téléchargements, documents" },
|
|
129
|
+
{ id: "editor", ico: "📝", name: "Éditeur de texte", desc: "Notes, fichiers de config" },
|
|
130
|
+
{ id: "install-chrome", ico: "⬇️", name: "Installer Google Chrome", desc: "Depuis google.com, selon les conditions de Google" },
|
|
131
|
+
],
|
|
132
|
+
spunto: [
|
|
133
|
+
{ id: "spunto", ico: "◆", name: "Ouvrir Spunto", desc: "Vos tâches, sandboxes et projets", accent: true },
|
|
134
|
+
{ id: "dashboard", ico: "🖥️", name: "Mur des postes", desc: "Tous les écrans de l'organisation" },
|
|
135
|
+
{ id: "screenshot", ico: "📸", name: "Capture d'écran", desc: "Dans le dossier Images" },
|
|
136
|
+
{ id: "settings", ico: "⚙️", name: "Réglages du bureau", desc: "Affichage, clavier, souris" },
|
|
137
|
+
],
|
|
138
|
+
keys: [
|
|
139
|
+
{ keys: ["Super", "Espace"], label: "ouvrir le lanceur" },
|
|
140
|
+
{ keys: ["↵"], label: "lancer" },
|
|
141
|
+
{ keys: ["↑", "↓"], label: "choisir" },
|
|
142
|
+
],
|
|
143
|
+
reservedBy: (name: string, holder: string) => `${name} · réservé par ${holder}`,
|
|
144
|
+
/** What is typed in the search: the launcher keeps the tiles whose name or description contains it. */
|
|
145
|
+
query: "term",
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** The terminal of docs/branding/fenetres.png. */
|
|
149
|
+
export const TERMINAL = {
|
|
150
|
+
title: "@742f92fef39a:~",
|
|
151
|
+
prompt: "abc@742f92fef39a:~$",
|
|
152
|
+
command: (name: string) => `echo Spunto Desktop · ${name}; uname -sr`,
|
|
153
|
+
output: (name: string) => [`Spunto Desktop · ${name}`, "Linux 6.18.55-s2"],
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/** The wallpaper's signature (desktop/branding/wallpaper.svg). */
|
|
157
|
+
export const WALLPAPER = { tagline: "Un poste à vous, dans sa microVM. Vos agents le réservent, vous gardez la main." }
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { CodeCard, Float, AppWindow, Stage, u, useStage, type StageColors } from "../stage"
|
|
4
|
+
import { Desk, DeskBrowser, LeaseState } from "./desk"
|
|
5
|
+
import { AppShell, CARDS_TOP, DesktopCard, heldBy, leaseOf, PlainPage, ROOM, WIN, type Lang, type Status } from "./parts"
|
|
6
|
+
import { CAPTION, DESK, DESKTOPS, LEASES, UI } from "./sample"
|
|
7
|
+
|
|
8
|
+
/* The wall of desktops: nobody touches it. An agent asks the API for a desktop tagged « auto »; the one
|
|
9
|
+
that slept wakes, the lease is written under its screen, and the desktop's own taskbar says the same.
|
|
10
|
+
|
|
11
|
+
The request is the documentation's (server/docs.ts: `POST /api/v1/leases`, 201 = the lease, its id
|
|
12
|
+
elided); a returned desktop is reset, so the one that wakes shows its wallpaper. */
|
|
13
|
+
|
|
14
|
+
const H = 580
|
|
15
|
+
const STILL = 4
|
|
16
|
+
/* 0 rest · 1 the agent asks · 2 the desktop wakes · 3 the lease · 4 what its taskbar says · 5 fade · 6 back to sleep */
|
|
17
|
+
const LENGTHS = [1100, 1600, 950, 1700, 3600, 500, 700] as const
|
|
18
|
+
|
|
19
|
+
const GAP = 14
|
|
20
|
+
const CARD = (ROOM - GAP * 2) / 3
|
|
21
|
+
|
|
22
|
+
export function WallScreen({ lang, colors, night, label }: { lang: Lang; colors: StageColors; night: boolean; label: string }) {
|
|
23
|
+
const { ref, step } = useStage(LENGTHS, STILL)
|
|
24
|
+
const status: Status = step === 2 ? "waking" : step >= 3 && step <= 5 ? "running" : "paused"
|
|
25
|
+
const leased = step >= 3 && step <= 5
|
|
26
|
+
const leases = [leaseOf("human", lang, "il y a 25 min", "1 h 35"), leased ? leaseOf("agent", lang, UI.justNow, "60 min") : null, leaseOf("watch", lang, "il y a 12 min", "48 min")]
|
|
27
|
+
const minutes = [95, 60, 48]
|
|
28
|
+
const agent = LEASES.agent
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Stage stageRef={ref} colors={colors} night={night} height={H} label={label}>
|
|
32
|
+
<AppWindow {...WIN} h={H} address="desktop.spunto.net">
|
|
33
|
+
<AppShell colors={colors} count={DESKTOPS.length}>
|
|
34
|
+
{DESKTOPS.map((d, i) => (
|
|
35
|
+
<DesktopCard
|
|
36
|
+
key={d.name}
|
|
37
|
+
x={i * (CARD + GAP)}
|
|
38
|
+
y={CARDS_TOP}
|
|
39
|
+
w={CARD}
|
|
40
|
+
name={d.name}
|
|
41
|
+
tag={d.tag}
|
|
42
|
+
size={d.size}
|
|
43
|
+
status={i === 1 ? status : "running"}
|
|
44
|
+
lease={leases[i]}
|
|
45
|
+
tone={colors.tone}
|
|
46
|
+
screen={
|
|
47
|
+
<Desk w={CARD} name={d.name} held={heldBy(leases[i], minutes[i])} windows={i === 1 ? [] : [{ icon: "browser", title: "example.com", active: true }]}>
|
|
48
|
+
{i !== 1 && (
|
|
49
|
+
<DeskBrowser x={i ? 204 : 26} y={i ? 18 : 14} w={i ? 262 : 330} h={i ? 196 : 214} tab="example.com" address="example.com">
|
|
50
|
+
<PlainPage feed={i === 2} />
|
|
51
|
+
</DeskBrowser>
|
|
52
|
+
)}
|
|
53
|
+
</Desk>
|
|
54
|
+
}
|
|
55
|
+
/>
|
|
56
|
+
))}
|
|
57
|
+
</AppShell>
|
|
58
|
+
</AppWindow>
|
|
59
|
+
|
|
60
|
+
<Float x={14} y={424} w={356} depth={110} show={step >= 1 && step <= 4}>
|
|
61
|
+
<CodeCard
|
|
62
|
+
title={CAPTION.agent[lang]}
|
|
63
|
+
meta="POST"
|
|
64
|
+
signal={colors.signal}
|
|
65
|
+
lines={[
|
|
66
|
+
{ text: CAPTION.lease[lang][0], dim: true },
|
|
67
|
+
{ text: "https://desktop.spunto.net/api/v1/leases" },
|
|
68
|
+
{ text: `{ "holder": "${agent.holder[lang]}", "tag": "auto",` },
|
|
69
|
+
{ text: ` "purpose": "${agent.purpose[lang]}" }` },
|
|
70
|
+
{ text: CAPTION.lease[lang][1], dim: true, hidden: step < 3 },
|
|
71
|
+
{ text: '{ "id": "…", "desktopName": "poste-2", "expiresAt": "…" }', hot: true, hidden: step < 3 },
|
|
72
|
+
]}
|
|
73
|
+
/>
|
|
74
|
+
</Float>
|
|
75
|
+
|
|
76
|
+
<Float x={566} y={446} w={326} depth={190} show={step === 4} style={{ background: "#150f27" }}>
|
|
77
|
+
<div style={{ padding: `${u(7)} ${u(12)}`, borderBottom: `1px solid ${DESK.line}`, fontSize: u(9.6), fontWeight: 600, color: DESK.muted }}>{CAPTION.onDesktop[lang]}</div>
|
|
78
|
+
<div style={{ display: "flex", alignItems: "center", padding: `${u(11)} ${u(12)} ${u(12)}`, color: DESK.text }}>
|
|
79
|
+
<LeaseState name="poste-2" held={heldBy(leaseOf("agent", lang, UI.justNow, "60 min"), 60)} size={11} />
|
|
80
|
+
<span style={{ marginLeft: "auto", fontSize: u(10), fontVariantNumeric: "tabular-nums" }}>13/11 10:42</span>
|
|
81
|
+
</div>
|
|
82
|
+
</Float>
|
|
83
|
+
</Stage>
|
|
84
|
+
)
|
|
85
|
+
}
|