From 726b2b2460576877feb687d2fad93b02ad3ce47a Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Sun, 9 Jun 2024 19:18:21 +0300 Subject: [PATCH 01/17] chore(minify): minify to the pages handler --- app/cmd/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cmd/server/server.go b/app/cmd/server/server.go index f6ee178d..2bfc26cf 100644 --- a/app/cmd/server/server.go +++ b/app/cmd/server/server.go @@ -115,7 +115,7 @@ func StartServer(staticFS embed.FS) error { apisHandler.HandleFunc("GET /history/{page}", gHandler.AuthApi(historyApi.HandleGetMoreHistoryItems)) applicationHandler := http.NewServeMux() - applicationHandler.Handle("/", pagesHandler) + applicationHandler.Handle("/", m.Middleware(pagesHandler)) applicationHandler.Handle("/api/", http.StripPrefix("/api", apisHandler)) log.Info("Starting http server at port " + config.Env().Port) From 052d0606f33ae232b853cfdde899a496d9d25a22 Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Mon, 10 Jun 2024 04:25:58 +0300 Subject: [PATCH 02/17] fix(search): add form action for seo shit --- app/views/components/search/search.templ | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/components/search/search.templ b/app/views/components/search/search.templ index 37607e41..ef1fe6b9 100644 --- a/app/views/components/search/search.templ +++ b/app/views/components/search/search.templ @@ -6,6 +6,7 @@ templ Search() {
Date: Mon, 10 Jun 2024 09:53:16 +0300 Subject: [PATCH 03/17] chore(minify): MINIFY EVERYTHING --- app/cmd/server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/cmd/server/server.go b/app/cmd/server/server.go index 2bfc26cf..9364c066 100644 --- a/app/cmd/server/server.go +++ b/app/cmd/server/server.go @@ -115,9 +115,9 @@ func StartServer(staticFS embed.FS) error { apisHandler.HandleFunc("GET /history/{page}", gHandler.AuthApi(historyApi.HandleGetMoreHistoryItems)) applicationHandler := http.NewServeMux() - applicationHandler.Handle("/", m.Middleware(pagesHandler)) + applicationHandler.Handle("/", pagesHandler) applicationHandler.Handle("/api/", http.StripPrefix("/api", apisHandler)) log.Info("Starting http server at port " + config.Env().Port) - return http.ListenAndServe(":"+config.Env().Port, applicationHandler) + return http.ListenAndServe(":"+config.Env().Port, m.Middleware(applicationHandler)) } From afd071c838fef9f1b6fd4b2d250dcd27849d238a Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Mon, 10 Jun 2024 15:57:10 +0300 Subject: [PATCH 04/17] chore(ytdl): add db timeout notice --- ytdl/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ytdl/main.py b/ytdl/main.py index 4bce9b66..3030d53c 100644 --- a/ytdl/main.py +++ b/ytdl/main.py @@ -12,7 +12,7 @@ ############################################################################################################################################################################################################################## ############################################################################################################################################################################################################################## -## Envirnmental variables +## Environmental variables ############################################################################################################################################################################################################################## ############################################################################################################################################################################################################################## @@ -33,6 +33,12 @@ def get_env(key) -> str: ############################################################################################################################################################################################################################## ############################################################################################################################################################################################################################## ## DB + +## Execute those on the target's mariadb +## +## SET @@GLOBAL.wait_timeout=31536000; +## SET @@GLOBAL.interactive_timeout=31536000; + ############################################################################################################################################################################################################################## ############################################################################################################################################################################################################################## From fbb3ef6468aecf4bad513e04f52fdfdc5cbddbdc Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Tue, 11 Jun 2024 00:13:48 +0300 Subject: [PATCH 05/17] chore(thmeme): update black's accent color --- app/static/css/themes/black.css | 12 ++++-------- app/views/components/themeswitch/themeswitch.templ | 8 ++++---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/app/static/css/themes/black.css b/app/static/css/themes/black.css index c0599c9f..81d3b913 100644 --- a/app/static/css/themes/black.css +++ b/app/static/css/themes/black.css @@ -9,12 +9,8 @@ --secondary-color-30: #ffffff4c; --secondary-color-69: #ffffffb0; - --accent-color: #d3fcbf; - --accent-color-20: #d3fcbf33; - --accent-color-30: #d3fcbf4c; - --accent-color-69: #d3fcbfb0; -} - -body { - background-color: #131313; + --accent-color: #236104; + --accent-color-20: #23610433; + --accent-color-30: #2361044c; + --accent-color-69: #236104b0; } diff --git a/app/views/components/themeswitch/themeswitch.templ b/app/views/components/themeswitch/themeswitch.templ index bf2ff4c7..0d8cfec0 100644 --- a/app/views/components/themeswitch/themeswitch.templ +++ b/app/views/components/themeswitch/themeswitch.templ @@ -77,10 +77,10 @@ script changeTheme(themeName string) { secondary20: "#ffffff33", secondary30: "#ffffff4c", secondary69: "#ffffffb0", - accent: "#d3fcbf", - accent20: "#d3fcbf33", - accent30: "#d3fcbf4C", - accent69: "#d3fcbfB0", + accent: "#236104", + accent20: "#23610433", + accent30: "#2361044C", + accent69: "#236104B0", bg: "#131313", }, white: { From ce9d40fc9ca7293b5e3542b63554dc4b5c48542b Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Tue, 11 Jun 2024 00:16:20 +0300 Subject: [PATCH 06/17] chore(theme): remove that weird ass background --- app/static/css/themes/dank.css | 4 ---- app/static/css/themes/white.css | 4 ---- app/views/components/themeswitch/themeswitch.templ | 4 ---- 3 files changed, 12 deletions(-) diff --git a/app/static/css/themes/dank.css b/app/static/css/themes/dank.css index 7588bd6e..bfd59c7b 100644 --- a/app/static/css/themes/dank.css +++ b/app/static/css/themes/dank.css @@ -14,7 +14,3 @@ --accent-color-30: #0000004c; --accent-color-69: #000000b0; } - -body { - background-color: #305922; -} diff --git a/app/static/css/themes/white.css b/app/static/css/themes/white.css index 233cfaef..463f55dd 100644 --- a/app/static/css/themes/white.css +++ b/app/static/css/themes/white.css @@ -14,7 +14,3 @@ --accent-color-30: #d5ffc14c; --accent-color-69: #d5ffc1b0; } - -body { - background-color: #dedede; -} diff --git a/app/views/components/themeswitch/themeswitch.templ b/app/views/components/themeswitch/themeswitch.templ index 0d8cfec0..415a3263 100644 --- a/app/views/components/themeswitch/themeswitch.templ +++ b/app/views/components/themeswitch/themeswitch.templ @@ -66,7 +66,6 @@ script changeTheme(themeName string) { accent20: "#00000033", accent30: "#0000004c", accent69: "#000000b0", - bg: "#305922", }, black: { primary: "#000000", @@ -81,7 +80,6 @@ script changeTheme(themeName string) { accent20: "#23610433", accent30: "#2361044C", accent69: "#236104B0", - bg: "#131313", }, white: { primary: "#ffffff", @@ -96,7 +94,6 @@ script changeTheme(themeName string) { accent20: "#d5ffc133", accent30: "#d5ffc14c", accent69: "#d5ffc1b0", - bg: "#ededed", }, }; @@ -118,6 +115,5 @@ script changeTheme(themeName string) { style.setProperty('--accent-color-20', theme.accent20); style.setProperty('--accent-color-30', theme.accent30); style.setProperty('--accent-color-69', theme.accent69); - document.body.style.backgroundColor = theme.bg; //document.getElementById("popover-theme-switcher").style.display = "none"; } From 0d7b04e520ab2e17ccbc1177c4541084c42ee44b Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Tue, 11 Jun 2024 00:16:50 +0300 Subject: [PATCH 07/17] chore(theme): add borders and shit --- app/views/components/header/header.templ | 2 +- app/views/components/mobilenav/mobilenav.templ | 7 +++++-- app/views/layouts/default.templ | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/components/header/header.templ b/app/views/components/header/header.templ index c92396b0..cca61d0b 100644 --- a/app/views/components/header/header.templ +++ b/app/views/components/header/header.templ @@ -26,7 +26,7 @@ templ Header() { class={ "bg-primary", "p-[15px]", "md:p-[10px]", "text-secondary", "w-full", "flex", "flex-col", "md:flex-row", "justify-between", "items-center", - "gap-y-5", + "gap-y-5", "border-b", "border-b-secondary", } >
diff --git a/app/views/components/mobilenav/mobilenav.templ b/app/views/components/mobilenav/mobilenav.templ index 8703530a..5a382ddd 100644 --- a/app/views/components/mobilenav/mobilenav.templ +++ b/app/views/components/mobilenav/mobilenav.templ @@ -5,10 +5,13 @@ import "dankmuzikk/views/icons" templ MobileNav() {