Skip to content

fix: open terminal and coder_app in a new tab, not window #6044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
terminal too
  • Loading branch information
bpmct committed Feb 6, 2023
commit 8831265dfb60a0cc7694d8bf40d4efbc9763e7ae
10 changes: 0 additions & 10 deletions site/src/components/TerminalLink/TerminalLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import ComputerIcon from "@material-ui/icons/Computer"
import { FC } from "react"
import * as TypesGen from "../../api/typesGenerated"
import { combineClasses } from "../../util/combineClasses"
import { generateRandomString } from "../../util/random"

export const Language = {
linkText: "Terminal",
terminalTitle: (identifier: string): string => `Terminal - ${identifier}`,
}

export interface TerminalLinkProps {
Expand Down Expand Up @@ -42,14 +40,6 @@ export const TerminalLink: FC<React.PropsWithChildren<TerminalLinkProps>> = ({
href={href}
className={combineClasses([styles.link, className])}
target="_blank"
onClick={(event) => {
event.preventDefault()
window.open(
href,
Language.terminalTitle(generateRandomString(12)),
"width=900,height=600",
)
}}
>
<Button startIcon={<ComputerIcon />} size="small">
{Language.linkText}
Expand Down