Skip to content

Commit

Permalink
Move allowedCharacters to a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
dar5hak committed Nov 22, 2024
1 parent cf86d95 commit e57b214
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 88 deletions.
89 changes: 1 addition & 88 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import Footer from "./Footer.svelte";
import Header from "./Header.svelte";
import InfoModal from "./InfoModal.svelte";
import { allowedCharacters } from "./constants.js";
let site = $state("");
let cipher = $state("");
Expand All @@ -14,94 +15,6 @@
let showDerivedPassword = $state(false);
let showInfoModal = $state(false);
const allowedCharacters = [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
"!",
"#",
"$",
"%",
"&",
"(",
")",
"*",
"+",
"-",
";",
"<",
"=",
">",
"?",
"@",
"^",
"_",
"`",
"{",
"|",
"}",
"~",
];
async function handleDerive() {
if (!site || !cipher) {
derivedPassword = "";
Expand Down
87 changes: 87 additions & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
export const allowedCharacters = [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
"!",
"#",
"$",
"%",
"&",
"(",
")",
"*",
"+",
"-",
";",
"<",
"=",
">",
"?",
"@",
"^",
"_",
"`",
"{",
"|",
"}",
"~",
];

0 comments on commit e57b214

Please sign in to comment.