diff --git a/src-tauri/src/data/auth.rs b/src-tauri/src/data/auth.rs index 4d464c8..93cdc49 100644 --- a/src-tauri/src/data/auth.rs +++ b/src-tauri/src/data/auth.rs @@ -151,8 +151,8 @@ fn test_authentication(){ use crate::data::json::init_user_data; init_user_data(); init_dir().expect("failed to create the main directory"); - let name = "a"; - let password = "a"; + let name = "test"; + let password = "test"; if user_exists(name, password) {} else {assert!(create_user(name, password).is_ok());} assert!(save_user(name, password).is_ok()); diff --git a/src/pages/login/login.tsx b/src/pages/login/login.tsx index fcd09f3..3f0cfc9 100644 --- a/src/pages/login/login.tsx +++ b/src/pages/login/login.tsx @@ -3,7 +3,6 @@ import { useState } from 'react'; import { invoke } from '@tauri-apps/api'; import { useNavigate } from 'react-router-dom'; import noenemies from '../main_page/assets/nature.jpg'; -import arrowright from '../main_page/assets/arrowright.png'; function login(){ const [name, setname] = useState(""); @@ -15,8 +14,6 @@ function login(){ let response = await invoke("authenticate_user", {name, password}).catch(e => {console.log(e)}); console.log(response); if (response){ - await invoke('system_make', {key: 'name',value: await invoke('create_value', {val_type: 'string', val: name})}); - await invoke('system_make', {key: 'password',value: await invoke('create_value', {val_type: 'string', val: password})}); navigate("/loading", {state: {name, password}}); } else{ @@ -69,9 +66,6 @@ function login(){ Login -
- navigate("/main_page")}/> -

{error}

diff --git a/src/pages/main_page/internal_apps/apps/file_system.tsx b/src/pages/main_page/internal_apps/apps/file_system.tsx index 31a6e04..49c4662 100644 --- a/src/pages/main_page/internal_apps/apps/file_system.tsx +++ b/src/pages/main_page/internal_apps/apps/file_system.tsx @@ -3,7 +3,7 @@ import { invoke } from '@tauri-apps/api'; import { useState, useEffect } from 'react'; async function create_file(){ - // console.log(await invoke('system_get', {key: 'name'})); + console.log(await invoke('system_get', {key: 'name'})); } function file_system() : [JSX.Element, React.Dispatch>, JSX.Element]{