clean: rename: authentification to authenticate
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { lang } from "../index.js";
|
||||
import AbstractAuthentificateView from "./abstracts/AbstractAuthentifiedView.js";
|
||||
import AbstractAuthenticatedView from "./abstracts/AbstractAuthenticatedView.js";
|
||||
|
||||
export default class extends AbstractAuthentificateView {
|
||||
export default class extends AbstractAuthenticatedView {
|
||||
constructor(params) {
|
||||
super(params, lang.get('homeWindowTitle', 'Home'));
|
||||
this.redirect_url = "/login"
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { client, navigateTo } from "../index.js";
|
||||
import { clear, fill_errors } from "../utils/formUtils.js";
|
||||
import AbstractAuthentifiedView from "./abstracts/AbstractAuthentifiedView.js";
|
||||
import AbstractAuthenticatedView from "./abstracts/AbstractAuthenticatedView.js";
|
||||
|
||||
export default class extends AbstractAuthentifiedView {
|
||||
export default class extends AbstractAuthenticatedView {
|
||||
constructor(params)
|
||||
{
|
||||
super(params, "Matchmaking");
|
||||
|
@ -44,7 +44,7 @@ export default class extends AbstractView {
|
||||
|
||||
async blockButton() {
|
||||
// Block option
|
||||
if (await client.isAuthentificate() === false)
|
||||
if (await client.isAuthenticate() === false)
|
||||
return;
|
||||
|
||||
if (client.me.id != this.user_id) {
|
||||
@ -72,7 +72,7 @@ export default class extends AbstractView {
|
||||
}
|
||||
|
||||
async friendButton() {
|
||||
if (await client.isAuthentificate() === false)
|
||||
if (await client.isAuthenticate() === false)
|
||||
return;
|
||||
|
||||
if (client.me.id != this.user_id) {
|
||||
|
@ -21,7 +21,7 @@ export default class extends AbstractView {
|
||||
|
||||
async postInit() {
|
||||
|
||||
let logged = await client.isAuthentificate();
|
||||
let logged = await client.isAuthenticate();
|
||||
let profiles = await client.profiles.all();
|
||||
|
||||
//console.log(client.notice.data);
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { client, navigateTo } from "../index.js";
|
||||
import { clear, fill_errors } from "../utils/formUtils.js";
|
||||
import AbstractAuthentificateView from "./abstracts/AbstractAuthentifiedView.js";
|
||||
import AbstractAuthenticatedView from "./abstracts/AbstractAuthenticatedView.js";
|
||||
|
||||
export default class extends AbstractAuthentificateView
|
||||
export default class extends AbstractAuthenticatedView
|
||||
{
|
||||
constructor(params)
|
||||
{
|
||||
@ -36,7 +36,7 @@ export default class extends AbstractAuthentificateView
|
||||
|
||||
let response_data = await client.account.delete(current_password);
|
||||
|
||||
console.log(await client.isAuthentificate())
|
||||
console.log(await client.isAuthenticate())
|
||||
if (response_data === null || response_data === "user deleted")
|
||||
{
|
||||
navigateTo("/login");
|
||||
|
@ -8,7 +8,7 @@ export default class extends AbstractRedirectView{
|
||||
|
||||
async redirect()
|
||||
{
|
||||
if (await client.isAuthentificate() === false)
|
||||
if (await client.isAuthenticate() === false)
|
||||
{
|
||||
navigateTo(this.redirect_url);
|
||||
return 1;
|
@ -8,7 +8,7 @@ export default class extends AbstractRedirectView{
|
||||
|
||||
async redirect()
|
||||
{
|
||||
if (await client.isAuthentificate() === false)
|
||||
if (await client.isAuthenticate() === false)
|
||||
return 0;
|
||||
navigateTo(this.redirect_url);
|
||||
return 1;
|
@ -1,9 +1,9 @@
|
||||
|
||||
import { client, lang, navigateTo } from "../../index.js";
|
||||
import { clear, fill_errors } from "../../utils/formUtils.js";
|
||||
import AbstractNonAuthentifiedView from "../abstracts/AbstractNonAuthentifiedView.js";
|
||||
import AbstractNonAuthenticatedView from "../abstracts/AbstractNonAuthenticatedView.js";
|
||||
|
||||
export default class extends AbstractNonAuthentifiedView
|
||||
export default class extends AbstractNonAuthenticatedView
|
||||
{
|
||||
constructor(params, lastUrlBeforeLogin = '/home')
|
||||
{
|
||||
@ -29,7 +29,7 @@ export default class extends AbstractNonAuthentifiedView
|
||||
let new_mode = location.pathname.slice(1);
|
||||
this.update_mode(new_mode);
|
||||
|
||||
document.getElementById("button").onclick = this.authenticate.bind(this);
|
||||
document.getElementById("button").onclick = this.authencation.bind(this);
|
||||
|
||||
let username_input = document.getElementById('username-input'),
|
||||
password_input = document.getElementById('password-input');
|
||||
@ -37,7 +37,7 @@ export default class extends AbstractNonAuthentifiedView
|
||||
[username_input, password_input].forEach(input => {
|
||||
input.addEventListener('keydown', async ev => {
|
||||
if (ev.key === 'Enter')
|
||||
await this.authenticate.bind(this)()
|
||||
await this.authencation.bind(this)()
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -114,7 +114,7 @@ export default class extends AbstractNonAuthentifiedView
|
||||
/**
|
||||
* @returns {Promise}
|
||||
*/
|
||||
async authenticate()
|
||||
async authencation()
|
||||
{
|
||||
let username = document.getElementById("username-input").value,
|
||||
password = document.getElementById("password-input").value;
|
@ -1,7 +1,7 @@
|
||||
import { client, lang, navigateTo } from "../../index.js";
|
||||
import AbstractAuthentifiedView from "../abstracts/AbstractAuthentifiedView.js";
|
||||
import AbstractAuthenticatedView from "../abstracts/AbstractAuthenticatedView.js";
|
||||
|
||||
export default class extends AbstractAuthentifiedView
|
||||
export default class extends AbstractAuthenticatedView
|
||||
{
|
||||
constructor(params, lastPageUrl = '/login') {
|
||||
super(params, lang.get('logoutWindowTitle', 'Logout'));
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {client, navigateTo} from "../../index.js";
|
||||
import { clear, fill_errors } from "../../utils/formUtils.js";
|
||||
import AbstractAuthentifiedView from "../abstracts/AbstractAuthentifiedView.js";
|
||||
import AbstractAuthenticatedView from "../abstracts/AbstractAuthenticatedView.js";
|
||||
|
||||
export default class extends AbstractAuthentifiedView
|
||||
export default class extends AbstractAuthenticatedView
|
||||
{
|
||||
constructor(params)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {client, navigateTo} from "../../index.js";
|
||||
import AbstractAuthentifiedView from "../abstracts/AbstractAuthentifiedView.js";
|
||||
import AbstractAuthenticatedView from "../abstracts/AbstractAuthenticatedView.js";
|
||||
|
||||
export default class extends AbstractAuthentifiedView
|
||||
export default class extends AbstractAuthenticatedView
|
||||
{
|
||||
constructor(params)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {client} from "../../index.js";
|
||||
import AbstractAuthentifiedView from "../abstracts/AbstractAuthentifiedView.js";
|
||||
import AbstractAuthenticatedView from "../abstracts/AbstractAuthenticatedView.js";
|
||||
|
||||
export default class extends AbstractAuthentifiedView
|
||||
export default class extends AbstractAuthenticatedView
|
||||
{
|
||||
constructor(params)
|
||||
{
|
||||
|
Reference in New Issue
Block a user