Merge branch 'app-nicename' into 'develop'
Add displayName, use as app name See merge request soapbox-pub/soapbox-fe!682
This commit is contained in:
commit
d81c31ce63
|
@ -7,6 +7,7 @@ import { fetchMeSuccess, fetchMeFail } from 'soapbox/actions/me';
|
||||||
import { getLoggedInAccount, parseBaseURL } from 'soapbox/utils/auth';
|
import { getLoggedInAccount, parseBaseURL } from 'soapbox/utils/auth';
|
||||||
import { createApp } from 'soapbox/actions/apps';
|
import { createApp } from 'soapbox/actions/apps';
|
||||||
import { obtainOAuthToken, revokeOAuthToken } from 'soapbox/actions/oauth';
|
import { obtainOAuthToken, revokeOAuthToken } from 'soapbox/actions/oauth';
|
||||||
|
import sourceCode from 'soapbox/utils/code';
|
||||||
|
|
||||||
export const SWITCH_ACCOUNT = 'SWITCH_ACCOUNT';
|
export const SWITCH_ACCOUNT = 'SWITCH_ACCOUNT';
|
||||||
|
|
||||||
|
@ -50,15 +51,10 @@ function createAppAndToken() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const appName = () => {
|
|
||||||
const timestamp = (new Date()).toISOString();
|
|
||||||
return `SoapboxFE_${timestamp}`; // TODO: Add commit hash
|
|
||||||
};
|
|
||||||
|
|
||||||
function createAuthApp() {
|
function createAuthApp() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const params = {
|
const params = {
|
||||||
client_name: appName(),
|
client_name: sourceCode.displayName,
|
||||||
redirect_uris: 'urn:ietf:wg:oauth:2.0:oob',
|
redirect_uris: 'urn:ietf:wg:oauth:2.0:oob',
|
||||||
scopes: 'read write follow push admin',
|
scopes: 'read write follow push admin',
|
||||||
};
|
};
|
||||||
|
|
|
@ -138,7 +138,7 @@ class Dashboard extends ImmutablePureComponent {
|
||||||
<div className='dashwidget'>
|
<div className='dashwidget'>
|
||||||
<h4><FormattedMessage id='admin.dashwidgets.software_header' defaultMessage='Software' /></h4>
|
<h4><FormattedMessage id='admin.dashwidgets.software_header' defaultMessage='Software' /></h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Soapbox FE <span className='pull-right'>{sourceCode.version}</span></li>
|
<li>{sourceCode.displayName} <span className='pull-right'>{sourceCode.version}</span></li>
|
||||||
<li>{v.software} <span className='pull-right'>{v.version}</span></li>
|
<li>{v.software} <span className='pull-right'>{v.version}</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -50,7 +50,7 @@ const LinkFooter = ({ onOpenHotkeys, account, onClickLogOut }) => (
|
||||||
id='getting_started.open_source_notice'
|
id='getting_started.open_source_notice'
|
||||||
defaultMessage='{code_name} is open source software. You can contribute or report issues at {code_link} (v{code_version}).'
|
defaultMessage='{code_name} is open source software. You can contribute or report issues at {code_link} (v{code_version}).'
|
||||||
values={{
|
values={{
|
||||||
code_name: sourceCode.name,
|
code_name: sourceCode.displayName,
|
||||||
code_link: <a href={sourceCode.url} rel='noopener' target='_blank'>{sourceCode.repository}</a>,
|
code_link: <a href={sourceCode.url} rel='noopener' target='_blank'>{sourceCode.repository}</a>,
|
||||||
code_version: sourceCode.version,
|
code_version: sourceCode.version,
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -33,6 +33,7 @@ const version = pkg => {
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: pkg.name,
|
name: pkg.name,
|
||||||
|
displayName: pkg.displayName,
|
||||||
url: pkg.repository.url,
|
url: pkg.repository.url,
|
||||||
repository: shortRepoName(pkg.repository.url),
|
repository: shortRepoName(pkg.repository.url),
|
||||||
version: version(pkg),
|
version: version(pkg),
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "soapbox-fe",
|
"name": "soapbox-fe",
|
||||||
|
"displayName": "Soapbox FE",
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"description": "Soapbox frontend for Pleroma.",
|
"description": "Soapbox frontend for Pleroma.",
|
||||||
"homepage": "https://soapbox.pub/",
|
"homepage": "https://soapbox.pub/",
|
||||||
|
|
Loading…
Reference in New Issue