Fix can rejoin SQ via vote in off-season
Some checks failed
E2E Tests / e2e (push) Has been cancelled
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled

Closes #3079
This commit is contained in:
Kalle
2026-05-19 22:04:35 +03:00
parent 32c0a872b2
commit beaf7bb2e4
20 changed files with 38 additions and 3 deletions

View File

@@ -162,6 +162,8 @@ export const action = async ({ request, params }: ActionFunctionArgs) => {
break;
}
case "CAST_CONTINUE_VOTE": {
errorToastIfFalsy(Seasons.current(), "Season is not active");
const viewerSide = SendouQMatch.resolveGroupMemberOf({
groupAlpha: match.groupAlpha,
groupBravo: match.groupBravo,

View File

@@ -106,3 +106,12 @@ function DeclinedSection() {
</div>
);
}
export function OffSeasonRejoinSection() {
const { t } = useTranslation(["q"]);
return (
<p className="text-lighter text-sm text-center">
{t("q:match.rematch.offSeason")}
</p>
);
}

View File

@@ -19,7 +19,11 @@ import {
} from "../core/match-timeline";
import * as SendouQMatch from "../core/SendouQMatch";
import type { SendouQMatchLoaderData } from "../loaders/q.match.$id.server";
import { MatchmadeRejoinSection, TrustedRejoinSection } from "./RejoinSections";
import {
MatchmadeRejoinSection,
OffSeasonRejoinSection,
TrustedRejoinSection,
} from "./RejoinSections";
import styles from "./SendouQMatchActionTab.module.css";
export function SendouQMatchActionTab({
@@ -222,7 +226,8 @@ function RequeueTab({
</div>
) : (
<div className={styles.rematchContent}>
{viewerGroup.matchmade ? (
{data.isOffSeason ? <OffSeasonRejoinSection /> : null}
{!data.isOffSeason && viewerGroup.matchmade ? (
<MatchmadeRejoinSection
data={data}
viewerGroup={viewerGroup}
@@ -231,7 +236,8 @@ function RequeueTab({
isOnReporterTeam={isOnReporterTeam}
/>
) : null}
{!viewerGroup.matchmade &&
{!data.isOffSeason &&
!viewerGroup.matchmade &&
(!awaitingConfirmation || isOnReporterTeam) ? (
<TrustedRejoinSection
viewerGroup={viewerGroup}

View File

@@ -2,6 +2,7 @@ import type { LoaderFunctionArgs } from "react-router";
import { getUser } from "~/features/auth/core/user.server";
import { chatAccessible } from "~/features/chat/chat-utils";
import * as RoomLinkRepository from "~/features/chat/RoomLinkRepository.server";
import * as Seasons from "~/features/mmr/core/Seasons";
import { SendouQ } from "~/features/sendouq/core/SendouQ.server";
import * as PrivateUserNoteRepository from "~/features/sendouq/PrivateUserNoteRepository.server";
import * as ReportedWeaponRepository from "~/features/sendouq-match/ReportedWeaponRepository.server";
@@ -45,6 +46,7 @@ export const loader = async ({ params }: LoaderFunctionArgs) => {
roomLinks,
anyUserPrefersNoSplatnet,
reportedWeapons,
isOffSeason: Seasons.current() === null,
chatCode: (() => {
const isStaff = user?.roles.includes("STAFF") ?? false;
const isParticipant = user && matchUsers.includes(user.id);

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "Waiting for the captain to choose whether to re-queue",
"match.rematch.rejoinQueue": "Rejoin queue",
"match.rematch.backToQueue": "Back to queue",
"match.rematch.offSeason": "Season has ended. The queue will reopen when the next season starts.",
"match.banner.final": "Final",
"match.banner.bestOf": "Best of {{count}}",
"match.banner.playAll": "Play all {{count}}",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",

View File

@@ -219,6 +219,7 @@
"match.rematch.waitingCaptain": "",
"match.rematch.rejoinQueue": "",
"match.rematch.backToQueue": "",
"match.rematch.offSeason": "",
"match.banner.final": "",
"match.banner.bestOf": "",
"match.banner.playAll": "",