fix: adapt pairing page to work without Web Component
**Motivations :** - La fonction initHomePage cherche login-4nk-component qui n'existe pas dans la page standalone - Créer un conteneur mock pour que getCorrectDOM fonctionne **Modifications :** - Créer un conteneur mock login-4nk-component dans pairing.ts - Déplacer le contenu pairing-container dans ce conteneur **Pages affectées :** - src/pages/pairing/pairing.ts (ajout conteneur mock)
This commit is contained in:
parent
47e3166851
commit
0fa1423b13
@ -99,6 +99,18 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
</style>
|
||||
${loginHtml}
|
||||
`;
|
||||
|
||||
// Créer un conteneur simulant login-4nk-component pour getCorrectDOM
|
||||
const mockContainer = document.createElement('div');
|
||||
mockContainer.id = 'login-4nk-component';
|
||||
mockContainer.className = 'login-4nk-component';
|
||||
pairingContent.appendChild(mockContainer);
|
||||
|
||||
// Déplacer le contenu de pairing-container dans le mockContainer
|
||||
const pairingContainer = pairingContent.querySelector('.pairing-container');
|
||||
if (pairingContainer && mockContainer) {
|
||||
mockContainer.appendChild(pairingContainer);
|
||||
}
|
||||
}
|
||||
|
||||
// Importer et initialiser la logique de pairing depuis home.ts
|
||||
@ -139,4 +151,3 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
isInitializing = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user