82 lines
		
	
	
	
		
			2.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			82 lines
		
	
	
	
		
			2.2 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html lang="de">
 | |
| <head>
 | |
|   <meta charset="UTF-8">
 | |
|   <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | |
|   <title>Ped Admin Menu</title>
 | |
|   <style>
 | |
|     body {
 | |
|       font-family: Arial, sans-serif;
 | |
|       background: rgba(0,0,0,0.8);
 | |
|       color: #fff;
 | |
|       display: flex;
 | |
|       flex-direction: column;
 | |
|       align-items: center;
 | |
|       justify-content: center;
 | |
|       height: 100vh;
 | |
|     }
 | |
|     .container {
 | |
|       background: #222;
 | |
|       padding: 20px;
 | |
|       border-radius: 10px;
 | |
|       width: 300px;
 | |
|     }
 | |
|     h2 {
 | |
|       margin-bottom: 10px;
 | |
|     }
 | |
|     select, button {
 | |
|       width: 100%;
 | |
|       padding: 10px;
 | |
|       margin-top: 10px;
 | |
|       border: none;
 | |
|       border-radius: 5px;
 | |
|     }
 | |
|     button {
 | |
|       background-color: #28a745;
 | |
|       color: white;
 | |
|       cursor: pointer;
 | |
|     }
 | |
|     button:hover {
 | |
|       background-color: #218838;
 | |
|     }
 | |
|   </style>
 | |
| </head>
 | |
| <body>
 | |
|   <div class="container">
 | |
|     <h2>Admin Ped-Menü</h2>
 | |
|     <label for="pedSelect">Ped auswählen:</label>
 | |
|     <select id="pedSelect">
 | |
|       <option value="a_m_y_business_01">Business 01</option>
 | |
|       <option value="a_f_y_hipster_01">Hipster Frau</option>
 | |
|       <option value="csb_ramp_marine">Marine</option>
 | |
|       <option value="ig_claypain">Clay</option>
 | |
|       <option value="mp_m_freemode_01">Standard (Mann)</option>
 | |
|       <option value="mp_f_freemode_01">Standard (Frau)</option>
 | |
|     </select>
 | |
|     <button onclick="setPed()">Ped setzen</button>
 | |
|     <button onclick="resetPed()">Zurücksetzen</button>
 | |
|   </div>
 | |
| 
 | |
|   <script>
 | |
|     window.addEventListener('message', function(event) {
 | |
|       if (event.data.type === "showUI") {
 | |
|         document.body.style.display = event.data.show ? 'flex' : 'none';
 | |
|       }
 | |
|     });
 | |
| 
 | |
|     function setPed() {
 | |
|       const pedName = document.getElementById("pedSelect").value;
 | |
|       fetch(`https://${GetParentResourceName()}/SetPed`, {
 | |
|         method: 'POST',
 | |
|         headers: { 'Content-Type': 'application/json' },
 | |
|         body: JSON.stringify({ ped: pedName })
 | |
|       });
 | |
|     }
 | |
| 
 | |
|     function resetPed() {
 | |
|       fetch(`https://${GetParentResourceName()}/ResetPed`, {
 | |
|         method: 'POST' });
 | |
|     }
 | |
|   </script>
 | |
| </body>
 | |
| </html>
 | 
