9ca4ee533ef57784a93f86cdbc0f8f4946aaac63

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

clean up

Diff

This diff is truncated to protect this page.

 1diff --git a/cmd/main.go b/cmd/main.go
 2index 1c6d13c7cf76f354dfb295a6ef03f04364836b92..e7d972d73eec6c8802be68af9c0ce639d27df82d 100644
 3--- a/cmd/main.go
 4+++ b/cmd/main.go
 5@@ -88,9 +88,11 @@ func main() {
 6 
 7 	// start periodic fetch videos routine
 8 	fetcherContext, cancelFetcher := context.WithCancel(context.Background())
 9-	wg.Go(func() {
10-		fetcherRoutine(fetcherContext, logger, handler)
11-	})
12+	if !cfg.Dev {
13+		wg.Go(func() {
14+			fetcherRoutine(fetcherContext, logger, handler)
15+		})
16+	}
17 
18 	wg.Go(func() {
19 		logger.Info("ytrssil API is starting up", "port", cfg.Port)
20diff --git a/httpserver/ytrssil/auth_pages.go b/httpserver/ytrssil/auth_pages.go
21index e3d2a07070ba070bdc1abded1a703f98f90fa856..d5ce3d114296a12a359d26384a82468bb031725f 100644
22--- a/httpserver/ytrssil/auth_pages.go
23+++ b/httpserver/ytrssil/auth_pages.go
24@@ -31,7 +31,7 @@ func (srv server) HandleAuth(c *gin.Context) {
25 	c.SetCookie(
26 		"token",
27 		token,
28-		0,            // maxAge (0 = session cookie)
29+		60*60*24*30,  // maxAge (30 days in seconds)
30 		"/",          // path
31 		"",           // domain (empty = current domain)
32 		!srv.cfg.Dev, // secure (false = works on HTTP)
33diff --git a/pages/navbar.templ b/pages/navbar.templ
34index 5828b0b16de926ba421b2df3640e47751fe5dbef..6ae84a5253853af690bf972b962874d3ccd1f226 100644
35--- a/pages/navbar.templ
36+++ b/pages/navbar.templ
37@@ -12,14 +12,21 @@ templ navbar(isWatchedPage bool) {
38 			<div class="collapse navbar-collapse" id="navbarSupportedContent">
39 				<ul class="navbar-nav me-auto mb-2 mb-lg-0">
40 					<li class="nav-item me-md-2 mt-2 mt-md-0">
41-						<button type="button" data-bs-toggle="modal" data-bs-target="#subscription-modal" class="btn btn-success">
42+						<button
43+							type="button"
44+							class="btn btn-outline-secondary"
45+							style="--bs-btn-color: var(--bs-body-color);"
46+							data-bs-toggle="modal"
47+							data-bs-target="#subscription-modal"
48+						>
49 							Subscribe <i class="bi bi-bookmark-plus"></i>
50 						</button>
51 					</li>
52 					<li class="nav-item me-md-2 mt-2 mt-md-0">
53 						<button
54 							type="button"
55-							class="btn btn-primary"
56+							class="btn btn-outline-secondary"
57+							style="--bs-btn-color: var(--bs-body-color);"
58 							hx-post="/fetch"
59 							hx-swap="none"
60 							hx-on::after-settle="console.log(`AAAAA`); window.location.reload()"
61@@ -28,17 +35,23 @@ templ navbar(isWatchedPage bool) {
62 						</button>
63 					</li>
64 					<li class="nav-item me-md-2 mt-2 mt-md-0">
65-						<button type="button" data-bs-toggle="modal" data-bs-target="#add-video-modal" class="btn">
66+						<button
67+							type="button"
68+							class="btn btn-outline-secondary"
69+							style="--bs-btn-color: var(--bs-body-color);"
70+							data-bs-toggle="modal"
71+							data-bs-target="#add-video-modal"
72+						>
73 							Add Video <i class="bi bi-camera-video"></i>
74 						</button>
75 					</li>
76 					<li class="nav-item me-md-2 mt-2 mt-md-0">
77 						if isWatchedPage {
78-							<a href="/" class="btn btn-outline-secondary">
79+							<a href="/" class="btn btn-outline-secondary" style="--bs-btn-color: var(--bs-body-color);">
80 								New Videos <i class="bi bi-collection-play"></i>
81 							</a>
82 						} else {
83-							<a href="/watched" class="btn btn-outline-secondary">
84+							<a href="/watched" class="btn btn-outline-secondary" style="--bs-btn-color: var(--bs-body-color);">
85 								Watched <i class="bi bi-check-circle"></i>
86 							</a>
87 						}
88diff --git a/pages/navbar_templ.go b/pages/navbar_templ.go
89index 133e9cff43c2cae5ad7100d7ab177c9f537b83f9..88fab6583053a278f3136324376626f533ff52aa 100644
90--- a/pages/navbar_templ.go
91+++ b/pages/navbar_templ.go
92@@ -29,17 +29,17 @@ func navbar(isWatchedPage bool) templ.Component {
93 			templ_7745c5c3_Var1 = templ.NopComponent
94 		}
95 		ctx = templ.ClearChildren(ctx)