mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
added loader
This commit is contained in:
parent
f7e8da1f1f
commit
b35a063cd7
3 changed files with 28 additions and 6 deletions
|
@ -31,7 +31,17 @@ export class App extends React.Component {
|
|||
|
||||
mapInit = () => {
|
||||
const path = getPath();
|
||||
if (path) getStoredMap({ name: path, callback: this.editor.setData });
|
||||
if (path) getStoredMap({ name: path, callback: this.setDataOnLoad });
|
||||
};
|
||||
|
||||
setDataOnLoad = data => {
|
||||
this.editor.setData(data);
|
||||
this.hideLoader();
|
||||
};
|
||||
|
||||
hideLoader = () => {
|
||||
document.getElementById('loader').style.opacity = 0;
|
||||
document.getElementById('loader').style.pointerEvents = 'none';
|
||||
};
|
||||
|
||||
setMode = mode => {
|
||||
|
@ -101,9 +111,7 @@ export class App extends React.Component {
|
|||
storeData('user', this.state.user);
|
||||
};
|
||||
|
||||
getUserData = () => {
|
||||
return getData('user') || null;
|
||||
};
|
||||
getUserData = () => getData('user') || null;
|
||||
|
||||
userLogout = () => {
|
||||
this.setState({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue