mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-06 08:08:10 +08:00
fix(packages): Default icon for third-party packages
This commit is contained in:
parent
b4690783ac
commit
806edd7215
2 changed files with 8 additions and 4 deletions
|
@ -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>
|
||||
|
|
BIN
static/images/preferences/plugin-icon-default@2x.png
Normal file
BIN
static/images/preferences/plugin-icon-default@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 63 KiB |
Loading…
Reference in a new issue