]> cat aescling's git repositories - mastodon.git/commitdiff
Center header in account column, hide media in "muted" status components (notifications)
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 24 Nov 2016 22:09:53 +0000 (23:09 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 24 Nov 2016 22:09:53 +0000 (23:09 +0100)
app/assets/javascripts/components/components/status.jsx
app/assets/javascripts/components/features/account/components/header.jsx

index 603561ab38d94280bc9ee46b79f0549243d61108..df5f0f2c2407a9266df89fd44af71c7488d84103 100644 (file)
@@ -82,7 +82,7 @@ const Status = React.createClass({
       );
     }
 
-    if (status.get('media_attachments').size > 0) {
+    if (status.get('media_attachments').size > 0 && !this.props.muted) {
       if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
         media = <VideoPlayer media={status.getIn(['media_attachments', 0])} sensitive={status.get('sensitive')} />;
       } else {
index d39a060620f40232738c34defa62171b009849bf..b890e15c1926b31b7b00414c98c5e1bd6ea5e3ad 100644 (file)
@@ -47,7 +47,7 @@ const Header = React.createClass({
     const displayNameHTML = { __html: emojify(escapeTextContentForBrowser(displayName)) };
 
     return (
-      <div style={{ flex: '0 0 auto', background: '#2f3441', textAlign: 'center', backgroundImage: `url(${account.get('header')})`, backgroundSize: 'cover', position: 'relative' }}>
+      <div style={{ flex: '0 0 auto', background: '#2f3441', textAlign: 'center', backgroundImage: `url(${account.get('header')})`, backgroundSize: 'cover', backgroundPosition: 'center', position: 'relative' }}>
         <div style={{ background: 'rgba(47, 52, 65, 0.9)', padding: '20px 10px' }}>
           <a href={account.get('url')} target='_blank' rel='noopener' style={{ display: 'block', color: 'inherit', textDecoration: 'none' }}>
             <div style={{ width: '90px', margin: '0 auto', marginBottom: '10px' }}>