Revert welcome message

This commit is contained in:
Sytone 2021-06-02 11:47:33 -07:00
parent d363cfc972
commit 9f9c942c73
1 changed files with 1 additions and 25 deletions

View File

@ -1,8 +1,7 @@
<template>
<div class="content has-text-centered">
<h2>
{{ welcomePrefix }}
{{ userInfo.name !== "" ? userInfo.name : userInfo.username }}!
Hi {{ userInfo.name !== '' ? userInfo.name : userInfo.username }}!
</h2>
<add-task
:list="defaultList"
@ -52,8 +51,6 @@ export default {
currentDate: new Date(),
tasks: [],
defaultList: ListModel,
updateWelcomeInterval: 1000,
welcomePrefix: 'Hi',
showTasksKey: 0,
};
},
@ -61,13 +58,6 @@ export default {
this.defaultList = new ListModel();
this.defaultList.id = 1;
},
mounted() {
const timer = window.setTimeout(
this.updateWelcome,
this.updateWelcomeInterval,
);
this.$on('hook:destroyed', () => window.clearTimeout(timer));
},
computed: mapState({
migratorsEnabled: state =>
state.config.availableMigrators !== null &&
@ -94,20 +84,6 @@ export default {
updateTaskList() {
this.showTasksKey += 1;
},
updateWelcome() {
this.currentDate = new Date();
if (this.currentDate.getHours() < 12) {
this.welcomePrefix = 'Good Morning';
} else if (this.currentDate.getHours() < 17) {
this.welcomePrefix = 'Good Afternoon';
} else {
this.welcomePrefix = 'Good Evening';
}
this.$options.timer = window.setTimeout(
this.updateDateTime,
this.updateWelcomeInterval,
);
},
},
};
</script>