diff --git a/app/components/topbar-account-panel/component.js b/app/components/topbar-account-panel/component.js index 2a5c942..65185e7 100644 --- a/app/components/topbar-account-panel/component.js +++ b/app/components/topbar-account-panel/component.js @@ -6,5 +6,14 @@ export default Component.extend({ tagName: '', kredits: service(), + router: service(), + + actions: { + + signup() { + this.router.transitionTo('signup'); + } + + } }); diff --git a/app/components/topbar-account-panel/template.hbs b/app/components/topbar-account-panel/template.hbs index 080621a..0731a4c 100644 --- a/app/components/topbar-account-panel/template.hbs +++ b/app/components/topbar-account-panel/template.hbs @@ -6,5 +6,6 @@ {{/if}} {{else}} Anonymous + {{/if}} \ No newline at end of file diff --git a/app/styles/app.scss b/app/styles/app.scss index 5db3cf8..ce49075 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -106,4 +106,5 @@ section { @import "components/loading-spinner"; @import "components/proposal-list"; @import "components/topbar"; +@import "components/topbar-account-panel"; @import "components/user-avatar"; diff --git a/app/styles/components/_topbar-account-panel.scss b/app/styles/components/_topbar-account-panel.scss new file mode 100644 index 0000000..900eb04 --- /dev/null +++ b/app/styles/components/_topbar-account-panel.scss @@ -0,0 +1,7 @@ +header#topbar section#user-account { + + button { + margin-left: 1.2rem; + } + +} diff --git a/tests/integration/components/topbar-account-panel/component-test.js b/tests/integration/components/topbar-account-panel/component-test.js index b6054ab..f194f73 100644 --- a/tests/integration/components/topbar-account-panel/component-test.js +++ b/tests/integration/components/topbar-account-panel/component-test.js @@ -9,7 +9,7 @@ module('Integration | Component | topbar-account-panel', function(hooks) { test('unknown user without wallet (or no permission to get wallet/account info)', async function(assert) { await render(hbs``); - assert.equal(this.element.textContent.trim(), 'Anonymous'); + assert.ok(this.element.textContent.trim().match(/^Anonymous/)); }); test('unknown user with Ethereum wallet', async function(assert) { @@ -17,7 +17,7 @@ module('Integration | Component | topbar-account-panel', function(hooks) { service.set('currentUserAccounts', [{ foo: 'bar' }]); await render(hbs``); - assert.equal(this.element.textContent.trim(), 'Anonymous'); + assert.ok(this.element.textContent.trim().match(/^Anonymous/)); }); test('known contributor', async function(assert) {