commit f07e38b34e0c80e70348dfea69180b83cf4c2127
parent 87ec38650b19251e10faf97e8c8966ce407807ee
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Thu, 1 Jun 2023 09:48:53 -0700
improve alive indicator
Diffstat:
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/pkg/web/handlers/api/v1/messages.qtpl b/pkg/web/handlers/api/v1/messages.qtpl
@@ -194,10 +194,10 @@
top: 1px;
right: 35px;
border-radius: 9px;
- animation: indicator1 10s forwards;
+ animation: i1 30s forwards;
}
- @keyframes i1 { 0% { background-color: #006400; } 99% { background-color: #006400; } 100% { background-color: #8b0000; } }
- @keyframes i2 { 0% { background-color: #006400; } 99% { background-color: #006400; } 100% { background-color: #8b0000; } }
+ @keyframes i1 { 0% { background-color: #006400; } 32% { background-color: #006400; } 33% { background-color: #626400; } 99% { background-color: #626400; } 100% { background-color: #8b0000; } }
+ @keyframes i2 { 0% { background-color: #006400; } 32% { background-color: #006400; } 33% { background-color: #626400; } 99% { background-color: #626400; } 100% { background-color: #8b0000; } }
</style>
{%- endfunc -%}
diff --git a/pkg/web/handlers/api/v1/messages.qtpl.go b/pkg/web/handlers/api/v1/messages.qtpl.go
@@ -252,10 +252,10 @@ func StreamGenerateStyle(qw422016 *qt422016.Writer, AuthUser *database.User, Dat
top: 1px;
right: 35px;
border-radius: 9px;
- animation: indicator1 10s forwards;
+ animation: i1 30s forwards;
}
- @keyframes i1 { 0% { background-color: #006400; } 99% { background-color: #006400; } 100% { background-color: #8b0000; } }
- @keyframes i2 { 0% { background-color: #006400; } 99% { background-color: #006400; } 100% { background-color: #8b0000; } }
+ @keyframes i1 { 0% { background-color: #006400; } 32% { background-color: #006400; } 33% { background-color: #626400; } 99% { background-color: #626400; } 100% { background-color: #8b0000; } }
+ @keyframes i2 { 0% { background-color: #006400; } 32% { background-color: #006400; } 33% { background-color: #626400; } 99% { background-color: #626400; } 100% { background-color: #8b0000; } }
</style>
`)
//line messages.qtpl:202
diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go
@@ -5176,7 +5176,7 @@ Loop:
db.UpdateChatReadRecord(authUser.ID, room.ID)
// Toggle the "http alive indicator" class to keep the dot green
- send(fmt.Sprintf(`<style>#i{animation: %s 10s forwards}</style>`,
+ send(fmt.Sprintf(`<style>#i{animation: %s 30s forwards}</style>`,
utils.Ternary(indicatorSelector, "i1", "i2")))
indicatorSelector = !indicatorSelector