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
2 changes: 1 addition & 1 deletion components/channel_header/channel_header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ export default class ChannelHeader extends React.Component {
headerTextElement = (
<div
id='channelHeaderDescription'
className='channel-header__description light'
className='channel-header__description'
>
{dmHeaderIconStatus}
{dmHeaderTextStatus}
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
7 changes: 3 additions & 4 deletions components/post_view/post_list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -525,17 +525,16 @@ export default class PostList extends React.PureComponent {
);
} else {
topRow = (
<a
<button
ref='loadmoretop'
className='more-messages-text theme'
href='#'
className='more-messages-text theme style--none color--link'
onClick={this.loadMorePosts}
>
<FormattedMessage
id='posts_view.loadMore'
defaultMessage='Load more messages'
/>
</a>
</button>
);
}

Expand Down
7 changes: 3 additions & 4 deletions components/search_bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,16 +303,15 @@ export default class SearchBar extends React.Component {
<div
className={'channel-header__icon ' + flagBtnClass}
>
<a
href='#'
type='button'
<button
onClick={this.getFlagged}
className='style--none'
>
<span
className='icon icon__flag'
dangerouslySetInnerHTML={{__html: flagIcon}}
/>
</a>
</button>
</div>
</OverlayTrigger>
);
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
2 changes: 1 addition & 1 deletion sass/components/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
@include border-radius(50px);
border: 1px solid $light-gray;
margin: 17px 10px 0 0;
width: 229px;
width: 296px;
}

.sidebar--right & {
Expand Down
18 changes: 16 additions & 2 deletions sass/layout/_headers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@
margin-top: 12px;
white-space: nowrap;

.dropdown-toggle {
overflow: hidden;
text-align: left;
text-overflow: ellipsis;
width: 100%;

strong {
max-width: calc(100% - 65px);
}
}

.header-dropdown__icon {
color: $dark-gray;
}
Expand All @@ -198,6 +209,7 @@
}

.channel-header__description {
cursor: pointer;
height: 24px;
margin-bottom: 3px;
margin-top: 3px;
Expand All @@ -218,12 +230,14 @@
&.light {
@include opacity(.8);
color: inherit;
cursor: pointer;

&:hover,
&:focus {
color: inherit;
text-decoration: underline;

span {
text-decoration: underline;
}
}
}

Expand Down
1 change: 1 addition & 0 deletions sass/layout/_post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
margin: 5px 0 10px;
outline: none;
text-align: center;
width: 100%;
}

.new-messages__button {
Expand Down
3 changes: 2 additions & 1 deletion sass/layout/_sidebar-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@

.nav {
> li {
> a {
> a,
> button {
background: none !important;
color: inherit;
font-size: 15px;
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