diff --git a/frontend/src/components/PasswordInput.tsx b/frontend/src/components/PasswordInput.tsx new file mode 100644 index 0000000..75082e6 --- /dev/null +++ b/frontend/src/components/PasswordInput.tsx @@ -0,0 +1,77 @@ +import { useState, InputHTMLAttributes } from 'react'; + +interface PasswordInputProps extends Omit, 'type'> { + // All standard input props are inherited +} + +export default function PasswordInput({ style, ...props }: PasswordInputProps) { + const [visible, setVisible] = useState(false); + + return ( +
+ + +
+ ); +} diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx index 195e632..8778647 100644 --- a/frontend/src/pages/Settings.tsx +++ b/frontend/src/pages/Settings.tsx @@ -1,6 +1,7 @@ import { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import Layout from '../components/Layout'; +import PasswordInput from '../components/PasswordInput'; import { settingsApi, profileApi, @@ -983,8 +984,7 @@ export default function Settings() {
- setTelegramBotToken(e.target.value)} placeholder={notificationSettings?.telegram_configured ? '••••••••••••••••' : 'Enter your bot token'} @@ -1053,8 +1053,7 @@ export default function Settings() {
- setDiscordWebhookUrl(e.target.value)} placeholder={notificationSettings?.discord_configured ? '••••••••••••••••' : 'https://discord.com/api/webhooks/...'} @@ -1112,8 +1111,7 @@ export default function Settings() {
- setPushoverUserKey(e.target.value)} placeholder={notificationSettings?.pushover_configured ? '••••••••••••••••' : 'Enter your user key'} @@ -1123,8 +1121,7 @@ export default function Settings() {
- setPushoverAppToken(e.target.value)} placeholder={notificationSettings?.pushover_configured ? '••••••••••••••••' : 'Enter your app token'} @@ -1208,8 +1205,7 @@ export default function Settings() { {aiProvider === 'anthropic' && (
- setAnthropicApiKey(e.target.value)} placeholder={aiSettings?.anthropic_configured ? '••••••••••••••••' : 'sk-ant-...'} @@ -1227,8 +1223,7 @@ export default function Settings() { {aiProvider === 'openai' && (
- setOpenaiApiKey(e.target.value)} placeholder={aiSettings?.openai_configured ? '••••••••••••••••' : 'sk-...'} diff --git a/frontend/tsconfig.tsbuildinfo b/frontend/tsconfig.tsbuildinfo index 4954d8a..b9f18e1 100644 --- a/frontend/tsconfig.tsbuildinfo +++ b/frontend/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/api/client.ts","./src/components/authform.tsx","./src/components/layout.tsx","./src/components/pricechart.tsx","./src/components/productcard.tsx","./src/components/productform.tsx","./src/components/sparkline.tsx","./src/components/stocktimeline.tsx","./src/context/authcontext.tsx","./src/context/toastcontext.tsx","./src/hooks/useauth.ts","./src/pages/dashboard.tsx","./src/pages/login.tsx","./src/pages/productdetail.tsx","./src/pages/register.tsx","./src/pages/settings.tsx"],"version":"5.9.3"} \ No newline at end of file +{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/api/client.ts","./src/components/authform.tsx","./src/components/layout.tsx","./src/components/passwordinput.tsx","./src/components/pricechart.tsx","./src/components/productcard.tsx","./src/components/productform.tsx","./src/components/sparkline.tsx","./src/components/stocktimeline.tsx","./src/context/authcontext.tsx","./src/context/toastcontext.tsx","./src/hooks/useauth.ts","./src/pages/dashboard.tsx","./src/pages/login.tsx","./src/pages/productdetail.tsx","./src/pages/register.tsx","./src/pages/settings.tsx"],"version":"5.9.3"} \ No newline at end of file