fix(packages): Default icon for third-party packages

This commit is contained in:
Ben Gotow 2016-01-12 12:03:42 -08:00
parent b4690783ac
commit 806edd7215
2 changed files with 8 additions and 4 deletions

View file

@ -1,6 +1,6 @@
React = require 'react'
_ = require 'underscore'
{Flexbox} = require 'nylas-component-kit'
{Flexbox, RetinaImg} = require 'nylas-component-kit'
PluginsActions = require './plugins-actions'
class Package extends React.Component
@ -15,6 +15,12 @@ class Package extends React.Component
actions = []
extras = []
if @props.package.icon
icon = <img src="nylas://#{@props.package.name}/#{@props.package.icon}" style={width:50} />
else
icon = <RetinaImg name="plugin-icon-default.png"/>
if @props.package.installed
if @props.package.category in ['user' ,'dev', 'example']
if @props.package.enabled
@ -42,9 +48,7 @@ class Package extends React.Component
)
<Flexbox className="package" direction="row">
<div className="icon" style={flexShink: 0}>
<img src="nylas://#{@props.package.name}/#{@props.package.icon}" style={width:50} />
</div>
<div className="icon" style={flexShink: 0}>{icon}</div>
<div className="info">
<div className="title">{title ? name}</div>
<div className="description">{description}</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB