Skip to content

Commit

Permalink
- bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingenious-c0der committed Dec 14, 2023
1 parent 533d140 commit cfdfb96
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.css linguist-vendored
*.css linguist-vendored
*.js linguist-vendored
19 changes: 9 additions & 10 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]

use diesel_migrations::embed_migrations;
#[macro_use]
extern crate diesel;
#[macro_use]
extern crate diesel_migrations;
embed_migrations!("../migrations/");
use diesel::prelude::*;
use std::sync::Mutex;
pub mod crypto_process;
Expand Down Expand Up @@ -125,11 +120,15 @@ fn create_vault(state: tauri::State<AppState>, vault: serde_json::Value) -> serd
});
return res_json;
};

let pass_len_str_text = vault["pass_length"].as_str().unwrap_or("15");
let pass_length : i32= pass_len_str_text.parse().unwrap();





let mut pass_len_str_text = vault["pass_length"].as_str().unwrap_or("15");
if pass_len_str_text == "" {
pass_len_str_text = "15";
}
let pass_length : i32= pass_len_str_text.parse().unwrap();
let mut password = vault["data"].to_string();
// let password_rectified = vault["data"].as_str().unwrap().trim();
// assert_eq!(password_rectified,"");
Expand Down Expand Up @@ -329,7 +328,7 @@ fn logout(state: tauri::State<AppState>) -> String {
fn main() {
let db_path = "store.sqlite";
let conn = db::establish_connection(db_path);
diesel_migrations::run_pending_migrations(&conn).expect("Error migrating");
//diesel_migrations::run_pending_migrations(&conn).expect("Error migrating");
let state = AppState {
conn: Mutex::new(conn),
etch_key: Mutex::new(key_store::EtchedKey::new()),
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddVaultForm/Addvaultform.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const AddVaultForm = ({ onAddVault, toggleFunc }) => {
</label>
<label>
Password Length (only if auto generating)
<input
<input type="number" id="numericInput" name="numericInput" pattern="[0-9]*" inputMode="numeric"
value={passlength}
onChange={(e) => setPassLength(e.target.value)}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/register.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import { invoke } from "@tauri-apps/api/tauri";
import Image from "next/image";
import vaultLogo from "../assets/vault.png";
import vaultLogo from "../assets/vault_icon.png";
import { ToastContainer, toast } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
class Register extends React.Component {
Expand Down Expand Up @@ -121,7 +121,7 @@ class Register extends React.Component {
type="button"
className="btn btn-secondary btn-block"
onClick={() => {
window.location.href = "/index";
window.location.href = "/";
}}
>
Back
Expand Down

0 comments on commit cfdfb96

Please sign in to comment.