fix: Settings screen cleanup

This commit is contained in:
Tom Moor
2019-06-25 21:53:23 -07:00
parent 7aea6458ce
commit b93824915d
5 changed files with 19 additions and 14 deletions

View File

@ -56,11 +56,11 @@ class ErrorBoundary extends React.Component<Props> {
<p> <p>
<Button onClick={this.handleReload}>Reload</Button>{' '} <Button onClick={this.handleReload}>Reload</Button>{' '}
{this.showDetails ? ( {this.showDetails ? (
<Button onClick={this.handleReportBug} light> <Button onClick={this.handleReportBug} neutral>
Report a Bug Report a Bug
</Button> </Button>
) : ( ) : (
<Button onClick={this.handleShowDetails} light> <Button onClick={this.handleShowDetails} neutral>
Show Details Show Details
</Button> </Button>
)} )}

View File

@ -128,7 +128,7 @@ class Details extends React.Component<Props> {
/> />
{this.subdomain && ( {this.subdomain && (
<HelpText small> <HelpText small>
Your knowledgebase will be accessed at{' '} Your knowledgebase will be accessible at{' '}
<strong>{this.subdomain}.getoutline.com</strong> <strong>{this.subdomain}.getoutline.com</strong>
</HelpText> </HelpText>
)} )}

View File

@ -59,7 +59,7 @@ class Security extends React.Component<Props> {
<PageTitle title="Security" /> <PageTitle title="Security" />
<h1>Security</h1> <h1>Security</h1>
<HelpText> <HelpText>
Settings that impact the access, security and content of your Settings that impact the access, security, and content of your
knowledgebase. knowledgebase.
</HelpText> </HelpText>

View File

@ -27,15 +27,16 @@ class Shares extends React.Component<Props> {
const { shares, auth } = this.props; const { shares, auth } = this.props;
const { user } = auth; const { user } = auth;
const canShareDocuments = auth.team && auth.team.sharing; const canShareDocuments = auth.team && auth.team.sharing;
const hasSharedDocuments = shares.orderedData.length > 0;
return ( return (
<CenteredContent> <CenteredContent>
<PageTitle title="Share Links" /> <PageTitle title="Share Links" />
<h1>Share Links</h1> <h1>Share Links</h1>
<HelpText> <HelpText>
Documents that have been shared appear below. Anyone that has the link Documents that have been shared are listed below. Anyone that has the
can access a read-only version of the document until the link has been public link can access a read-only version of the document until the
revoked. link has been revoked.
</HelpText> </HelpText>
{user && {user &&
user.isAdmin && ( user.isAdmin && (
@ -47,12 +48,16 @@ class Shares extends React.Component<Props> {
sharing in <Link to="/settings/security">security settings</Link>. sharing in <Link to="/settings/security">security settings</Link>.
</HelpText> </HelpText>
)} )}
{hasSharedDocuments && (
<React.Fragment>
<Subheading>Shared Documents</Subheading> <Subheading>Shared Documents</Subheading>
<List> <List>
{shares.orderedData.map(share => ( {shares.orderedData.map(share => (
<ShareListItem key={share.id} share={share} /> <ShareListItem key={share.id} share={share} />
))} ))}
</List> </List>
</React.Fragment>
)}
</CenteredContent> </CenteredContent>
); );
} }

View File

@ -16,7 +16,7 @@ const TokenListItem = ({ token, onDelete }: Props) => {
title={token.name} title={token.name}
subtitle={<code>{token.secret}</code>} subtitle={<code>{token.secret}</code>}
actions={ actions={
<Button onClick={() => onDelete(token.id)} light> <Button onClick={() => onDelete(token.id)} neutral>
Revoke Revoke
</Button> </Button>
} }