Skip to content

Commit

Permalink
add stub for account panel
Browse files Browse the repository at this point in the history
  • Loading branch information
eapearson committed Mar 2, 2017
1 parent cff6d25 commit 04ef4a2
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 4 deletions.
17 changes: 16 additions & 1 deletion src/plugin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ install:
module: test
id: auth2Test
type: factory
-
module: account
id: auth2Account
type: factory
routes:
-
path: ['auth2', 'info']
Expand All @@ -48,6 +52,10 @@ install:
nextrequest: {}
in-process-login-token: {}
test: {}
-
path: ['auth2', 'account']
widget: auth2Account
authorization: true
menu:
-
name: auth2info
Expand All @@ -62,4 +70,11 @@ install:
definition:
path: ['auth2', 'login']
label: Auth2 Login
icon: flask
icon: flask
-
name: auth2account
menus: ['authenticated', 'unathenticated']
definition:
path: ['auth2', 'account']
label: Auth2 Account
icon: user-circle-o
45 changes: 45 additions & 0 deletions src/plugin/modules/account.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
define([

], function () {

function factory(config) {
var hostNode, container,
runtime = config.runtime;

function attach(node) {
return Promise.try(function () {
hostNode = node;
container = hostNode.appendChild(document.createElement('div'));
});
}
function start(params) {
return Promise.try(function () {
container.innerHTML = 'this will be the account manager';
});
}
function stop() {
return Promise.try(function () {
});
}
function detach() {
return Promise.try(function () {
if (hostNode && container) {
hostNode.removeChild(container);
}
});
}

return Object.freeze({
attach: attach,
start: start,
stop: stop,
detach: detach
});
}

return {
make: function (config) {
return factory(config);
}
}
});
6 changes: 3 additions & 3 deletions src/plugin/modules/loginContinue.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ define([
div(
h1({
dataElement: 'main-title'
}, 'KBase Login - further action required')
}, 'KBase Login')
),
div({
dataElement: 'introduction'
Expand Down Expand Up @@ -522,10 +522,10 @@ define([
// just log them in, but we should never see this case.
intro = div([
p([
'This ' + b(choice.provider) + ' identity account is associated with a KBase account.'
'This ' + b(choice.provider) + ' account is associated with a KBase account.'
]),
p([
'Click the login button for the associated account to continue using KBase as that user.'
'Click the login button to continue using KBase with the indicated account.'
])
]);
ui.setContent('main-title', 'KBase Login - Ready')
Expand Down

0 comments on commit 04ef4a2

Please sign in to comment.