Landing page (#353)

* Landing page

* Change legal corp name, remove google from privacy policy, other fixes
This commit is contained in:
Geometrically
2022-02-16 17:39:48 -07:00
committed by GitHub
parent e91b0500c5
commit 51a9a7b75d
22 changed files with 535 additions and 187 deletions

View File

@@ -2,6 +2,16 @@ export default ({ store }, inject) => {
inject('user', store.state.user)
inject('tag', store.state.tag)
inject('auth', store.state.auth)
inject('formatNumber', (number) => {
const x = +number
if (x >= 1000000) {
return (x / 1000000).toFixed(2).toString() + 'M'
} else if (x >= 10000) {
return (x / 1000).toFixed(1).toString() + 'K'
} else {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
}
})
inject('formatVersion', (versionArray) => {
const allVersions = store.state.tag.gameVersions.slice().reverse()
const allReleases = allVersions.filter((x) => x.version_type === 'release')