From f6b6a0aefe08a92645a645da4230407c43ad5f8d Mon Sep 17 00:00:00 2001 From: BagusCodeStudio <60974759+baguscodestudio@users.noreply.github.com> Date: Wed, 1 Feb 2023 14:41:10 +0700 Subject: [PATCH] feat: Add instruction, revise & add new UI style Add second style for the UI Add Instruction feature for alternative of HelpNotification --- client.lua | 2 + web/index.html | 14 +- web/src/App.tsx | 6 +- web/src/components/Alert.tsx | 210 ++++++++++++++++++--------- web/src/components/InputKeyboard.tsx | 145 +++++++++++++----- web/src/components/Instruction.tsx | 118 +++++++++++++++ web/src/components/Modal.tsx | 23 ++- web/src/index.css | 13 ++ web/src/types.tsx | 15 ++ web/tailwind.config.js | 14 ++ 10 files changed, 434 insertions(+), 126 deletions(-) create mode 100644 web/src/components/Instruction.tsx diff --git a/client.lua b/client.lua index eb01835..ef58b08 100644 --- a/client.lua +++ b/client.lua @@ -1,6 +1,7 @@ local Settings = { HelpPosition = 'top-left', HelpAudio = true, + NotificationStyle = 'clean', -- clean or transparent NotificationPosition = 'top-right', NotificationAudio = true, Volume = 1 @@ -38,6 +39,7 @@ function SendAlert(title, message, type, duration, position) type=type, play=Settings.NotificationAudio, volume=Settings.Volume, + style=Settings.NotificationStyle, position=position or Settings.NotificationPosition, duration=duration } diff --git a/web/index.html b/web/index.html index 829bad1..f548347 100644 --- a/web/index.html +++ b/web/index.html @@ -4,7 +4,19 @@ - + + + +
{data.message}
+{data.message}
-{data.message}
+{data.text}
+{data.text}