Browse Source

fix(files): default emptycontent message

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
tags/v28.0.0beta1
John Molakvoæ 11 months ago
parent
commit
bb9c7ee75c
69 changed files with 150 additions and 106 deletions
  1. 1
    1
      apps/files/src/components/FilesListVirtual.vue
  2. 7
    1
      apps/files/src/services/Navigation.ts
  3. 5
    5
      apps/files/src/views/FilesList.vue
  4. 1
    1
      apps/files/src/views/favorites.spec.ts
  5. 3
    0
      apps/files/src/views/favorites.ts
  6. 8
    6
      apps/files_sharing/src/views/shares.spec.ts
  7. 19
    1
      apps/files_sharing/src/views/shares.ts
  8. 3
    0
      apps/files_trashbin/src/main.ts
  9. 2
    2
      dist/2246-2246.js
  10. 1
    1
      dist/2246-2246.js.map
  11. 2
    2
      dist/2323-2323.js
  12. 1
    1
      dist/2323-2323.js.map
  13. 2
    2
      dist/3832-3832.js
  14. 1
    1
      dist/3832-3832.js.map
  15. 2
    2
      dist/comments-comments-app.js
  16. 2
    0
      dist/comments-comments-app.js.LICENSE.txt
  17. 1
    1
      dist/comments-comments-app.js.map
  18. 2
    2
      dist/core-common.js
  19. 1
    1
      dist/core-common.js.map
  20. 2
    2
      dist/core-main.js
  21. 2
    0
      dist/core-main.js.LICENSE.txt
  22. 1
    1
      dist/core-main.js.map
  23. 2
    2
      dist/core-unified-search.js
  24. 2
    0
      dist/core-unified-search.js.LICENSE.txt
  25. 1
    1
      dist/core-unified-search.js.map
  26. 2
    2
      dist/dav-settings-personal-availability.js
  27. 1
    1
      dist/dav-settings-personal-availability.js.map
  28. 2
    2
      dist/files-main.js
  29. 4
    0
      dist/files-main.js.LICENSE.txt
  30. 1
    1
      dist/files-main.js.map
  31. 2
    2
      dist/files-reference-files.js
  32. 1
    1
      dist/files-reference-files.js.map
  33. 2
    2
      dist/files-sidebar.js
  34. 1
    1
      dist/files-sidebar.js.map
  35. 2
    2
      dist/files_sharing-files_sharing.js
  36. 1
    1
      dist/files_sharing-files_sharing.js.map
  37. 2
    2
      dist/files_sharing-files_sharing_tab.js
  38. 1
    1
      dist/files_sharing-files_sharing_tab.js.map
  39. 2
    2
      dist/files_trashbin-main.js
  40. 1
    1
      dist/files_trashbin-main.js.map
  41. 2
    2
      dist/files_versions-files_versions.js
  42. 1
    1
      dist/files_versions-files_versions.js.map
  43. 2
    2
      dist/settings-apps-view-7418.js
  44. 1
    1
      dist/settings-apps-view-7418.js.map
  45. 2
    2
      dist/settings-users-8351.js
  46. 2
    0
      dist/settings-users-8351.js.LICENSE.txt
  47. 1
    1
      dist/settings-users-8351.js.map
  48. 2
    2
      dist/settings-vue-settings-apps-users-management.js
  49. 1
    1
      dist/settings-vue-settings-apps-users-management.js.map
  50. 2
    2
      dist/settings-vue-settings-personal-security.js
  51. 1
    1
      dist/settings-vue-settings-personal-security.js.map
  52. 2
    2
      dist/theming-admin-theming.js
  53. 1
    1
      dist/theming-admin-theming.js.map
  54. 2
    2
      dist/theming-personal-theming.js
  55. 1
    1
      dist/theming-personal-theming.js.map
  56. 2
    2
      dist/updatenotification-updatenotification.js
  57. 1
    1
      dist/updatenotification-updatenotification.js.map
  58. 2
    2
      dist/user-status-modal-8299.js
  59. 1
    1
      dist/user-status-modal-8299.js.map
  60. 2
    2
      dist/user_status-dashboard.js
  61. 1
    1
      dist/user_status-dashboard.js.map
  62. 2
    2
      dist/user_status-menu.js
  63. 1
    1
      dist/user_status-menu.js.map
  64. 2
    2
      dist/weather_status-weather-status.js
  65. 1
    1
      dist/weather_status-weather-status.js.map
  66. 2
    2
      dist/workflowengine-workflowengine.js
  67. 1
    1
      dist/workflowengine-workflowengine.js.map
  68. 9
    9
      package-lock.json
  69. 1
    1
      package.json

+ 1
- 1
apps/files/src/components/FilesListVirtual.vue View File

@@ -45,7 +45,7 @@
<template #before>
<!-- Accessibility description -->
<caption class="hidden-visually">
{{ currentView.caption || '' }}
{{ currentView.caption || t('files', 'List of files and folders.') }}
{{ t('files', 'This list is not fully rendered for performances reasons. The files will be rendered as you navigate through the list.') }}
</caption>


+ 7
- 1
apps/files/src/services/Navigation.ts View File

@@ -51,8 +51,14 @@ export interface Navigation {
id: string
/** Translated view name */
name: string
/** Translated view accessible description */
/** Translated accessible description of the view */
caption?: string

/** Translated title of the empty view */
emptyTitle?: string
/** Translated description of the empty view */
emptyCaption?: string

/**
* Method return the content of the provided path
* This ideally should be a cancellable promise.

+ 5
- 5
apps/files/src/views/FilesList.vue View File

@@ -39,8 +39,8 @@

<!-- Empty content placeholder -->
<NcEmptyContent v-else-if="!loading && isEmptyDir"
:title="t('files', 'No files in here')"
:description="t('files', 'No files or folders have been deleted yet')"
:title="currentView?.emptyTitle || t('files', 'No files in here')"
:description="currentView?.emptyCaption || t('files', 'Upload some content or sync with your devices!')"
data-cy-files-content-empty>
<template #action>
<NcButton v-if="dir !== '/'"
@@ -51,7 +51,7 @@
</NcButton>
</template>
<template #icon>
<TrashCan />
<NcIconSvgWrapper :svg="currentView.icon" />
</template>
</NcEmptyContent>

@@ -72,7 +72,6 @@ import NcAppContent from '@nextcloud/vue/dist/Components/NcAppContent.js'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent.js'
import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'
import TrashCan from 'vue-material-design-icons/TrashCan.vue'
import Vue from 'vue'

import { useFilesStore } from '../store/files.ts'
@@ -85,6 +84,7 @@ import FilesListVirtual from '../components/FilesListVirtual.vue'
import filesSortingMixin from '../mixins/filesSorting.ts'
import logger from '../logger.js'
import Navigation, { ContentsWithRoot } from '../services/Navigation.ts'
import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js'

export default Vue.extend({
name: 'FilesList',
@@ -95,8 +95,8 @@ export default Vue.extend({
NcAppContent,
NcButton,
NcEmptyContent,
NcIconSvgWrapper,
NcLoadingIcon,
TrashCan,
},

mixins: [

+ 1
- 1
apps/files/src/views/favorites.spec.ts View File

@@ -68,7 +68,7 @@ describe('Favorites view definition', () => {

expect(favoritesView?.id).toBe('favorites')
expect(favoritesView?.name).toBe('Favorites')
expect(favoritesView?.caption).toBe('List of favorites files and folders.')
expect(favoritesView?.caption).toBeDefined()
expect(favoritesView?.icon).toBe('<svg>SvgMock</svg>')
expect(favoritesView?.order).toBe(5)
expect(favoritesView?.columns).toStrictEqual([])

+ 3
- 0
apps/files/src/views/favorites.ts View File

@@ -68,6 +68,9 @@ export default () => {
name: t('files', 'Favorites'),
caption: t('files', 'List of favorites files and folders.'),

emptyTitle: t('files', 'No favorites yet'),
emptyCaption: t('files', 'Files and folders you mark as favorite will show up here'),

icon: StarSvg,
order: 5,


+ 8
- 6
apps/files_sharing/src/views/shares.spec.ts View File

@@ -67,18 +67,20 @@ describe('Sharing views definition', () => {
expect(shareOverviewView?.getContents).toBeDefined()

const dataProvider = [
{ id: 'sharingin', name: 'Shared with you', caption: 'List of files that are shared with you.' },
{ id: 'sharingout', name: 'Shared with others', caption: 'List of files that you shared with others.' },
{ id: 'sharinglinks', name: 'Shared by link', caption: 'List of files that are shared by link.' },
{ id: 'deletedshares', name: 'Deleted shares', caption: 'List of shares that you removed yourself from.' },
{ id: 'pendingshares', name: 'Pending shares', caption: 'List of unapproved shares.' },
{ id: 'sharingin', name: 'Shared with you' },
{ id: 'sharingout', name: 'Shared with others' },
{ id: 'sharinglinks', name: 'Shared by link' },
{ id: 'deletedshares', name: 'Deleted shares' },
{ id: 'pendingshares', name: 'Pending shares' },
]

sharesChildViews.forEach((view, index) => {
expect(view?.id).toBe(dataProvider[index].id)
expect(view?.parent).toBe('shareoverview')
expect(view?.name).toBe(dataProvider[index].name)
expect(view?.caption).toBe(dataProvider[index].caption)
expect(view?.caption).toBeDefined()
expect(view?.emptyTitle).toBeDefined()
expect(view?.emptyCaption).toBeDefined()
expect(view?.icon).toBe('<svg>SvgMock</svg>')
expect(view?.order).toBe(index + 1)
expect(view?.columns).toStrictEqual([])

+ 19
- 1
apps/files_sharing/src/views/shares.ts View File

@@ -46,6 +46,9 @@ export default () => {
name: t('files_sharing', 'Shares'),
caption: t('files_sharing', 'Overview of shared files.'),

emptyTitle: t('files_sharing', 'No shares'),
emptyCaption: t('files_sharing', 'Files and folders you shared or have been shared with you will show up here'),

icon: ShareVariantSvg,
order: 20,

@@ -59,6 +62,9 @@ export default () => {
name: t('files_sharing', 'Shared with you'),
caption: t('files_sharing', 'List of files that are shared with you.'),

emptyTitle: t('files_sharing', 'Nothing shared with you yet'),
emptyCaption: t('files_sharing', 'Files and folders others shared with you will show up here'),

icon: AccountSvg,
order: 1,
parent: sharesViewId,
@@ -73,6 +79,9 @@ export default () => {
name: t('files_sharing', 'Shared with others'),
caption: t('files_sharing', 'List of files that you shared with others.'),

emptyTitle: t('files_sharing', 'Nothing shared yet'),
emptyCaption: t('files_sharing', 'Files and folders you shared will show up here'),

icon: AccountGroupSvg,
order: 2,
parent: sharesViewId,
@@ -87,6 +96,9 @@ export default () => {
name: t('files_sharing', 'Shared by link'),
caption: t('files_sharing', 'List of files that are shared by link.'),

emptyTitle: t('files_sharing', 'No shared links'),
emptyCaption: t('files_sharing', 'Files and folders you shared by link will show up here'),

icon: LinkSvg,
order: 3,
parent: sharesViewId,
@@ -99,7 +111,10 @@ export default () => {
Navigation.register({
id: deletedSharesViewId,
name: t('files_sharing', 'Deleted shares'),
caption: t('files_sharing', 'List of shares that you removed yourself from.'),
caption: t('files_sharing', 'List of shares you left.'),

emptyTitle: t('files_sharing', 'No deleted shares'),
emptyCaption: t('files_sharing', 'Shares you have left will show up here'),

icon: DeleteSvg,
order: 4,
@@ -115,6 +130,9 @@ export default () => {
name: t('files_sharing', 'Pending shares'),
caption: t('files_sharing', 'List of unapproved shares.'),

emptyTitle: t('files_sharing', 'No pending shares'),
emptyCaption: t('files_sharing', 'Shares you have received but not approved will show up here'),

icon: AccountClockSvg,
order: 5,
parent: sharesViewId,

+ 3
- 0
apps/files_trashbin/src/main.ts View File

@@ -37,6 +37,9 @@ Navigation.register({
name: t('files_trashbin', 'Deleted files'),
caption: t('files_trashbin', 'List of files that have been deleted.'),

emptyTitle: t('files_trashbin', 'No deleted files'),
emptyCaption: t('files_trashbin', 'Files and folders you have deleted will show up here'),

icon: DeleteSvg,
order: 50,
sticky: true,

+ 2
- 2
dist/2246-2246.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/2246-2246.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/2323-2323.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/2323-2323.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/3832-3832.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/3832-3832.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/comments-comments-app.js
File diff suppressed because it is too large
View File


+ 2
- 0
dist/comments-comments-app.js.LICENSE.txt View File

@@ -1,3 +1,5 @@
/*! For license information please see richEditor.js.LICENSE.txt */

/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */

/*! https://mths.be/he v1.2.0 by @mathias | MIT license */

+ 1
- 1
dist/comments-comments-app.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/core-common.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/core-common.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/core-main.js
File diff suppressed because it is too large
View File


+ 2
- 0
dist/core-main.js.LICENSE.txt View File

@@ -170,6 +170,8 @@
* http://jquery.org/license
*/

/*! For license information please see NcHeaderMenu.js.LICENSE.txt */

/*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */

/*! jQuery UI - v1.13.2 - 2022-07-14

+ 1
- 1
dist/core-main.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/core-unified-search.js
File diff suppressed because it is too large
View File


+ 2
- 0
dist/core-unified-search.js.LICENSE.txt View File

@@ -1,3 +1,5 @@
/*! For license information please see NcHeaderMenu.js.LICENSE.txt */

/**
* @copyright 2020, John Molakvoæ <skjnldsv@protonmail.com>
*

+ 1
- 1
dist/core-unified-search.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/dav-settings-personal-availability.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/dav-settings-personal-availability.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/files-main.js
File diff suppressed because it is too large
View File


+ 4
- 0
dist/files-main.js.LICENSE.txt View File

@@ -34,10 +34,14 @@

/*! For license information please see NcAppSettingsDialog.js.LICENSE.txt */

/*! For license information please see NcAppSettingsSection.js.LICENSE.txt */

/*! For license information please see NcBreadcrumb.js.LICENSE.txt */

/*! For license information please see NcBreadcrumbs.js.LICENSE.txt */

/*! For license information please see NcIconSvgWrapper.js.LICENSE.txt */

/*! For license information please see NcInputField.js.LICENSE.txt */

/*! https://mths.be/punycode v1.4.1 by @mathias */

+ 1
- 1
dist/files-main.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/files-reference-files.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/files-reference-files.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/files-sidebar.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/files-sidebar.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/files_sharing-files_sharing.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/files_sharing-files_sharing.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/files_sharing-files_sharing_tab.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/files_sharing-files_sharing_tab.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/files_trashbin-main.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/files_trashbin-main.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/files_versions-files_versions.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/files_versions-files_versions.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/settings-apps-view-7418.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/settings-apps-view-7418.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/settings-users-8351.js
File diff suppressed because it is too large
View File


+ 2
- 0
dist/settings-users-8351.js.LICENSE.txt View File

@@ -5,3 +5,5 @@
/*! For license information please see NcAppNavigationNewItem.js.LICENSE.txt */

/*! For license information please see NcAppNavigationSettings.js.LICENSE.txt */

/*! For license information please see NcIconSvgWrapper.js.LICENSE.txt */

+ 1
- 1
dist/settings-users-8351.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/settings-vue-settings-apps-users-management.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/settings-vue-settings-apps-users-management.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/settings-vue-settings-personal-security.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/settings-vue-settings-personal-security.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/theming-admin-theming.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/theming-admin-theming.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/theming-personal-theming.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/theming-personal-theming.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/updatenotification-updatenotification.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/updatenotification-updatenotification.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/user-status-modal-8299.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/user-status-modal-8299.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/user_status-dashboard.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/user_status-dashboard.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/user_status-menu.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/user_status-menu.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/weather_status-weather-status.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/weather_status-weather-status.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
dist/workflowengine-workflowengine.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/workflowengine-workflowengine.js.map
File diff suppressed because it is too large
View File


+ 9
- 9
package-lock.json View File

@@ -28,7 +28,7 @@
"@nextcloud/paths": "^2.1.0",
"@nextcloud/router": "^2.1.2",
"@nextcloud/sharing": "^0.1.0",
"@nextcloud/vue": "^7.12.0",
"@nextcloud/vue": "^7.12.1",
"@nextcloud/vue-dashboard": "^2.0.1",
"@skjnldsv/sanitize-svg": "^1.0.2",
"@vueuse/components": "^10.2.0",
@@ -3873,9 +3873,9 @@
}
},
"node_modules/@nextcloud/vue": {
"version": "7.12.0",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-7.12.0.tgz",
"integrity": "sha512-f7x3YFBzc/mt27F7AU+ITLmGCwRpVM0aVTF+DxjaOdelQNTYZBuFJCCOk6nC+x+gg/KWLIxeWm/NWDxToCstbQ==",
"version": "7.12.1",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-7.12.1.tgz",
"integrity": "sha512-j3wWgUkGEbq6cEdgdiG8VWWgqEd8YvKhK64o1eKbLP3OlVkcrqXfiRmPm1SafPVureGr/Yp/Ty/zIZnHBjxlNg==",
"dependencies": {
"@floating-ui/dom": "^1.1.0",
"@nextcloud/auth": "^2.0.0",
@@ -3897,7 +3897,7 @@
"emoji-mart-vue-fast": "^12.0.1",
"escape-html": "^1.0.3",
"floating-vue": "^1.0.0-beta.19",
"focus-trap": "^7.1.0",
"focus-trap": "^7.4.3",
"hammerjs": "^2.0.8",
"linkify-string": "^4.0.0",
"md5": "^2.3.0",
@@ -30005,9 +30005,9 @@
}
},
"@nextcloud/vue": {
"version": "7.12.0",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-7.12.0.tgz",
"integrity": "sha512-f7x3YFBzc/mt27F7AU+ITLmGCwRpVM0aVTF+DxjaOdelQNTYZBuFJCCOk6nC+x+gg/KWLIxeWm/NWDxToCstbQ==",
"version": "7.12.1",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-7.12.1.tgz",
"integrity": "sha512-j3wWgUkGEbq6cEdgdiG8VWWgqEd8YvKhK64o1eKbLP3OlVkcrqXfiRmPm1SafPVureGr/Yp/Ty/zIZnHBjxlNg==",
"requires": {
"@floating-ui/dom": "^1.1.0",
"@nextcloud/auth": "^2.0.0",
@@ -30029,7 +30029,7 @@
"emoji-mart-vue-fast": "^12.0.1",
"escape-html": "^1.0.3",
"floating-vue": "^1.0.0-beta.19",
"focus-trap": "^7.1.0",
"focus-trap": "^7.4.3",
"hammerjs": "^2.0.8",
"linkify-string": "^4.0.0",
"md5": "^2.3.0",

+ 1
- 1
package.json View File

@@ -54,7 +54,7 @@
"@nextcloud/paths": "^2.1.0",
"@nextcloud/router": "^2.1.2",
"@nextcloud/sharing": "^0.1.0",
"@nextcloud/vue": "^7.12.0",
"@nextcloud/vue": "^7.12.1",
"@nextcloud/vue-dashboard": "^2.0.1",
"@skjnldsv/sanitize-svg": "^1.0.2",
"@vueuse/components": "^10.2.0",

Loading…
Cancel
Save