diff --git a/index.html b/index.html index aef07f1..548621f 100644 --- a/index.html +++ b/index.html @@ -1,180 +1,724 @@ - - - - XUI.ONE Admin API Documentation - - + + + XUI.ONE Admin API Documentation + + + -
-

🎬 XUI.ONE Admin API

-

Complete API Documentation for IPTV Panel Administration

- - -
- 📢 Note: This documentation is for XUI.ONE v1.5.13+. - Replace placeholder values (your-server.com, <API-KEY>, <Access-Code>) with your actual credentials. -
- -
-
⏳ Loading API Documentation...
-
- - - - - - + + + + // Tab Switching + function switchTab(tabName) { + // Update tab buttons + document.querySelectorAll('.nav-tab').forEach(tab => { + tab.classList.remove('active'); + }); + event.target.closest('.nav-tab').classList.add('active'); + + // Update content sections + document.querySelectorAll('.content-section').forEach(section => { + section.classList.remove('active'); + }); + document.getElementById(tabName + '-section').classList.add('active'); + + // Initialize Swagger UI if not already initialized + if (tabName === 'swagger' && !window.swaggerInitialized) { + initSwagger(); + } + } + + // Initialize Swagger UI + let swaggerInitialized = false; + function initSwagger() { + window.ui = SwaggerUIBundle({ + url: "./openapi.yaml", + dom_id: '#swagger-ui', + deepLinking: true, + presets: [ + SwaggerUIBundle.presets.apis, + SwaggerUIStandalonePreset + ], + plugins: [ + SwaggerUIBundle.plugins.DownloadUrl + ], + layout: "StandaloneLayout", + defaultModelsExpandDepth: 1, + defaultModelExpandDepth: 1, + docExpansion: "list", + filter: true, + showExtensions: true, + showCommonExtensions: true, + tryItOutEnabled: true + }); + window.swaggerInitialized = true; + } + + // Initialize Swagger on first swagger tab click or if URL has #swagger + if (window.location.hash === '#swagger') { + switchTab('swagger'); + } +