Import Soapbox version/metadata from package.json
This commit is contained in:
parent
f116d57d11
commit
dfa1443832
2 changed files with 8 additions and 6 deletions
|
@ -7,13 +7,15 @@ import { connect } from 'react-redux';
|
|||
import { openModal } from '../../../actions/modal';
|
||||
import { logOut } from 'soapbox/actions/auth';
|
||||
import { isStaff } from 'soapbox/utils/accounts';
|
||||
import pkg from '../../../../../package.json';
|
||||
|
||||
const shortRepoName = url => new URL(url).pathname.substring(1);
|
||||
|
||||
// FIXME: Let this be configured
|
||||
const sourceCode = {
|
||||
name: 'soapbox-fe',
|
||||
url: 'https://gitlab.com/soapbox-pub/soapbox-fe',
|
||||
repository: 'soapbox-pub/soapbox-fe',
|
||||
version: '1.1.0',
|
||||
name: pkg.name,
|
||||
url: pkg.repository.url,
|
||||
repository: shortRepoName(pkg.repository.url),
|
||||
version: pkg.version,
|
||||
};
|
||||
|
||||
const mapStateToProps = state => {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"homepage": "https://soapbox.pub/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/soapbox-pub/soapbox-fe.git"
|
||||
"url": "https://gitlab.com/soapbox-pub/soapbox-fe"
|
||||
},
|
||||
"keywords": [
|
||||
"fediverse",
|
||||
|
|
Loading…
Reference in a new issue