README
User widget
Install
<link rel="stylesheet" href="./user-widget.css">
<script type="text/javascript" src="./user-widget.min.js"></script>
You can use it as a regular script or use npm install
Use
userWidget.init(documentNode, options);
Options
accountUrl
: the account url, default "https://accounts.platform.sh"source
: the name of the app the user widget is used currently, default: "account"getQueryString
: a function that return the queryString you want to pass to the context api call, default: path => pathshowProjectsMenu
: do the user widget show the current user projects menu, default: trueincludeBilling
: do the user widget show the billing link, default: trueincludeSupport
: do the user widget show the support link, default: trueactivateTalkus
: activate talkus, default: falsecustomAccountMenuItems
: array of {label: "label", value: "link"} objects. It will be added at the begining of the menu, default: []
Dev
The dev environment contains an html page to test the user widget.
To run it:
npm install
npm start