-
Notifications
You must be signed in to change notification settings - Fork 31
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
Implemented: time zone selector displays user's current time (dxp-221) #671
base: main
Are you sure you want to change the base?
Conversation
src/locales/en.json
Outdated
@@ -111,6 +111,7 @@ | |||
"In 15 minutes": "In 15 minutes", | |||
"In 5 minutes": "In 5 minutes", | |||
"In an hour": "In an hour", | |||
"India Standard Time(Asia/Culcutta)": "India Standard Time(Asia/Culcutta)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to add this in locale
src/views/Settings.vue
Outdated
<ion-label> {{ userProfile && userProfile.userTimeZone ? userProfile.userTimeZone : '-' }} </ion-label> | ||
<ion-button @click="changeTimeZone()" slot="end" fill="outline" color="dark">{{ $t("Change") }}</ion-button> | ||
</ion-item> | ||
<ion-item lines="none"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve indentation
src/views/Settings.vue
Outdated
<ion-button @click="changeTimeZone()" slot="end" fill="outline" color="dark">{{ $t("Change") }}</ion-button> | ||
</ion-item> | ||
<ion-item lines="none"> | ||
<ion-label>Browse time zone</ion-label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add translation for static text
<ion-label>Browse time zone</ion-label> | |
<ion-label>Browser time zone</ion-label> |
src/views/Settings.vue
Outdated
return this.userProfile?.userTimeZone || this.defaultTimeZone | ||
}, | ||
defaultTimeZone(){ | ||
return DateTime.local().setZone('Asia/Kolkata').toFormat('hh:mm a ZZZZ'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to hardcode the zone, the zone should be identified from the browser's timeZone.
src/views/TimezoneModal.vue
Outdated
</ion-item> | ||
</ion-radio-group> | ||
</ion-list> | ||
<div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is no need for an extra div.
Related Issues
Closes #
Short Description and Why It's Useful
Screenshots of Visual Changes
IMPORTANT NOTICE - Remember to add changelog entry
Contribution and Currently Important Rules Acceptance