Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Commit

Permalink
Fixed few issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgodhani committed May 16, 2021
1 parent 10d5080 commit a203875
Show file tree
Hide file tree
Showing 5 changed files with 286 additions and 100 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Please feel free to suggest more ideas to improve this app.
|-----------|--------------|
| English | |
| French | |
| Catalan | [alexhoma](https://github.com/hello-efficiency-inc/raven-reader/issues?q=is%3Apr+author%3alexhoma)|
| Turkish | [ahmetcadirci25](https://github.com/hello-efficiency-inc/raven-reader/issues?q=is%3Apr+author%3ahmetcadirci25)|
| Chinese | [@LinWhite2333](https://github.com/hello-efficiency-inc/raven-reader/issues?q=is%3Apr+author%3LinWhite2333)|
| Dutch | [@Vistause](https://github.com/hello-efficiency-inc/raven-reader/issues?q=is%3Apr+author%3AVistaus) |
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "raven-reader",
"productName": "Raven Reader",
"version": "1.0.52",
"version": "1.0.54",
"author": "Hello Efficiency Inc. <welcome@helloefficiency.com>",
"description": "Simple desktop RSS Reader",
"license": "MIT",
Expand All @@ -25,12 +25,13 @@
"@panter/vue-i18next": "^0.15.2",
"@postlight/mercury-parser": "^2.2.0",
"axios": "^0.21.1",
"bootstrap": "^5.0.0",
"bootstrap": "^4.0.0",
"bootstrap-vue": "^2.16.0",
"core-js": "^3.8.1",
"cross-fetch": "^3.1.3-alpha.6",
"crypto-js": "^4.0.0",
"dayjs": "^1.8.31",
"electron-builder": "^22.10.5",
"electron-context-menu": "^3.0.0",
"electron-log": "^4.2.2",
"electron-store": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion public/locales/en-US/translation.missing.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Connect Feedbin":"Connect Feedbin","Log into Feedbin":"Log into Feedbin","Connect Self-hosted (Google Reader API)":"Connect Self-hosted (Google Reader API)","Log into Self Hosted RSS Service":"Log into Self Hosted RSS Service","Enter username":"Enter username","Connect Fever":"Connect Fever","Log into Fever":"Log into Fever","No categories available":"No categories available","Feed in this categories would not be deleted":"Feed in this categories would not be deleted","Please select atleast one feed":"Please select atleast one feed","Title":"Title","Feed":"Feed","Articles":"Articles","Action":"Action","Unsubscribe":"Unsubscribe","Articles inside this feed would be deleted":"Articles inside this feed would be deleted","Category cannot be empty":{"":"Category cannot be empty."},"Category":"Category","Manage Categories":"Manage Categories","Manage Feeds":"Manage Feeds"}
{"Connect Feedbin":"Connect Feedbin","Log into Feedbin":"Log into Feedbin","Connect Self-hosted (Google Reader API)":"Connect Self-hosted (Google Reader API)","Log into Self Hosted RSS Service":"Log into Self Hosted RSS Service","Enter username":"Enter username","Connect Fever":"Connect Fever","Log into Fever":"Log into Fever","No categories available":"No categories available","Feed in this categories would not be deleted":"Feed in this categories would not be deleted","Please select atleast one feed":"Please select atleast one feed","Title":"Title","Feed":"Feed","Articles":"Articles","Action":"Action","Unsubscribe":"Unsubscribe","Articles inside this feed would be deleted":"Articles inside this feed would be deleted","Category cannot be empty":{"":"Category cannot be empty."},"Category":"Category","Manage Categories":"Manage Categories","Manage Feeds":"Manage Feeds","Please subscribe to atleast one feed to add category":"Please subscribe to atleast one feed to add category","No feeds available":"No feeds available","Add new feed":"Add new feed"}
21 changes: 17 additions & 4 deletions src/components/ArticleListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class="list-group-item list-group-item-action flex-column align-items-start"
@click="handleArticle(article.articles.id)"
>
<div class="d-flex flex-column w-100">
<div class="d-flex flex-row justify-content-between w-100">
<p class="mb-1">
<small><img
v-if="article.feeds.favicon"
Expand All @@ -20,8 +20,13 @@
class="mr-2"
> {{ article.feeds.title }}</small>
</p>
<p class="mb-2">
<small>{{ formatDate(article.articles) }}</small>
<p
class="mb-2"
>
<small><time
:title="formatString(article.articles)"
:datetime="formatString(article.articles)"
>{{ formatDate(article.articles) }}</time></small>
</p>
</div>
<h6><strong>{{ article.articles.title }}</strong></h6>
Expand Down Expand Up @@ -49,6 +54,7 @@
<script>
import bus from '../services/bus'
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'
import advanced from 'dayjs/plugin/advancedFormat'
import timezone from 'dayjs/plugin/timezone'
import relativeTime from 'dayjs/plugin/relativeTime'
Expand All @@ -58,6 +64,10 @@ dayjs.extend(relativeTime)
dayjs.extend(timezone)
dayjs.extend(advanced)
dayjs.extend(localizedFormat)
dayjs.extend(utc)
const tz = dayjs.tz.guess()
dayjs.tz.setDefault(tz)
export default {
props: {
Expand All @@ -72,13 +82,16 @@ export default {
}
},
methods: {
formatString (article) {
return dayjs(article.pubDate).tz(tz).format('LLLL')
},
formatDate (article) {
let formatDate
if (article.source === 'inoreader' || article.source === 'greader') {
formatDate = dayjs.unix(article.pubDate).format('LLL')
} else {
formatDate = dayjs(article.pubDate)
.format('LLL')
.fromNow()
}
return formatDate
},
Expand Down
Loading

0 comments on commit a203875

Please sign in to comment.