mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add dates to app pages
This commit is contained in:
parent
1d15ce87f4
commit
3ddd96ae1d
1 changed files with 22 additions and 2 deletions
|
|
@ -24,12 +24,19 @@
|
||||||
>{{ (i === 0) ? 'View' : link.label }}</LinkButton>
|
>{{ (i === 0) ? 'View' : link.label }}</LinkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="report-links py-24 shadow-none">
|
<div class="report-links py-24 text-xs shadow-none">
|
||||||
|
<div v-if="app.lastUpdated">
|
||||||
|
<time
|
||||||
|
:datetime="app.lastUpdated.raw"
|
||||||
|
>
|
||||||
|
Last Updated {{ lastUpdatedFriendly }}
|
||||||
|
</time>
|
||||||
|
</div>
|
||||||
<!-- https://eric.blog/2016/01/08/prefilling-github-issues/ -->
|
<!-- https://eric.blog/2016/01/08/prefilling-github-issues/ -->
|
||||||
<a
|
<a
|
||||||
:href="`https://github.com/ThatGuySam/doesitarm/issues?q=is%3Aissue+is%3Aopen+${app.name}`"
|
:href="`https://github.com/ThatGuySam/doesitarm/issues?q=is%3Aissue+is%3Aopen+${app.name}`"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="text-xs"
|
class="underline"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
>Report Update</a>
|
>Report Update</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -38,6 +45,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import parseGithubDate from '~/helpers/parse-github-date'
|
||||||
import LinkButton from '~/components/link-button.vue'
|
import LinkButton from '~/components/link-button.vue'
|
||||||
import EmailSubscribe from '~/components/email-subscribe.vue'
|
import EmailSubscribe from '~/components/email-subscribe.vue'
|
||||||
import appList from '~/app-list.json'
|
import appList from '~/app-list.json'
|
||||||
|
|
@ -55,6 +63,18 @@ export default {
|
||||||
app: appList.find(app => (app.slug === slug))
|
app: appList.find(app => (app.slug === slug))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
lastUpdatedFriendly () {
|
||||||
|
|
||||||
|
if (this.app.lastUpdated === null) return
|
||||||
|
|
||||||
|
const options = { month: "long", day: "numeric", year: "numeric" }
|
||||||
|
const date = new Date(this.app.lastUpdated.raw)
|
||||||
|
const americanDate = new Intl.DateTimeFormat("en-US", options).format(date)
|
||||||
|
|
||||||
|
return americanDate
|
||||||
|
}
|
||||||
|
},
|
||||||
head() {
|
head() {
|
||||||
return {
|
return {
|
||||||
title: `Does ${this.app.name} work on Apple Silicon?`,
|
title: `Does ${this.app.name} work on Apple Silicon?`,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue