Skip to content

Commit

Permalink
Improved empty-state
Browse files Browse the repository at this point in the history
  • Loading branch information
shanmukhdutt committed Jan 5, 2024
1 parent 5a4161a commit d002023
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
15 changes: 15 additions & 0 deletions src/theme/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,18 @@ http://ionicframework.com/docs/theming/ */
display: none;
}
}

.empty-state {
max-width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 10px;
}
.empty-state>img{
object-fit: contain;
}
.empty-state>p {
text-align: center;
}
17 changes: 7 additions & 10 deletions src/views/TimezoneModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@
</ion-toolbar>
</ion-header>

<!-- Empty state -->
<ion-content class="ion-text-center">

<ion-content class="ion-padding">
<!-- Empty state -->
<div class="empty-state" v-if="filteredTimeZones.length === 0">
<ion-row class="ion-align-items-center ion-justify-content-center" style="height: 50vh;">
<ion-col size="auto">
<ion-spinner name="crescent" ></ion-spinner>
</ion-col>
<ion-col size="auto">
<p>{{ $t("Fetching time zones")}}</p>
</ion-col>
</ion-row>
<ion-item lines="none">
<ion-spinner name="crescent" ></ion-spinner>
<p>{{ $t("Fetching time zones")}}</p>
</ion-item>
</div>

<!-- Timezones -->
Expand Down

0 comments on commit d002023

Please sign in to comment.