From aa406458362967213f7ef702f69e73913147cc31 Mon Sep 17 00:00:00 2001 From: Laura Date: Mon, 25 Aug 2025 23:36:46 +0200 Subject: [PATCH] better notifications --- static/css/chat.css | 39 ++++++++++++++++++++++++++++++ static/css/icons/error.svg | 7 ++++++ static/index.html | 2 ++ static/js/chat.js | 49 ++++++++++++++++++++++++++++---------- static/js/lib.js | 4 ++++ 5 files changed, 89 insertions(+), 12 deletions(-) create mode 100644 static/css/icons/error.svg diff --git a/static/css/chat.css b/static/css/chat.css index 261d00f..c4decc2 100644 --- a/static/css/chat.css +++ b/static/css/chat.css @@ -127,6 +127,44 @@ body:not(.loading) #loading { pointer-events: none; } +#notifications { + position: absolute; + top: 15px; + right: 20px; +} + +.notification { + position: relative; + background: #24273a; + padding: 12px 15px; + border-radius: 6px; + width: 280px; + margin-bottom: 10px; + transition: 250ms; + color: #ed8796; + border: 2px solid #ed8796; + left: 0px; + overflow: hidden; +} + +.notification.off-screen { + height: 0px !important; + border-width: 0px; + left: calc(100% + 20px); + padding: 0px 15px; + margin-bottom: 0px; +} + +.notification::before { + content: ""; + background-image: url(icons/error.svg); + position: absolute; + top: 4px; + right: 4px; + width: 16px !important; + height: 16px !important; +} + #page { display: flex; flex-direction: column; @@ -752,6 +790,7 @@ select { } body.loading #version, +.notification::before, #title-refresh, #loading .inner::after, .modal.loading .content::after, diff --git a/static/css/icons/error.svg b/static/css/icons/error.svg new file mode 100644 index 0000000..4232937 --- /dev/null +++ b/static/css/icons/error.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/static/index.html b/static/index.html index 5cca6f7..6cea0c1 100644 --- a/static/index.html +++ b/static/index.html @@ -25,6 +25,8 @@ +
+