add login page

This commit is contained in:
2019-01-28 16:28:44 +07:00
parent cccca5a774
commit 52856ccca0
11 changed files with 283 additions and 1 deletions

View File

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