Skip to content

Commit

Permalink
fix login (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
jairad26 authored Oct 24, 2024
1 parent cad31cf commit ab481bd
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 53 deletions.
53 changes: 52 additions & 1 deletion src/commands/login/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,58 @@ import open from 'open'
import {
fileExists, getEnvDir, getEnvFilePath, promptOrgSelection, sendGraphQLRequest,
} from '../../util/index.js'
import loginHTML from './login-html.js'

const loginHTML = `<!-- src/commands/login/login.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Success!</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
width: 100vw;
margin: 0;
background-color: #14161f;
}
h1 {
color: #fff;
text-align: center;
margin-bottom: 8px;
}
p {
color: #62646b;
text-align: center;
}
svg {
width: 36px;
height: 36px;
margin-bottom: 16px;
}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path
fillRule="evenodd"
clipRule="evenodd"
fill="#fff"
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"
/>
</svg>
<h1>Authentication complete!</h1>
<p>You can now close this window and return to the terminal.</p>
</body>
</html>
`

export default class LoginIndex extends Command {
static override args = {}
Expand Down
51 changes: 0 additions & 51 deletions src/commands/login/login-html.ts

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -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"}
{"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 comments on commit ab481bd

Please sign in to comment.