mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
feat(site): connect open_in parameter (#16036)
Second step to resolve [open_in issue](https://github.com/coder/terraform-provider-coder/issues/297) This PR improves the way the open_in parameter is forwarded across the code, changing the last `string` to const everywhere. Also make sure it is available and forwarded up to the `CreateLink` component.
This commit is contained in:
@@ -28,6 +28,12 @@ const (
|
||||
WorkspaceAppSharingLevelPublic WorkspaceAppSharingLevel = "public"
|
||||
)
|
||||
|
||||
var MapWorkspaceAppSharingLevels = map[WorkspaceAppSharingLevel]struct{}{
|
||||
WorkspaceAppSharingLevelOwner: {},
|
||||
WorkspaceAppSharingLevelAuthenticated: {},
|
||||
WorkspaceAppSharingLevelPublic: {},
|
||||
}
|
||||
|
||||
type WorkspaceAppOpenIn string
|
||||
|
||||
const (
|
||||
@@ -36,10 +42,10 @@ const (
|
||||
WorkspaceAppOpenInTab WorkspaceAppOpenIn = "tab"
|
||||
)
|
||||
|
||||
var MapWorkspaceAppSharingLevels = map[WorkspaceAppSharingLevel]struct{}{
|
||||
WorkspaceAppSharingLevelOwner: {},
|
||||
WorkspaceAppSharingLevelAuthenticated: {},
|
||||
WorkspaceAppSharingLevelPublic: {},
|
||||
var MapWorkspaceAppOpenIns = map[WorkspaceAppOpenIn]struct{}{
|
||||
WorkspaceAppOpenInSlimWindow: {},
|
||||
WorkspaceAppOpenInWindow: {},
|
||||
WorkspaceAppOpenInTab: {},
|
||||
}
|
||||
|
||||
type WorkspaceApp struct {
|
||||
@@ -70,7 +76,7 @@ type WorkspaceApp struct {
|
||||
Healthcheck Healthcheck `json:"healthcheck"`
|
||||
Health WorkspaceAppHealth `json:"health"`
|
||||
Hidden bool `json:"hidden"`
|
||||
OpenIn string `json:"open_in"`
|
||||
OpenIn WorkspaceAppOpenIn `json:"open_in"`
|
||||
}
|
||||
|
||||
type Healthcheck struct {
|
||||
|
||||
Reference in New Issue
Block a user