fix: cannot import ncryptsec
This commit is contained in:
@@ -56,7 +56,7 @@ async createAccount(name: string, about: string, picture: string, password: stri
|
||||
else return { status: "error", error: e as any };
|
||||
}
|
||||
},
|
||||
async importAccount(key: string, password: string | null) : Promise<Result<string, string>> {
|
||||
async importAccount(key: string, password: string) : Promise<Result<string, string>> {
|
||||
try {
|
||||
return { status: "ok", data: await TAURI_INVOKE("import_account", { key, password }) };
|
||||
} catch (e) {
|
||||
|
||||
@@ -95,13 +95,15 @@ function Screen() {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{key.length && !key.startsWith("ncryptsec") ? (
|
||||
{key.length ? (
|
||||
<div className="flex flex-col gap-1">
|
||||
<label
|
||||
htmlFor="password"
|
||||
className="text-sm font-medium text-neutral-800 dark:text-neutral-200"
|
||||
>
|
||||
Set password to secure your key
|
||||
{!key.startsWith("ncryptsec")
|
||||
? "Set password to secure your key"
|
||||
: "Enter password to decrypt your key"}
|
||||
</label>
|
||||
<input
|
||||
name="password"
|
||||
|
||||
Reference in New Issue
Block a user