Skip to content

Commit f087c11

Browse files
committed
[PER-10275] Fixed archive selector modal available archives list
1 parent 7131945 commit f087c11

15 files changed

+391
-81
lines changed

src/app/component-library/components.module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { ButtonComponent } from './components/button/button.component';
1111
import { ToggleComponent } from './components/toggle/toggle.component';
1212
import { CheckboxComponent } from './components/checkbox/checkbox.component';
1313
import { LoadingSpinnerComponent } from './components/loading-spinner/loading-spinner.component';
14+
import { BasicLoadingSpinnerComponent } from './components/basic-loading-spinner/basic-loading-spinner.component';
1415

1516
@NgModule({
1617
declarations: [
@@ -19,6 +20,7 @@ import { LoadingSpinnerComponent } from './components/loading-spinner/loading-sp
1920
ButtonComponent,
2021
CheckboxComponent,
2122
LoadingSpinnerComponent,
23+
BasicLoadingSpinnerComponent,
2224
],
2325
imports: [CommonModule, FontAwesomeModule, FormsModule, ReactiveFormsModule],
2426
exports: [
@@ -27,6 +29,7 @@ import { LoadingSpinnerComponent } from './components/loading-spinner/loading-sp
2729
ButtonComponent,
2830
CheckboxComponent,
2931
LoadingSpinnerComponent,
32+
BasicLoadingSpinnerComponent,
3033
],
3134
})
3235
export class ComponentsModule {
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<div>
2+
<svg
3+
width="118"
4+
height="110"
5+
viewBox="0 0 118 110"
6+
fill="none"
7+
xmlns="http://www.w3.org/2000/svg"
8+
>
9+
<g class="outer-circle" filter="url(#filter0_d_6094_25361)">
10+
<path
11+
d="M76.186 39.5004C77.5649 41.8887 78.4598 44.5252 78.8198 47.2594C79.1798 49.9935 78.9977 52.7718 78.2839 55.4356C77.5701 58.0994 76.3387 60.5965 74.6599 62.7844C72.9811 64.9723 70.8877 66.8081 68.4995 68.187C66.1112 69.5658 63.4747 70.4608 60.7405 70.8208C58.0063 71.1807 55.228 70.9986 52.5643 70.2849C49.9005 69.5711 47.4033 68.3397 45.2155 66.6608C43.0276 64.982 41.1918 62.8887 39.8129 60.5004"
12+
stroke="url(#paint0_linear_6094_25361)"
13+
stroke-width="6"
14+
stroke-linecap="round"
15+
/>
16+
</g>
17+
<g class="inner-circle">
18+
<path
19+
d="M50.9289 42.9289C51.8575 42.0003 52.9599 41.2637 54.1732 40.7612C55.3864 40.2586 56.6868 40 58 40C59.3132 40 60.6136 40.2586 61.8268 40.7612C63.0401 41.2637 64.1425 42.0003 65.0711 42.9289C65.9997 43.8575 66.7362 44.9599 67.2388 46.1732C67.7413 47.3864 68 48.6868 68 50C68 51.3132 67.7413 52.6136 67.2388 53.8268C66.7362 55.0401 65.9997 56.1425 65.0711 57.0711"
20+
stroke="url(#paint1_linear_6094_25361)"
21+
stroke-width="6"
22+
stroke-linecap="round"
23+
/>
24+
</g>
25+
<defs>
26+
<filter
27+
id="filter0_d_6094_25361"
28+
x="-2"
29+
y="-10"
30+
width="120"
31+
height="120"
32+
filterUnits="userSpaceOnUse"
33+
color-interpolation-filters="sRGB"
34+
>
35+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
36+
<feColorMatrix
37+
in="SourceAlpha"
38+
type="matrix"
39+
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
40+
result="hardAlpha"
41+
/>
42+
<feOffset />
43+
<feGaussianBlur stdDeviation="18" />
44+
<feComposite in2="hardAlpha" operator="out" />
45+
<feColorMatrix
46+
type="matrix"
47+
values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.32 0"
48+
/>
49+
<feBlend
50+
mode="normal"
51+
in2="BackgroundImageFix"
52+
result="effect1_dropShadow_6094_25361"
53+
/>
54+
<feBlend
55+
mode="normal"
56+
in="SourceGraphic"
57+
in2="effect1_dropShadow_6094_25361"
58+
result="shape"
59+
/>
60+
</filter>
61+
<linearGradient
62+
id="paint0_linear_6094_25361"
63+
x1="25.2148"
64+
y1="41.2158"
65+
x2="80.3161"
66+
y2="24.4276"
67+
gradientUnits="userSpaceOnUse"
68+
>
69+
<stop stop-color="#800080" />
70+
<stop offset="1" stop-color="#FF9933" />
71+
</linearGradient>
72+
<linearGradient
73+
id="paint1_linear_6094_25361"
74+
x1="58"
75+
y1="68.3848"
76+
x2="41.4914"
77+
y2="41.9089"
78+
gradientUnits="userSpaceOnUse"
79+
>
80+
<stop stop-color="#800080" />
81+
<stop offset="1" stop-color="#FF9933" />
82+
</linearGradient>
83+
</defs>
84+
</svg>
85+
</div>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.outer-circle {
2+
animation: spin-outer 2s linear infinite;
3+
transform-origin: 50% 50%; /* Center the rotation */
4+
transform-box: fill-box;
5+
}
6+
7+
.inner-circle {
8+
animation: spin-inner 2s linear infinite;
9+
transform-origin: 50% 50%; /* Center the rotation */
10+
transform-box: fill-box;
11+
}
12+
13+
@keyframes spin-outer {
14+
0% {
15+
transform: scale(1.4) rotate(300deg);
16+
}
17+
100% {
18+
transform: scale(1.4) rotate(660deg);
19+
}
20+
}
21+
22+
@keyframes spin-inner {
23+
0% {
24+
transform: scale(0.9) translate(-0.5px, 6.5px) rotate(45deg);
25+
}
26+
100% {
27+
transform: scale(0.9) translate(-0.5px, 6px) rotate(-315deg);
28+
}
29+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { BasicLoadingSpinnerComponent } from './basic-loading-spinner.component';
4+
5+
describe('BasicLoadingSpinnerComponent', () => {
6+
let component: BasicLoadingSpinnerComponent;
7+
let fixture: ComponentFixture<BasicLoadingSpinnerComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [BasicLoadingSpinnerComponent],
12+
}).compileComponents();
13+
14+
fixture = TestBed.createComponent(BasicLoadingSpinnerComponent);
15+
component = fixture.componentInstance;
16+
fixture.detectChanges();
17+
});
18+
19+
it('should create', () => {
20+
expect(component).toBeTruthy();
21+
});
22+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'pr-basic-loading-spinner',
5+
templateUrl: './basic-loading-spinner.component.html',
6+
styleUrl: './basic-loading-spinner.component.scss',
7+
standalone: false,
8+
})
9+
export class BasicLoadingSpinnerComponent {}

src/app/component-library/components/button/button.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Shallow } from 'shallow-render';
2-
import { SharedModule } from '@shared/shared.module';
2+
import { ComponentsModule } from '../../components.module';
33
import { ButtonComponent } from './button.component';
44

55
describe('ButtonComponent', () => {
66
let shallow: Shallow<ButtonComponent>;
77

88
beforeEach(async () => {
9-
shallow = new Shallow(ButtonComponent, SharedModule);
9+
shallow = new Shallow(ButtonComponent, ComponentsModule);
1010
});
1111

1212
it('should create', async () => {

src/app/core/components/archive-switcher/archive-switcher.component.spec.ts

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/app/core/core.module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import { ManageMetadataModule } from '../archive-settings/manage-metadata/manage
2929
import { DirectiveModule } from '../directive/directive.module';
3030
import { FilesystemModule } from '../filesystem/filesystem.module';
3131
import { UserChecklistModule } from '../user-checklist/user-checklist.module';
32-
import { ArchiveSwitcherComponent } from './components/archive-switcher/archive-switcher.component';
3332
import { MultiSelectStatusComponent } from './components/multi-select-status/multi-select-status.component';
3433
import { EditService } from './services/edit/edit.service';
3534
import { AccountSettingsComponent } from './components/account-settings/account-settings.component';
@@ -90,7 +89,6 @@ import { RedeemGiftComponent } from './components/redeem-gift/redeem-gift.compon
9089
RightMenuComponent,
9190
UploadProgressComponent,
9291
UploadButtonComponent,
93-
ArchiveSwitcherComponent,
9492
FolderPickerComponent,
9593
MultiSelectStatusComponent,
9694
AccountSettingsComponent,

src/app/core/core.routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { RootFolderResolveService } from '@core/resolves/root-folder-resolve.ser
77
import { RecordResolveService } from '@core/resolves/record-resolve.service';
88
import { ArchivesResolveService } from '@core/resolves/archives-resolve.service';
99
import { SharedModule } from '@shared/shared.module';
10-
import { ArchiveSwitcherComponent } from '@core/components/archive-switcher/archive-switcher.component';
10+
import { ArchiveSwitcherComponent } from '@shared/components/archive-switcher/archive-switcher.component';
1111
import { GlobalSearchResultsComponent } from '@search/components/global-search-results/global-search-results.component';
1212
import { RoutedDialogWrapperComponent } from '@shared/components/routed-dialog-wrapper/routed-dialog-wrapper.component';
1313
import { RoutesWithData } from '../app.routes';

src/app/core/components/archive-switcher/archive-switcher.component.html renamed to src/app/shared/components/archive-switcher/archive-switcher.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
>
1010
</pr-archive-small>
1111
}
12-
@if (!archives.length) {
12+
@if (!archivesLoading && !archives.length) {
1313
<div class="archives-empty">You have no other archives</div>
1414
}
15+
@if (archivesLoading) {
16+
<pr-basic-loading-spinner></pr-basic-loading-spinner>
17+
}
1518
</div>
1619
</div>
1720
<div class="archive-list-button">

0 commit comments

Comments
 (0)