Skip to main content

systemprompt_cli/commands/cloud/templates/
oauth.rs

1//! HTML template for the cloud OAuth completion page.
2//!
3//! Copyright (c) systemprompt.io — Business Source License 1.1.
4//! See <https://systemprompt.io> for licensing details.
5
6pub const SUCCESS_HTML: &str = r#"<!DOCTYPE html>
7<html>
8<head>
9    <title>Authentication Successful - systemprompt.io</title>
10    <style>
11        body {
12            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
13            display: flex;
14            justify-content: center;
15            align-items: center;
16            min-height: 100vh;
17            margin: 0;
18            background: #0a0a0a;
19            color: white;
20        }
21        .container {
22            text-align: center;
23            padding: 48px;
24            max-width: 400px;
25        }
26        .success-icon {
27            width: 64px;
28            height: 64px;
29            border-radius: 50%;
30            background: #FF9A2F;
31            display: flex;
32            align-items: center;
33            justify-content: center;
34            margin: 0 auto 24px;
35            font-size: 32px;
36        }
37        h1 {
38            margin: 0 0 12px;
39            font-size: 1.5em;
40            font-weight: 600;
41        }
42        p {
43            margin: 0;
44            color: #a1a1aa;
45            font-size: 0.95em;
46        }
47    </style>
48</head>
49<body>
50    <div class="container">
51        <div class="success-icon">✓</div>
52        <h1>Authentication Successful</h1>
53        <p>You can close this window and return to the terminal.</p>
54    </div>
55</body>
56</html>"#;
57
58pub const ERROR_HTML: &str = r#"<!DOCTYPE html>
59<html>
60<head>
61    <title>Authentication Failed - systemprompt.io</title>
62    <style>
63        body {
64            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
65            display: flex;
66            justify-content: center;
67            align-items: center;
68            min-height: 100vh;
69            margin: 0;
70            background: #0a0a0a;
71            color: white;
72        }
73        .container {
74            text-align: center;
75            padding: 48px;
76            max-width: 400px;
77        }
78        .error-icon {
79            width: 64px;
80            height: 64px;
81            border-radius: 50%;
82            background: #ef4444;
83            display: flex;
84            align-items: center;
85            justify-content: center;
86            margin: 0 auto 24px;
87            font-size: 32px;
88        }
89        h1 {
90            margin: 0 0 12px;
91            font-size: 1.5em;
92            font-weight: 600;
93        }
94        p {
95            margin: 0;
96            color: #a1a1aa;
97            font-size: 0.95em;
98        }
99    </style>
100</head>
101<body>
102    <div class="container">
103        <div class="error-icon">✗</div>
104        <h1>Authentication Failed</h1>
105        <p>Please try again.</p>
106    </div>
107</body>
108</html>"#;