Add displayName, use as app name
This commit is contained in:
parent
a582c7efd7
commit
1579e047b5
5 changed files with 6 additions and 8 deletions
|
@ -7,6 +7,7 @@ import { fetchMeSuccess, fetchMeFail } from 'soapbox/actions/me';
|
|||
import { getLoggedInAccount, parseBaseURL } from 'soapbox/utils/auth';
|
||||
import { createApp } from 'soapbox/actions/apps';
|
||||
import { obtainOAuthToken, revokeOAuthToken } from 'soapbox/actions/oauth';
|
||||
import sourceCode from 'soapbox/utils/code';
|
||||
|
||||
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() {
|
||||
return (dispatch, getState) => {
|
||||
const params = {
|
||||
client_name: appName(),
|
||||
client_name: sourceCode.displayName,
|
||||
redirect_uris: 'urn:ietf:wg:oauth:2.0:oob',
|
||||
scopes: 'read write follow push admin',
|
||||
};
|
||||
|
|
|
@ -138,7 +138,7 @@ class Dashboard extends ImmutablePureComponent {
|
|||
<div className='dashwidget'>
|
||||
<h4><FormattedMessage id='admin.dashwidgets.software_header' defaultMessage='Software' /></h4>
|
||||
<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>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -50,7 +50,7 @@ const LinkFooter = ({ onOpenHotkeys, account, onClickLogOut }) => (
|
|||
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}).'
|
||||
values={{
|
||||
code_name: sourceCode.name,
|
||||
code_name: sourceCode.displayName,
|
||||
code_link: <a href={sourceCode.url} rel='noopener' target='_blank'>{sourceCode.repository}</a>,
|
||||
code_version: sourceCode.version,
|
||||
}}
|
||||
|
|
|
@ -33,6 +33,7 @@ const version = pkg => {
|
|||
|
||||
module.exports = {
|
||||
name: pkg.name,
|
||||
displayName: pkg.displayName,
|
||||
url: pkg.repository.url,
|
||||
repository: shortRepoName(pkg.repository.url),
|
||||
version: version(pkg),
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "soapbox-fe",
|
||||
"displayName": "Soapbox FE",
|
||||
"version": "1.3.0",
|
||||
"description": "Soapbox frontend for Pleroma.",
|
||||
"homepage": "https://soapbox.pub/",
|
||||
|
|
Loading…
Reference in a new issue