From 141702748572a977133ae60ea8b39ce76342d7ce Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 5 Sep 2016 17:34:11 -0700 Subject: webkit support: get the js and css working in older webkit engines --- src/leap/bitmask_js/app/models/dummy_account.js | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/leap/bitmask_js/app/models/dummy_account.js (limited to 'src/leap/bitmask_js/app/models/dummy_account.js') diff --git a/src/leap/bitmask_js/app/models/dummy_account.js b/src/leap/bitmask_js/app/models/dummy_account.js new file mode 100644 index 00000000..bf0391be --- /dev/null +++ b/src/leap/bitmask_js/app/models/dummy_account.js @@ -0,0 +1,33 @@ +// +// A proxy of an account, but with a different ID. For testing. +// + +import bitmask from 'lib/bitmask' + +export default class DummyAccount { + + constructor(account) { + this.account = account + } + + get id() { + return 'dummy--' + this.account.address + } + + get domain() {return this.account.domain} + get address() {return this.account.address} + get userpart() {return this.account.userpart} + get authenticated() {return this.account.authenticated} + get hasEmail() {return this.account.hasEmail} + login(password) {return this.account.login(password)} + + logout() { + return bitmask.user.logout(this.address).then( + response => { + this._authenticated = false + this._address = '@' + this.domain + return this + } + ) + } +} -- cgit v1.2.3