add login page
This commit is contained in:
@@ -149,4 +149,29 @@ export default class GlobalUI {
|
||||
this.globalAlert = '';
|
||||
this[DIALOG.UI.ALERT] = false;
|
||||
}
|
||||
|
||||
@observable successAlertCB = ()=>{
|
||||
this.closeAlert();
|
||||
};
|
||||
|
||||
@action
|
||||
openAlert({title=false,subtitle=false,cb=false,type='error'}){
|
||||
if(typeof cb === 'function'){
|
||||
this.successAlertCB = cb;
|
||||
}
|
||||
this.alertDialog= {
|
||||
title : title,
|
||||
open : true,
|
||||
subtitle : subtitle,
|
||||
type : type
|
||||
}
|
||||
};
|
||||
|
||||
@action
|
||||
closeAlert(){
|
||||
this.alertDialog.title = false;
|
||||
this.alertDialog.open = false;
|
||||
this.alertDialog.subtitle = false;
|
||||
this.successAlertCB = ()=>this.closeAlert();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user