Add an icon to show account info

part of #19
This commit is contained in:
Girish Ramakrishnan
2016-09-07 02:34:17 -07:00
parent 1a0f3f687a
commit dd91de8cf6
2 changed files with 12 additions and 7 deletions

View File

@@ -284,7 +284,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.reset();
$scope.appAccounts.app = app;
$scope.appAccounts.info = app.manifest.description;
$scope.appAccounts.info = app.manifest.description.match(/### Accounts([\s\S]*?)###/m)[1];
$('#appAccountsModal').modal('show');
@@ -481,6 +481,10 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
window.history.back();
};
$scope.hasAccountInfo = function (app) {
return app.manifest && app.manifest.description.match(/### Accounts/) !== null;
};
function fetchUsers() {
Client.getUsers(function (error, users) {
if (error) {