48 lines
1.9 KiB
JavaScript
48 lines
1.9 KiB
JavaScript
async function testPasswordVisibility() {
|
|
console.log('🧪 測試密碼顯示/隱藏功能...\n');
|
|
|
|
try {
|
|
// 測試各個頁面是否可以正常載入
|
|
const pages = [
|
|
{ name: '註冊頁面', url: 'http://localhost:3000/register' },
|
|
{ name: '重設密碼頁面', url: 'http://localhost:3000/reset-password?token=test' },
|
|
{ name: '評審評分頁面', url: 'http://localhost:3000/judge-scoring' },
|
|
];
|
|
|
|
for (const page of pages) {
|
|
console.log(`測試 ${page.name}...`);
|
|
try {
|
|
const response = await fetch(page.url);
|
|
if (response.ok) {
|
|
console.log(`✅ ${page.name} 載入成功 (狀態碼: ${response.status})`);
|
|
} else {
|
|
console.log(`❌ ${page.name} 載入失敗 (狀態碼: ${response.status})`);
|
|
}
|
|
} catch (error) {
|
|
console.log(`❌ ${page.name} 載入錯誤: ${error.message}`);
|
|
}
|
|
}
|
|
|
|
console.log('\n🎉 密碼顯示/隱藏功能測試完成!');
|
|
console.log('\n📋 已添加密碼顯示/隱藏功能的頁面:');
|
|
console.log('✅ 註冊頁面 (app/register/page.tsx)');
|
|
console.log('✅ 登入對話框 (components/auth/login-dialog.tsx) - 已有功能');
|
|
console.log('✅ 重設密碼頁面 (app/reset-password/page.tsx) - 已有功能');
|
|
console.log('✅ 評審評分頁面 (app/judge-scoring/page.tsx)');
|
|
console.log('✅ 註冊對話框 (components/auth/register-dialog.tsx)');
|
|
console.log('✅ 系統設定頁面 (components/admin/system-settings.tsx)');
|
|
|
|
console.log('\n🔧 功能特點:');
|
|
console.log('• 眼睛圖示切換顯示/隱藏');
|
|
console.log('• 鎖頭圖示表示密碼欄位');
|
|
console.log('• 懸停效果提升用戶體驗');
|
|
console.log('• 統一的視覺設計風格');
|
|
console.log('• 支援所有密碼相關欄位');
|
|
|
|
} catch (error) {
|
|
console.error('❌ 測試過程中發生錯誤:', error);
|
|
}
|
|
}
|
|
|
|
testPasswordVisibility();
|