Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved code by displaying instance and current time zone in the bottom of the menu(#28u2prh) #35

Merged
merged 2 commits into from
Aug 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,34 @@
</ion-menu-toggle>
</ion-list>
</ion-content>

<ion-footer>
<ion-toolbar>
<ion-item lines="none">
<ion-label class="ion-text-wrap">
<p class="overline">{{ instanceUrl }}</p>
</ion-label>
<ion-note slot="end">{{ userProfile.userTimeZone }}</ion-note>
</ion-item>
</ion-toolbar>
</ion-footer>
</ion-menu>
</template>

<script lang="ts">
import {
IonContent,
IonFooter,
IonIcon,
IonHeader,
IonItem,
IonLabel,
IonList,
IonTitle,
IonToolbar,
IonMenu,
IonMenuToggle,
IonNote,
IonTitle,
IonToolbar,
} from "@ionic/vue";
import { defineComponent, ref } from "vue";
import { mapGetters } from "vuex";
Expand All @@ -49,15 +62,17 @@ export default defineComponent({
name: "Menu",
components: {
IonContent,
IonFooter,
IonHeader,
IonIcon,
IonItem,
IonTitle,
IonLabel,
IonList,
IonToolbar,
IonMenu,
IonMenuToggle,
IonNote,
IonTitle,
IonToolbar
},
created() {
// When open any specific page it should show that page selected
Expand All @@ -68,7 +83,9 @@ export default defineComponent({
},
computed: {
...mapGetters({
isUserAuthenticated: 'user/isUserAuthenticated'
isUserAuthenticated: 'user/isUserAuthenticated',
instanceUrl: 'user/getInstanceUrl',
userProfile: 'user/getUserProfile'
})
},
watch:{
Expand Down