summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornickago <ngonella@calpoly.edu>2015-08-20 17:02:47 -0700
committernickago <ngonella@calpoly.edu>2015-08-21 08:09:02 -0700
commitaaa0bb9d4dcaca0212a7bf1a7dc3dbd9b78fb6c5 (patch)
treefa794598d2e9cb84d2aae2a134625cb26c9dbb15
parentddcdcc3e2c85efbfd1d91d69c0f5c0af7c7cb1c7 (diff)
downloadchat-aaa0bb9d4dcaca0212a7bf1a7dc3dbd9b78fb6c5.tar.gz
chat-aaa0bb9d4dcaca0212a7bf1a7dc3dbd9b78fb6c5.tar.bz2
chat-aaa0bb9d4dcaca0212a7bf1a7dc3dbd9b78fb6c5.zip
Added help text to profile picture screen
-rw-r--r--web/react/components/setting_picture.jsx4
-rw-r--r--web/templates/head.html2
-rw-r--r--web/web.go2
3 files changed, 8 insertions, 0 deletions
diff --git a/web/react/components/setting_picture.jsx b/web/react/components/setting_picture.jsx
index e97b67706..5b12ad7e9 100644
--- a/web/react/components/setting_picture.jsx
+++ b/web/react/components/setting_picture.jsx
@@ -48,6 +48,7 @@ module.exports = React.createClass({
}
confirmButton = <a className={confirmButtonClass} onClick={this.props.submit}>Save</a>;
}
+ var helpText = 'Upload a profile picture in either JPG or PNG format, at least ' + config.ProfileWidth + 'px in width and ' + config.ProfileHeight + 'px height.'
var self = this;
return (
@@ -59,6 +60,9 @@ module.exports = React.createClass({
{img}
</li>
<li className='setting-list-item'>
+ {helpText}
+ </li>
+ <li className='setting-list-item'>
{serverError}
{clientError}
<span className='btn btn-sm btn-primary btn-file sel-btn'>Select<input ref='input' accept='.jpg,.png,.bmp' type='file' onChange={this.props.pictureChange}/></span>
diff --git a/web/templates/head.html b/web/templates/head.html
index 5448b09ed..02904e764 100644
--- a/web/templates/head.html
+++ b/web/templates/head.html
@@ -50,6 +50,8 @@
config = {};
}
config.SiteName = '{{ .SiteName }}';
+ config.ProfileWidth = '{{ .Props.ProfileWidth }}'
+ config.ProfileHeight = '{{ .Props.ProfileHeight }}'
</script>
<script src="/static/js/bundle.js"></script>
diff --git a/web/web.go b/web/web.go
index d6f8d553b..e449d2d3a 100644
--- a/web/web.go
+++ b/web/web.go
@@ -30,6 +30,8 @@ func NewHtmlTemplatePage(templateName string, title string) *HtmlTemplatePage {
props := make(map[string]string)
props["AnalyticsUrl"] = utils.Cfg.ServiceSettings.AnalyticsUrl
+ props["ProfileHeight"] = fmt.Sprintf("%v", utils.Cfg.ImageSettings.ProfileHeight)
+ props["ProfileWidth"] = fmt.Sprintf("%v", utils.Cfg.ImageSettings.ProfileWidth)
return &HtmlTemplatePage{TemplateName: templateName, Title: title, SiteName: utils.Cfg.ServiceSettings.SiteName, Props: props}
}