Skip to content

Commit

Permalink
allow to configure applications for web
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek committed Sep 14, 2022
1 parent 7faca11 commit 78c2173
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/enhancement-web-applications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Allow to configure applications in Web

We've added the possibility to configure applications in the Web configuration.

https://github.com/owncloud/ocis/pull/4578
25 changes: 18 additions & 7 deletions services/web/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type WebConfig struct {
Theme string `json:"theme,omitempty" yaml:"-"`
OpenIDConnect OIDC `json:"openIdConnect,omitempty" yaml:"oidc"`
Apps []string `json:"apps" yaml:"apps"`
Applications []Application `json:"applications,omitempty" yaml:"applications"`
ExternalApps []ExternalApp `json:"external_apps,omitempty" yaml:"external_apps"`
Options map[string]interface{} `json:"options,omitempty" yaml:"options"`
}
Expand All @@ -49,14 +50,24 @@ type OIDC struct {
Scope string `json:"scope,omitempty" yaml:"scope" env:"WEB_OIDC_SCOPE" desc:"OIDC scopes to request during authentication."`
}

// Application defines an application for the Web app switcher.
type Application struct {
Icon string `json:"icon,omitempty" yaml:"icon"`
Target string `json:"target,omitempty" yaml:"target"`
Title map[string]string `json:"title,omitempty" yaml:"title"`
Menu string `json:"menu,omitempty" yaml:"menu"`
URL string `json:"url,omitempty" yaml:"url"`
}

// ExternalApp defines an external web app.
// {
// "name": "hello",
// "path": "http://localhost:9105/hello.js",
// "config": {
// "url": "http://localhost:9105"
// }
// }
//
// {
// "name": "hello",
// "path": "http://localhost:9105/hello.js",
// "config": {
// "url": "http://localhost:9105"
// }
// }
type ExternalApp struct {
ID string `json:"id,omitempty" yaml:"id"`
Path string `json:"path,omitempty" yaml:"path"`
Expand Down

0 comments on commit 78c2173

Please sign in to comment.