shogun-button-react 6.6.0 → 6.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ShogunButton.js +12 -0
- package/dist/index.js +1 -1
- package/dist/styles/index.css +40 -1
- package/package.json +2 -2
- package/src/styles/index.css +40 -1
|
@@ -649,6 +649,8 @@ export const ShogunButton = (() => {
|
|
|
649
649
|
const [showZkTrapdoorCopySuccess, setShowZkTrapdoorCopySuccess] = useState(false);
|
|
650
650
|
const [webauthnSeedPhrase, setWebauthnSeedPhrase] = useState("");
|
|
651
651
|
const [webauthnRecoverySeed, setWebauthnRecoverySeed] = useState("");
|
|
652
|
+
const [formPin, setFormPin] = useState(""); // Optional PIN for gun-authd
|
|
653
|
+
const [showAdvanced, setShowAdvanced] = useState(false); // Toggle for advanced options
|
|
652
654
|
const dropdownRef = useRef(null);
|
|
653
655
|
// Handle click outside to close dropdown
|
|
654
656
|
useEffect(() => {
|
|
@@ -990,6 +992,8 @@ export const ShogunButton = (() => {
|
|
|
990
992
|
setFormPasswordConfirm("");
|
|
991
993
|
setFormHint("");
|
|
992
994
|
setFormSecurityAnswer("");
|
|
995
|
+
setFormPin(""); // Reset PIN
|
|
996
|
+
setShowAdvanced(false); // Reset advanced options toggle
|
|
993
997
|
setError("");
|
|
994
998
|
setLoading(false);
|
|
995
999
|
setAuthView("options");
|
|
@@ -1093,6 +1097,14 @@ export const ShogunButton = (() => {
|
|
|
1093
1097
|
React.createElement(UserIcon, null),
|
|
1094
1098
|
React.createElement("span", null, "Security Answer")),
|
|
1095
1099
|
React.createElement("input", { type: "text", id: "securityAnswer", value: formSecurityAnswer, onChange: (e) => setFormSecurityAnswer(e.target.value), disabled: loading, required: true, placeholder: "Enter your security answer" })))),
|
|
1100
|
+
React.createElement("div", { className: "shogun-advanced-toggle" },
|
|
1101
|
+
React.createElement("button", { type: "button", className: "shogun-toggle-advanced", onClick: () => setShowAdvanced(!showAdvanced) }, showAdvanced ? "▼ Hide Advanced Options" : "▶ Advanced Options")),
|
|
1102
|
+
showAdvanced && (React.createElement("div", { className: "shogun-form-group shogun-advanced-options" },
|
|
1103
|
+
React.createElement("label", { htmlFor: "pin" },
|
|
1104
|
+
React.createElement(KeyIcon, null),
|
|
1105
|
+
React.createElement("span", null, "PIN (Optional)")),
|
|
1106
|
+
React.createElement("input", { type: "password", id: "pin", value: formPin, onChange: (e) => setFormPin(e.target.value), disabled: loading, placeholder: "4-8 digit PIN for extra security", pattern: "[0-9]*", inputMode: "numeric", maxLength: 8, minLength: 4 }),
|
|
1107
|
+
React.createElement("small", { className: "shogun-field-hint" }, "Optional: Add a PIN for three-factor authentication (gun-authd)"))),
|
|
1096
1108
|
React.createElement("button", { type: "submit", className: "shogun-submit-button", disabled: loading }, loading
|
|
1097
1109
|
? "Processing..."
|
|
1098
1110
|
: formMode === "login"
|