dkforest

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

commit 1f6ae8f6b54a66bb4dae9af1c89b25b45603d412
parent 2741212f28f6904404e537b9a72a47154395e3ae
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed,  7 Jun 2023 04:36:36 -0700

add css/sql

Diffstat:
Mpkg/web/handlers/api/v1/topBarHandler.go | 2+-
Mpkg/web/handlers/handlers.go | 2++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkg/web/handlers/api/v1/topBarHandler.go b/pkg/web/handlers/api/v1/topBarHandler.go @@ -272,7 +272,7 @@ func ChatTopBarHandler(c echo.Context) error { if authUser.CanUseMultiline && c.Request().PostFormValue("sender") == "codeModal" { database.MsgPubSub.Pub("code_hide_"+authUser.ID.String()+"_"+room.ID.String(), database.ChatMessageType{}) lang := c.Request().PostFormValue("lang") - if !utils.InArr(lang, []string{"go", "c", "cpp", "py", "js", "php"}) { + if !utils.InArr(lang, []string{"go", "c", "cpp", "py", "js", "php", "css", "sql"}) { lang = "" } newOrigMessage := "\n```" + lang + "\n" + origMessage + "\n```\n" diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -5270,6 +5270,8 @@ Loop: <option value="py">Python</option> <option value="js">Javascript</option> <option value="php">PHP</option> + <option value="css">CSS</option> + <option value="sql">SQL</option> </select> <button type="submit">send</button> </div>