This repository was archived by the owner on Feb 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +40
-1
lines changed
studio/src/app/modals/editor Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,30 @@ app-custom-images {
3232 }
3333 }
3434 }
35+
36+ div .photos-placeholder {
37+ position : absolute ;
38+ top : 50% ;
39+ left : 50% ;
40+ transform : translate (-50% , -50% );
41+
42+ > div {
43+ display : flex ;
44+ flex-direction : column ;
45+ justify-content : center ;
46+ align-items : center ;
47+
48+ position : relative ;
49+
50+ ion-icon {
51+ font-size : 10rem ;
52+ }
53+
54+ ion-label , ion-icon {
55+ color : var (--ion-color-medium );
56+ }
57+ }
58+ }
3559}
3660
3761ion-alert .custom-images {
Original file line number Diff line number Diff line change @@ -229,6 +229,8 @@ export class AppCustomImages {
229229 onSelectImage = { ( $event : CustomEvent ) => this . selectImage ( $event ) } >
230230 </ app-image-columns >
231231
232+ { this . renderImagesPlaceHolder ( ) }
233+
232234 < input type = "file" accept = "image/x-png,image/jpeg,image/gif" onChange = { ( ) => this . upload ( ) } />
233235
234236 < ion-infinite-scroll threshold = "100px" disabled = { this . disableInfiniteScroll }
@@ -249,6 +251,19 @@ export class AppCustomImages {
249251 ] ;
250252 }
251253
254+ private renderImagesPlaceHolder ( ) {
255+ if ( ( ! this . imagesOdd || this . imagesOdd . length <= 0 ) && ( ! this . imagesEven || this . imagesEven . length <= 0 ) ) {
256+ return < div class = "photos-placeholder" >
257+ < div >
258+ < ion-icon name = "images" > </ ion-icon >
259+ < ion-label class = "ion-text-center" > Your collection of images is empty</ ion-label >
260+ </ div >
261+ </ div >
262+ } else {
263+ return undefined ;
264+ }
265+ }
266+
252267 private renderToolbarAction ( ) {
253268 if ( ! this . uploading ) {
254269 return < ion-button onClick = { ( ) => this . uploadNewImage ( ) } shape = "round" color = "tertiary" >
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ export class AppPhoto {
227227 return < div class = "photos-placeholder" >
228228 < div >
229229 < ion-icon name = "images" > </ ion-icon >
230- < ion-label > Photos by Unsplash</ ion-label >
230+ < ion-label class = "ion-text-center" > Photos by Unsplash</ ion-label >
231231 { this . renderPlaceHolderSearching ( ) }
232232 </ div >
233233 </ div >
You can’t perform that action at this time.
0 commit comments