IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Browse Source

Better sign out.

pull/1/head
parent
commit
d682eea9ac
2 changed files with 7 additions and 4 deletions
  1. +1
    -1
      frontend/src/js/page/wb-app.js
  2. +6
    -3
      frontend/src/js/page/wb-sign-out.js

+ 1
- 1
frontend/src/js/page/wb-app.js View File

@@ -48,7 +48,7 @@ class WBApp extends Component {
<WBSignIn path="/sign-in" appState={ this.state } />
<WBSignOut path='/sign-out' />
<WBSignOut path='/sign-out' app={ this } />
<WBBrowse path="/browse/:ownerUuid?/:activePage?/:objTypeTab?/:collectionPage?/:processPage?/:workflowPage?"
appState={ this.state }


+ 6
- 3
frontend/src/js/page/wb-sign-out.js View File

@@ -3,9 +3,12 @@ import { route } from 'preact-router';
class WBSignOut extends Component {
componentDidMount() {
delete window.localStorage['arvHost'];
delete window.localStorage['arvToken'];
delete window.localStorage['currentUser'];
const { app } = this.props;
const keys = ['arvHost', 'arvToken', 'currentUser'];
for (let i = 0; i < keys.length; i++) {
delete app.state[keys[i]];
delete window.localStorage[keys[i]];
}
route('/sign-in');
}


Loading…
Cancel
Save