Initial commit: Telegram Management System
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
Full-stack web application for Telegram management - Frontend: Vue 3 + Vben Admin - Backend: NestJS - Features: User management, group broadcast, statistics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
51
marketing-agent/frontend/public/clear-and-test.html
Normal file
51
marketing-agent/frontend/public/clear-and-test.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Clear and Test</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Clear Storage and Test Login</h1>
|
||||
|
||||
<button onclick="clearStorage()">Clear All Storage</button>
|
||||
<button onclick="testAuth()">Test Current Auth</button>
|
||||
<button onclick="goToLogin()">Go to Login Page</button>
|
||||
<button onclick="goToHome()">Go to Home (Protected)</button>
|
||||
|
||||
<div id="result" style="margin-top: 20px; padding: 10px; border: 1px solid #ddd;"></div>
|
||||
|
||||
<script>
|
||||
function clearStorage() {
|
||||
localStorage.clear();
|
||||
sessionStorage.clear();
|
||||
document.getElementById('result').innerHTML = 'All storage cleared!';
|
||||
}
|
||||
|
||||
function testAuth() {
|
||||
const token = localStorage.getItem('token');
|
||||
const result = document.getElementById('result');
|
||||
|
||||
if (token) {
|
||||
result.innerHTML = `
|
||||
<p style="color: green;">Authenticated!</p>
|
||||
<p>Token: ${token.substring(0, 50)}...</p>
|
||||
`;
|
||||
} else {
|
||||
result.innerHTML = '<p style="color: red;">Not authenticated</p>';
|
||||
}
|
||||
}
|
||||
|
||||
function goToLogin() {
|
||||
window.location.href = '/login';
|
||||
}
|
||||
|
||||
function goToHome() {
|
||||
window.location.href = '/';
|
||||
}
|
||||
|
||||
// Show current status on load
|
||||
window.onload = testAuth;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user