File tree Expand file tree Collapse file tree 2 files changed +36
-12
lines changed
features/project/overview/components/add-component-dialog
shared/components/wiki/wiki-list Expand file tree Collapse file tree 2 files changed +36
-12
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,13 @@ export class AddComponentDialogComponent implements OnInit {
8484 constructor ( ) {
8585 effect ( ( ) => {
8686 const storageLocations = this . storageLocations ( ) ;
87- if ( ! storageLocations ) return ;
87+ if ( ! storageLocations ?. length ) return ;
8888
89- const defaultRegion = this . currentUser ( ) ?. defaultRegionId || storageLocations [ 0 ] . id ;
90- this . componentForm . controls [ ComponentFormControls . StorageLocation ] . setValue ( defaultRegion ) ;
89+ const storageLocationControl = this . componentForm . controls [ ComponentFormControls . StorageLocation ] ;
90+ if ( ! storageLocationControl . value ) {
91+ const defaultRegion = this . currentUser ( ) ?. defaultRegionId ?? storageLocations [ 0 ] . id ;
92+ storageLocationControl . setValue ( defaultRegion ) ;
93+ }
9194 } ) ;
9295 }
9396
Original file line number Diff line number Diff line change @@ -71,20 +71,41 @@ <h4 class="ml-2">{{ item.label | translate }}</h4>
7171 </ p-panel >
7272 } @else {
7373 < div class ="mb-2 ">
74- < p-button class ="btn-icon-only " raised outlined severity ="contrast " (onClick) ="collapseNavigation() ">
74+ < p-button
75+ class ="btn-icon-only "
76+ styleClass ="flex gap-3 "
77+ raised
78+ outlined
79+ severity ="contrast "
80+ (onClick) ="collapseNavigation() "
81+ >
7582 < i class ="fas fa-list-ul "> </ i >
7683 < i class ="fas fa-forward "> </ i >
7784 </ p-button >
7885 </ div >
7986 @if (canEdit()) {
80- < p-button
81- class ="btn-icon-only "
82- icon ="fas fa-plus "
83- raised
84- outlined
85- severity ="success "
86- (onClick) ="openAddWikiDialog() "
87- />
87+ < div class ="flex gap-2 ">
88+ < p-button
89+ class ="btn-icon-only "
90+ icon ="fas fa-plus "
91+ raised
92+ outlined
93+ severity ="success "
94+ (onClick) ="openAddWikiDialog() "
95+ />
96+ @if (list().length) {
97+ @if (!isHomeWikiSelected()) {
98+ < p-button
99+ class ="btn-icon-only "
100+ icon ="fas fa-trash "
101+ raised
102+ outlined
103+ severity ="danger "
104+ (onClick) ="openDeleteWikiDialog() "
105+ />
106+ }
107+ }
108+ </ div >
88109 }
89110 }
90111 }
You can’t perform that action at this time.
0 commit comments