style: format project
[skip ci]
This commit is contained in:
@@ -17,6 +17,17 @@ import {LocalStorageService} from '../../services/local-storage.service';
|
||||
})
|
||||
export class AdminComponent implements OnInit {
|
||||
|
||||
user: User;
|
||||
isCollapsed: boolean = false;
|
||||
infoDrawerVisible: boolean = false;
|
||||
sayHelloContent: string;
|
||||
editInfoModalVisible: boolean = false;
|
||||
resetPwdModalVisible: boolean = false;
|
||||
editInfoFormGroup: FormGroup;
|
||||
resetPwdFormGroup: FormGroup;
|
||||
noAvatarUrl = 'https://cdn.celess.cn/'
|
||||
host: string
|
||||
|
||||
constructor(public gUserService: GlobalUserService, private apiService: ApiService, private messageService: NzMessageService,
|
||||
private router: Router, private localStorageService: LocalStorageService) {
|
||||
this.gUserService.watchUserInfo({
|
||||
@@ -45,16 +56,6 @@ export class AdminComponent implements OnInit {
|
||||
})
|
||||
}
|
||||
|
||||
user: User;
|
||||
isCollapsed: boolean = false;
|
||||
infoDrawerVisible: boolean = false;
|
||||
sayHelloContent: string;
|
||||
editInfoModalVisible: boolean = false;
|
||||
resetPwdModalVisible: boolean = false;
|
||||
editInfoFormGroup: FormGroup;
|
||||
resetPwdFormGroup: FormGroup;
|
||||
noAvatarUrl = 'https://cdn.celess.cn/'
|
||||
host: string
|
||||
showInfoDrawer = () => this.infoDrawerVisible = !this.infoDrawerVisible;
|
||||
|
||||
logout() {
|
||||
@@ -76,23 +77,6 @@ export class AdminComponent implements OnInit {
|
||||
return {Authorization: this.localStorageService.getToken()}
|
||||
};
|
||||
|
||||
private initHelloWords() {
|
||||
const hours = new Date().getHours();
|
||||
if (hours < 6) {
|
||||
this.sayHelloContent = `夜深了,注意早点休息哦!${this.user.displayName}`
|
||||
} else if (hours < 10) {
|
||||
this.sayHelloContent = `早上好呀!${this.user.displayName}`
|
||||
} else if (hours < 14) {
|
||||
this.sayHelloContent = `中午好呀!${this.user.displayName}`
|
||||
} else if (hours < 19) {
|
||||
this.sayHelloContent = `下午好呀!${this.user.displayName}`
|
||||
} else if (hours < 22) {
|
||||
this.sayHelloContent = `晚上好呀!${this.user.displayName}`
|
||||
} else {
|
||||
this.sayHelloContent = `时间不早了,注意休息哦!${this.user.displayName}`
|
||||
}
|
||||
}
|
||||
|
||||
showEditInfoModal() {
|
||||
this.editInfoModalVisible = true;
|
||||
this.infoDrawerVisible = false;
|
||||
@@ -142,4 +126,21 @@ export class AdminComponent implements OnInit {
|
||||
this.gUserService.refreshUserInfo();
|
||||
}
|
||||
}
|
||||
|
||||
private initHelloWords() {
|
||||
const hours = new Date().getHours();
|
||||
if (hours < 6) {
|
||||
this.sayHelloContent = `夜深了,注意早点休息哦!${this.user.displayName}`
|
||||
} else if (hours < 10) {
|
||||
this.sayHelloContent = `早上好呀!${this.user.displayName}`
|
||||
} else if (hours < 14) {
|
||||
this.sayHelloContent = `中午好呀!${this.user.displayName}`
|
||||
} else if (hours < 19) {
|
||||
this.sayHelloContent = `下午好呀!${this.user.displayName}`
|
||||
} else if (hours < 22) {
|
||||
this.sayHelloContent = `晚上好呀!${this.user.displayName}`
|
||||
} else {
|
||||
this.sayHelloContent = `时间不早了,注意休息哦!${this.user.displayName}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user