112 lines
3.1 KiB
HTML
112 lines
3.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>FCM Test PWA</title>
|
|
<link rel="manifest" href="/manifest.json">
|
|
<meta name="theme-color" content="#2196F3">
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 0;
|
|
padding: 20px;
|
|
background-color: #f5f5f5;
|
|
}
|
|
.container {
|
|
max-width: 400px;
|
|
margin: 0 auto;
|
|
background: white;
|
|
padding: 20px;
|
|
border-radius: 10px;
|
|
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
}
|
|
.login-form {
|
|
display: block;
|
|
}
|
|
.user-info {
|
|
display: none;
|
|
}
|
|
input {
|
|
width: 100%;
|
|
padding: 10px;
|
|
margin: 10px 0;
|
|
border: 1px solid #ddd;
|
|
border-radius: 5px;
|
|
box-sizing: border-box;
|
|
}
|
|
button {
|
|
width: 100%;
|
|
padding: 12px;
|
|
background-color: #2196F3;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
margin: 10px 0;
|
|
}
|
|
button:hover {
|
|
background-color: #1976D2;
|
|
}
|
|
button:disabled {
|
|
background-color: #ccc;
|
|
cursor: not-allowed;
|
|
}
|
|
.status {
|
|
padding: 10px;
|
|
margin: 10px 0;
|
|
border-radius: 5px;
|
|
text-align: center;
|
|
}
|
|
.success {
|
|
background-color: #d4edda;
|
|
color: #155724;
|
|
border: 1px solid #c3e6cb;
|
|
}
|
|
.error {
|
|
background-color: #f8d7da;
|
|
color: #721c24;
|
|
border: 1px solid #f5c6cb;
|
|
}
|
|
.info {
|
|
background-color: #d1ecf1;
|
|
color: #0c5460;
|
|
border: 1px solid #bee5eb;
|
|
}
|
|
.user-display {
|
|
background-color: #e3f2fd;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
margin: 10px 0;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>FCM Test PWA</h1>
|
|
|
|
<div id="status" class="status" style="display: none;"></div>
|
|
|
|
<div id="loginForm" class="login-form">
|
|
<h2>Login</h2>
|
|
<input type="text" id="username" placeholder="Username (pwau1, pwau2, or pwau3)" required>
|
|
<input type="password" id="password" placeholder="Password" required>
|
|
<button onclick="login()">Login</button>
|
|
</div>
|
|
|
|
<div id="userInfo" class="user-info">
|
|
<div class="user-display">
|
|
Logged in as: <span id="currentUser"></span>
|
|
</div>
|
|
<button id="sendNotificationBtn" onclick="sendNotification()">Send Notification</button>
|
|
<button id="logoutBtn" onclick="logout()">Logout</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/app.js"></script>
|
|
</body>
|
|
</html>
|