From 33610759713989e240570a40f52806304edcf511 Mon Sep 17 00:00:00 2001 From: Bogdan Cilibiu Date: Thu, 19 Oct 2017 23:01:08 +0300 Subject: [PATCH 1/4] empty states --- .../favorites/favorites.component.html | 11 +++++ src/app/components/files/files.component.html | 1 + .../libraries/libraries.component.html | 11 +++++ .../recent-files/recent-files.component.html | 27 ++++++++---- .../shared-files/shared-files.component.html | 11 +++++ .../trashcan/trashcan.component.html | 12 ++++++ .../ui/overrides/_alfresco-document-list.scss | 42 +++++++++++++++++++ 7 files changed, 107 insertions(+), 8 deletions(-) diff --git a/src/app/components/favorites/favorites.component.html b/src/app/components/favorites/favorites.component.html index bfa1a8880..af094eca8 100644 --- a/src/app/components/favorites/favorites.component.html +++ b/src/app/components/favorites/favorites.component.html @@ -77,6 +77,7 @@
+ + +
+ star_rate +

No favorite files or folders

+

Favorite items that you want to easily find later.

+
+
+
+ + + +
+ group_work +

You aren't a member of any File Libraries yet

+

Join sites to upload, view, and share files.

+
+
+
+ + [ngClass]="{ 'app-no-content': documentList.isEmpty() }" + currentFolderId="-recent-" + selectionMode="multiple" + [navigate]="false" + [sorting]="[ 'modifiedAt', 'desc' ]" + [pageSize]="25" + [contextMenuActions]="true" + [contentActions]="false" + (node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)"> + + + +
+ access_time +

No recent files or folders

+

Items you upload or edit in the last 30 days are shown here.

+
+
+
+ + +
+ people +

No shared files or folders

+

Items you share using the Share option are shown here.

+
+
+
+ + + +
+ delete +

Trash is empty

+

Items you delete are moved to the Trash.

+

Empty Trash to permanently delete items.

+
+
+
+ Date: Thu, 19 Oct 2017 23:21:55 +0300 Subject: [PATCH 2/4] translation --- .../favorites/favorites.component.html | 4 ++-- .../libraries/libraries.component.html | 4 ++-- .../recent-files/recent-files.component.html | 4 ++-- .../shared-files/shared-files.component.html | 4 ++-- .../components/trashcan/trashcan.component.html | 6 +++--- src/assets/i18n/en.json | 17 +++++++++++++++++ 6 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/app/components/favorites/favorites.component.html b/src/app/components/favorites/favorites.component.html index af094eca8..a66bf922b 100644 --- a/src/app/components/favorites/favorites.component.html +++ b/src/app/components/favorites/favorites.component.html @@ -91,8 +91,8 @@
star_rate -

No favorite files or folders

-

Favorite items that you want to easily find later.

+

{{ 'APP.BROWSE.FAVORITES.EMPTY_STATE.TITLE' | translate }}

+

{{ 'APP.BROWSE.FAVORITES.EMPTY_STATE.TEXT' | translate }}

diff --git a/src/app/components/libraries/libraries.component.html b/src/app/components/libraries/libraries.component.html index a64b10864..6fdf722fe 100644 --- a/src/app/components/libraries/libraries.component.html +++ b/src/app/components/libraries/libraries.component.html @@ -23,8 +23,8 @@
group_work -

You aren't a member of any File Libraries yet

-

Join sites to upload, view, and share files.

+

{{ 'APP.BROWSE.LIBRARIES.EMPTY_STATE.TITLE' | translate }}

+

{{ 'APP.BROWSE.LIBRARIES.EMPTY_STATE.TITLE' | translate }}

diff --git a/src/app/components/recent-files/recent-files.component.html b/src/app/components/recent-files/recent-files.component.html index ed012601a..a94bff4df 100644 --- a/src/app/components/recent-files/recent-files.component.html +++ b/src/app/components/recent-files/recent-files.component.html @@ -84,8 +84,8 @@
access_time -

No recent files or folders

-

Items you upload or edit in the last 30 days are shown here.

+

{{ 'APP.BROWSE.RECENT.EMPTY_STATE.TITLE' | translate }}

+

{{ 'APP.BROWSE.RECENT.EMPTY_STATE.TITLE' | translate }}

diff --git a/src/app/components/shared-files/shared-files.component.html b/src/app/components/shared-files/shared-files.component.html index 6992a2cb0..e84e09bfc 100644 --- a/src/app/components/shared-files/shared-files.component.html +++ b/src/app/components/shared-files/shared-files.component.html @@ -82,8 +82,8 @@
people -

No shared files or folders

-

Items you share using the Share option are shown here.

+

{{ 'APP.BROWSE.SHARED.EMPTY_STATE.TITLE' | translate }}

+

{{ 'APP.BROWSE.SHARED.EMPTY_STATE.TITLE' | translate }}

diff --git a/src/app/components/trashcan/trashcan.component.html b/src/app/components/trashcan/trashcan.component.html index 8de6271e6..b5e743941 100644 --- a/src/app/components/trashcan/trashcan.component.html +++ b/src/app/components/trashcan/trashcan.component.html @@ -40,9 +40,9 @@
delete -

Trash is empty

-

Items you delete are moved to the Trash.

-

Empty Trash to permanently delete items.

+

{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.TITLE' | translate }}

+

{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.FIRST_TEXT' | translate }}

+

{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.SECOND_TEXT' | translate }}

diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 255a3ba6b..702407243 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -31,6 +31,10 @@ "SIDENAV_LINK": { "LABEL": "File Libraries", "TOOLTIP": "Access File Libraries" + }, + "EMPTY_STATE": { + "TITLE": "You aren't a member of any File Libraries yet", + "TEXT": "Join sites to upload, view, and share files." } }, "SHARED": { @@ -45,6 +49,10 @@ "SIDENAV_LINK": { "LABEL": "Recent Files", "TOOLTIP": "View files you recently edited" + }, + "EMPTY_STATE": { + "TITLE": "No recent files or folders", + "TEXT": "Items you upload or edit in the last 30 days are shown here." } }, "FAVORITES": { @@ -52,6 +60,10 @@ "SIDENAV_LINK": { "LABEL": "Favorites", "TOOLTIP": "View your favorite files and folders" + }, + "EMPTY_STATE": { + "TITLE": "No favorite files or folders", + "TEXT": "Favorite items that you want to easily find later." } }, "TRASHCAN": { @@ -59,6 +71,11 @@ "SIDENAV_LINK": { "LABEL": "Trash", "TOOLTIP": "View deleted files in the trash" + }, + "EMPTY_STATE": { + "TITLE": "Trash is empty", + "FIRST_TEXT": "Items you delete are moved to the Trash.", + "SECOND_TEXT": "Empty Trash to permanently delete items." } } }, From 70af159e6a31be9d60d6834a17ab5fbff5122edd Mon Sep 17 00:00:00 2001 From: Bogdan Cilibiu Date: Fri, 20 Oct 2017 15:16:11 +0300 Subject: [PATCH 3/4] app locator for e2e --- e2e/pages/page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/pages/page.ts b/e2e/pages/page.ts index 01e9895d9..0ee4009cb 100644 --- a/e2e/pages/page.ts +++ b/e2e/pages/page.ts @@ -21,7 +21,7 @@ export abstract class Page { private static USE_HASH_STRATEGY = true; private locators = { - app: by.css('alfresco-content-app'), + app: by.css('app-root'), overlay: by.css('.cdk-overlay-container'), snackBar: by.css('simple-snack-bar') }; From dfe398c468f99d69c902ae082003eedb9e49c54c Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 20 Oct 2017 16:14:24 +0100 Subject: [PATCH 4/4] remove duplicate module --- src/app/common/adf.module.ts | 44 --------------------------------- src/app/common/common.module.ts | 2 +- 2 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 src/app/common/adf.module.ts diff --git a/src/app/common/adf.module.ts b/src/app/common/adf.module.ts deleted file mode 100644 index 9698c33a5..000000000 --- a/src/app/common/adf.module.ts +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * @license - * Copyright 2017 Alfresco Software, Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { NgModule } from '@angular/core'; - -import { CoreModule } from 'ng2-alfresco-core'; -import { DataTableModule } from 'ng2-alfresco-datatable'; -import { DocumentListModule } from 'ng2-alfresco-documentlist'; -import { ViewerModule } from 'ng2-alfresco-viewer'; -import { UploadModule } from 'ng2-alfresco-upload'; -import { SearchModule } from 'ng2-alfresco-search'; -import { LoginModule } from 'ng2-alfresco-login'; - -export function modules() { - return [ - CoreModule, - DataTableModule, - DocumentListModule, - ViewerModule, - UploadModule, - SearchModule, - LoginModule - ]; -} - -@NgModule({ - imports: modules(), - exports: modules() -}) -export class AdfModule {} diff --git a/src/app/common/common.module.ts b/src/app/common/common.module.ts index 7dadb14f4..06a8d886c 100644 --- a/src/app/common/common.module.ts +++ b/src/app/common/common.module.ts @@ -20,7 +20,7 @@ import { DatePipe } from '@angular/common'; import { RouterModule } from '@angular/router'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { AdfModule } from './adf.module'; +import { AdfModule } from '../adf.module'; import { MaterialModule } from './material.module'; import { FolderDialogComponent } from './dialogs/folder-dialog.component';