mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-27 00:19:39 +01:00
add site url link
This commit is contained in:
parent
f665228a5a
commit
4b9a60a735
frontend/src/component
@ -3,7 +3,7 @@ import React, { Component, PureComponent } from 'react';
|
||||
|
||||
import { Link } from 'react-router';
|
||||
import { Grid, Cell, List, ListItem, ListItemContent, Textfield, Icon, ProgressBar } from 'react-mdl';
|
||||
import { HeaderTitle } from '../common';
|
||||
import { HeaderTitle, ExternalIconLink } from '../common';
|
||||
|
||||
class StatefulTextfield extends Component {
|
||||
constructor (props) {
|
||||
@ -51,7 +51,9 @@ class ClientStrategies extends PureComponent {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderTitle title={<span><Icon name={icon} /> {appName}</span>} subtitle={description} />
|
||||
<HeaderTitle title={<span><Icon name={icon} /> {appName}</span>} subtitle={description}
|
||||
actions={url && <ExternalIconLink url={url}>Visit site</ExternalIconLink>}
|
||||
/>
|
||||
<Grid>
|
||||
<Cell col={3}>
|
||||
<h6> Toggles</h6>
|
||||
|
@ -79,3 +79,17 @@ export function getIcon (type) {
|
||||
default: return 'star';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export const IconLink = ({ icon, children, ...props }) => (
|
||||
<a {...props} style={{ textDecoration: 'none' }}>
|
||||
<Icon name={icon} style={{ marginRight: '5px', verticalAlign: 'middle' }}/>
|
||||
<span style={{ textDecoration: 'none', verticalAlign: 'middle' }}>{children}</span>
|
||||
</a>
|
||||
);
|
||||
|
||||
export const ExternalIconLink = ({ url, children }) => (
|
||||
<IconLink icon="queue" href={url} target="_blank" rel="noopener">
|
||||
{children}
|
||||
</IconLink>
|
||||
);
|
||||
|
@ -69,6 +69,7 @@ class EditFeatureToggleWrapper extends React.Component {
|
||||
return (
|
||||
<div>
|
||||
<h4>{featureToggle.name} <small>{featureToggle.enabled ? 'is enabled' : 'is disabled'}</small></h4>
|
||||
<p>{featureToggle.description}</p>
|
||||
<hr />
|
||||
<SwitchWithLabel
|
||||
checked={featureToggle.enabled}
|
||||
@ -120,7 +121,6 @@ class EditFeatureToggleWrapper extends React.Component {
|
||||
</Link>
|
||||
</Cell>
|
||||
</Grid>
|
||||
<p>{featureToggle.description}</p>
|
||||
|
||||
<hr />
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user