hoodie-accountbar

0.4.0 • Public • Published
Build Status Coverage Status Dependency Status devDependency Status

hoodie-accountbar

A Polymer element providing an accountbar to manage user account actions in Hoodie.

This element is still a work in progress. Code for all of the functionality is present, but not all of it is working correctly yet, as is described in the open issues on GitHub.

Online docs & demo are at http://timblack1.github.io/hoodie-accountbar/.

Installation

$ bower install --save hoodie-accountbar

Usage

Import hoodie-accountbar into the <head> of your Polymer element or elements.html file:

    <head>
      <link rel="import" href="../../hoodie-accountbar/hoodie-accountbar.html">
    </head>

Place the element where you would like it to appear in the context of your app:

    <hoodie-accountbar></hoodie-accountbar>

Use Hoodie in your code:

    <script>
    (function() {
      Polymer({
        attached:function(){
          this.async(function(){
            this.hoodie = document.querySelector('hoodie-accountbar').hoodie;
            var thiz = this;
            // Get selected_colors from a user preference
            this.hoodie.store.find('preferences', 'selected-colors')
            .then(function(selected_colors){
              thiz.selected_colors = selected_colors.colors;
            });
          });
        }
      });
    });
    </script> 

Development

Run the following commands to set up a development environment to improve hoodie-accountbar:

$ npm install -g polyserve && npm install && bower install
$ npm start

Navigate to http://localhost:3000/components/hoodie-accountbar/ to see the component's docs and demo.

Integration tests

You can run the integration tests in one of two ways:

  1. From the command line: Run npm test.

  2. In your browser: Run npm start and navigate to http://localhost:8080/components/hoodie-accountbar/test/index.html.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.4.0
    1
    • latest

Version History

Package Sidebar

Install

npm i hoodie-accountbar

Weekly Downloads

1

Version

0.4.0

License

BSD-3-Clause-Clear

Last publish

Collaborators

  • timblack1