Skip to content

Commit

Permalink
Merge pull request #318 from gaohan085/dev
Browse files Browse the repository at this point in the history
fix page '/actress/:name' video box title style error
  • Loading branch information
gaohan085 authored Nov 14, 2024
2 parents 3ca7f3c + 2478f94 commit 441c9ab
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 29 deletions.
29 changes: 18 additions & 11 deletions routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,34 @@ func SetRoutes(app *fiber.App) {

app.Get("/api/ws", handlers.Wshandler)

app.Static("/assets", "./assets/")

api := app.Group("/api")
api.Get("/disk", handlers.DiskUsageHandler)
api.Post("/delete", handlers.DeleteHandler)
api.Post("/rename", handlers.RenameHandler)
api.Get("/version", handlers.VersionHandler)
api.Get("/actress/:name", handlers.GetVideosByActress)
api.Post("/convert", handlers.ConvertHandler)

switch os.Getenv("FileLocation") {
case "local":
api.Get("/*", handlers.FileReaderHandler)
app.Static("/assets", "./assets/")

api.Get("/disk", handlers.DiskUsageHandler)
api.Post("/delete", handlers.DeleteHandler)
api.Post("/rename", handlers.RenameHandler)
api.Get("/version", handlers.VersionHandler)
api.Get("/actress/:name", handlers.GetVideosByActress)
api.Post("/convert", handlers.ConvertHandler)
api.Get("/*", handlers.FileReaderHandler)
default:
app.Get("/assets/*", func(c *fiber.Ctx) error {
path, err := url.QueryUnescape(c.Params("*"))
if err != nil {
return err
}

return proxy.Do(c, "http://192.168.1.199/assets/"+path)
})

api.Get("/*", func(c *fiber.Ctx) error {
path, err := url.QueryUnescape(c.Params("*"))
if err != nil {
return err
}

return proxy.Do(c, "http://192.168.1.199/api/"+path)
})

Expand All @@ -54,5 +62,4 @@ func SetRoutes(app *fiber.App) {
Browse: true,
}))
app.Get("/*", handlers.IndexHandler)

}
1 change: 0 additions & 1 deletion web_src/Components/folder-element.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

.container-enter-active {
opacity: 1;
height: calc-size(auto);
padding-left: 0px;
transition: all .3s ease-in-out;
}
Expand Down
2 changes: 1 addition & 1 deletion web_src/Components/player-title.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.title {
.player-title {
border-left: 3px solid #e85982;
border-right: 3px solid #e85982;
padding: 0.25rem 1rem;
Expand Down
2 changes: 1 addition & 1 deletion web_src/Components/player-title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Title: React.FC = () => {
);

return (
<div className={styles["title"]}>
<div className={styles["player-title"]}>
<h4>
{!!videoPlaying.name &&
`${serialNumber ? serialNumber[0] : videoPlaying.name} ${videoPlaying.title}`}
Expand Down
28 changes: 14 additions & 14 deletions web_src/Components/video-boxes-sidebar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
padding: 5px;
border-radius: 5px;

[class~="img-box"] {
> [class~="img-box"] {
position: relative;
padding-top: 5px;
padding-right: 10px;
cursor: pointer;

Expand All @@ -31,27 +30,28 @@
}
}

[class~="title"] {
> [class~="img-box-title"] {
width: 100%;
height: 100%;
white-space-collapse: collapse;
overflow: hidden;
text-overflow: ellipsis;
height: calc(50%);
padding: 5px;
padding-left: 0px;
cursor: pointer;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
line-clamp: 3;
overflow: hidden;
a {
font-size: 14px;
font-size: 13px;
&:hover{
color: color.scale(base.$main-color,$lightness: 10%);
}
}
}

&[class~="playing"] {
// outline: 1px solid lighten(base.$main-color, 15%);
outline: 1px solid color.scale(base.$main-color, $lightness: 15%);
}

&:hover {
[class~="title"] a {
color: color.scale(base.$main-color,$lightness: 10%);
}
}
}
}
2 changes: 1 addition & 1 deletion web_src/Components/video-boxes-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const VideoBox: React.FC<VideoInfo> = (props) => {
<div className="img-box">
<img src={`/assets/poster/${posterName}`} loading="lazy" />
</div>
<div className="title">
<div className="img-box-title">
<a>{`${serialNumber} ${title}`}</a>
</div>
</div>
Expand Down

0 comments on commit 441c9ab

Please sign in to comment.