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!
Procházet zdrojové kódy

Better sign out.

pull/1/head
Stanislaw Adaszewski před 4 roky
rodič
revize
d682eea9ac
2 změnil soubory, kde provedl 7 přidání a 4 odebrání
  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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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');
}


Načítá se…
Zrušit
Uložit