Make sure welcome back only shows once and improve margins
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b200b1c2b2
commit
cad508a9bb
|
@ -99,13 +99,20 @@ $mdi-font-path: "~@mdi/font/fonts";
|
|||
body {
|
||||
// background: #f7f8fa;
|
||||
background: #ebebeb;
|
||||
|
||||
main {
|
||||
margin: 1rem auto;
|
||||
}
|
||||
}
|
||||
|
||||
#mobilizon > .container > .message .message-header {
|
||||
#mobilizon > .container > .message {
|
||||
margin: 1rem auto auto;
|
||||
.message-header {
|
||||
button.delete {
|
||||
background: #4a4a4a;
|
||||
}
|
||||
|
||||
color: #111;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
</section>
|
||||
<div class="container" v-if="config">
|
||||
<section v-if="currentActor.id">
|
||||
<section v-if="currentActor.id && welcomeBack">
|
||||
<b-message type="is-info">
|
||||
{{ $t('Welcome back {username}', { username: currentActor.displayName() }) }}
|
||||
</b-message>
|
||||
|
@ -183,6 +183,14 @@ export default class Home extends Vue {
|
|||
return this.config.name;
|
||||
}
|
||||
|
||||
get welcomeBack() {
|
||||
return window.localStorage.getItem('welcome-back') === 'yes';
|
||||
}
|
||||
|
||||
mounted() {
|
||||
window.localStorage.removeItem('welcome-back');
|
||||
}
|
||||
|
||||
isToday(date: Date) {
|
||||
return (new Date(date)).toDateString() === (new Date()).toDateString();
|
||||
}
|
||||
|
|
|
@ -169,6 +169,7 @@ export default class Login extends Vue {
|
|||
if (this.redirect) {
|
||||
await this.$router.push(this.redirect);
|
||||
} else {
|
||||
window.localStorage.setItem('welcome-back', 'yes');
|
||||
await this.$router.push({ name: RouteName.HOME });
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
Loading…
Reference in a new issue