That's it!Įxtending the Mailspring mail client is really that simple. You should see a horizontal bar that changes color based on the domain of the contact's email address. Go back to Mailspring, and try opening a message. Hue = (domain.split( '').reduce(((sum, char) -> sum char. Replace the existing render method with the code to the right, then save the file. Now let's add something - a bar that changes color based on the active contact in the sidebar. Delete the content of the render method and save - the text should disappear. Try opening a message in Mailspring - you'll see the new package's example text show up on the sidebar. lib/my-message-sidebar.cjs componentWillUnmount: => See your changes happen live when you save! Replace the code here to change what shows up in the sidebar. Scroll down to line 34, the render method. It only shows the name of the selected contact, but with a few quick changes we can build something more interesting. Your new plugin is pre-filled with a simple example component for the message sidebar (on the right when you're viewing an email). Open the file /lib/my-message-sidebar.cjsx in your favorite text editor. This creates a directory in ~/.nylas/dev/packages containing your new plugin (on MacOS it can be found in ~/Library/Application\ Support/Mailspring-dev/dev/packages/). from the Developer menu, and name your new plugin. Developer Mode turns on better exception logging and enables hot-reloading. Go to the Developer menu and select Run with debug flags. Open it and sign in to your email account.įirst, switch over to Developer Mode. Install Mailspringĭownload and install Nylas for Mac OS X (or Linux). You can create your own packages in a matter of minutes! 1. The thread list, message composer and other core parts are just packages bundled with the app. Build an Mailspring plugin Extend your mail client in five minutes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |