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
Next Next commit
fix!: open coder_app in a new tab, not window
  • Loading branch information
bpmct committed Feb 6, 2023
commit 16394bde1e82f4430f984a4a617b2ae18e1d520d
18 changes: 0 additions & 18 deletions site/src/components/AppLink/AppLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@ import Tooltip from "@material-ui/core/Tooltip"
import ErrorOutlineIcon from "@material-ui/icons/ErrorOutline"
import { FC } from "react"
import * as TypesGen from "../../api/typesGenerated"
import { generateRandomString } from "../../util/random"
import { BaseIcon } from "./BaseIcon"
import { ShareIcon } from "./ShareIcon"

const Language = {
appTitle: (appName: string, identifier: string): string =>
`${appName} - ${identifier}`,
}

export interface AppLinkProps {
appsHost?: string
workspace: TypesGen.Workspace
Expand Down Expand Up @@ -98,18 +92,6 @@ export const AppLink: FC<AppLinkProps> = ({
href={href}
target="_blank"
className={canClick ? styles.link : styles.disabledLink}
onClick={
canClick
? (event) => {
event.preventDefault()
window.open(
href,
Language.appTitle(appDisplayName, generateRandomString(12)),
"width=900,height=600",
)
}
: undefined
}
>
{button}
</Link>
Expand Down