Skip to content

Commit 9c3d81e

Browse files
committed
Merge branch 'main' into oauth
2 parents 86f2f4a + 3151bef commit 9c3d81e

File tree

133 files changed

+376
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+376
-240
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
site @coder/frontend
1+
site/ @coder/frontend
22
site/src/xServices @presleyp

cli/start.go

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ func start() *cobra.Command {
7070
traceDatadog bool
7171
secureAuthCookie bool
7272
sshKeygenAlgorithmRaw string
73+
spooky bool
7374
)
7475

7576
root := &cobra.Command{
@@ -83,7 +84,7 @@ func start() *cobra.Command {
8384
defer tracer.Stop()
8485
}
8586

86-
printLogo(cmd)
87+
printLogo(cmd, spooky)
8788
listener, err := net.Listen("tcp", address)
8889
if err != nil {
8990
return xerrors.Errorf("listen %q: %w", address, err)
@@ -416,6 +417,8 @@ func start() *cobra.Command {
416417
cliflag.BoolVarP(root.Flags(), &secureAuthCookie, "secure-auth-cookie", "", "CODER_SECURE_AUTH_COOKIE", false, "Specifies if the 'Secure' property is set on browser session cookies")
417418
cliflag.StringVarP(root.Flags(), &sshKeygenAlgorithmRaw, "ssh-keygen-algorithm", "", "CODER_SSH_KEYGEN_ALGORITHM", "ed25519", "Specifies the algorithm to use for generating ssh keys. "+
418419
`Accepted values are "ed25519", "ecdsa", or "rsa4096"`)
420+
cliflag.BoolVarP(root.Flags(), &spooky, "spooky", "", "", false, "Specifies spookiness level")
421+
_ = root.Flags().MarkHidden("spooky")
419422

420423
return root
421424
}
@@ -486,7 +489,24 @@ func newProvisionerDaemon(ctx context.Context, client *codersdk.Client, logger s
486489
}), nil
487490
}
488491

489-
func printLogo(cmd *cobra.Command) {
492+
// nolint: revive
493+
func printLogo(cmd *cobra.Command, spooky bool) {
494+
if spooky {
495+
_, _ = fmt.Fprintf(cmd.OutOrStdout(), `
496+
▄████▄ ▒█████ ▓█████▄ ▓█████ ██▀███
497+
▒██▀ ▀█ ▒██▒ ██▒▒██▀ ██▌▓█ ▀ ▓██ ▒ ██▒
498+
▒▓█ ▄ ▒██░ ██▒░██ █▌▒███ ▓██ ░▄█ ▒
499+
▒▓▓▄ ▄██▒▒██ ██░░▓█▄ ▌▒▓█ ▄ ▒██▀▀█▄
500+
▒ ▓███▀ ░░ ████▓▒░░▒████▓ ░▒████▒░██▓ ▒██▒
501+
░ ░▒ ▒ ░░ ▒░▒░▒░ ▒▒▓ ▒ ░░ ▒░ ░░ ▒▓ ░▒▓░
502+
░ ▒ ░ ▒ ▒░ ░ ▒ ▒ ░ ░ ░ ░▒ ░ ▒░
503+
░ ░ ░ ░ ▒ ░ ░ ░ ░ ░░ ░
504+
░ ░ ░ ░ ░ ░ ░ ░
505+
░ ░
506+
507+
`)
508+
return
509+
}
490510
_, _ = fmt.Fprintf(cmd.OutOrStdout(), ` ▄█▀ ▀█▄
491511
▄▄ ▀▀▀ █▌ ██▀▀█▄ ▐█
492512
▄▄██▀▀█▄▄▄ ██ ██ █▀▀█ ▐█▀▀██ ▄█▀▀█ █▀▀

examples/docker-local/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ resource "docker_volume" "coder_volume" {
3737
}
3838

3939
resource "docker_container" "workspace" {
40-
count = data.coder_workspace.me.start_count
40+
count = data.coder_workspace.me.start_count
4141
image = var.docker_image
4242
name = "coder-${data.coder_workspace.me.owner}-${data.coder_workspace.me.name}-root"
4343
dns = ["1.1.1.1"]

site/htmlTemplates/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<!DOCTYPE html>
22

3+
<!--
4+
▄█▀ ▀█▄
5+
▄▄ ▀▀▀ █▌ ██▀▀█▄ ▐█
6+
▄▄██▀▀█▄▄▄ ██ ██ █▀▀█ ▐█▀▀██ ▄█▀▀█ █▀▀
7+
█▌ ▄▌ ▐█ █▌ ▀█▄▄▄█▌ █ █ ▐█ ██ ██▀▀ █
8+
██████▀▄█ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀ ▀▀▀▀ ▀
9+
-->
10+
311
<head>
412
<meta charset="utf-8" />
513
<meta name="viewport" content="width=device-width, initial-scale=1" />

site/src/AppRouter.tsx

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import React from "react"
22
import { Route, Routes } from "react-router-dom"
3-
import { RequireAuth } from "./components"
43
import { AuthAndFrame } from "./components/AuthAndFrame/AuthAndFrame"
5-
import { PreferencesLayout } from "./components/Preferences/Layout"
4+
import { PreferencesLayout } from "./components/PreferencesLayout/PreferencesLayout"
5+
import { RequireAuth } from "./components/RequireAuth/RequireAuth"
66
import { IndexPage } from "./pages"
7-
import { NotFoundPage } from "./pages/404"
8-
import { CliAuthenticationPage } from "./pages/cli-auth"
9-
import { HealthzPage } from "./pages/healthz"
10-
import { SignInPage } from "./pages/login"
11-
import { OrganizationsPage } from "./pages/orgs"
12-
import { PreferencesAccountPage } from "./pages/preferences/account"
13-
import { PreferencesLinkedAccountsPage } from "./pages/preferences/linkedAccounts"
14-
import { PreferencesSecurityPage } from "./pages/preferences/security"
15-
import { PreferencesSSHKeysPage } from "./pages/preferences/sshKeys"
16-
import { SettingsPage } from "./pages/settings"
17-
import { TemplatesPage } from "./pages/templates"
18-
import { TemplatePage } from "./pages/templates/[organization]/[template]"
19-
import { CreateWorkspacePage } from "./pages/templates/[organization]/[template]/create"
7+
import { NotFoundPage } from "./pages/404Page/404Page"
8+
import { CliAuthenticationPage } from "./pages/CliAuthPage/CliAuthPage"
9+
import { HealthzPage } from "./pages/HealthzPage/HealthzPage"
10+
import { LoginPage } from "./pages/LoginPage/LoginPage"
11+
import { OrgsPage } from "./pages/OrgsPage/OrgsPage"
12+
import { AccountPage } from "./pages/PreferencesPages/AccountPage/AccountPage"
13+
import { LinkedAccountsPage } from "./pages/PreferencesPages/LinkedAccountsPage/LinkedAccountsPage"
14+
import { SecurityPage } from "./pages/PreferencesPages/SecurityPage/SecurityPage"
15+
import { SSHKeysPage } from "./pages/PreferencesPages/SSHKeysPage/SSHKeysPage"
16+
import { SettingsPage } from "./pages/SettingsPage/SettingsPage"
17+
import { CreateWorkspacePage } from "./pages/TemplatesPages/OrganizationPage/TemplatePage/CreateWorkspacePage"
18+
import { TemplatePage } from "./pages/TemplatesPages/OrganizationPage/TemplatePage/TemplatePage"
19+
import { TemplatesPage } from "./pages/TemplatesPages/TemplatesPage"
2020
import { UsersPage } from "./pages/UsersPage/UsersPage"
21-
import { WorkspacePage } from "./pages/workspaces/[workspace]"
21+
import { WorkspacePage } from "./pages/WorkspacesPage/WorkspacesPage"
2222

2323
export const AppRouter: React.FC = () => (
2424
<Routes>
@@ -32,7 +32,7 @@ export const AppRouter: React.FC = () => (
3232
}
3333
/>
3434

35-
<Route path="login" element={<SignInPage />} />
35+
<Route path="login" element={<LoginPage />} />
3636
<Route path="healthz" element={<HealthzPage />} />
3737
<Route path="cli-auth" element={<CliAuthenticationPage />} />
3838

@@ -88,7 +88,7 @@ export const AppRouter: React.FC = () => (
8888
path="orgs"
8989
element={
9090
<AuthAndFrame>
91-
<OrganizationsPage />
91+
<OrgsPage />
9292
</AuthAndFrame>
9393
}
9494
/>
@@ -102,10 +102,10 @@ export const AppRouter: React.FC = () => (
102102
/>
103103

104104
<Route path="preferences" element={<PreferencesLayout />}>
105-
<Route path="account" element={<PreferencesAccountPage />} />
106-
<Route path="security" element={<PreferencesSecurityPage />} />
107-
<Route path="ssh-keys" element={<PreferencesSSHKeysPage />} />
108-
<Route path="linked-accounts" element={<PreferencesLinkedAccountsPage />} />
105+
<Route path="account" element={<AccountPage />} />
106+
<Route path="security" element={<SecurityPage />} />
107+
<Route path="ssh-keys" element={<SSHKeysPage />} />
108+
<Route path="linked-accounts" element={<LinkedAccountsPage />} />
109109
</Route>
110110

111111
{/* Using path="*"" means "match anything", so this route

site/src/Main.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ if (process.env.NODE_ENV === "development" && process.env.INSPECT_XSTATE === "tr
1919
// In the future, we'll likely bring in more bootstrapping logic -
2020
// like: https://github.com/coder/m/blob/50898bd4803df7639bd181e484c74ac5d84da474/product/coder/site/pages/_app.tsx#L32
2121
const main = () => {
22+
console.info(` ▄█▀ ▀█▄
23+
▄▄ ▀▀▀ █▌ ██▀▀█▄ ▐█
24+
▄▄██▀▀█▄▄▄ ██ ██ █▀▀█ ▐█▀▀██ ▄█▀▀█ █▀▀
25+
█▌ ▄▌ ▐█ █▌ ▀█▄▄▄█▌ █ █ ▐█ ██ ██▀▀ █
26+
██████▀▄█ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀ ▀▀▀▀ ▀
27+
`)
2228
const element = document.getElementById("root")
2329
ReactDOM.render(<App />, element)
2430
}

site/src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from "react"
44
import { BrowserRouter as Router } from "react-router-dom"
55
import { SWRConfig } from "swr"
66
import { AppRouter } from "./AppRouter"
7-
import { GlobalSnackbar } from "./components/Snackbar/GlobalSnackbar"
7+
import { GlobalSnackbar } from "./components/GlobalSnackbar/GlobalSnackbar"
88
import { light } from "./theme"
99
import "./theme/globalFonts"
1010
import { XServiceProvider } from "./xServices/StateContext"

site/src/components/AuthAndFrame/AuthAndFrame.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react"
2-
import { Navbar } from "../Navbar"
3-
import { Footer } from "../Page/Footer"
4-
import { RequireAuth } from "../Page/RequireAuth"
2+
import { Footer } from "../Footer/Footer"
3+
import { Navbar } from "../Navbar/Navbar"
4+
import { RequireAuth } from "../RequireAuth/RequireAuth"
55

66
interface AuthAndFrameProps {
77
children: JSX.Element

site/src/components/Button/index.ts

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

site/src/components/SignIn/CliAuthToken.stories.tsx renamed to site/src/components/CliAuthToken/CliAuthToken.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from "react"
33
import { CliAuthToken, CliAuthTokenProps } from "./CliAuthToken"
44

55
export default {
6-
title: "SignIn/CliAuthToken",
6+
title: "components/CliAuthToken",
77
component: CliAuthToken,
88
argTypes: {
99
sessionToken: { control: "text", defaultValue: "some-session-token" },

0 commit comments

Comments
 (0)