Skip to content

Commit df13b9d

Browse files
authored
fix: open multiple app windows (coder#2912)
1 parent 2c89e07 commit df13b9d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

site/src/components/AppLink/AppLink.tsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import { makeStyles } from "@material-ui/core/styles"
44
import ComputerIcon from "@material-ui/icons/Computer"
55
import { FC } from "react"
66
import * as TypesGen from "../../api/typesGenerated"
7+
import { generateRandomString } from "../../util/random"
8+
9+
export const Language = {
10+
appTitle: (appName: string, identifier: string): string => `${appName} - ${identifier}`,
11+
}
712

813
export interface AppLinkProps {
914
userName: TypesGen.User["username"]
@@ -23,7 +28,11 @@ export const AppLink: FC<AppLinkProps> = ({ userName, workspaceName, appName, ap
2328
className={styles.link}
2429
onClick={(event) => {
2530
event.preventDefault()
26-
window.open(href, appName, "width=900,height=600")
31+
window.open(
32+
href,
33+
Language.appTitle(appName, generateRandomString(12)),
34+
"width=900,height=600",
35+
)
2736
}}
2837
>
2938
<Button

0 commit comments

Comments
 (0)