Skip to content

Commit ab481bd

Browse files
authored
fix login (#14)
1 parent cad31cf commit ab481bd

File tree

3 files changed

+53
-53
lines changed

3 files changed

+53
-53
lines changed

src/commands/login/index.ts

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,58 @@ import open from 'open'
88
import {
99
fileExists, getEnvDir, getEnvFilePath, promptOrgSelection, sendGraphQLRequest,
1010
} from '../../util/index.js'
11-
import loginHTML from './login-html.js'
11+
12+
const loginHTML = `<!-- src/commands/login/login.html -->
13+
<!DOCTYPE html>
14+
<html lang="en">
15+
<head>
16+
<meta charset="UTF-8" />
17+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
18+
<title>Success!</title>
19+
<style>
20+
body {
21+
font-family: Arial, sans-serif;
22+
display: flex;
23+
flex-direction: column;
24+
justify-content: center;
25+
align-items: center;
26+
height: 100vh;
27+
width: 100vw;
28+
margin: 0;
29+
background-color: #14161f;
30+
}
31+
h1 {
32+
color: #fff;
33+
text-align: center;
34+
margin-bottom: 8px;
35+
}
36+
37+
p {
38+
color: #62646b;
39+
text-align: center;
40+
}
41+
42+
svg {
43+
width: 36px;
44+
height: 36px;
45+
margin-bottom: 16px;
46+
}
47+
</style>
48+
</head>
49+
<body>
50+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
51+
<path
52+
fillRule="evenodd"
53+
clipRule="evenodd"
54+
fill="#fff"
55+
d="M10.0173 0H2.64764L0 10.3598H7.36967L10.0173 0ZM2.91136 22.6282L6.0172 10.3599H14.1776L16.8252 0.00012207H24.1949L18.3248 22.9691H10.9551L14.1592 10.4317L2.91136 22.6282Z"
56+
/>
57+
</svg>
58+
<h1>Authentication complete!</h1>
59+
<p>You can now close this window and return to the terminal.</p>
60+
</body>
61+
</html>
62+
`
1263

1364
export default class LoginIndex extends Command {
1465
static override args = {}

src/commands/login/login-html.ts

Lines changed: 0 additions & 51 deletions
This file was deleted.

tsconfig.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"root":["./src/index.ts","./src/commands/login/index.ts","./src/commands/login/login-html.ts","./src/commands/logout/index.ts","./src/commands/org/switch.ts","./src/custom/help.ts","./src/util/index.ts"],"version":"5.6.2"}
1+
{"root":["./src/index.ts","./src/commands/login/index.ts","./src/commands/logout/index.ts","./src/commands/org/switch.ts","./src/custom/help.ts","./src/util/index.ts"],"version":"5.6.2"}

0 commit comments

Comments
 (0)