0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 13:42:38 +00:00

Add HB icon for Mongo brews

This commit is contained in:
G.Ambatte
2023-08-07 22:03:49 +12:00
parent cca882869d
commit d28e85209e
2 changed files with 14 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ const moment = require('moment');
const request = require('../../../../utils/request-middleware.js');
const googleDriveIcon = require('../../../../googleDrive.svg');
const homebreweryIcon = require('../../../../thumbnail.png');
const dedent = require('dedent-tabs').default;
const BrewItem = createClass({
@@ -90,10 +91,12 @@ const BrewItem = createClass({
</a>;
},
renderGoogleDriveIcon : function(){
if(!this.props.brew.googleId) return;
renderStorageIcon : function(){
if(!this.props.brew.googleId) return <span title='Internal Homebrewery Database'>
<img className='homebreweryIcon' src={homebreweryIcon} alt='homebreweryIcon' />
</span>;
return <span>
return <span title='Google Drive Storage'>
<a href={this.props.brew.webViewLink} target='_blank'>
<img className='googleDriveIcon' src={googleDriveIcon} alt='googleDriveIcon' />
</a>
@@ -146,7 +149,7 @@ const BrewItem = createClass({
Last updated: ${moment(brew.updatedAt).local().format(dateFormatString)}`}>
<i className='fas fa-sync-alt' /> {moment(brew.updatedAt).fromNow()}
</span>
{this.renderGoogleDriveIcon()}
{this.renderStorageIcon()}
</div>
<div className='links'>

View File

@@ -98,4 +98,11 @@
padding : 0px;
margin : -5px;
}
.homebreweryIcon {
mix-blend-mode : darken;
height : 24px;
position : relative;
top : 5px;
left : -5px;
}
}