mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
UX: copy and formating improvements to local-dates form (#7343)
This commit is contained in:
@ -167,6 +167,14 @@ export default Ember.Component.extend({
|
||||
return moment.tz.guess();
|
||||
},
|
||||
|
||||
@computed("currentUserTimezone")
|
||||
formatedCurrentUserTimezone(timezone) {
|
||||
return timezone
|
||||
.replace("_", " ")
|
||||
.replace("Etc/", "")
|
||||
.split("/");
|
||||
},
|
||||
|
||||
@computed("formats")
|
||||
previewedFormats(formats) {
|
||||
return formats.map(format => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{{#d-modal-body
|
||||
title="discourse_local_dates.create.modal_title"
|
||||
title="discourse_local_dates.title"
|
||||
class="discourse-local-dates-create-modal"
|
||||
style="overflow: auto"}}
|
||||
|
||||
@ -10,8 +10,7 @@
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="preview alert alert-info">
|
||||
<b>{{currentUserTimezone}}: </b>
|
||||
{{currentPreview}}
|
||||
<b>{{formatedCurrentUserTimezone}} </b>{{currentPreview}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
|
Reference in New Issue
Block a user