fix score ui issue when on mobile and add swagger to the footer
Some checks failed
Deploy Backend / deploy (push) Failing after 2m25s
Deploy Website / deploy (push) Successful in 7m19s

This commit is contained in:
Lee 2024-10-19 07:36:20 +01:00
parent 37b491a0b5
commit 0931e52df5
4 changed files with 9 additions and 13 deletions

View File

@ -43,8 +43,6 @@ spec:
namespace: traefik
- name: compress
namespace: traefik
- name: scoresaber-reloaded-backend-strip-swagger-prefix
namespace: public-services
services:
- name: scoresaber-reloaded-backend-service
port: 8080

View File

@ -1,10 +0,0 @@
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: scoresaber-reloaded-backend-strip-swagger-prefix
namespace: public-services
spec:
stripPrefix:
prefixes:
- "/swagger"

View File

@ -32,6 +32,11 @@ const items: NavbarItem[] = [
link: "https://status.fascinated.cc/status/scoresaber-reloaded",
openInNewTab: true,
},
{
name: "Swagger",
link: "/swagger",
openInNewTab: true,
},
];
export default function Footer() {
@ -44,7 +49,7 @@ export default function Footer() {
<p className="hidden md:block">({buildTime})</p>
<p className="none md:hidden">({buildTimeShort})</p>
</div>
<div className="h-10 w-full flex flex-wrap items-center justify-center bg-secondary/95 divide-x divide-input">
<div className="w-full flex flex-wrap items-center justify-center bg-secondary/95 divide-x divide-input text-sm py-2">
{items.map((item, index) => {
return (
<Link

View File

@ -13,6 +13,7 @@ import { scoresaberService } from "@ssr/common/service/impl/scoresaber";
import ScoreSaberScore from "@ssr/common/score/impl/scoresaber-score";
import ScoreSaberLeaderboard from "@ssr/common/leaderboard/impl/scoresaber-leaderboard";
import { BeatSaverMap } from "@ssr/common/model/beatsaver/beatsaver-map";
import { useIsMobile } from "@/hooks/use-is-mobile";
type Props = {
/**
@ -44,6 +45,7 @@ type Props = {
};
export default function Score({ player, leaderboard, beatSaverMap, score, settings }: Props) {
const isMobile = useIsMobile();
const [baseScore, setBaseScore] = useState<number>(score.score);
const [isLeaderboardExpanded, setIsLeaderboardExpanded] = useState(false);
@ -82,6 +84,7 @@ export default function Score({ player, leaderboard, beatSaverMap, score, settin
leaderboard={leaderboard}
beatSaverMap={beatSaverMap}
score={score}
alwaysSingleLine={isMobile}
setIsLeaderboardExpanded={setIsLeaderboardExpanded}
updateScore={score => {
setBaseScore(score.score);