Compare commits

...

5 Commits

Author SHA1 Message Date
IRHM ba28ae14f1 v1.44.0 2024-10-06 22:10:51 +01:00
IRHM 674c1a0e86 1.44.0-dev 2024-10-06 20:18:39 +01:00
IRHM aa754210a4 auth: use secret from config 2024-10-06 19:40:11 +01:00
IRHM 2fbdd5a16a Fix .small-scrollbar style for chromium
.small-scrollbar is used on poster rating/status lists, but wasn't working because we also have the `scrollbar-width` property set, so now if the browser supports the webkit scrollbar styling, we will prefer that over scrollbar-width.

Don't know if this will break safari or whatever but hell if ima download that.

firefox scrollbar looks nice and this will let us keep using scrollbar-width: small wherever we want for that sweet smol bar action in ff
2024-10-04 02:15:07 +00:00
IRHM 09954d2370 Poster: Let title/overview overflow with scroll 2024-10-04 02:15:07 +00:00
6 changed files with 28 additions and 18 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "watcharr",
"version": "1.43.0",
"version": "1.44.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "watcharr",
"version": "1.43.0",
"version": "1.44.0",
"dependencies": {
"axios": "^1.7.4",
"blurhash": "^2.0.5",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "watcharr",
"version": "1.43.0",
"version": "1.44.0",
"private": true,
"scripts": {
"dev": "vite dev",
+2 -3
View File
@@ -13,7 +13,6 @@ import (
"log/slog"
"net/http"
"net/url"
"os"
"strconv"
"strings"
"time"
@@ -207,7 +206,7 @@ func AuthRequired(db *gorm.DB) gin.HandlerFunc {
}
// Parse token
token, err := jwt.ParseWithClaims(atoken, &TokenClaims{}, func(token *jwt.Token) (interface{}, error) {
return []byte(os.Getenv("JWT_SECRET")), nil
return []byte(Config.JWT_SECRET), nil
})
if err != nil {
slog.Error("AuthRequired failed to parse token", "error", err)
@@ -587,7 +586,7 @@ func signJWT(user *User) (token string, err error) {
})
// Sign and get the complete encoded token as a string using the secret
return jwt.SignedString([]byte(os.Getenv("JWT_SECRET")))
return jwt.SignedString([]byte(Config.JWT_SECRET))
}
func hashPassword(password string, p *ArgonParams) (encodedHash string, err error) {
+2 -1
View File
@@ -207,7 +207,7 @@
role="button"
tabindex="-1"
>
<a data-sveltekit-preload-data="tap" href={link}>
<a data-sveltekit-preload-data="tap" href={link} class="small-scrollbar">
<h2>
{title}
{#if year}
@@ -329,6 +329,7 @@
& > a {
height: 100%;
overflow: auto;
}
h2 {
+2 -1
View File
@@ -175,7 +175,7 @@
role="button"
tabindex="-1"
>
<a data-sveltekit-preload-data="tap" href={link}>
<a data-sveltekit-preload-data="tap" href={link} class="small-scrollbar">
<h2>
{title}
{#if year}
@@ -277,6 +277,7 @@
& > a {
height: 100%;
overflow: auto;
}
h2 {
+19 -10
View File
@@ -253,18 +253,27 @@
}
.small-scrollbar {
&::-webkit-scrollbar {
width: 4.5px;
}
@supports selector(::-webkit-scrollbar) {
&::-webkit-scrollbar {
width: 4.5px;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: rgba(155, 155, 155, 0.5);
border-radius: 20px;
border: transparent;
&::-webkit-scrollbar-thumb {
background-color: rgba(155, 155, 155, 0.5);
border-radius: 20px;
border: transparent;
}
// The scrollbar-width property will always override
// -webkit-scrollbar, but since the scrollbars in
// chromium look ugly af, we will try to unset scrollbar-width
// in these cases and use our manual styling instead to try
// mimicking beatiful firefox.
scrollbar-width: auto !important;
}
}
}