diff --git a/lib/index.ts b/lib/index.ts index 73389834..425eccb9 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -22,7 +22,8 @@ */ import { type Entry, getNewFileMenu } from './newFileMenu' -import { Folder } from './files/folder' +import { type Folder } from './files/folder' +import { type View } from './navigation/view' export { formatFileSize } from './humanfilesize' export { FileAction, getFileActions, registerFileAction, DefaultType } from './fileAction' @@ -67,8 +68,9 @@ export const removeNewFileMenuEntry = function(entry: Entry | string) { * Get the list of registered entries from the upload menu * * @param {Folder} context the creation context. Usually the current folder FileInfo + * @param {View} view the current view */ -export const getNewFileMenuEntries = function(context?: Folder) { +export const getNewFileMenuEntries = function(context?: Folder, view?: View) { const newFileMenu = getNewFileMenu() - return newFileMenu.getEntries(context) + return newFileMenu.getEntries(context, view) } diff --git a/lib/navigation/view.ts b/lib/navigation/view.ts index 8ea50d21..fe43aa98 100644 --- a/lib/navigation/view.ts +++ b/lib/navigation/view.ts @@ -126,14 +126,26 @@ export class View implements ViewData { return this._view.icon } + set icon(icon) { + this._view.icon = icon + } + get order() { return this._view.order } + set order(order) { + this._view.order = order + } + get params() { return this._view.params } + set params(params) { + this._view.params = params + } + get columns() { return this._view.columns } @@ -154,6 +166,10 @@ export class View implements ViewData { return this._view.expanded } + set expanded(expanded: boolean | undefined) { + this._view.expanded = expanded + } + get defaultSortKey() { return this._view.defaultSortKey }