From b16bf4a5e23f5218391f0e12ede704a442bead79 Mon Sep 17 00:00:00 2001 From: Nur Muhammad Date: Tue, 5 Jul 2022 17:42:13 +0800 Subject: [PATCH] Improve UI styles --- index-multiple-account.html | 86 ++++++++++++++++++++++++++++++------- index.html | 40 ++++++++++++++++- 2 files changed, 110 insertions(+), 16 deletions(-) diff --git a/index-multiple-account.html b/index-multiple-account.html index 3929c64..05a2bf3 100644 --- a/index-multiple-account.html +++ b/index-multiple-account.html @@ -2,17 +2,73 @@ Whatsapp API by Ngekoding + + + @@ -26,10 +82,9 @@


-

+
-

@@ -67,6 +122,7 @@ template.find('.title').html(clientId); template.find('.description').html(clientDescription); + template.find('.logs').append($('
  • ').text('Connecting...')); $('.client-container').append(template); socket.emit('create-session', { @@ -94,9 +150,9 @@ $('.client-container').append(template); if (session.ready) { - $(`.client.${clientClass} .logs`).append($('
  • ').text('Whatsapp is ready!')); + $(`.client.${clientClass} .logs`).prepend($('
  • ').text('Whatsapp is ready!')); } else { - $(`.client.${clientClass} .logs`).append($('
  • ').text('Connecting...')); + $(`.client.${clientClass} .logs`).prepend($('
  • ').text('Connecting...')); } } }); @@ -106,7 +162,7 @@ }); socket.on('message', function(data) { - $(`.client.client-${data.id} .logs`).append($('
  • ').text(data.text)); + $(`.client.client-${data.id} .logs`).prepend($('
  • ').text(data.text)); }); socket.on('qr', function(data) { diff --git a/index.html b/index.html index 1a007b0..b134215 100644 --- a/index.html +++ b/index.html @@ -2,6 +2,44 @@ Whatsapp API by Ngekoding + + + + @@ -20,7 +58,7 @@ var socket = io(); socket.on('message', function(msg) { - $('.logs').append($('
  • ').text(msg)); + $('.logs').prepend($('
  • ').text(msg)); }); socket.on('qr', function(src) {