summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Godeps/Godeps.json4
-rw-r--r--Godeps/_workspace/src/github.com/mssola/user_agent/.travis.yml1
-rw-r--r--Godeps/_workspace/src/github.com/mssola/user_agent/all_test.go8
-rw-r--r--Godeps/_workspace/src/github.com/mssola/user_agent/browser.go18
-rw-r--r--api/file.go14
-rw-r--r--web/react/components/user_settings/manage_incoming_hooks.jsx2
-rw-r--r--web/react/utils/constants.jsx32
-rw-r--r--web/react/utils/utils.jsx11
-rw-r--r--web/sass-files/sass/partials/_loading.scss2
-rw-r--r--web/sass-files/sass/partials/_post.scss4
-rw-r--r--web/sass-files/sass/partials/_responsive.scss2
-rw-r--r--web/static/images/themes/mattermost dark.png (renamed from web/static/images/themes/dark.png)bin75371 -> 75371 bytes
-rw-r--r--web/static/images/themes/windows 10 dark.pngbin0 -> 82784 bytes
13 files changed, 81 insertions, 17 deletions
diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json
index d6503a1d5..9bd02d455 100644
--- a/Godeps/Godeps.json
+++ b/Godeps/Godeps.json
@@ -85,8 +85,8 @@
},
{
"ImportPath": "github.com/mssola/user_agent",
- "Comment": "v0.4.1-2-g35c7f18",
- "Rev": "35c7f18f5261cc18c698a461053c119aebaf8542"
+ "Comment": "v0.4.1-4-ga163d6a",
+ "Rev": "a163d6a569f1cd264d2f8b2bf3c5d04ace5995eb"
},
{
"ImportPath": "github.com/nfnt/resize",
diff --git a/Godeps/_workspace/src/github.com/mssola/user_agent/.travis.yml b/Godeps/_workspace/src/github.com/mssola/user_agent/.travis.yml
index 922091263..33c596acb 100644
--- a/Godeps/_workspace/src/github.com/mssola/user_agent/.travis.yml
+++ b/Godeps/_workspace/src/github.com/mssola/user_agent/.travis.yml
@@ -5,6 +5,7 @@ go:
- 1.2
- 1.3
- 1.4
+ - 1.5
- tip
matrix:
allow_failures:
diff --git a/Godeps/_workspace/src/github.com/mssola/user_agent/all_test.go b/Godeps/_workspace/src/github.com/mssola/user_agent/all_test.go
index 6dca19d5c..34ccbb864 100644
--- a/Godeps/_workspace/src/github.com/mssola/user_agent/all_test.go
+++ b/Godeps/_workspace/src/github.com/mssola/user_agent/all_test.go
@@ -40,6 +40,10 @@ var uastrings = []struct {
{"IE11b32Win7b64MDDRJS", "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; MDDRJS; rv:11.0) like Gecko"},
{"IE11Compatibility", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0)"},
+ // Microsoft Edge
+ {"EdgeDesktop", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240"},
+ {"EdgeMobile", "Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; DEVICE INFO) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/12.10240"},
+
// Gecko
{"FirefoxMac", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b8) Gecko/20100101 Firefox/4.0b8"},
{"FirefoxMacLoc", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13"},
@@ -129,6 +133,10 @@ var expected = []string{
"Mozilla:5.0 Platform:Windows OS:Windows 7 Browser:Internet Explorer-11.0 Engine:Trident Bot:false Mobile:false",
"Mozilla:4.0 Platform:Windows OS:Windows 8.1 Browser:Internet Explorer-7.0 Engine:Trident Bot:false Mobile:false",
+ // Microsoft Edge
+ "Mozilla:5.0 Platform:Windows OS:Windows NT 10.0 Browser:Edge-12.10240 Engine:EdgeHTML Bot:false Mobile:false",
+ "Mozilla:5.0 Platform:Windows OS:Windows Phone 10.0 Browser:Edge-12.10240 Engine:EdgeHTML Bot:false Mobile:true",
+
// Gecko
"Mozilla:5.0 Platform:Macintosh OS:Intel Mac OS X 10.6 Browser:Firefox-4.0b8 Engine:Gecko-20100101 Bot:false Mobile:false",
"Mozilla:5.0 Platform:Macintosh OS:Intel Mac OS X 10.6 Localization:en-US Browser:Firefox-3.6.13 Engine:Gecko-20101203 Bot:false Mobile:false",
diff --git a/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go b/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go
index 9fb27e5f3..c5612db7b 100644
--- a/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go
+++ b/Godeps/_workspace/src/github.com/mssola/user_agent/browser.go
@@ -48,13 +48,21 @@ func (p *UserAgent) detectBrowser(sections []section) {
if slen > 2 {
p.browser.Version = sections[2].version
if engine.name == "AppleWebKit" {
- if sections[slen-1].name == "OPR" {
+ switch sections[slen-1].name {
+ case "Edge":
+ p.browser.Name = "Edge"
+ p.browser.Version = sections[slen-1].version
+ p.browser.Engine = "EdgeHTML"
+ p.browser.EngineVersion = ""
+ case "OPR":
p.browser.Name = "Opera"
p.browser.Version = sections[slen-1].version
- } else if sections[2].name == "Chrome" {
- p.browser.Name = "Chrome"
- } else {
- p.browser.Name = "Safari"
+ default:
+ if sections[2].name == "Chrome" {
+ p.browser.Name = "Chrome"
+ } else {
+ p.browser.Name = "Safari"
+ }
}
} else if engine.name == "Gecko" {
name := sections[2].name
diff --git a/api/file.go b/api/file.go
index 694fc734c..1cb05e81b 100644
--- a/api/file.go
+++ b/api/file.go
@@ -13,6 +13,7 @@ import (
"github.com/gorilla/mux"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
+ "github.com/mssola/user_agent"
"github.com/nfnt/resize"
"github.com/rwcarlsen/goexif/exif"
_ "golang.org/x/image/bmp"
@@ -426,6 +427,19 @@ func getFile(c *Context, w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "max-age=2592000, public")
w.Header().Set("Content-Length", strconv.Itoa(len(f)))
w.Header().Set("Content-Type", mime.TypeByExtension(filepath.Ext(filename)))
+
+ // attach extra headers to trigger a download on IE and Edge
+ ua := user_agent.New(r.UserAgent())
+ bname, _ := ua.Browser()
+
+ if bname == "Edge" || bname == "Internet Explorer" {
+ // trim off anything before the final / so we just get the file's name
+ parts := strings.Split(filename, "/")
+
+ w.Header().Set("Content-Type", "application/octet-stream")
+ w.Header().Set("Content-Disposition", "attachment;filename=\""+parts[len(parts)-1]+"\"")
+ }
+
w.Write(f)
}
diff --git a/web/react/components/user_settings/manage_incoming_hooks.jsx b/web/react/components/user_settings/manage_incoming_hooks.jsx
index 12c041c7f..1bbfbd162 100644
--- a/web/react/components/user_settings/manage_incoming_hooks.jsx
+++ b/web/react/components/user_settings/manage_incoming_hooks.jsx
@@ -134,7 +134,7 @@ export default class ManageIncomingHooks extends React.Component {
} else if (hooks.length > 0) {
displayHooks = hooks;
} else {
- displayHooks = <label>{' None'}</label>;
+ displayHooks = <label>{': None'}</label>;
}
const existingHooks = (
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 40d52c165..7497d8450 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -134,6 +134,7 @@ module.exports = {
mentionColor: '#ffffff',
centerChannelBg: '#ffffff',
centerChannelColor: '#333333',
+ newMessageSeparator: '#FF8800',
linkColor: '#2389d7',
buttonBg: '#2389d7',
buttonColor: '#FFFFFF'
@@ -154,12 +155,13 @@ module.exports = {
mentionColor: '#bfcde8',
centerChannelBg: '#f2f4f8',
centerChannelColor: '#333333',
+ newMessageSeparator: '#FF8800',
linkColor: '#2f81b7',
buttonBg: '#1dacfc',
buttonColor: '#FFFFFF'
},
- dark: {
- type: 'Dark',
+ mattermostDark: {
+ type: 'Mattermost Dark',
sidebarBg: '#1B2C3E',
sidebarText: '#bbbbbb',
sidebarUnreadText: '#fff',
@@ -174,9 +176,31 @@ module.exports = {
mentionColor: '#FFFFFF',
centerChannelBg: '#2F3E4E',
centerChannelColor: '#DDDDDD',
+ newMessageSeparator: '#5de5da',
linkColor: '#A4FFEB',
buttonBg: '#1dacfc',
buttonColor: '#FFFFFF'
+ },
+ windows10: {
+ type: 'Windows 10 Dark',
+ sidebarBg: '#171717',
+ sidebarText: '#eee',
+ sidebarUnreadText: '#fff',
+ sidebarTextHoverBg: '#302e30',
+ sidebarTextHoverColor: '#fff',
+ sidebarTextActiveBg: '#484748',
+ sidebarTextActiveColor: '#FFFFFF',
+ sidebarHeaderBg: '#1f1f1f',
+ sidebarHeaderTextColor: '#FFFFFF',
+ onlineIndicator: '#0177e7',
+ mentionBj: '#0177e7',
+ mentionColor: '#FFFFFF',
+ centerChannelBg: '#1F1F1F',
+ centerChannelColor: '#DDDDDD',
+ newMessageSeparator: '#CC992D',
+ linkColor: '#0177e7',
+ buttonBg: '#0177e7',
+ buttonColor: '#FFFFFF'
}
},
THEME_ELEMENTS: [
@@ -237,6 +261,10 @@ module.exports = {
uiName: 'Center Channel Text'
},
{
+ id: 'newMessageSeparator',
+ uiName: 'New message separator'
+ },
+ {
id: 'linkColor',
uiName: 'Link Color'
},
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index c330296b2..61dcae6d8 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -616,7 +616,7 @@ export function applyTheme(theme) {
}
if (theme.centerChannelColor) {
- changeCss('.app__content, .post-create__container .post-create-body .btn-file', 'color:' + theme.centerChannelColor, 1);
+ changeCss('.app__content, .post-create__container .post-create-body .btn-file, .post-create__container .post-create-footer .msg-typing, .loading-screen .loading__content .round', 'color:' + theme.centerChannelColor, 1);
changeCss('#post-create', 'color:' + theme.centerChannelColor, 2);
changeCss('.post-body hr', 'background:' + theme.centerChannelColor, 1);
changeCss('.channel-header .heading', 'color:' + theme.centerChannelColor, 1);
@@ -631,8 +631,8 @@ export function applyTheme(theme) {
changeCss('.search-bar__container .search__form .search-bar', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2) + '; color: ' + theme.centerChannelColor, 2);
changeCss('.search-bar__container .search__form', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1);
changeCss('.channel-intro .channel-intro__content', 'background:' + changeOpacity(theme.centerChannelColor, 0.05), 1);
- changeCss('.date-separator .separator__text, .new-separator .separator__text', 'color:' + theme.centerChannelColor, 2);
- changeCss('.date-separator .separator__hr, .new-separator .separator__hr, .post-right__container .post.post--root hr, .search-item-container', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1);
+ changeCss('.date-separator .separator__text', 'color:' + theme.centerChannelColor, 2);
+ changeCss('.date-separator .separator__hr, .post-right__container .post.post--root hr, .search-item-container', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1);
changeCss('.channel-intro', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1);
changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1);
changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment, .post.post--comment.other--root .post-comment, .post.same--root .post-body', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2);
@@ -646,6 +646,11 @@ export function applyTheme(theme) {
changeCss('.sidebar--right', 'color:' + theme.centerChannelColor, 2);
}
+ if (theme.newMessageSeparator) {
+ changeCss('.new-separator .separator__text', 'color:' + theme.newMessageSeparator, 1);
+ changeCss('.new-separator .separator__hr', 'border-color:' + changeOpacity(theme.newMessageSeparator, 0.5), 1);
+ }
+
if (theme.linkColor) {
changeCss('a, a:focus, a:hover', 'color:' + theme.linkColor, 1);
changeCss('.post .comment-icon__container', 'fill:' + theme.linkColor, 1);
diff --git a/web/sass-files/sass/partials/_loading.scss b/web/sass-files/sass/partials/_loading.scss
index d71055722..ab8601df6 100644
--- a/web/sass-files/sass/partials/_loading.scss
+++ b/web/sass-files/sass/partials/_loading.scss
@@ -37,4 +37,4 @@
to { opacity: 0.1; }
}
}
-}
+} \ No newline at end of file
diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss
index a1958af3b..7532875d6 100644
--- a/web/sass-files/sass/partials/_post.scss
+++ b/web/sass-files/sass/partials/_post.scss
@@ -185,7 +185,7 @@ body.ios {
.post-create__container {
form {
width: 100%;
- padding: 10px 1em 0 1em;
+ padding: 0 1em;
margin: 0;
}
.post-create-body {
@@ -257,7 +257,7 @@ body.ios {
line-height: 18px;
display: inline-block;
font-size: 13px;
- color: #777;
+ @include opacity(0.6);
}
}
}
diff --git a/web/sass-files/sass/partials/_responsive.scss b/web/sass-files/sass/partials/_responsive.scss
index e0b35d0bf..d29c653ff 100644
--- a/web/sass-files/sass/partials/_responsive.scss
+++ b/web/sass-files/sass/partials/_responsive.scss
@@ -417,7 +417,7 @@
padding: 0 1em;
}
form {
- padding: 10px 0 0 0;
+ padding: 0;
}
.post-create-body {
padding-bottom: 10px;
diff --git a/web/static/images/themes/dark.png b/web/static/images/themes/mattermost dark.png
index 832f64d2e..832f64d2e 100644
--- a/web/static/images/themes/dark.png
+++ b/web/static/images/themes/mattermost dark.png
Binary files differ
diff --git a/web/static/images/themes/windows 10 dark.png b/web/static/images/themes/windows 10 dark.png
new file mode 100644
index 000000000..d65304820
--- /dev/null
+++ b/web/static/images/themes/windows 10 dark.png
Binary files differ