* Update title for tabs not including challenges, guild and team * add section titles to challenges, guilds, and groups * Update dynamic title to use vuex action * Remove duplicate key * Actually remove duplicate key * Fix section sub section in group * Add note to implement setTitle when adding a page * Add missing sections to dynamic title * Features string not translated * Use onGroupUpdate to update group titles * Add watcher to challenges for dynamic title updates * Small fixes * Add register and login to title, remove duplicate keys * Add home page dynamic title functionality * Minor name changes * remove wrong i18n strings from front.js * refactor router note Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
This commit is contained in:
@@ -745,6 +745,7 @@ export default {
|
||||
watch: {
|
||||
$route: {
|
||||
handler () {
|
||||
this.setTitle();
|
||||
if (this.resetPasswordSetNewOne) {
|
||||
const { query } = this.$route;
|
||||
const { code } = query;
|
||||
@@ -760,7 +761,6 @@ export default {
|
||||
this.$router.push({ name: 'login' });
|
||||
return;
|
||||
}
|
||||
|
||||
this.resetPasswordSetNewOneData.code = query.code;
|
||||
this.resetPasswordSetNewOneData.hasError = hasError;
|
||||
}
|
||||
@@ -898,6 +898,18 @@ export default {
|
||||
window.location.href = redirectTo;
|
||||
}
|
||||
},
|
||||
setTitle () {
|
||||
if (this.resetPasswordSetNewOne) {
|
||||
return;
|
||||
}
|
||||
let title = 'login';
|
||||
if (this.registering) {
|
||||
title = 'register';
|
||||
}
|
||||
this.$store.dispatch('common:setTitle', {
|
||||
section: this.$t(title),
|
||||
});
|
||||
},
|
||||
handleSubmit () {
|
||||
if (this.registering) {
|
||||
this.register();
|
||||
|
||||
Reference in New Issue
Block a user