dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 5175eb22653c51633b5dad3d2b64426405803db8
parent 9f0fb3ce0bea8f955813c144c8faaac596724d90
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 24 May 2023 07:50:44 -0700

reduce bandwidth

Diffstat:
Mpkg/web/handlers/api/v1/messages.qtpl | 4++--
Mpkg/web/handlers/api/v1/messages.qtpl.go | 4++--
Mpkg/web/handlers/handlers.go | 2+-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/pkg/web/handlers/api/v1/messages.qtpl b/pkg/web/handlers/api/v1/messages.qtpl @@ -198,8 +198,8 @@ border-radius: 9px; animation: indicator1 10s forwards; } - @keyframes indicator1 { 0% { background-color: #006400; } 99% { background-color: #006400; } 100% { background-color: #8b0000; } } - @keyframes indicator2 { 0% { background-color: #006400; } 99% { background-color: #006400; } 100% { background-color: #8b0000; } } + @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; } } </style> {%- endfunc -%} diff --git a/pkg/web/handlers/api/v1/messages.qtpl.go b/pkg/web/handlers/api/v1/messages.qtpl.go @@ -264,8 +264,8 @@ func StreamGenerateStyle(qw422016 *qt422016.Writer, AuthUser *database.User, Dat border-radius: 9px; animation: indicator1 10s forwards; } - @keyframes indicator1 { 0% { background-color: #006400; } 99% { background-color: #006400; } 100% { background-color: #8b0000; } } - @keyframes indicator2 { 0% { background-color: #006400; } 99% { background-color: #006400; } 100% { background-color: #8b0000; } } + @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; } } </style> `) //line messages.qtpl:204 diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -5013,7 +5013,7 @@ Loop: // Toggle the "http alive indicator" class to keep the dot green _, _ = c.Response().Write([]byte(fmt.Sprintf(`<style>#i{animation: %s 10s forwards}</style>`, - utils.Ternary(indicatorSelector, "indicator1", "indicator2")))) + utils.Ternary(indicatorSelector, "i1", "i2")))) c.Response().Flush() indicatorSelector = !indicatorSelector