🧠 logic cleanup in Login component
This commit is contained in:
parent
20ee0c1a9e
commit
90be4200ca
@ -3,14 +3,12 @@
|
|||||||
import { _ } from "svelte-i18n";
|
import { _ } from "svelte-i18n";
|
||||||
store.init();
|
store.init();
|
||||||
import { push, pop, replace } from "svelte-spa-router";
|
import { push, pop, replace } from "svelte-spa-router";
|
||||||
//
|
|
||||||
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
||||||
OpenAPI.BASE = config.baseurl;
|
OpenAPI.BASE = config.baseurl;
|
||||||
//
|
|
||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
import "toastify-js/src/toastify.css";
|
import "toastify-js/src/toastify.css";
|
||||||
let usersUsername,
|
let usersUsername;
|
||||||
usersPassword = "";
|
let usersPassword = "";
|
||||||
let last_loginclick_processed = true;
|
let last_loginclick_processed = true;
|
||||||
|
|
||||||
const login = async () => {
|
const login = async () => {
|
||||||
@ -23,10 +21,10 @@
|
|||||||
}).showToast();
|
}).showToast();
|
||||||
let username = usersUsername;
|
let username = usersUsername;
|
||||||
let password = usersPassword;
|
let password = usersPassword;
|
||||||
// if (usersUsername.length == 0) {
|
// if ((usersUsername + "").length == 0) {
|
||||||
username = config.fallback_username || "demo";
|
username = config.fallback_username || "demo";
|
||||||
// }
|
// }
|
||||||
// if (usersPassword.length == 0) {
|
// if ((usersPassword + "").length == 0) {
|
||||||
password = config.fallback_password || "demo";
|
password = config.fallback_password || "demo";
|
||||||
// }
|
// }
|
||||||
AuthService.authControllerLogin({
|
AuthService.authControllerLogin({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user