@tanagram/cli 0.4.8 → 0.4.9
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/commands/login.go +184 -5
- package/package.json +1 -1
package/commands/login.go
CHANGED
|
@@ -81,14 +81,193 @@ func Login() error {
|
|
|
81
81
|
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
|
82
82
|
fmt.Fprintf(w, `
|
|
83
83
|
<!DOCTYPE html>
|
|
84
|
-
<html>
|
|
84
|
+
<html lang="en">
|
|
85
85
|
<head>
|
|
86
86
|
<meta charset="utf-8">
|
|
87
|
-
<
|
|
87
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
88
|
+
<title>Tanagram – Login Successful</title>
|
|
89
|
+
<style>
|
|
90
|
+
:root {
|
|
91
|
+
color-scheme: light dark;
|
|
92
|
+
--bg-color: #f5f5f7;
|
|
93
|
+
--card-bg-color: #ffffff;
|
|
94
|
+
--border-color: rgba(15, 23, 42, 0.08);
|
|
95
|
+
--text-color: #0f172a;
|
|
96
|
+
--muted-text-color: #6b7280;
|
|
97
|
+
--accent-color: #16a34a;
|
|
98
|
+
--accent-soft: rgba(22, 163, 74, 0.1);
|
|
99
|
+
--shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (prefers-color-scheme: dark) {
|
|
103
|
+
:root {
|
|
104
|
+
--bg-color: #020617;
|
|
105
|
+
--card-bg-color: #020617;
|
|
106
|
+
--border-color: rgba(148, 163, 184, 0.28);
|
|
107
|
+
--text-color: #e5e7eb;
|
|
108
|
+
--muted-text-color: #9ca3af;
|
|
109
|
+
--accent-color: #22c55e;
|
|
110
|
+
--accent-soft: rgba(34, 197, 94, 0.15);
|
|
111
|
+
--shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.8);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
*,
|
|
116
|
+
*::before,
|
|
117
|
+
*::after {
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
html, body {
|
|
122
|
+
margin: 0;
|
|
123
|
+
padding: 0;
|
|
124
|
+
height: 100%;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
body {
|
|
128
|
+
font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, -system-ui, sans-serif;
|
|
129
|
+
background-color: var(--bg-color);
|
|
130
|
+
color: var(--text-color);
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
justify-content: center;
|
|
134
|
+
padding: 24px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.container {
|
|
138
|
+
max-width: 440px;
|
|
139
|
+
width: 100%;
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
align-items: center;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.card {
|
|
146
|
+
background-color: var(--card-bg-color);
|
|
147
|
+
border-radius: 18px;
|
|
148
|
+
border: 1px solid var(--border-color);
|
|
149
|
+
box-shadow: var(--shadow-soft);
|
|
150
|
+
padding: 28px 26px 24px;
|
|
151
|
+
position: relative;
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
width: 100%;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.card::before {
|
|
157
|
+
content: "";
|
|
158
|
+
position: absolute;
|
|
159
|
+
inset: 0;
|
|
160
|
+
background: radial-gradient(circle at top left, rgba(22, 163, 74, 0.08), transparent 55%);
|
|
161
|
+
pointer-events: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.accent-bar {
|
|
165
|
+
position: absolute;
|
|
166
|
+
top: 0;
|
|
167
|
+
left: 0;
|
|
168
|
+
right: 0;
|
|
169
|
+
height: 3px;
|
|
170
|
+
background: linear-gradient(90deg, #16a34a, #22c55e);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.content {
|
|
174
|
+
position: relative;
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
align-items: center;
|
|
178
|
+
text-align: center;
|
|
179
|
+
gap: 14px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.icon-wrapper {
|
|
183
|
+
width: 56px;
|
|
184
|
+
height: 56px;
|
|
185
|
+
border-radius: 999px;
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
background: var(--accent-soft);
|
|
190
|
+
color: var(--accent-color);
|
|
191
|
+
margin-bottom: 4px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.icon {
|
|
195
|
+
font-size: 30px;
|
|
196
|
+
line-height: 1;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
h1 {
|
|
200
|
+
margin: 0;
|
|
201
|
+
font-size: 22px;
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
letter-spacing: -0.01em;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.subtitle {
|
|
207
|
+
margin: 0;
|
|
208
|
+
font-size: 14px;
|
|
209
|
+
color: var(--muted-text-color);
|
|
210
|
+
line-height: 1.5;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.tag {
|
|
214
|
+
display: inline-flex;
|
|
215
|
+
align-items: center;
|
|
216
|
+
gap: 6px;
|
|
217
|
+
margin-top: 8px;
|
|
218
|
+
padding: 3px 9px;
|
|
219
|
+
border-radius: 999px;
|
|
220
|
+
background-color: rgba(15, 23, 42, 0.03);
|
|
221
|
+
color: var(--muted-text-color);
|
|
222
|
+
font-size: 11px;
|
|
223
|
+
text-transform: uppercase;
|
|
224
|
+
letter-spacing: 0.09em;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@media (prefers-color-scheme: dark) {
|
|
228
|
+
.tag {
|
|
229
|
+
background-color: rgba(15, 23, 42, 0.7);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.tag-dot {
|
|
234
|
+
width: 7px;
|
|
235
|
+
height: 7px;
|
|
236
|
+
border-radius: 999px;
|
|
237
|
+
background-color: var(--accent-color);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.footer-note {
|
|
241
|
+
margin-top: 20px;
|
|
242
|
+
font-size: 13px;
|
|
243
|
+
color: var(--muted-text-color);
|
|
244
|
+
text-align: center;
|
|
245
|
+
}
|
|
246
|
+
</style>
|
|
88
247
|
</head>
|
|
89
|
-
<body
|
|
90
|
-
<
|
|
91
|
-
|
|
248
|
+
<body>
|
|
249
|
+
<div class="container">
|
|
250
|
+
<div class="card" role="status" aria-live="polite">
|
|
251
|
+
<div class="accent-bar"></div>
|
|
252
|
+
<div class="content">
|
|
253
|
+
<div class="icon-wrapper">
|
|
254
|
+
<div class="icon">✓</div>
|
|
255
|
+
</div>
|
|
256
|
+
<h1>Login successful</h1>
|
|
257
|
+
<p class="subtitle">
|
|
258
|
+
You're now signed in to the Tanagram CLI.<br>
|
|
259
|
+
You can safely close this tab and return to your terminal.
|
|
260
|
+
</p>
|
|
261
|
+
<div class="tag">
|
|
262
|
+
<span class="tag-dot"></span>
|
|
263
|
+
<span>Authenticated from this device</span>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
<p class="footer-note">
|
|
268
|
+
If this window doesn't close automatically, you can just close it manually.
|
|
269
|
+
</p>
|
|
270
|
+
</div>
|
|
92
271
|
</body>
|
|
93
272
|
</html>
|
|
94
273
|
`)
|