Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#43695] replaced loading skeleton

Eric Schubert0791fdb7b1dd
diff --git a/frontend/src/app/shared/components/file-links/file-picker-modal/file-picker-modal.html b/frontend/src/app/shared/components/file-links/file-picker-modal/file-picker-modal.html
index 023ffef53f5..48b33cdcabb 100644
--- a/frontend/src/app/shared/components/file-links/file-picker-modal/file-picker-modal.html
+++ b/frontend/src/app/shared/components/file-links/file-picker-modal/file-picker-modal.html
@@ -14,7 +14,7 @@
<div class="spot-divider"></div>
- <div class="spot-modal--body">
+ <div class="spot-modal--body spot-container">
<ng-container *ngIf="(loading$ | async) === false; else loadingTemplate">
<ul
class="spot-list spot-list_compact op-files-tab--file-list"
@@ -32,11 +32,11 @@
</ng-container>
<ng-template #loadingTemplate>
- <op-loading-project-list></op-loading-project-list>
+ <op-loading-file-list></op-loading-file-list>
</ng-template>
</div>
- <div class="spot-modal--footer spot-action-bar">
+ <div class="spot-action-bar">
<div class="spot-action-bar--right">
<button
class="button button_no-margin spot-action-bar--action"
diff --git a/frontend/src/app/shared/components/file-links/laoding-file-list/loading-file-list.component.ts b/frontend/src/app/shared/components/file-links/laoding-file-list/loading-file-list.component.ts
new file mode 100644
index 00000000000..90a3280bb55
--- /dev/null
+++ b/frontend/src/app/shared/components/file-links/laoding-file-list/loading-file-list.component.ts
@@ -0,0 +1,41 @@
+// -- copyright
+// OpenProject is an open source project management software.
+// Copyright (C) 2012-2022 the OpenProject GmbH
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License version 3.
+//
+// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+// Copyright (C) 2006-2013 Jean-Philippe Lang
+// Copyright (C) 2010-2013 the ChiliProject Team
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// See COPYRIGHT and LICENSE files for more details.
+//++
+
+import {
+ ChangeDetectionStrategy,
+ Component,
+ ViewEncapsulation,
+} from '@angular/core';
+
+@Component({
+ templateUrl: './loading-file-list.html',
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ selector: 'op-loading-file-list',
+ encapsulation: ViewEncapsulation.None,
+})
+export class LoadingFileListComponent { }
diff --git a/frontend/src/app/shared/components/file-links/laoding-file-list/loading-file-list.html b/frontend/src/app/shared/components/file-links/laoding-file-list/loading-file-list.html
new file mode 100644
index 00000000000..acda52a14cb
--- /dev/null
+++ b/frontend/src/app/shared/components/file-links/laoding-file-list/loading-file-list.html
@@ -0,0 +1,11 @@
+<op-content-loader viewBox="0 0 1080 200">
+ <svg:rect x="0" y="20" width="100%" height="32" rx="1" />
+
+ <svg:rect x="0" y="56" width="100%" height="32" rx="1" />
+
+ <svg:rect x="0" y="92" width="100%" height="32" rx="1" />
+
+ <svg:rect x="0" y="128" width="100%" height="32" rx="1" />
+
+ <svg:rect x="0" y="164" width="100%" height="32" rx="1" />
+</op-content-loader>
diff --git a/frontend/src/app/shared/components/file-links/openproject-file-links.module.ts b/frontend/src/app/shared/components/file-links/openproject-file-links.module.ts
index ad4cd8a6296..1c73bf1f931 100644
--- a/frontend/src/app/shared/components/file-links/openproject-file-links.module.ts
+++ b/frontend/src/app/shared/components/file-links/openproject-file-links.module.ts
@@ -48,6 +48,9 @@ import {
StorageFileListItemComponent,
} from 'core-app/shared/components/file-links/storage-file-list-item/storage-file-list-item.component';
import { SortFilesPipe } from 'core-app/shared/components/file-links/file-picker-modal/sort-files.pipe';
+import {
+ LoadingFileListComponent,
+} from 'core-app/shared/components/file-links/laoding-file-list/loading-file-list.component';
@NgModule({
imports: [
@@ -60,6 +63,7 @@ import { SortFilesPipe } from 'core-app/shared/components/file-links/file-picker
FileLinkListComponent,
FileLinkListItemComponent,
FilePickerModalComponent,
+ LoadingFileListComponent,
StorageInformationComponent,
StorageFileListItemComponent,
SortFilesPipe,
diff --git a/frontend/src/app/spot/styles/sass/components/modal.sass b/frontend/src/app/spot/styles/sass/components/modal.sass
index 9a1cc1da2ab..cd756c74240 100644
--- a/frontend/src/app/spot/styles/sass/components/modal.sass
+++ b/frontend/src/app/spot/styles/sass/components/modal.sass
@@ -67,9 +67,5 @@
&:focus
outline-style: none
- .spot-list
- margin-left: -$spot-spacing-1
- margin-right: -$spot-spacing-1
-
&--footer
width: 100%