From 731737467a1325d75a84ca10e38c2a0ddd00a258 Mon Sep 17 00:00:00 2001 From: kosgrz <45372453+kosgrz@users.noreply.github.com> Date: Thu, 30 May 2019 01:29:03 +0200 Subject: [PATCH] add profile image to plugin posts (#7) * add profile image to plugin posts * fix S4B icon in webapp according to brand guidelines * changed the icon in the channel header to a more generic video icon --- Makefile | 6 +++ assets/profile.png | Bin 0 -> 2406 bytes server/plugin.go | 35 ++++++++++++++++-- server/plugin_test.go | 13 +++++++ webapp/src/components/icon.jsx | 4 +- .../post_type_s4b/post_type_s4b.jsx | 6 --- webapp/src/constants/svgs.js | 6 +-- 7 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 assets/profile.png diff --git a/Makefile b/Makefile index 8ffb8da53..c2991552e 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ HTTP ?= $(shell command -v http 2> /dev/null) CURL ?= $(shell command -v curl 2> /dev/null) MANIFEST_FILE ?= plugin.json +# You can include assets this directory into the bundle. This can be e.g. used to include profile pictures. +ASSETS_DIR ?= assets + # Verify environment, and define PLUGIN_ID, PLUGIN_VERSION, HAS_SERVER and HAS_WEBAPP as needed. include build/setup.mk @@ -90,6 +93,9 @@ bundle: rm -rf dist/ mkdir -p dist/$(PLUGIN_ID) cp $(MANIFEST_FILE) dist/$(PLUGIN_ID)/ +ifneq ($(wildcard $(ASSETS_DIR)/.),) + cp -r $(ASSETS_DIR) dist/$(PLUGIN_ID)/ +endif ifneq ($(HAS_SERVER),) mkdir -p dist/$(PLUGIN_ID)/server/dist; cp -r server/dist/* dist/$(PLUGIN_ID)/server/dist/; diff --git a/assets/profile.png b/assets/profile.png new file mode 100644 index 0000000000000000000000000000000000000000..9798bdd2b6b8250201859373a02077a9bc53d349 GIT binary patch literal 2406 zcmV-s37PhZP)002b@1^@s60z?~{00004b3#c}2nYxW zd$k`j%EXZynZtUkbN z7d1i#e>2V@@uMkrzCYQ{KuD+2AI7Wd_(C8N5jVpsk!_R6vrCCQUQ#hFmRHm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KC=^)of$U=+z* z{c6Uw7?!py!+Z~DvP&k{L`(TYUzi8q^RuQlcKT6dA~J4mjNbZ*hT*%EXNrrpGT%z` zSJL?Cwp3b|rLk>}6Em^m`EzQ_qT9?u#B(31!VAZS#S%>hC%a^}m%IKStt8<7A{#r( zU8d^5mO%8$=riF=y_!x{n^@PvuvimaGG7pA$1d_%u36@+8fWE^VzC7byA0D}w3nM= z2pNk#Et=5vLX-WQ1;&bE04*H-1vXB1utFegKU!=jJBH6YWO7~eM7LP6DJ0gt1y$jbfM-51 z7D;|R)4{_x#-4J`0i7L9D%D*f+Wx0*p-W~?y23XKY>acn_HbW6-p|Vy#ir9>e0QYd zGH3w8VzsL}ld5{~8TcqJ1rAlDm`*$5@uyETzWuIv_CA=7Woa>|_+W$+lpLGHBgN6D z#bEkFu>4;>;r_i5b~bCQKAD(M04{+V(Nv#f{WLqX4OaYZs!rwGeLQwLKwlCz)BI64e2^~jy@ne+--!s<yHSbE#OYpK9mH>Bd|NB;oAN`uaf3CHB!w&0?|Olkm}mjnf_6UuZm89WBgB zSA?TtLyhWwbW8up;4AJtv2q(Hj zeCOSM>U&4$#`$y$99x_kvoMcF(vMS>Whk7iOl4iMogqGVB#aDfFL#>~3WmV42Giu% z+0+o=rAF~aTe4ArEwi0GFwuN48d9;Y&>YbDL!-*}CUr!nXQox+uXA18l9SkK_OOUG znD;M-dHs?`jW@ChBwn&<5<8kSo@og19|5bZ$X0lAx|53R zjBLcscgU2a%2Z@qxHI2s+KI>Fx)N)oxgP%)#fUK`mH=a72{0y>0ApeaFea7&V`2&L YUxtB%9uIa ); } @@ -25,7 +25,7 @@ const getStyle = makeStyleFromTheme(() => { return { iconStyle: { position: 'relative', - top: '4px', + top: '-1px', }, }; }); diff --git a/webapp/src/components/post_type_s4b/post_type_s4b.jsx b/webapp/src/components/post_type_s4b/post_type_s4b.jsx index 2975cf960..4cb008599 100644 --- a/webapp/src/components/post_type_s4b/post_type_s4b.jsx +++ b/webapp/src/components/post_type_s4b/post_type_s4b.jsx @@ -6,8 +6,6 @@ import PropTypes from 'prop-types'; import {makeStyleFromTheme} from 'mattermost-redux/utils/theme_utils'; -import {Svgs} from '../../constants'; - export default class PostTypeS4b extends React.PureComponent { static propTypes = { @@ -40,10 +38,6 @@ export default class PostTypeS4b extends React.PureComponent { target='_blank' href={props.meeting_link} > - {'JOIN MEETING'} ); diff --git a/webapp/src/constants/svgs.js b/webapp/src/constants/svgs.js index e4031289b..ad6b126e7 100644 --- a/webapp/src/constants/svgs.js +++ b/webapp/src/constants/svgs.js @@ -1,7 +1,3 @@ -// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. -// See License for license information. - export default { - SKYPE: " ", - SKYPE_2: " ", + VIDEO_CAMERA: " ", };