Merge pull request #631 from asaadmahmoodspin/mm-1866
MM-1866 - Adding download icon and adding download links
Этот коммит содержится в:
@@ -97,6 +97,7 @@ export default class FileAttachment extends React.Component {
|
|||||||
var filename = this.props.filename;
|
var filename = this.props.filename;
|
||||||
|
|
||||||
var fileInfo = utils.splitFileLocation(filename);
|
var fileInfo = utils.splitFileLocation(filename);
|
||||||
|
var fileUrl = utils.getFileUrl(filename);
|
||||||
var type = utils.getFileType(fileInfo.ext);
|
var type = utils.getFileType(fileInfo.ext);
|
||||||
|
|
||||||
var thumbnail;
|
var thumbnail;
|
||||||
@@ -150,14 +151,25 @@ export default class FileAttachment extends React.Component {
|
|||||||
{thumbnail}
|
{thumbnail}
|
||||||
</a>
|
</a>
|
||||||
<div className='post-image__details'>
|
<div className='post-image__details'>
|
||||||
<div
|
<a
|
||||||
|
href={fileUrl}
|
||||||
|
download={filenameString}
|
||||||
data-toggle='tooltip'
|
data-toggle='tooltip'
|
||||||
title={filenameString}
|
title={filenameString}
|
||||||
className='post-image__name'
|
className='post-image__name'
|
||||||
>
|
>
|
||||||
{trimmedFilename}
|
{trimmedFilename}
|
||||||
</div>
|
</a>
|
||||||
<div>
|
<div>
|
||||||
|
<a
|
||||||
|
href={fileUrl}
|
||||||
|
download={filenameString}
|
||||||
|
className='post-image__download'
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className='fa fa-download'
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
<span className='post-image__type'>{fileInfo.ext.toUpperCase()}</span>
|
<span className='post-image__type'>{fileInfo.ext.toUpperCase()}</span>
|
||||||
<span className='post-image__size'>{fileSizeString}</span>
|
<span className='post-image__size'>{fileSizeString}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,14 +12,18 @@ export default class SettingItemMin extends React.Component {
|
|||||||
href='#'
|
href='#'
|
||||||
onClick={this.props.updateSection}
|
onClick={this.props.updateSection}
|
||||||
>
|
>
|
||||||
Edit
|
<i className='fa fa-pencil'/>
|
||||||
|
{'Edit'}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className='section-min'>
|
<ul
|
||||||
|
className='section-min'
|
||||||
|
onClick={this.props.updateSection}
|
||||||
|
>
|
||||||
<li className='col-sm-10 section-title'>{this.props.title}</li>
|
<li className='col-sm-10 section-title'>{this.props.title}</li>
|
||||||
{editButton}
|
{editButton}
|
||||||
<li className='col-sm-7 section-describe'>{this.props.describe}</li>
|
<li className='col-sm-7 section-describe'>{this.props.describe}</li>
|
||||||
|
|||||||
@@ -75,15 +75,13 @@ export default class TeamExportTab extends React.Component {
|
|||||||
<li className='col-xs-offset-3 col-xs-8'>
|
<li className='col-xs-offset-3 col-xs-8'>
|
||||||
<ul className='setting-list'>
|
<ul className='setting-list'>
|
||||||
<li className='setting-list-item'>
|
<li className='setting-list-item'>
|
||||||
<span className='btn btn-sm btn-primary btn-file sel-btn'>
|
<a
|
||||||
<a
|
className='btn btn-sm btn-primary btn-file sel-btn'
|
||||||
className='btn btn-sm btn-primary'
|
href='#'
|
||||||
href='#'
|
onClick={this.doExport}
|
||||||
onClick={this.doExport}
|
>
|
||||||
>
|
{'Export'}
|
||||||
{'Export'}
|
</a>
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export default class UserSettingsGeneralTab extends React.Component {
|
|||||||
key='firstNameSetting'
|
key='firstNameSetting'
|
||||||
className='form-group'
|
className='form-group'
|
||||||
>
|
>
|
||||||
<label className='col-sm-5 control-label'>First Name</label>
|
<label className='col-sm-5 control-label'>{'First Name'}</label>
|
||||||
<div className='col-sm-7'>
|
<div className='col-sm-7'>
|
||||||
<input
|
<input
|
||||||
className='form-control'
|
className='form-control'
|
||||||
@@ -255,7 +255,7 @@ export default class UserSettingsGeneralTab extends React.Component {
|
|||||||
key='lastNameSetting'
|
key='lastNameSetting'
|
||||||
className='form-group'
|
className='form-group'
|
||||||
>
|
>
|
||||||
<label className='col-sm-5 control-label'>Last Name</label>
|
<label className='col-sm-5 control-label'>{'Last Name'}</label>
|
||||||
<div className='col-sm-7'>
|
<div className='col-sm-7'>
|
||||||
<input
|
<input
|
||||||
className='form-control'
|
className='form-control'
|
||||||
@@ -278,14 +278,14 @@ export default class UserSettingsGeneralTab extends React.Component {
|
|||||||
href='#'
|
href='#'
|
||||||
onClick={notifClick.bind(this)}
|
onClick={notifClick.bind(this)}
|
||||||
>
|
>
|
||||||
Notifications
|
{'Notifications'}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
|
||||||
const extraInfo = (
|
const extraInfo = (
|
||||||
<span>
|
<span>
|
||||||
By default, you will receive mention notifications when someone types your first name.
|
{'By default, you will receive mention notifications when someone types your first name. '}
|
||||||
Go to {notifLink} settings to change this default.
|
{'Go to '} {notifLink} {'settings to change this default.'}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -351,8 +351,8 @@ export default class UserSettingsGeneralTab extends React.Component {
|
|||||||
|
|
||||||
const extraInfo = (
|
const extraInfo = (
|
||||||
<span>
|
<span>
|
||||||
Use Nickname for a name you might be called that is different from your first name and user name.
|
{'Use Nickname for a name you might be called that is different from your first name and user name.'}
|
||||||
This is most often used when two or more people have similar sounding names and usernames.
|
{'This is most often used when two or more people have similar sounding names and usernames.'}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -406,7 +406,7 @@ export default class UserSettingsGeneralTab extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
const extraInfo = (<span>Pick something easy for teammates to recognize and recall.</span>);
|
const extraInfo = (<span>{'Pick something easy for teammates to recognize and recall.'}</span>);
|
||||||
|
|
||||||
usernameSection = (
|
usernameSection = (
|
||||||
<SettingItemMax
|
<SettingItemMax
|
||||||
@@ -438,13 +438,13 @@ export default class UserSettingsGeneralTab extends React.Component {
|
|||||||
let helpText = <div>Email is used for notifications, and requires verification if changed.</div>;
|
let helpText = <div>Email is used for notifications, and requires verification if changed.</div>;
|
||||||
|
|
||||||
if (!this.state.emailEnabled) {
|
if (!this.state.emailEnabled) {
|
||||||
helpText = <div className='text-danger'><br />Email has been disabled by your system administrator. No notification emails will be sent until it is enabled.</div>;
|
helpText = <div className='setting-list__hint text-danger'>{'Email has been disabled by your system administrator. No notification emails will be sent until it is enabled.'}</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
inputs.push(
|
inputs.push(
|
||||||
<div key='emailSetting'>
|
<div key='emailSetting'>
|
||||||
<div className='form-group'>
|
<div className='form-group'>
|
||||||
<label className='col-sm-5 control-label'>Primary Email</label>
|
<label className='col-sm-5 control-label'>{'Primary Email'}</label>
|
||||||
<div className='col-sm-7'>
|
<div className='col-sm-7'>
|
||||||
<input
|
<input
|
||||||
className='form-control'
|
className='form-control'
|
||||||
@@ -526,18 +526,18 @@ export default class UserSettingsGeneralTab extends React.Component {
|
|||||||
data-dismiss='modal'
|
data-dismiss='modal'
|
||||||
aria-label='Close'
|
aria-label='Close'
|
||||||
>
|
>
|
||||||
<span aria-hidden='true'>×</span>
|
<span aria-hidden='true'>{'×'}</span>
|
||||||
</button>
|
</button>
|
||||||
<h4
|
<h4
|
||||||
className='modal-title'
|
className='modal-title'
|
||||||
ref='title'
|
ref='title'
|
||||||
>
|
>
|
||||||
<i className='modal-back'></i>
|
<i className='modal-back'></i>
|
||||||
General Settings
|
{'General Settings'}
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div className='user-settings'>
|
<div className='user-settings'>
|
||||||
<h3 className='tab-header'>General Settings</h3>
|
<h3 className='tab-header'>{'General Settings'}</h3>
|
||||||
<div className='divider-dark first'/>
|
<div className='divider-dark first'/>
|
||||||
{nameSection}
|
{nameSection}
|
||||||
<div className='divider-light'/>
|
<div className='divider-light'/>
|
||||||
|
|||||||
@@ -61,8 +61,8 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
opacity: inherit;
|
opacity: inherit;
|
||||||
text-shadow: 0 0px 3px #444;
|
text-shadow: 0 0px 3px #444;
|
||||||
text-shadow: 0 0px 3px rgba(0, 0, 0, 0.7);
|
text-shadow: 0 0px 3px rgba(0, 0, 0, 0.7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,6 +159,14 @@
|
|||||||
padding: 7px;
|
padding: 7px;
|
||||||
.post-image__name {
|
.post-image__name {
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
|
display: block;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.post-image__download {
|
||||||
|
display: inline-block;
|
||||||
|
padding-right: 7px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #555;
|
||||||
}
|
}
|
||||||
.post-image__type {
|
.post-image__type {
|
||||||
color: grey;
|
color: grey;
|
||||||
|
|||||||
@@ -56,7 +56,17 @@
|
|||||||
.section-min {
|
.section-min {
|
||||||
padding: 1em 0;
|
padding: 1em 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
cursor: pointer;
|
||||||
@include clearfix;
|
@include clearfix;
|
||||||
|
&:hover {
|
||||||
|
background: #f9f9f9;
|
||||||
|
}
|
||||||
|
&:hover .fa {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
&:hover .section-edit {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-max {
|
.section-max {
|
||||||
@@ -77,6 +87,12 @@
|
|||||||
.section-edit {
|
.section-edit {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
.fa {
|
||||||
|
margin-right: 7px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #aaa;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-describe {
|
.section-describe {
|
||||||
@@ -97,7 +113,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.setting-list__hint {
|
.setting-list__hint {
|
||||||
color: #555;
|
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user