- Fixed Challenge Modal overlap issue by adjusting the main stacking context in App.tsx
- Implemented "click-outside-to-close" functionality for both the Challenge Modal and User Dropdown - Added protocol-specific action buttons for challenges: "Open in new tab" for HTTP and "Copy to clipboard" for NC - Enhanced Scoreboard rankings with significantly larger, consistent font sizes (text-2xl) for better readability - Rebranded "TEAM_IDENTIFIER" to "PLAYER" and "TOTAL_POINTS" to "POINTS" across the platform (Scoreboard, Matrix, User Menu) - Updated navigation: Renamed "SCOREBOARD" to "SCORES" in the nav bar and dynamic page titles - Modernized User Dropdown menu with a dedicated "PLAYER" header and "LOGOUT" action - Improved Score Matrix and Score Graph titles for consistency with the new "Player" terminology - Added CAPTCHA human verification (svg-captcha) to Login and Registration flows for enhanced security - Optimized frontend assets by migrating Tailwind and JetBrains Mono to local hosting - Refactored Admin panel: Renamed "Operators" to "Users" and improved layout alignment
This commit is contained in:
@@ -22,11 +22,16 @@ class ApiService {
|
||||
return res.json();
|
||||
}
|
||||
|
||||
async login(name: string, pass: string): Promise<{ team: Team, token: string }> {
|
||||
async getCaptcha(): Promise<{ id: string, data: string }> {
|
||||
const res = await fetch(`${API_BASE}/auth/captcha`);
|
||||
return res.json();
|
||||
}
|
||||
|
||||
async login(name: string, pass: string, captchaId: string, captchaAnswer: string): Promise<{ team: Team, token: string }> {
|
||||
const res = await fetch(`${API_BASE}/auth/login`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ name, password: pass }),
|
||||
body: JSON.stringify({ name, password: pass, captchaId, captchaAnswer }),
|
||||
});
|
||||
if (!res.ok) {
|
||||
const err = await res.json();
|
||||
@@ -35,11 +40,11 @@ class ApiService {
|
||||
return res.json();
|
||||
}
|
||||
|
||||
async register(name: string, pass: string): Promise<{ team: Team, token: string }> {
|
||||
async register(name: string, pass: string, captchaId: string, captchaAnswer: string): Promise<{ team: Team, token: string }> {
|
||||
const res = await fetch(`${API_BASE}/auth/register`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ name, password: pass }),
|
||||
body: JSON.stringify({ name, password: pass, captchaId, captchaAnswer }),
|
||||
});
|
||||
if (!res.ok) {
|
||||
const err = await res.json();
|
||||
|
||||
Reference in New Issue
Block a user