Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Multiple Bug fixes #216

Merged
merged 10 commits into from
Nov 6, 2017
6 changes: 3 additions & 3 deletions components/change_url_modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default class ChangeUrlModal extends React.Component {

if (this.props.serverError || this.state.urlError) {
error = (
<div className='form-group has-error'>
<div className='has-error'>
<p className='input__help error'>
{this.state.urlError || this.props.serverError}
</p>
Expand Down Expand Up @@ -170,13 +170,13 @@ export default class ChangeUrlModal extends React.Component {
/>
</div>
<div className='form-group'>
<label className='col-sm-2 form__label control-label'>
<label className='col-sm-3 form__label control-label'>
<FormattedMessage
id='change_url.urlLabel'
defaultMessage='Channel URL'
/>
</label>
<div className='col-sm-10'>
<div className='col-sm-9'>
<div className={urlClass}>
<OverlayTrigger
trigger={['hover', 'focus']}
Expand Down
6 changes: 3 additions & 3 deletions components/delete_modal_trigger.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ export default class DeleteModalTrigger extends React.Component {
render() {
return (
<span>
<a
href='#'
<button
className='color--link style--none'
onClick={this.handleOpenModal}
>
{ this.triggerTitle }
</a>
</button>
<ConfirmModal
show={this.state.showDeleteModal}
title={this.modalTitle}
Expand Down
6 changes: 3 additions & 3 deletions components/integrations/components/installed_command.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ export default class InstalledCommand extends React.PureComponent {
if (this.props.canChange) {
actions = (
<div className='item-actions'>
<a
href='#'
<button
className='style--none color--link'
onClick={this.handleRegenToken}
>
<FormattedMessage
id='installed_integrations.regenToken'
defaultMessage='Regenerate Token'
/>
</a>
</button>
{' - '}
<Link to={`/${this.props.team.name}/integrations/commands/edit?id=${command.id}`}>
<FormattedMessage
Expand Down
18 changes: 9 additions & 9 deletions components/integrations/components/installed_oauth_app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,40 +158,40 @@ export default class InstalledOAuthApp extends React.PureComponent {
let showHide;
if (this.state.clientSecret === FAKE_SECRET) {
showHide = (
<a
href='#'
<button
className='style--none color--link'
onClick={this.handleShowClientSecret}
>
<FormattedMessage
id='installed_integrations.showSecret'
defaultMessage='Show Secret'
/>
</a>
</button>
);
} else {
showHide = (
<a
href='#'
<button
className='style--none color--link'
onClick={this.handleHideClientSecret}
>
<FormattedMessage
id='installed_integrations.hideSecret'
defaultMessage='Hide Secret'
/>
</a>
</button>
);
}

const regen = (
<a
href='#'
<button
className='style--none color--link'
onClick={this.handleRegenerate}
>
<FormattedMessage
id='installed_integrations.regenSecret'
defaultMessage='Regenerate Secret'
/>
</a>
</button>
);

let icon;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ export default class InstalledOutgoingWebhook extends React.PureComponent {
if (this.props.canChange) {
actions = (
<div className='item-actions'>
<a
href='#'
<button
className='style--none color--link'
onClick={this.handleRegenToken}
>
<FormattedMessage
id='installed_integrations.regenToken'
defaultMessage='Regen Token'
/>
</a>
</button>
{' - '}
<Link to={`/${this.props.team.name}/integrations/outgoing_webhooks/edit?id=${outgoingWebhook.id}`}>
<FormattedMessage
Expand Down
6 changes: 3 additions & 3 deletions components/mfa/mfa_controller.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export default class MFAController extends React.Component {
if (window.mm_config.EnforceMultifactorAuthentication === 'true') {
backButton = (
<div className='signup-header'>
<a
href='#'
<button
className='style--none color--link'
onClick={(e) => {
e.preventDefault();
emitUserLoggedOutEvent('/login');
Expand All @@ -36,7 +36,7 @@ export default class MFAController extends React.Component {
id='web.header.logout'
defaultMessage='Logout'
/>
</a>
</button>
</div>
);
} else {
Expand Down
6 changes: 4 additions & 2 deletions components/new_channel_flow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,16 @@ export default class NewChannelFlow extends React.Component {
this.doOnModalExited();
}
}
typeSwitched() {
typeSwitched(e) {
e.preventDefault();
if (this.state.channelType === 'P') {
this.setState({channelType: 'O'});
} else {
this.setState({channelType: 'P'});
}
}
urlChangeRequested() {
urlChangeRequested(e) {
e.preventDefault();
this.setState({flowState: SHOW_EDIT_URL});
}
urlChangeSubmitted(newURL) {
Expand Down
12 changes: 6 additions & 6 deletions components/new_channel_modal/new_channel_modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,27 +167,27 @@ export default class NewChannelModal extends React.PureComponent {
}

let createPublicChannelLink = (
<a
href='#'
<button
className='style--none color--link'
onClick={this.props.onTypeSwitched}
>
<FormattedMessage
id='channel_modal.publicChannel1'
defaultMessage='Create a public channel'
/>
</a>
</button>
);

let createPrivateChannelLink = (
<a
href='#'
<button
className='style--none color--link'
onClick={this.props.onTypeSwitched}
>
<FormattedMessage
id='channel_modal.privateGroup2'
defaultMessage='Create a private channel'
/>
</a>
</button>
);

if (!ChannelUtils.showCreateOption(Constants.OPEN_CHANNEL, this.props.isTeamAdmin, this.props.isSystemAdmin)) {
Expand Down
4 changes: 2 additions & 2 deletions components/sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -943,14 +943,14 @@ export default class Sidebar extends React.Component {
show={this.state.showTopUnread}
onClick={this.scrollToFirstUnreadChannel}
extraClass='nav-pills__unread-indicator-top'
text={above}
content={above}
/>
<UnreadChannelIndicator
name='Bottom'
show={this.state.showBottomUnread}
onClick={this.scrollToLastUnreadChannel}
extraClass='nav-pills__unread-indicator-bottom'
text={below}
content={below}
/>

<div
Expand Down
1 change: 1 addition & 0 deletions sass/base/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ a {
}

.color--link {
color: $link-color;
cursor: pointer;

&:hover,
Expand Down
1 change: 1 addition & 0 deletions sass/components/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
.custom-textarea {
border-color: $light-gray;
color: inherit;
padding-right: 30px;

&:focus {
border-color: $light-gray;
Expand Down
1 change: 0 additions & 1 deletion sass/layout/_headers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@
&:hover,
&:focus {
color: inherit;
text-decoration: underline;
}
}

Expand Down
1 change: 1 addition & 0 deletions sass/utils/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $yellow: rgb(255, 255, 0);
$light-gray: rgba(0, 0, 0, .15);
$gray: rgba(0, 0, 0, .3);
$dark-gray: rgba(0, 0, 0, .5);
$link-color: rgb(35, 137, 215);

// Page Variables
$border-gray: 1px solid #ddd;
Expand Down
2 changes: 1 addition & 1 deletion utils/utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ export function displayEntireNameForUser(user) {
return '';
}

let displayName = user.username;
let displayName = '@' + user.username;
const fullName = getFullName(user);

if (fullName && user.nickname) {
Expand Down