Skip to content
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

fix: respect the open-in-new-tab-config for external apps #9663

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
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