Skip to main content

systemprompt_cli/commands/cloud/templates/
oauth.rs

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