Thanks to visit codestin.com
Credit goes to github.com

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 = {}
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 { FileCopyIcon } from "./FileCopyIcon"
4+
5+
export default {
6+
title: "icons/FileCopyIcon",
7+
component: FileCopyIcon,
8+
}
9+
10+
const Template: Story = (args) => <FileCopyIcon {...args} />
11+
12+
export const Example = Template.bind({})
13+
Example.args = {}

site/src/components/Icons/FileCopy.tsx renamed to site/src/components/Icons/FileCopyIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import SvgIcon from "@material-ui/core/SvgIcon"
22
import React from "react"
33

4-
export const FileCopy: typeof SvgIcon = (props) => (
4+
export const FileCopyIcon: typeof SvgIcon = (props) => (
55
<SvgIcon {...props} viewBox="0 0 20 20">
66
<path
77
d="M12.7412 2.2807H4.32014C3.5447 2.2807 2.91663 2.90877 2.91663 3.68421V13.5088H4.32014V3.68421H12.7412V2.2807ZM14.8465 5.08772H7.12716C6.35172 5.08772 5.72365 5.71579 5.72365 6.49123V16.3158C5.72365 17.0912 6.35172 17.7193 7.12716 17.7193H14.8465C15.6219 17.7193 16.25 17.0912 16.25 16.3158V6.49123C16.25 5.71579 15.6219 5.08772 14.8465 5.08772ZM14.8465 16.3158H7.12716V6.49123H14.8465V16.3158Z"
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 { Logo } from "./Logo"
4+
5+
export default {
6+
title: "icons/Logo",
7+
component: Logo,
8+
}
9+
10+
const Template: Story = (args) => <Logo fill="black" {...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 { LogoutIcon } from "./LogoutIcon"
4+
5+
export default {
6+
title: "icons/LogoutIcon",
7+
component: LogoutIcon,
8+
}
9+
10+
const Template: Story = (args) => <LogoutIcon {...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 { UsersOutlinedIcon } from "./UsersOutlinedIcon"
4+
5+
export default {
6+
title: "icons/UsersOutlinedIcon",
7+
component: UsersOutlinedIcon,
8+
}
9+
10+
const Template: Story = (args) => <UsersOutlinedIcon {...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 { WorkspacesIcon } from "./WorkspacesIcon"
4+
5+
export default {
6+
title: "icons/WorkspacesIcon",
7+
component: WorkspacesIcon,
8+
}
9+
10+
const Template: Story = (args) => <WorkspacesIcon {...args} />
11+
12+
export const Example = Template.bind({})
13+
Example.args = {}

site/src/components/Icons/index.test.tsx

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

site/src/components/Icons/index.ts

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

site/src/components/Navbar/NavbarView/NavbarView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { NavLink } from "react-router-dom"
66
import { UserResponse } from "../../../api/types"
77
import { navHeight } from "../../../theme/constants"
88
import { AdminDropdown } from "../../AdminDropdown/AdminDropdown"
9-
import { Logo } from "../../Icons"
9+
import { Logo } from "../../Icons/Logo"
1010
import { UserDropdown } from "../UserDropdown/UsersDropdown"
1111

1212
export interface NavbarViewProps {

site/src/components/Navbar/UserDropdown/UsersDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { Link } from "react-router-dom"
1010
import { UserResponse } from "../../../api/types"
1111
import { BorderedMenu } from "../../BorderedMenu/BorderedMenu"
1212
import { CloseDropdown, OpenDropdown } from "../../DropdownArrows/DropdownArrows"
13-
import { LogoutIcon } from "../../Icons"
1413
import { DocsIcon } from "../../Icons/DocsIcon"
14+
import { LogoutIcon } from "../../Icons/LogoutIcon"
1515
import { UserAvatar } from "../../User/UserAvatar"
1616
import { UserProfileCard } from "../../User/UserProfileCard"
1717

site/src/components/SignIn/Welcome.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { makeStyles } from "@material-ui/core/styles"
22
import Typography from "@material-ui/core/Typography"
33
import React from "react"
4-
import { CoderIcon } from "../Icons"
4+
import { CoderIcon } from "../Icons/CoderIcon"
55

66
export const Welcome: React.FC = () => {
77
const styles = useStyles()

0 commit comments

Comments
 (0)