From 63f6ac828f0901cb409b379665ab36df02301ae5 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Thu, 23 Oct 2025 21:23:12 +0200 Subject: [PATCH] Remove process display functionality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Motivations :** - Process display is not needed at this stage and clutters the interface - User feedback indicates it's ugly and unnecessary **Modifications :** - Removed displayExistingProcesses() function calls from handleMainPairing() - Removed displayExistingProcesses() function calls from initHomePage() - Deleted the entire displayExistingProcesses() function - Simplified interface to focus on core pairing functionality **Pages affectΓ©es :** - src/pages/home/home.ts --- src/pages/home/home.ts | 57 ------------------------------------------ 1 file changed, 57 deletions(-) diff --git a/src/pages/home/home.ts b/src/pages/home/home.ts index fbf4cd4..9dade17 100755 --- a/src/pages/home/home.ts +++ b/src/pages/home/home.ts @@ -153,10 +153,6 @@ export async function initHomePage(): Promise { console.log('πŸ” Auto-triggering WebAuthn authentication...'); await handleMainPairing(); - // Display existing processes even if authentication fails - console.log('πŸ“Š Displaying existing processes...'); - await displayExistingProcesses(); - // Hide loading spinner after initialization console.log('πŸ”§ Hiding loading spinner...'); hideHomeLoadingSpinner(); @@ -585,9 +581,6 @@ async function handleMainPairing(): Promise { // Now proceed with pairing process await prepareAndSendPairingTx(); - // Display any existing processes in the status field - await displayExistingProcesses(); - } catch (error) { console.error('Pairing failed:', error); @@ -597,56 +590,6 @@ async function handleMainPairing(): Promise { } } -// Display existing processes in the status field -async function displayExistingProcesses(): Promise { - try { - const service = await Services.getInstance(); - const processes = await service.getProcesses(); - - const container = getCorrectDOM('login-4nk-component') as HTMLElement; - const mainStatus = container.querySelector('#main-status') as HTMLElement; - - if (!mainStatus) { - console.warn('Main status element not found'); - return; - } - - const processCount = Object.keys(processes).length; - console.log(`πŸ“Š Found ${processCount} existing processes`); - - if (processCount === 0) { - if (mainStatus) { - mainStatus.innerHTML = 'πŸ“‹ No existing processes found'; - } - return; - } - - // Display all processes as simple text - let allMessages = ''; - for (const [processId, process] of Object.entries(processes)) { - const processInfo = { - id: processId.substring(0, 8) + '...', - states: process.states?.length || 0, - members: Object.keys(process.members || {}).length, - lastUpdate: process.last_update || 'Unknown' - }; - - allMessages += `πŸ“‹ Process ${processInfo.id} - States: ${processInfo.states}, Members: ${processInfo.members}, Updated: ${processInfo.lastUpdate}\n`; - } - - if (mainStatus) { - mainStatus.innerHTML = `
${allMessages}
`; - } - - } catch (error) { - console.error('❌ Error displaying processes:', error); - const container = getCorrectDOM('login-4nk-component') as HTMLElement; - const mainStatus = container.querySelector('#main-status') as HTMLElement; - if (mainStatus) { - mainStatus.innerHTML = '❌ Error loading processes'; - } - } -} // Account Actions export function setupAccountActions(): void {