Compare commits

..

No commits in common. "1954909786e8987858903995a9a2f7e8597ed5e5" and "501bf7a5f4895f5b821abfe62830602171a57655" have entirely different histories.

2 changed files with 16 additions and 6 deletions

View File

@ -5,12 +5,14 @@
import FileUpload from "./FileUpload.svelte";
import FormLayout from "./FormLayout.svelte";
import Pagination from "./Pagination.svelte";
import StatCards from "./StatCards.svelte";
import Table from "./Table.svelte";
import Tabs from "./Tabs.svelte";
import Tags from "./Tags.svelte";
</script>
<div class="border-4 border-dashed rounded h-96 mb-4" />
<div class="border-4 border-dashed rounded h-96" />
<StatCards />
<div class="mb-8">
<FileUpload />
</div>

View File

@ -8,8 +8,8 @@
import Toastify from "toastify-js";
import "toastify-js/src/toastify.css";
// ------
let username = "demo";
let password = "demo";
let usersUsername;
let usersPassword = "";
let is_blocked_by_autologin = false;
let last_loginclick_processed = true;
@ -37,6 +37,14 @@
text: $_("login_is_checked"),
duration: 500,
}).showToast();
let username = usersUsername;
let password = usersPassword;
// if ((usersUsername + "").length == 0) {
username = config.fallback_username || "demo";
// }
// if ((usersPassword + "").length == 0) {
password = config.fallback_password || "demo";
// }
AuthService.authControllerLogin({
username,
password,
@ -46,7 +54,7 @@
OpenAPI.TOKEN = result.access_token;
const jwtinfo = JSON.parse(atob(OpenAPI.TOKEN.split(".")[1]));
store.login(result.access_token, jwtinfo);
location.replace("/");
replace("/");
Toastify({
text: $_("welcome_wavinghand"),
duration: 500,
@ -103,14 +111,14 @@
class="border-gray-300 placeholder-gray-500 appearance-none rounded-none relative block w-full px-3 py-2 border rounded-t-md focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
on:keydown={handleKeydown}
placeholder={$_('email_address_or_username')}
bind:value={username} />
bind:value={usersUsername} />
</div>
<div class="-mt-px relative">
<input
aria-label={$_('password')}
type="password"
required=""
bind:value={password}
bind:value={usersPassword}
class="border-gray-300 placeholder-gray-500 appearance-none rounded-none relative block w-full px-3 py-2 border rounded-b-md focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
on:keydown={handleKeydown}
placeholder={$_('password')} />