Skip to content

Commit

Permalink
Merge pull request #3 from bjn7/main
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
bjn7 authored Sep 10, 2024
2 parents b0f7225 + 48a8e94 commit 0b22999
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 11 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h1>Tau (𝜏)</h1>
</div>

**Tau** is a free, open-source two-factor authenticator (2FA) application for Windows, Linux, and macOS.
**Tau** a free, open-source two-factor authenticator (2FA) application for Windows, Linux, and macOS.

## Features

Expand All @@ -11,6 +11,8 @@
- Simple, intuitive user interface.
- Completely free and open source.

Double click on card to copy code btw

## Installation

- **Windows**: Download the installer from [releases](https://github.com/bjn7/Tau/releases) and run it.
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/tau.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri + React + Typescript</title>
<title>Tau</title>
<%- bufferInject %>
</head>
<body>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@nextui-org/input": "^2.2.4",
"@nextui-org/modal": "^2.0.39",
"@nextui-org/select": "^2.2.5",
"@nextui-org/skeleton": "^2.0.31",
"@nextui-org/system": "^2.2.5",
"@nextui-org/theme": "^2.2.9",
"@otplib/preset-browser": "^12.0.1",
Expand All @@ -44,4 +45,4 @@
"vite-plugin-html": "^3.2.2",
"vite-plugin-node-polyfills": "^0.22.0"
}
}
}
1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

7 changes: 5 additions & 2 deletions src/components/FloatingMenu/ManualModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Select, SelectItem } from "@nextui-org/select";
//@ts-ignore
import { authenticator } from "@otplib/preset-browser";

import { SecretEntry } from "../../libs/FS";
import { SecretEntry, writeSecrets } from "../../libs/FS";
import cacheImage from "../../libs/fetchAndCacheIcon";

export default function ({
Expand Down Expand Up @@ -150,7 +150,10 @@ export default function ({
onClick={async () => {
onClose();
await cacheImage(inputState.issuer);
setOtp((pre) => [...pre, inputState]);
setOtp((pre) => {
writeSecrets([...pre, inputState]);
return [...pre, inputState];
});
setInputState({
algorithm: "sha1",
digits: 6,
Expand Down
1 change: 0 additions & 1 deletion src/components/FloatingMenu/actions/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default async function (
if (!e.startsWith("otpauth://")) continue;
if (!URL.canParse(e)) continue;
const urlString = new URL(e);
console.log(urlString.searchParams.get("issuer"));
cacheImage(urlString.searchParams.get("issuer") || "").then(() => {
paseAndInsert(urlString, updateState);
});
Expand Down
3 changes: 1 addition & 2 deletions src/components/Main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Card from "./card.tsx";
export default function () {
const [searchQuery, setSearchQuery] = useState("");
const [hasError, setHasError] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [_isLoading, setIsLoading] = useState(true);
const { otp, setOtp } = useContext(Context);
const [generatedCodes, setGeneratedCodes] = useState<{
[key: string]: string;
Expand Down Expand Up @@ -82,7 +82,6 @@ export default function () {
});
}, []);

if (isLoading) return <p>Loading...</p>;
if (hasError) return <p>Failed to parse the secrets.</p>;

return (
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
"./node_modules/@nextui-org/theme/dist/components/(button|input|card|divider|modal|accordion|select).js",
"./node_modules/@nextui-org/theme/dist/components/(button|input|card|divider|modal|accordion|select|skeleton).js",
],

theme: {
Expand Down

0 comments on commit 0b22999

Please sign in to comment.