fix score ui issue when on mobile and add swagger to the footer
This commit is contained in:
parent
37b491a0b5
commit
0931e52df5
@ -43,8 +43,6 @@ spec:
|
|||||||
namespace: traefik
|
namespace: traefik
|
||||||
- name: compress
|
- name: compress
|
||||||
namespace: traefik
|
namespace: traefik
|
||||||
- name: scoresaber-reloaded-backend-strip-swagger-prefix
|
|
||||||
namespace: public-services
|
|
||||||
services:
|
services:
|
||||||
- name: scoresaber-reloaded-backend-service
|
- name: scoresaber-reloaded-backend-service
|
||||||
port: 8080
|
port: 8080
|
||||||
|
@ -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"
|
|
@ -32,6 +32,11 @@ const items: NavbarItem[] = [
|
|||||||
link: "https://status.fascinated.cc/status/scoresaber-reloaded",
|
link: "https://status.fascinated.cc/status/scoresaber-reloaded",
|
||||||
openInNewTab: true,
|
openInNewTab: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Swagger",
|
||||||
|
link: "/swagger",
|
||||||
|
openInNewTab: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
@ -44,7 +49,7 @@ export default function Footer() {
|
|||||||
<p className="hidden md:block">({buildTime})</p>
|
<p className="hidden md:block">({buildTime})</p>
|
||||||
<p className="none md:hidden">({buildTimeShort})</p>
|
<p className="none md:hidden">({buildTimeShort})</p>
|
||||||
</div>
|
</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) => {
|
{items.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
|
@ -13,6 +13,7 @@ import { scoresaberService } from "@ssr/common/service/impl/scoresaber";
|
|||||||
import ScoreSaberScore from "@ssr/common/score/impl/scoresaber-score";
|
import ScoreSaberScore from "@ssr/common/score/impl/scoresaber-score";
|
||||||
import ScoreSaberLeaderboard from "@ssr/common/leaderboard/impl/scoresaber-leaderboard";
|
import ScoreSaberLeaderboard from "@ssr/common/leaderboard/impl/scoresaber-leaderboard";
|
||||||
import { BeatSaverMap } from "@ssr/common/model/beatsaver/beatsaver-map";
|
import { BeatSaverMap } from "@ssr/common/model/beatsaver/beatsaver-map";
|
||||||
|
import { useIsMobile } from "@/hooks/use-is-mobile";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
/**
|
/**
|
||||||
@ -44,6 +45,7 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function Score({ player, leaderboard, beatSaverMap, score, settings }: Props) {
|
export default function Score({ player, leaderboard, beatSaverMap, score, settings }: Props) {
|
||||||
|
const isMobile = useIsMobile();
|
||||||
const [baseScore, setBaseScore] = useState<number>(score.score);
|
const [baseScore, setBaseScore] = useState<number>(score.score);
|
||||||
const [isLeaderboardExpanded, setIsLeaderboardExpanded] = useState(false);
|
const [isLeaderboardExpanded, setIsLeaderboardExpanded] = useState(false);
|
||||||
|
|
||||||
@ -82,6 +84,7 @@ export default function Score({ player, leaderboard, beatSaverMap, score, settin
|
|||||||
leaderboard={leaderboard}
|
leaderboard={leaderboard}
|
||||||
beatSaverMap={beatSaverMap}
|
beatSaverMap={beatSaverMap}
|
||||||
score={score}
|
score={score}
|
||||||
|
alwaysSingleLine={isMobile}
|
||||||
setIsLeaderboardExpanded={setIsLeaderboardExpanded}
|
setIsLeaderboardExpanded={setIsLeaderboardExpanded}
|
||||||
updateScore={score => {
|
updateScore={score => {
|
||||||
setBaseScore(score.score);
|
setBaseScore(score.score);
|
||||||
|
Reference in New Issue
Block a user