Hide groups and multiple fixes
Closes #169 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
<div class="control">
|
||||
<router-link
|
||||
class="button is-text"
|
||||
:to="{ name: 'SendPasswordReset', params: { email: credentials.email }}"
|
||||
:to="{ name: RouteName.SEND_PASSWORD_RESET, params: { email: credentials.email }}"
|
||||
>
|
||||
{{ $t('Forgot your password ?') }}
|
||||
</router-link>
|
||||
@@ -45,7 +45,7 @@
|
||||
<div class="control" v-if="config && config.registrationsOpen">
|
||||
<router-link
|
||||
class="button is-text"
|
||||
:to="{ name: 'Register', params: { default_email: credentials.email, default_password: credentials.password }}"
|
||||
:to="{ name: RouteName.REGISTER, params: { default_email: credentials.email, default_password: credentials.password }}"
|
||||
>
|
||||
{{ $t('Register') }}
|
||||
</router-link>
|
||||
@@ -95,6 +95,8 @@ export default class Login extends Vue {
|
||||
config!: IConfig;
|
||||
currentUser!: ICurrentUser;
|
||||
|
||||
RouteName = RouteName;
|
||||
|
||||
credentials = {
|
||||
email: '',
|
||||
password: '',
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<section class="container">
|
||||
<nav class="breadcrumb" aria-label="breadcrumbs">
|
||||
<ul>
|
||||
<li><router-link :to="{ name: MyAccountRouteName.UPDATE_IDENTITY }">{{ $t('My account') }}</router-link></li>
|
||||
<li class="is-active"><router-link :to="{ name: UserRouteName.PASSWORD_CHANGE }" aria-current="page">{{ $t('Password change') }}</router-link></li>
|
||||
<li><router-link :to="{ name: RouteName.UPDATE_IDENTITY }">{{ $t('My account') }}</router-link></li>
|
||||
<li class="is-active"><router-link :to="{ name: RouteName.PASSWORD_CHANGE }" aria-current="page">{{ $t('Password change') }}</router-link></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h1 class="title">{{ $t('Password') }}</h1>
|
||||
@@ -48,8 +48,7 @@
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { CHANGE_PASSWORD } from '@/graphql/user';
|
||||
import { UserRouteName } from '@/router/user';
|
||||
import { MyAccountRouteName } from '@/router/actor';
|
||||
import { RouteName } from '@/router';
|
||||
|
||||
@Component
|
||||
export default class PasswordChange extends Vue {
|
||||
@@ -57,8 +56,7 @@ export default class PasswordChange extends Vue {
|
||||
newPassword: string = '';
|
||||
errors: string[] = [];
|
||||
|
||||
MyAccountRouteName = MyAccountRouteName;
|
||||
UserRouteName = UserRouteName;
|
||||
RouteName = RouteName;
|
||||
|
||||
async resetAction(e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<div class="control">
|
||||
<router-link
|
||||
class="button is-text"
|
||||
:to="{ name: 'ResendConfirmation', params: { email: credentials.email }}"
|
||||
:to="{ name: RouteName.RESEND_CONFIRMATION, params: { email: credentials.email }}"
|
||||
>
|
||||
{{ $t("Didn't receive the instructions ?") }}
|
||||
</router-link>
|
||||
@@ -85,7 +85,7 @@
|
||||
<div class="control">
|
||||
<router-link
|
||||
class="button is-text"
|
||||
:to="{ name: 'Login', params: { email: credentials.email, password: credentials.password }}"
|
||||
:to="{ name: RouteName.LOGIN, params: { email: credentials.email, password: credentials.password }}"
|
||||
:disabled="sendingValidation"
|
||||
>
|
||||
{{ $t('Login') }}
|
||||
@@ -107,7 +107,7 @@
|
||||
<script lang="ts">
|
||||
import { CREATE_USER } from '@/graphql/user';
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { UserRouteName } from '@/router/user';
|
||||
import { RouteName } from '@/router';
|
||||
|
||||
@Component
|
||||
export default class Register extends Vue {
|
||||
@@ -121,6 +121,7 @@ export default class Register extends Vue {
|
||||
errors: object = {};
|
||||
sendingValidation: boolean = false;
|
||||
validationSent: boolean = false;
|
||||
RouteName = RouteName;
|
||||
|
||||
async submit() {
|
||||
try {
|
||||
@@ -135,7 +136,7 @@ export default class Register extends Vue {
|
||||
this.validationSent = true;
|
||||
|
||||
this.$router.push({
|
||||
name: UserRouteName.REGISTER_PROFILE,
|
||||
name: RouteName.REGISTER_PROFILE,
|
||||
params: { email: this.credentials.email },
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@@ -21,7 +21,6 @@ import { VALIDATE_USER } from '@/graphql/user';
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { AUTH_USER_ID } from '@/constants';
|
||||
import { RouteName } from '@/router';
|
||||
import { UserRouteName } from '@/router/user';
|
||||
import { saveTokenData } from '@/utils/auth';
|
||||
|
||||
@Component
|
||||
@@ -51,7 +50,7 @@ export default class Validate extends Vue {
|
||||
if (user.defaultActor) {
|
||||
this.$router.push({ name: RouteName.HOME });
|
||||
} else { // If the user didn't register any profile yet, let's create one for them
|
||||
this.$router.push({ name: UserRouteName.REGISTER_PROFILE, params: { email: user.email, userAlreadyActivated: 'true' } });
|
||||
this.$router.push({ name: RouteName.REGISTER_PROFILE, params: { email: user.email, userAlreadyActivated: 'true' } });
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
Reference in New Issue
Block a user