Commit graph

5 commits

Author SHA1 Message Date
Kosta Korenkov
f41be9f4e5 Allow addons to use custom template for proposal row on home screen. 2015-09-04 09:14:49 +03:00
Kosta Korenkov
6e37cb3017 Allow addons to customize pending proposals 2015-08-06 15:30:57 +03:00
Kosta Korenkov
56e91029da Make addonManager to be service
..so it would be possible to use other services/factories/values when registering addon
2015-08-06 15:30:57 +03:00
Kosta Korenkov
823dc6f1a7 Store the whole addon spec in addonManager 2015-08-06 15:30:57 +03:00
Kosta Korenkov
e6785335a9 Addon support
Addons are simple Angular modules with views, controllers, services etc. Addons can register
themselves in Copay using pluginManagerProvider. It allows them to add extra items to the bottom
menu and as well as extra tab-views:

````
  addonManagerProvider.registerAddon({
    menuItem: {
      'title': 'Assets',
      'icon': 'icon-pricetag',
      'link': 'assets'
    },
    view: {
      id: 'assets',
      'class': 'assets',
      template: 'colored-coins/views/assets.html'
    }
  });
````

Addons can consume core Copay services and listen for events to react on changes. For this very
first addon system inplementation Copay emits additional BalanceUpdated event so that interested
addons can react on new transactions (see plugin reference implementation below).

As bottom menu can accomodate only 6 items without sacrificing usability, so it was reworked to
have second layer of items. Now If menu has more than 6 items, toggle button will be added to
the menu allowing to reveal extra items in a sliding panel. Bottom menu in this case will show
only 5 items, the rest will be rendered on sliding panel.

This changes addresses issue #2949 and reference implementation of addon could be found here:
https://github.com/troggy/copay-colored-coins-plugin
2015-07-10 14:31:17 +03:00