mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(files): openfile is set on the query not as a param
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
bbdf69a9fb
commit
066bd0a25d
1 changed files with 5 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ export function useRouteParameters() {
|
|||
const directory = computed<string>(
|
||||
() => String(route.query.dir || '/')
|
||||
// Remove any trailing slash but leave root slash
|
||||
.replace(/^(.+)\/$/, '$1')
|
||||
.replace(/^(.+)\/$/, '$1'),
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
@ -32,7 +32,10 @@ export function useRouteParameters() {
|
|||
/**
|
||||
* State of `openFile` route param
|
||||
*/
|
||||
const openFile = computed<boolean>(() => 'openFile' in route.params && route.params.openFile.toLocaleLowerCase() !== 'false')
|
||||
const openFile = computed<boolean>(
|
||||
// if `openfile` is set it is considered truthy, but allow to explicitly set it to 'false'
|
||||
() => 'openfile' in route.query && (typeof route.query.openfile !== 'string' || route.query.openfile.toLocaleLowerCase() !== 'false'),
|
||||
)
|
||||
|
||||
return {
|
||||
/** Path of currently open directory */
|
||||
|
|
|
|||
Loading…
Reference in a new issue