Skip to content

Commit 8d67d38

Browse files
committed
chore: merge branch 'main' of github.com:coder/coder into bq/refactor-index
2 parents 4b9bd88 + c35be02 commit 8d67d38

22 files changed

+165
-35
lines changed

cli/start.go

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func start() *cobra.Command {
6363
traceDatadog bool
6464
secureAuthCookie bool
6565
sshKeygenAlgorithmRaw string
66+
spooky bool
6667
)
6768

6869
root := &cobra.Command{
@@ -76,7 +77,7 @@ func start() *cobra.Command {
7677
defer tracer.Stop()
7778
}
7879

79-
printLogo(cmd)
80+
printLogo(cmd, spooky)
8081
listener, err := net.Listen("tcp", address)
8182
if err != nil {
8283
return xerrors.Errorf("listen %q: %w", address, err)
@@ -394,6 +395,8 @@ func start() *cobra.Command {
394395
cliflag.BoolVarP(root.Flags(), &secureAuthCookie, "secure-auth-cookie", "", "CODER_SECURE_AUTH_COOKIE", false, "Specifies if the 'Secure' property is set on browser session cookies")
395396
cliflag.StringVarP(root.Flags(), &sshKeygenAlgorithmRaw, "ssh-keygen-algorithm", "", "CODER_SSH_KEYGEN_ALGORITHM", "ed25519", "Specifies the algorithm to use for generating ssh keys. "+
396397
`Accepted values are "ed25519", "ecdsa", or "rsa4096"`)
398+
cliflag.BoolVarP(root.Flags(), &spooky, "spooky", "", "", false, "Specifies spookiness level")
399+
_ = root.Flags().MarkHidden("spooky")
397400

398401
return root
399402
}
@@ -464,7 +467,24 @@ func newProvisionerDaemon(ctx context.Context, client *codersdk.Client, logger s
464467
}), nil
465468
}
466469

467-
func printLogo(cmd *cobra.Command) {
470+
// nolint: revive
471+
func printLogo(cmd *cobra.Command, spooky bool) {
472+
if spooky {
473+
_, _ = fmt.Fprintf(cmd.OutOrStdout(), `
474+
▄████▄ ▒█████ ▓█████▄ ▓█████ ██▀███
475+
▒██▀ ▀█ ▒██▒ ██▒▒██▀ ██▌▓█ ▀ ▓██ ▒ ██▒
476+
▒▓█ ▄ ▒██░ ██▒░██ █▌▒███ ▓██ ░▄█ ▒
477+
▒▓▓▄ ▄██▒▒██ ██░░▓█▄ ▌▒▓█ ▄ ▒██▀▀█▄
478+
▒ ▓███▀ ░░ ████▓▒░░▒████▓ ░▒████▒░██▓ ▒██▒
479+
░ ░▒ ▒ ░░ ▒░▒░▒░ ▒▒▓ ▒ ░░ ▒░ ░░ ▒▓ ░▒▓░
480+
░ ▒ ░ ▒ ▒░ ░ ▒ ▒ ░ ░ ░ ░▒ ░ ▒░
481+
░ ░ ░ ░ ▒ ░ ░ ░ ░ ░░ ░
482+
░ ░ ░ ░ ░ ░ ░ ░
483+
░ ░
484+
485+
`)
486+
return
487+
}
468488
_, _ = fmt.Fprintf(cmd.OutOrStdout(), ` ▄█▀ ▀█▄
469489
▄▄ ▀▀▀ █▌ ██▀▀█▄ ▐█
470490
▄▄██▀▀█▄▄▄ ██ ██ █▀▀█ ▐█▀▀██ ▄█▀▀█ █▀▀

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/components/Button/CopyButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { makeStyles } from "@material-ui/core/styles"
33
import Tooltip from "@material-ui/core/Tooltip"
44
import Check from "@material-ui/icons/Check"
55
import React, { useState } from "react"
6-
import { FileCopy } from "../Icons"
6+
import { FileCopyIcon } from "../Icons/FileCopyIcon"
77

88
interface CopyButtonProps {
99
text: string
@@ -38,7 +38,7 @@ export const CopyButton: React.FC<CopyButtonProps> = ({ className = "", text })
3838
<Tooltip title="Copy to Clipboard" placement="top">
3939
<div className={`${styles.copyButtonWrapper} ${className}`}>
4040
<Button className={styles.copyButton} onClick={copyToClipboard} size="small">
41-
{isCopied ? <Check className={styles.fileCopyIcon} /> : <FileCopy className={styles.fileCopyIcon} />}
41+
{isCopied ? <Check className={styles.fileCopyIcon} /> : <FileCopyIcon className={styles.fileCopyIcon} />}
4242
</Button>
4343
</div>
4444
</Tooltip>

site/src/components/Form/FormCloseButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import IconButton from "@material-ui/core/IconButton"
22
import { makeStyles } from "@material-ui/core/styles"
33
import Typography from "@material-ui/core/Typography"
44
import React, { useEffect } from "react"
5-
import { CloseIcon } from "../Icons/Close"
5+
import { CloseIcon } from "../Icons/CloseIcon"
66

77
export interface FormCloseButtonProps {
88
onClose: () => void
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Story } from "@storybook/react"
2+
import React from "react"
3+
import { BuildingIcon } from "./BuildingIcon"
4+
5+
export default {
6+
title: "icons/BuildingIcon",
7+
component: BuildingIcon,
8+
}
9+
10+
const Template: Story = (args) => <BuildingIcon {...args} />
11+
12+
export const Example = Template.bind({})
13+
Example.args = {}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Story } from "@storybook/react"
2+
import React from "react"
3+
import { CloseIcon } from "./CloseIcon"
4+
5+
export default {
6+
title: "icons/CloseIcon",
7+
component: CloseIcon,
8+
}
9+
10+
const Template: Story = (args) => <CloseIcon {...args} />
11+
12+
export const Example = Template.bind({})
13+
Example.args = {}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Story } from "@storybook/react"
2+
import React from "react"
3+
import { CoderIcon } from "./CoderIcon"
4+
5+
export default {
6+
title: "icons/CoderIcon",
7+
component: CoderIcon,
8+
}
9+
10+
const Template: Story = (args) => <CoderIcon {...args} />
11+
12+
export const Example = Template.bind({})
13+
Example.args = {}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Story } from "@storybook/react"
2+
import React from "react"
3+
import { DocsIcon } from "./DocsIcon"
4+
5+
export default {
6+
title: "icons/DocsIcon",
7+
component: DocsIcon,
8+
}
9+
10+
const Template: Story = (args) => <DocsIcon {...args} />
11+
12+
export const Example = Template.bind({})
13+
Example.args = {}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Story } from "@storybook/react"
2+
import React from "react"
3+
import { ErrorIcon } from "./ErrorIcon"
4+
5+
export default {
6+
title: "icons/ErrorIcon",
7+
component: ErrorIcon,
8+
}
9+
10+
const Template: Story = (args) => <ErrorIcon {...args} />
11+
12+
export const Example = Template.bind({})
13+
Example.args = {}

0 commit comments

Comments
 (0)