From 3d9c9f56f436d21fe6622f59176ff4a914ec294e Mon Sep 17 00:00:00 2001 From: lenovo Date: Sun, 4 Dec 2022 22:50:43 +0100 Subject: [PATCH] wip drop down menu --- tests_hugo/chat_node/README.md | 40 +- tests_hugo/chat_node/chat_client/chat.html | 27 + .../chat_node/chat_client/style/chat.css | 2 + .../chat_client/style/drop_down_menu.css | 42 + .../chat_node/chat_client/style/globals.css | 3 + .../chat_client/style/msg_controls.css | 16 + .../chat_node/chat_server/package-lock.json | 1360 +++++++++++++++++ tests_hugo/chat_node/chat_server/package.json | 7 + 8 files changed, 1491 insertions(+), 6 deletions(-) create mode 100644 tests_hugo/chat_node/chat_client/style/drop_down_menu.css create mode 100644 tests_hugo/chat_node/chat_client/style/globals.css create mode 100644 tests_hugo/chat_node/chat_client/style/msg_controls.css create mode 100644 tests_hugo/chat_node/chat_server/package-lock.json create mode 100644 tests_hugo/chat_node/chat_server/package.json diff --git a/tests_hugo/chat_node/README.md b/tests_hugo/chat_node/README.md index 07fe6b18..5f59b451 100644 --- a/tests_hugo/chat_node/README.md +++ b/tests_hugo/chat_node/README.md @@ -2,8 +2,7 @@ - [socket io multi room chat](http://psitsmike.com/2011/10/node-js-and-socket-io-multiroom-chat-tutorial/) first time : - npm install --save express - npm install --save socket.io + npm install --save express socket.io cors sudo npm install -g nodemon next time : @@ -19,8 +18,37 @@ anytime : - [ ] what to do with message not received ? ``` --> create_room('create_room', room_name); --> change_room('change_room', room_name); --> get_room_history('get_room_history', room_name); -``` +-> create_public_conv( room_name ); +-> create_private_conv( room_name ); +-> create_protected_conv( room_name ); +-> create_direct_conv( room_name ); + +-> change_conv( room_name ); + +-> get_conv_history( room_name ); +-> get_last_conv(); + +-> get_my_convs_directs( ); +-> get_my_convs_rooms( ); +-> get_public_convs( ); + +[ list ][ create ][ join ] + "directs" . [direct] (public and protected) + "rooms" . [room] + . public + . private + . protected + +on connection : + get_convs_directs(); + get_convs_rooms(); + last_conv = get_last_conv(); + if (last_conv) + get_conv_history(last_conv); + + +``` +## todo: +- check if drop down menu works also with buttons instead of
+- add window for option when select 'room' diff --git a/tests_hugo/chat_node/chat_client/chat.html b/tests_hugo/chat_node/chat_client/chat.html index 2229c9ce..e11db5ae 100644 --- a/tests_hugo/chat_node/chat_client/chat.html +++ b/tests_hugo/chat_node/chat_client/chat.html @@ -13,6 +13,33 @@
+ + +
+

join

+