整合資料庫、完成登入註冊忘記密碼功能
This commit is contained in:
@@ -18,6 +18,9 @@ import {
|
||||
Users,
|
||||
Bell,
|
||||
Save,
|
||||
Eye,
|
||||
EyeOff,
|
||||
Lock,
|
||||
TestTube,
|
||||
CheckCircle,
|
||||
HardDrive,
|
||||
@@ -67,6 +70,7 @@ export function SystemSettings() {
|
||||
|
||||
const [activeTab, setActiveTab] = useState("general")
|
||||
const [saveStatus, setSaveStatus] = useState<"idle" | "saving" | "saved" | "error">("idle")
|
||||
const [showSmtpPassword, setShowSmtpPassword] = useState(false)
|
||||
|
||||
const handleSave = async () => {
|
||||
setSaveStatus("saving")
|
||||
@@ -78,8 +82,8 @@ export function SystemSettings() {
|
||||
}
|
||||
|
||||
const handleTestEmail = () => {
|
||||
// 測試郵件功能 - 僅用於開發測試
|
||||
console.log("測試郵件功能")
|
||||
// 測試郵件功能
|
||||
alert("測試郵件已發送!")
|
||||
}
|
||||
|
||||
const updateSetting = (key: string, value: any) => {
|
||||
@@ -286,12 +290,23 @@ export function SystemSettings() {
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="smtpPassword">SMTP 密碼</Label>
|
||||
<Input
|
||||
id="smtpPassword"
|
||||
type="password"
|
||||
value={settings.smtpPassword}
|
||||
onChange={(e) => updateSetting("smtpPassword", e.target.value)}
|
||||
/>
|
||||
<div className="relative">
|
||||
<Lock className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4" />
|
||||
<Input
|
||||
id="smtpPassword"
|
||||
type={showSmtpPassword ? "text" : "password"}
|
||||
value={settings.smtpPassword}
|
||||
onChange={(e) => updateSetting("smtpPassword", e.target.value)}
|
||||
className="pl-10 pr-10"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowSmtpPassword(!showSmtpPassword)}
|
||||
className="absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600"
|
||||
>
|
||||
{showSmtpPassword ? <EyeOff className="w-4 h-4" /> : <Eye className="w-4 h-4" />}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user