forked from vikunja/frontend
Revert welcome message
This commit is contained in:
parent
d363cfc972
commit
9f9c942c73
|
@ -1,8 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="content has-text-centered">
|
<div class="content has-text-centered">
|
||||||
<h2>
|
<h2>
|
||||||
{{ welcomePrefix }}
|
Hi {{ userInfo.name !== '' ? userInfo.name : userInfo.username }}!
|
||||||
{{ userInfo.name !== "" ? userInfo.name : userInfo.username }}!
|
|
||||||
</h2>
|
</h2>
|
||||||
<add-task
|
<add-task
|
||||||
:list="defaultList"
|
:list="defaultList"
|
||||||
|
@ -52,8 +51,6 @@ export default {
|
||||||
currentDate: new Date(),
|
currentDate: new Date(),
|
||||||
tasks: [],
|
tasks: [],
|
||||||
defaultList: ListModel,
|
defaultList: ListModel,
|
||||||
updateWelcomeInterval: 1000,
|
|
||||||
welcomePrefix: 'Hi',
|
|
||||||
showTasksKey: 0,
|
showTasksKey: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -61,13 +58,6 @@ export default {
|
||||||
this.defaultList = new ListModel();
|
this.defaultList = new ListModel();
|
||||||
this.defaultList.id = 1;
|
this.defaultList.id = 1;
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
const timer = window.setTimeout(
|
|
||||||
this.updateWelcome,
|
|
||||||
this.updateWelcomeInterval,
|
|
||||||
);
|
|
||||||
this.$on('hook:destroyed', () => window.clearTimeout(timer));
|
|
||||||
},
|
|
||||||
computed: mapState({
|
computed: mapState({
|
||||||
migratorsEnabled: state =>
|
migratorsEnabled: state =>
|
||||||
state.config.availableMigrators !== null &&
|
state.config.availableMigrators !== null &&
|
||||||
|
@ -94,20 +84,6 @@ export default {
|
||||||
updateTaskList() {
|
updateTaskList() {
|
||||||
this.showTasksKey += 1;
|
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>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user