mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Remove date from News title, add posting time in EST
This commit is contained in:
@@ -20,9 +20,11 @@
|
|||||||
class="draft"
|
class="draft"
|
||||||
>DRAFT</small>
|
>DRAFT</small>
|
||||||
<h2 class="title">
|
<h2 class="title">
|
||||||
{{ getPostDate(post) }} - {{ post.title.toUpperCase() }}
|
{{ post.title.toUpperCase() }}
|
||||||
</h2>
|
</h2>
|
||||||
|
<small>
|
||||||
|
{{ getPostedOn(post) }}
|
||||||
|
</small>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div v-html="renderMarkdown(post.text)"></div>
|
<div v-html="renderMarkdown(post.text)"></div>
|
||||||
@@ -51,7 +53,8 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
display: inline;
|
text-align: left;
|
||||||
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.draft {
|
.draft {
|
||||||
@@ -105,9 +108,12 @@ export default {
|
|||||||
renderMarkdown (text) {
|
renderMarkdown (text) {
|
||||||
return habiticaMarkdown.unsafeHTMLRender(text);
|
return habiticaMarkdown.unsafeHTMLRender(text);
|
||||||
},
|
},
|
||||||
getPostDate (post) {
|
getPostedOn (post) {
|
||||||
const format = this.user ? this.user.preferences.dateFormat.toUpperCase() : 'MM/DD/yyyy';
|
const publishDate = moment(post.publishDate)
|
||||||
return moment(post.publishDate).format(format);
|
.utcOffset(-300)
|
||||||
|
.format(this.user.preferences.dateFormat.toUpperCase());
|
||||||
|
const publishTime = moment(post.publishDate).utcOffset(-300).format('LT');
|
||||||
|
return this.$t('newStuffPostedOn', { publishDate, publishTime });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
"invalidQuantity": "Quantity to purchase must be a positive whole number.",
|
"invalidQuantity": "Quantity to purchase must be a positive whole number.",
|
||||||
"USD": "(USD)",
|
"USD": "(USD)",
|
||||||
"newStuff": "New Stuff by Bailey",
|
"newStuff": "New Stuff by Bailey",
|
||||||
|
"newStuffPostedOn": "Posted on <%= publishDate %>, <%= publishTime %> EST",
|
||||||
"newBaileyUpdate": "New Bailey Update!",
|
"newBaileyUpdate": "New Bailey Update!",
|
||||||
"tellMeLater": "Tell Me Later",
|
"tellMeLater": "Tell Me Later",
|
||||||
"dismissAlert": "Dismiss This Alert",
|
"dismissAlert": "Dismiss This Alert",
|
||||||
|
|||||||
Reference in New Issue
Block a user