mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: add generate strong password button to Add Members form
Add a "Generate strong password" button with Sparkles icon to the Add Members form in Settings > People. Generated passwords are shown in plain text with a copy button and an amber warning to copy before creating the user. Also upgraded the button style on the change password page to match. Translated copy/warning strings for all 21 locales. Closes #139
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Sparkles } from "lucide-react";
|
||||
import { type FormEvent, useState } from "react";
|
||||
import { useTranslation } from "@/contexts/i18n-context";
|
||||
import { formatHeaders } from "@/lib/api";
|
||||
@@ -164,8 +165,9 @@ export function ChangePasswordPage() {
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleGenerate}
|
||||
className="text-xs text-primary hover:text-primary/80 font-medium"
|
||||
className="flex items-center gap-1.5 px-2.5 py-1 rounded-lg border border-primary/30 bg-primary/10 text-xs text-primary hover:bg-primary/20 font-medium transition-colors"
|
||||
>
|
||||
<Sparkles className="h-3 w-3" />
|
||||
{t.changePassword.generateButton}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user