diff options
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/src/services/Navigation.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files/src/services/Navigation.ts b/apps/files/src/services/Navigation.ts index b2ae3b0b973..e85bd39ed81 100644 --- a/apps/files/src/services/Navigation.ts +++ b/apps/files/src/services/Navigation.ts @@ -49,6 +49,8 @@ export interface Navigation { id: string /** Translated view name */ name: string + /** Translated view accessible description */ + caption?: string /** * Method return the content of the provided path * This ideally should be a cancellable promise. @@ -171,6 +173,11 @@ const isValidNavigation = function(view: Navigation): boolean { throw new Error('Navigation name is required and must be a string') } + if (view.columns && view.columns.length > 0 + && (!view.caption || typeof view.caption !== 'string')) { + throw new Error('Navigation caption is required for top-level views and must be a string') + } + /** * Legacy handle their content and icon differently * TODO: remove when support for legacy views is removed |