From 60ab17bb26ceab70c6171b864ae7ff7355ba22f2 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Thu, 23 Oct 2025 21:17:31 +0200 Subject: [PATCH] Simplify process display to simple text messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Motivations :** - User wants simple text messages, one per line, not complex UI - Simplify the process display to basic text format **Modifications :** - Changed from complex HTML cards to simple text messages - Each process displayed as one line of text with basic info - Messages joined with newlines and displayed in monospace font - Removed complex styling and containers **Pages affectΓ©es :** - src/pages/home/home.ts --- src/pages/home/home.ts | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/pages/home/home.ts b/src/pages/home/home.ts index 2ada4b5..66efe56 100755 --- a/src/pages/home/home.ts +++ b/src/pages/home/home.ts @@ -590,7 +590,7 @@ async function handleMainPairing(): Promise { } catch (error) { console.error('Pairing failed:', error); - + if (mainStatus) { mainStatus.innerHTML = '❌ Authentication failed'; } @@ -602,28 +602,27 @@ 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; } - - // Create a list of processes to display - let processesHtml = `
-

πŸ“‹ Existing Processes (${processCount})

`; + + // Create simple text messages for each process + let messages = []; for (const [processId, process] of Object.entries(processes)) { const processInfo = { @@ -633,21 +632,15 @@ async function displayExistingProcesses(): Promise { lastUpdate: process.last_update || 'Unknown' }; - processesHtml += ` -
- Process: ${processInfo.id}
- - States: ${processInfo.states} | Members: ${processInfo.members} | Updated: ${processInfo.lastUpdate} - -
`; + messages.push(`πŸ“‹ Process ${processInfo.id} - States: ${processInfo.states}, Members: ${processInfo.members}, Updated: ${processInfo.lastUpdate}`); } - processesHtml += '
'; + const messagesText = messages.join('\n'); if (mainStatus) { - mainStatus.innerHTML = processesHtml; + mainStatus.innerHTML = `
${messagesText}
`; } - + } catch (error) { console.error('❌ Error displaying processes:', error); const container = getCorrectDOM('login-4nk-component') as HTMLElement;