Skip to content

Commit

Permalink
Merge pull request #9663 from owncloud/respect-open-in-new-tab-extern…
Browse files Browse the repository at this point in the history
…al-apps

fix: respect the open-in-new-tab-config for external apps
  • Loading branch information
JammingBen authored Sep 7, 2023
2 parents c3c1bdd + 45daa33 commit 61d8688
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Respect the open-in-new-tab-config for external apps

The `WEB_OPTION_OPEN_APPS_IN_TAB` is now being respected correctly when opening files with external apps.

https://github.com/owncloud/web/pull/9663
https://github.com/owncloud/web/issues/9630
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,10 @@ export const useFileActions = ({ store }: { store?: Store<any> } = {}) => {
...routeOpts.query
} as any

// TODO: Let users configure whether to open in same/new tab (`_blank` vs `_self`)
openUrl(router.resolve(routeOpts).href, '_blank')
openUrl(
router.resolve(routeOpts).href,
configurationManager.options.openAppsInTab ? '_blank' : '_self'
)
}

return {
Expand Down
1 change: 1 addition & 0 deletions packages/web-pkg/src/configuration/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export class ConfigurationManager {
get(options, 'contextHelpersReadMore', true)
)
set(this.optionsConfiguration, 'contextHelpers', get(options, 'contextHelpers', true))
set(this.optionsConfiguration, 'openAppsInTab', get(options, 'openAppsInTab', false))
set(
this.optionsConfiguration,
'openLinksWithDefaultApp',
Expand Down
1 change: 1 addition & 0 deletions packages/web-pkg/src/configuration/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface OptionsConfiguration {
logoutUrl?: string
contextHelpersReadMore?: boolean
contextHelpers?: boolean
openAppsInTab?: boolean
openLinksWithDefaultApp?: boolean
tokenStorageLocal?: boolean
}
Expand Down

0 comments on commit 61d8688

Please sign in to comment.