diff --git a/app/db/tables.ts b/app/db/tables.ts index 1d8c12f87..2b1fc8159 100644 --- a/app/db/tables.ts +++ b/app/db/tables.ts @@ -846,6 +846,14 @@ export interface UserPreferences { clockFormat?: "24h" | "12h" | "auto"; } +export const SUBJECT_PRONOUNS = ["he", "she", "they", "it", "any"] as const; +export const OBJECT_PRONOUNS = ["him", "her", "them", "its", "all"] as const; + +export type Pronouns = { + subject: (typeof SUBJECT_PRONOUNS)[number]; + object: (typeof OBJECT_PRONOUNS)[number]; +}; + export interface User { /** 1 = permabanned, timestamp = ban active till then */ banned: Generated; @@ -874,6 +882,7 @@ export interface User { isApiAccesser: Generated; languages: string | null; motionSens: number | null; + pronouns: JSONColumnTypeNullable; patronSince: number | null; patronTier: number | null; patronTill: number | null; diff --git a/app/features/api-public/routes/org.$id.ts b/app/features/api-public/routes/org.$id.ts index bbeb9ce25..6eb579a47 100644 --- a/app/features/api-public/routes/org.$id.ts +++ b/app/features/api-public/routes/org.$id.ts @@ -47,6 +47,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => { "User.id", "User.discordId", "User.username", + "User.pronouns", "TournamentOrganizationMember.role", "TournamentOrganizationMember.roleDisplayName", ]) @@ -68,6 +69,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => { userId: member.id, discordId: member.discordId, name: member.username, + pronouns: member.pronouns, role: member.role, roleDisplayName: member.roleDisplayName, })), diff --git a/app/features/api-public/routes/tournament.$id.teams.ts b/app/features/api-public/routes/tournament.$id.teams.ts index d5ad26684..17d8f3f2e 100644 --- a/app/features/api-public/routes/tournament.$id.teams.ts +++ b/app/features/api-public/routes/tournament.$id.teams.ts @@ -90,6 +90,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => { "User.discordAvatar", "User.battlefy", "User.country", + "User.pronouns", "TournamentTeamMember.inGameName", "TournamentTeamMember.isOwner", "TournamentTeamMember.createdAt", @@ -148,6 +149,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => { country: member.country, captain: Boolean(member.isOwner), inGameName: member.inGameName, + pronouns: member.pronouns, friendCode: friendCodes[member.userId], joinedAt: databaseTimestampToDate(member.createdAt).toISOString(), }; diff --git a/app/features/api-public/routes/user.$identifier.ts b/app/features/api-public/routes/user.$identifier.ts index 256d5ea93..54ce2f7fe 100644 --- a/app/features/api-public/routes/user.$identifier.ts +++ b/app/features/api-public/routes/user.$identifier.ts @@ -39,6 +39,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => { "User.customUrl", "User.discordId", "User.discordAvatar", + "User.pronouns", "PlusTier.tier", jsonArrayFrom( eb @@ -107,6 +108,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => { : null, url: `https://sendou.ink/u/${user.customUrl ?? user.discordId}`, country: user.country, + pronouns: user.pronouns, plusServerTier: user.tier as GetUserResponse["plusServerTier"], socials: { twitch: user.twitch, diff --git a/app/features/api-public/schema.ts b/app/features/api-public/schema.ts index d967fbd2d..4b702fe09 100644 --- a/app/features/api-public/schema.ts +++ b/app/features/api-public/schema.ts @@ -37,6 +37,12 @@ export interface GetUserResponse { badges: Array; /** Teams user is member of. The main team is always first in the array. */ teams: Array; + /** + * User's pronouns. + * + * @example { "subject": "he", "object": "him" } + */ + pronouns: Pronouns | null; peakXp: number | null; /** Users current (or previous if it's off-season) ranked season (SendouQ & ranked tournaments) rank. Null if no rank for the season in question or the season does not have yet enough players on the leaderboard. */ currentRank: SeasonalRank | null; @@ -225,6 +231,12 @@ export type GetTournamentTeamsResponse = Array<{ * @example "Sendou#2955" */ inGameName: string | null; + /** + * User's pronouns. + * + * @example { "subject": "he", "object": "him" } + */ + pronouns: Pronouns | null; /** * Switch friend code used for identification purposes. * @@ -365,6 +377,12 @@ interface TournamentOrganizationMember { * @example "79237403620945920" */ discordId: string; + /** + * User's pronouns. + * + * @example { "subject": "he", "object": "him" } + */ + pronouns: Pronouns | null; role: "ADMIN" | "MEMBER" | "ORGANIZER" | "STREAMER"; roleDisplayName: string | null; } @@ -425,6 +443,14 @@ type RankTierName = | "BRONZE" | "IRON"; +type SubjectPronoun = "he" | "she" | "they" | "it" | "any"; +type ObjectPronoun = "him" | "her" | "them" | "its" | "all"; + +export interface Pronouns { + subject: SubjectPronoun; + object: ObjectPronoun; +} + type Badge = { /** * @example "Monday Afterparty" diff --git a/app/features/chat/chat-types.ts b/app/features/chat/chat-types.ts index 413f4def6..1c2a4c976 100644 --- a/app/features/chat/chat-types.ts +++ b/app/features/chat/chat-types.ts @@ -30,7 +30,7 @@ export interface ChatMessage { export type ChatUser = Pick< Tables["User"], - "username" | "discordId" | "discordAvatar" + "username" | "discordId" | "discordAvatar" | "pronouns" > & { chatNameColor: string | null; title?: string; diff --git a/app/features/chat/components/Chat.tsx b/app/features/chat/components/Chat.tsx index 702c0d6fa..63e3e4d5d 100644 --- a/app/features/chat/components/Chat.tsx +++ b/app/features/chat/components/Chat.tsx @@ -214,9 +214,20 @@ function Message({ }) { return (
  • - {user ? : null} + {user ? ( +
    + + {user.title ? ( + {user.title} + ) : null} +
    + ) : null}
    -
    +
    {user?.username ?? missingUserName}
    - {user?.title ? ( -
    - {user.title} -
    + {user?.pronouns ? ( + + {user.pronouns.subject}/{user.pronouns.object} + ) : null} {!message.pending ? ( diff --git a/app/features/sendouq-match/SQMatchRepository.server.ts b/app/features/sendouq-match/SQMatchRepository.server.ts index 0ea0fa39d..e411e5023 100644 --- a/app/features/sendouq-match/SQMatchRepository.server.ts +++ b/app/features/sendouq-match/SQMatchRepository.server.ts @@ -103,6 +103,7 @@ function groupWithTeamAndMembers( "GroupMember.role", "GroupMember.note", "User.inGameName", + "User.pronouns", "User.vc", "User.languages", "User.noScreen", diff --git a/app/features/sendouq/SQGroupRepository.server.ts b/app/features/sendouq/SQGroupRepository.server.ts index 352bcb26a..19f1beede 100644 --- a/app/features/sendouq/SQGroupRepository.server.ts +++ b/app/features/sendouq/SQGroupRepository.server.ts @@ -33,6 +33,7 @@ export async function findCurrentGroups() { discordId: Tables["User"]["discordId"]; discordAvatar: Tables["User"]["discordAvatar"]; customUrl: Tables["User"]["customUrl"]; + pronouns: Tables["User"]["pronouns"] | null; mapModePreferences: Tables["User"]["mapModePreferences"]; noScreen: Tables["User"]["noScreen"]; languages: Tables["User"]["languages"]; diff --git a/app/features/sendouq/components/GroupCard.tsx b/app/features/sendouq/components/GroupCard.tsx index 9b43692df..280c36e8a 100644 --- a/app/features/sendouq/components/GroupCard.tsx +++ b/app/features/sendouq/components/GroupCard.tsx @@ -340,6 +340,11 @@ function GroupMember({ member.username )} + {member.pronouns ? ( + + {member.pronouns.subject}/{member.pronouns.object} + + ) : null}
    {showActions || displayOnly ? ( diff --git a/app/features/tournament-bracket/components/MatchRosters.tsx b/app/features/tournament-bracket/components/MatchRosters.tsx index 7d3c2a7c0..04e6eb5db 100644 --- a/app/features/tournament-bracket/components/MatchRosters.tsx +++ b/app/features/tournament-bracket/components/MatchRosters.tsx @@ -76,7 +76,7 @@ export function MatchRosters({
  • 0 && teamOneParticipatedPlayers.every( @@ -87,6 +87,11 @@ export function MatchRosters({ > {p.username} + {p.pronouns ? ( + + {p.pronouns.subject}/{p.pronouns.object} + + ) : null}
  • ); @@ -130,7 +135,7 @@ export function MatchRosters({
  • 0 && teamTwoParticipatedPlayers.every( @@ -141,6 +146,11 @@ export function MatchRosters({ > {p.username} + {p.pronouns ? ( + + {p.pronouns.subject}/{p.pronouns.object} + + ) : null}
  • ); diff --git a/app/features/tournament-bracket/components/StartedMatch.tsx b/app/features/tournament-bracket/components/StartedMatch.tsx index 5e93273ae..7df81ffe7 100644 --- a/app/features/tournament-bracket/components/StartedMatch.tsx +++ b/app/features/tournament-bracket/components/StartedMatch.tsx @@ -662,11 +662,11 @@ function StartedMatchTabs({ ...data.match.players.map((p) => ({ ...p, title: undefined })), ...(tournament.ctx.organization?.members ?? []).map((m) => ({ ...m, - title: m.role === "STREAMER" ? "Stream" : "TO", + title: m.role === "STREAMER" ? "Cast" : "TO", })), ...tournament.ctx.staff.map((s) => ({ ...s, - title: s.role === "STREAMER" ? "Stream" : "TO", + title: s.role === "STREAMER" ? "Cast" : "TO", })), { ...tournament.ctx.author, diff --git a/app/features/tournament-bracket/core/tests/mocks-li.ts b/app/features/tournament-bracket/core/tests/mocks-li.ts index 40f6608b3..24cc0c777 100644 --- a/app/features/tournament-bracket/core/tests/mocks-li.ts +++ b/app/features/tournament-bracket/core/tests/mocks-li.ts @@ -6929,6 +6929,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ORGANIZER", id: 405, username: "ely", + pronouns: null, discordId: "260999523806085120", discordAvatar: "4f15f20946fbd992ee9d694a539e6317", customUrl: "elemental", @@ -6939,6 +6940,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ADMIN", id: 622, username: ".jpg", + pronouns: null, discordId: "201922904781357057", discordAvatar: "7fa46b7dc27fa589d3d278ba4b60224f", customUrl: "dotjpg", @@ -6949,6 +6951,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ADMIN", id: 680, username: "inkfarer", + pronouns: null, discordId: "87494390724964352", discordAvatar: "3b82ee3101ba39120b6a65c042a04a37", customUrl: "inkfarer", @@ -6959,6 +6962,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ADMIN", id: 936, username: "Raze", + pronouns: null, discordId: "119620026767507456", discordAvatar: "aa1ff5b8eefd5a26657c411138a160b8", customUrl: null, @@ -6969,6 +6973,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ADMIN", id: 1402, username: "grace", + pronouns: null, discordId: "216335108037148673", discordAvatar: "458f1e233a3b590a62f6b867b95a6241", customUrl: "grace", @@ -6979,6 +6984,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ORGANIZER", id: 1755, username: "BrushStrokes", + pronouns: null, discordId: "200777324520538113", discordAvatar: "a_d71ac2f474ce422ce711e8e74d657b2f", customUrl: "brushstrokes", @@ -6989,6 +6995,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ORGANIZER", id: 2908, username: "KitsuneKeira", + pronouns: null, discordId: "112254088992792576", discordAvatar: "711e8d48f316687faa4fdb41ab9298f0", customUrl: "kitsunekeira", @@ -6999,6 +7006,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ADMIN", id: 3742, username: "Thoma", + pronouns: null, discordId: "124007565758693376", discordAvatar: "ca9e37c9b31dfa39f88b2a2da2d4af21", customUrl: "thoma", @@ -7009,6 +7017,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ADMIN", id: 3806, username: "vlee", + pronouns: null, discordId: "113026708071821312", discordAvatar: "4b3f0da55a834acc0beb258edd9c7e34", customUrl: null, @@ -7019,6 +7028,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ADMIN", id: 4941, username: "HoeenHero", + pronouns: null, discordId: "236292964052107264", discordAvatar: "c95b9a8cfb9164f3a66267a5e8cfe8b1", customUrl: "hoeenhero", @@ -7029,6 +7039,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ORGANIZER", id: 5036, username: "toastγ", + pronouns: null, discordId: "248232091005747201", discordAvatar: "40a21a204f8fae6ae2e7e8c5de70de83", customUrl: "toasty", @@ -7039,6 +7050,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ADMIN", id: 8098, username: "Popgun", + pronouns: null, discordId: "442431978269310987", discordAvatar: "e0fd0fed98a4d3c3bfd56332678d4e6c", customUrl: "popgun", @@ -7049,6 +7061,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ORGANIZER", id: 8750, username: "LiberoWolf", + pronouns: null, discordId: "273188925189914628", discordAvatar: "c62afa020e24ead92cc043ffa809ffdc", customUrl: "liberowolf", @@ -7059,6 +7072,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ADMIN", id: 9222, username: "Jardonian", + pronouns: null, discordId: "298241282550267906", discordAvatar: "f69bb5af745eca4e9b7f55504c641f78", customUrl: "jardonian", @@ -7069,6 +7083,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ORGANIZER", id: 9719, username: "Scepidilionz", + pronouns: null, discordId: "184478601171828737", discordAvatar: "75dedb3527b73d9571151f0a00d1c365", customUrl: "scepidilionz", @@ -7079,6 +7094,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ role: "ORGANIZER", id: 18720, username: "Tulip", + pronouns: null, discordId: "103988435785650176", discordAvatar: "df9936bea9dcbd250daf8e2ef2d7c04a", customUrl: "tulip", @@ -7090,6 +7106,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ author: { id: 4941, username: "HoeenHero", + pronouns: null, discordId: "236292964052107264", discordAvatar: "c95b9a8cfb9164f3a66267a5e8cfe8b1", customUrl: "hoeenhero", @@ -7099,6 +7116,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 405, username: "ely", + pronouns: null, discordId: "260999523806085120", discordAvatar: "4f15f20946fbd992ee9d694a539e6317", customUrl: "elemental", @@ -7108,6 +7126,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 446, username: "pock", + pronouns: null, discordId: "176095582534762496", discordAvatar: "89e15b6e74f5abdef1183c9416434dde", customUrl: "pock", @@ -7117,6 +7136,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 680, username: "inkfarer", + pronouns: null, discordId: "87494390724964352", discordAvatar: "3b82ee3101ba39120b6a65c042a04a37", customUrl: "inkfarer", @@ -7126,6 +7146,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 787, username: "IV Shads", + pronouns: null, discordId: "334504066405367808", discordAvatar: "0d31f0d52ebfeaa0216fcacb86eb140a", customUrl: "shads", @@ -7135,6 +7156,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 2908, username: "KitsuneKeira", + pronouns: null, discordId: "112254088992792576", discordAvatar: "711e8d48f316687faa4fdb41ab9298f0", customUrl: "kitsunekeira", @@ -7144,6 +7166,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 2963, username: "Lepus", + pronouns: null, discordId: "412316772637736981", discordAvatar: "1408d204fa8a128efd2d2625476468c2", customUrl: null, @@ -7153,6 +7176,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 5877, username: "Koreki", + pronouns: null, discordId: "578038263433134080", discordAvatar: "f552df977e0165e7fb93d1ce2a7512d4", customUrl: "bars", @@ -7162,6 +7186,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 6766, username: "Bowen", + pronouns: null, discordId: "230161540299489280", discordAvatar: "a_3ca2a0737b2c1e2b5e82ddc98fe79c8b", customUrl: "bowen", @@ -7171,6 +7196,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 7400, username: "Toes", + pronouns: null, discordId: "678892046534311936", discordAvatar: "11490e6c0ace327ebc32a117b9e0510c", customUrl: "toes", @@ -7180,6 +7206,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 8277, username: "Neato", + pronouns: null, discordId: "512418782933811221", discordAvatar: "c3afd465b53dedbb97fb9dd504d01305", customUrl: "neato", @@ -7189,6 +7216,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 22026, username: "strings 🎻", + pronouns: null, discordId: "182994907907096585", discordAvatar: "31da63dcb6dd1dbe4c3f135c105f07e7", customUrl: "strings", @@ -7198,6 +7226,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 23094, username: "みちさん", + pronouns: null, discordId: "725416982681223259", discordAvatar: "cb9bf51b05f22c763a2b4812bdd574cc", customUrl: "michi", @@ -7207,6 +7236,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 29467, username: "glumbaron", + pronouns: null, discordId: "367803257717784599", discordAvatar: "b8ad30de9487a9699093b728098e01d0", customUrl: "glumbaron", @@ -7216,6 +7246,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 29775, username: "Lemon7890", + pronouns: null, discordId: "1058063829973618698", discordAvatar: "dc110c2d77ea84e470c87a18ac0b7e5d", customUrl: "lemon7890", @@ -7225,6 +7256,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 30996, username: "eemee", + pronouns: null, discordId: "1132918323697418310", discordAvatar: "48089383c5d666ae7ef8417d205bfa1f", customUrl: "eemeee", @@ -7234,6 +7266,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ { id: 31736, username: "vheavy ☃", + pronouns: null, discordId: "689577992430944281", discordAvatar: "911c0ac66f9489406ea4ae970e7ed5b0", customUrl: "pin-eye", diff --git a/app/features/tournament-bracket/core/tests/mocks-sos.ts b/app/features/tournament-bracket/core/tests/mocks-sos.ts index b732c1869..470f2842b 100644 --- a/app/features/tournament-bracket/core/tests/mocks-sos.ts +++ b/app/features/tournament-bracket/core/tests/mocks-sos.ts @@ -2032,6 +2032,7 @@ export const SWIM_OR_SINK_167 = ( role: "ORGANIZER", id: 405, username: "ely", + pronouns: null, discordId: "260999523806085120", discordAvatar: "a_71a6a4b4f76bd79bc9d7743e322a879d", customUrl: "elemental", @@ -2042,6 +2043,7 @@ export const SWIM_OR_SINK_167 = ( role: "ADMIN", id: 622, username: ".jpg", + pronouns: null, discordId: "201922904781357057", discordAvatar: "7fa46b7dc27fa589d3d278ba4b60224f", customUrl: "dotjpg", @@ -2052,6 +2054,7 @@ export const SWIM_OR_SINK_167 = ( role: "ADMIN", id: 680, username: "inkfarer", + pronouns: null, discordId: "87494390724964352", discordAvatar: "3b82ee3101ba39120b6a65c042a04a37", customUrl: "inkfarer", @@ -2062,6 +2065,7 @@ export const SWIM_OR_SINK_167 = ( role: "ADMIN", id: 936, username: "Raze", + pronouns: null, discordId: "119620026767507456", discordAvatar: "aa1ff5b8eefd5a26657c411138a160b8", customUrl: null, @@ -2072,6 +2076,7 @@ export const SWIM_OR_SINK_167 = ( role: "ADMIN", id: 1402, username: "grace", + pronouns: null, discordId: "216335108037148673", discordAvatar: "458f1e233a3b590a62f6b867b95a6241", customUrl: "grace", @@ -2082,6 +2087,7 @@ export const SWIM_OR_SINK_167 = ( role: "ORGANIZER", id: 1755, username: "BrushStrokes", + pronouns: null, discordId: "200777324520538113", discordAvatar: "a_d71ac2f474ce422ce711e8e74d657b2f", customUrl: "brushstrokes", @@ -2092,6 +2098,7 @@ export const SWIM_OR_SINK_167 = ( role: "ORGANIZER", id: 2908, username: "KitsuneKeira", + pronouns: null, discordId: "112254088992792576", discordAvatar: "711e8d48f316687faa4fdb41ab9298f0", customUrl: "kitsunekeira", @@ -2102,6 +2109,7 @@ export const SWIM_OR_SINK_167 = ( role: "ADMIN", id: 3742, username: "Thoma", + pronouns: null, discordId: "124007565758693376", discordAvatar: "702429723f31a57326f87d11063139f7", customUrl: "thoma", @@ -2112,6 +2120,7 @@ export const SWIM_OR_SINK_167 = ( role: "ADMIN", id: 3806, username: "vlee", + pronouns: null, discordId: "113026708071821312", discordAvatar: "4b3f0da55a834acc0beb258edd9c7e34", customUrl: null, @@ -2122,6 +2131,7 @@ export const SWIM_OR_SINK_167 = ( role: "ADMIN", id: 4941, username: "HoeenHero", + pronouns: null, discordId: "236292964052107264", discordAvatar: "c95b9a8cfb9164f3a66267a5e8cfe8b1", customUrl: "hoeenhero", @@ -2132,6 +2142,7 @@ export const SWIM_OR_SINK_167 = ( role: "ORGANIZER", id: 5036, username: "toastγ", + pronouns: null, discordId: "248232091005747201", discordAvatar: "40a21a204f8fae6ae2e7e8c5de70de83", customUrl: "toasty", @@ -2142,6 +2153,7 @@ export const SWIM_OR_SINK_167 = ( role: "ADMIN", id: 8098, username: "Popgun", + pronouns: null, discordId: "442431978269310987", discordAvatar: "e0fd0fed98a4d3c3bfd56332678d4e6c", customUrl: "popgun", @@ -2152,6 +2164,7 @@ export const SWIM_OR_SINK_167 = ( role: "ORGANIZER", id: 8750, username: "LiberoWolf", + pronouns: null, discordId: "273188925189914628", discordAvatar: "c62afa020e24ead92cc043ffa809ffdc", customUrl: "liberowolf", @@ -2162,6 +2175,7 @@ export const SWIM_OR_SINK_167 = ( role: "ADMIN", id: 9222, username: "Jardonian", + pronouns: null, discordId: "298241282550267906", discordAvatar: "f69bb5af745eca4e9b7f55504c641f78", customUrl: "jardonian", @@ -2172,6 +2186,7 @@ export const SWIM_OR_SINK_167 = ( role: "ORGANIZER", id: 9719, username: "Scepidilionz", + pronouns: null, discordId: "184478601171828737", discordAvatar: "75dedb3527b73d9571151f0a00d1c365", customUrl: "scepidilionz", @@ -2182,6 +2197,7 @@ export const SWIM_OR_SINK_167 = ( role: "ORGANIZER", id: 18720, username: "Tulip", + pronouns: null, discordId: "103988435785650176", discordAvatar: "5fef4bf0c1b8a6a76fe2f43b956bfc3d", customUrl: "tulip", @@ -2193,6 +2209,7 @@ export const SWIM_OR_SINK_167 = ( author: { id: 1402, username: "grace", + pronouns: null, discordId: "216335108037148673", discordAvatar: "458f1e233a3b590a62f6b867b95a6241", customUrl: "grace", @@ -2202,6 +2219,7 @@ export const SWIM_OR_SINK_167 = ( { id: 52, username: "Roundy", + pronouns: null, discordId: "333766288969302018", discordAvatar: "42d40d5ae6ff7081ae57bc02b6e2f717", customUrl: null, @@ -2211,6 +2229,7 @@ export const SWIM_OR_SINK_167 = ( { id: 405, username: "ely", + pronouns: null, discordId: "260999523806085120", discordAvatar: "a_71a6a4b4f76bd79bc9d7743e322a879d", customUrl: "elemental", @@ -2220,6 +2239,7 @@ export const SWIM_OR_SINK_167 = ( { id: 451, username: "Half", + pronouns: null, discordId: "468596581357060097", discordAvatar: "940589e5c6793a5cbbab2adebd84fe0b", customUrl: null, @@ -2229,6 +2249,7 @@ export const SWIM_OR_SINK_167 = ( { id: 570, username: "SuperaJokera", + pronouns: null, discordId: "418176537561661441", discordAvatar: "bab3e7a9cdb2071de7f2ae29256fc83b", customUrl: null, @@ -2238,6 +2259,7 @@ export const SWIM_OR_SINK_167 = ( { id: 657, username: "lost memory.", + pronouns: null, discordId: "302160815132246016", discordAvatar: "da7cfcd1a5b8bee37cfa5d308b0898eb", customUrl: "mashimashi", @@ -2247,6 +2269,7 @@ export const SWIM_OR_SINK_167 = ( { id: 3266, username: "Tux", + pronouns: null, discordId: "183025242266927104", discordAvatar: "a9475b488962953152c60f4f138b1618", customUrl: "tux", @@ -2256,6 +2279,7 @@ export const SWIM_OR_SINK_167 = ( { id: 4285, username: "Tbob408", + pronouns: null, discordId: "343219263655510021", discordAvatar: "f30c675fc07203ca112d93fd03b5cc96", customUrl: "tbob408", @@ -2265,6 +2289,7 @@ export const SWIM_OR_SINK_167 = ( { id: 5239, username: "Super_ryn_", + pronouns: null, discordId: "390444783425945602", discordAvatar: "e821ac7a457033d6c990bcaf518287e5", customUrl: null, @@ -2274,6 +2299,7 @@ export const SWIM_OR_SINK_167 = ( { id: 5639, username: "reef", + pronouns: null, discordId: "422790410566500352", discordAvatar: "77b479e49ec0d09edb8f9b975bff04ce", customUrl: "reefsixes", @@ -2283,6 +2309,7 @@ export const SWIM_OR_SINK_167 = ( { id: 8695, username: "kloud", + pronouns: null, discordId: "360259023389327361", discordAvatar: "c5a2506e46e135b2568ef48242f669e8", customUrl: "kloud", @@ -2292,6 +2319,7 @@ export const SWIM_OR_SINK_167 = ( { id: 9678, username: "Justin | PipedreamDX 💜", + pronouns: null, discordId: "247504664378081280", discordAvatar: "a_a60bcc9c76d4baa9814287fdc5c28fe9", customUrl: "pipedreamdx", @@ -2301,6 +2329,7 @@ export const SWIM_OR_SINK_167 = ( { id: 9719, username: "Scepidilionz", + pronouns: null, discordId: "184478601171828737", discordAvatar: "75dedb3527b73d9571151f0a00d1c365", customUrl: "scepidilionz", @@ -2310,6 +2339,7 @@ export const SWIM_OR_SINK_167 = ( { id: 18461, username: "Riley Rooster", + pronouns: null, discordId: "565712290020589569", discordAvatar: "498b21d6f64dcd56d06e61c2ec39e571", customUrl: "rooster", @@ -2319,6 +2349,7 @@ export const SWIM_OR_SINK_167 = ( { id: 18720, username: "Tulip", + pronouns: null, discordId: "103988435785650176", discordAvatar: "5fef4bf0c1b8a6a76fe2f43b956bfc3d", customUrl: "tulip", @@ -2328,6 +2359,7 @@ export const SWIM_OR_SINK_167 = ( { id: 24117, username: "Boltz!", + pronouns: null, discordId: "221418644297482250", discordAvatar: "6b7156dcd0582ee160564bfa0c5cdc0e", customUrl: "fusionboltzgx", @@ -2337,6 +2369,7 @@ export const SWIM_OR_SINK_167 = ( { id: 28303, username: "Lagoon", + pronouns: null, discordId: "458714559855722497", discordAvatar: "b815bb6090c2b32fec23f1336fae5663", customUrl: null, @@ -2346,6 +2379,7 @@ export const SWIM_OR_SINK_167 = ( { id: 28482, username: "phantom 👻", + pronouns: null, discordId: "599633578648928307", discordAvatar: "f5139304fb364bca35634a8e5cd11c0f", customUrl: "phantom_spl", diff --git a/app/features/tournament-bracket/core/tests/mocks-zones-weekly.ts b/app/features/tournament-bracket/core/tests/mocks-zones-weekly.ts index 424dceaea..f22b7ab1d 100644 --- a/app/features/tournament-bracket/core/tests/mocks-zones-weekly.ts +++ b/app/features/tournament-bracket/core/tests/mocks-zones-weekly.ts @@ -331,6 +331,7 @@ export const ZONES_WEEKLY_38 = (): TournamentData => ({ author: { id: 13370, username: "Puma", + pronouns: null, discordId: "308483655515373570", discordAvatar: "a5fff2b4706d99364e646cab28c8085b", customUrl: "puma", @@ -340,6 +341,7 @@ export const ZONES_WEEKLY_38 = (): TournamentData => ({ { id: 1183, username: "goobler", + pronouns: null, discordId: "395757059922198548", discordAvatar: "2a569302e9545c6a07f8f8aa337d139d", customUrl: "penis", @@ -349,6 +351,7 @@ export const ZONES_WEEKLY_38 = (): TournamentData => ({ { id: 3147, username: "Cookie", + pronouns: null, discordId: "267963609924108288", discordAvatar: "85090cfe2e0da693355bcec9740c1eaa", customUrl: "cookie", @@ -358,6 +361,7 @@ export const ZONES_WEEKLY_38 = (): TournamentData => ({ { id: 5212, username: "Mars", + pronouns: null, discordId: "507102073427460098", discordAvatar: "bd634c91f7d0475f3671956fa9a2110a", customUrl: null, @@ -367,6 +371,7 @@ export const ZONES_WEEKLY_38 = (): TournamentData => ({ { id: 23120, username: "micah", + pronouns: null, discordId: "111682034056835072", discordAvatar: "f1191c94b1da5396a06b620408017c1f", customUrl: "weizihao", diff --git a/app/features/tournament-bracket/core/tests/mocks.ts b/app/features/tournament-bracket/core/tests/mocks.ts index f2cd6309a..a69572e48 100644 --- a/app/features/tournament-bracket/core/tests/mocks.ts +++ b/app/features/tournament-bracket/core/tests/mocks.ts @@ -1462,6 +1462,7 @@ export const PADDLING_POOL_257 = () => author: { id: 860, username: "공주 Alice", + pronouns: null, discordId: "163771047068303360", discordAvatar: "b33d8f230218d6a92705a63fdf803851", customUrl: "alicetheto", @@ -1471,6 +1472,7 @@ export const PADDLING_POOL_257 = () => { id: 1536, username: "Pinky", + pronouns: null, discordId: "178489224192851969", discordAvatar: "8b8c1d85cc525ea366f3ce2a6a594c05", customUrl: "pinky", @@ -1480,6 +1482,7 @@ export const PADDLING_POOL_257 = () => { id: 1662, username: "Andromeda", + pronouns: null, discordId: "275213752025088000", discordAvatar: "25bf68c5aa4e622ceb5a241c34841c6d", customUrl: null, @@ -1489,6 +1492,7 @@ export const PADDLING_POOL_257 = () => { id: 6648, username: "Hαzε", + pronouns: null, discordId: "195618756800675841", discordAvatar: "a_03ec4bbcb2a4ab000237c9f3e9e71508", customUrl: "sdomi19", @@ -1498,6 +1502,7 @@ export const PADDLING_POOL_257 = () => { id: 12717, username: "Browni", + pronouns: null, discordId: "413759870333091884", discordAvatar: "a_b55f70ada809a600e73c5088b910e659", customUrl: "brufnie", @@ -7434,6 +7439,7 @@ export const PADDLING_POOL_255 = () => author: { id: 860, username: "공주 Alice", + pronouns: null, discordId: "163771047068303360", discordAvatar: "b33d8f230218d6a92705a63fdf803851", customUrl: "alicetheto", @@ -7443,6 +7449,7 @@ export const PADDLING_POOL_255 = () => { id: 1536, username: "Pinky", + pronouns: null, discordId: "178489224192851969", discordAvatar: "8b8c1d85cc525ea366f3ce2a6a594c05", customUrl: "pinky", @@ -7452,6 +7459,7 @@ export const PADDLING_POOL_255 = () => { id: 1662, username: "Andromeda", + pronouns: null, discordId: "275213752025088000", discordAvatar: "25bf68c5aa4e622ceb5a241c34841c6d", customUrl: null, @@ -7461,6 +7469,7 @@ export const PADDLING_POOL_255 = () => { id: 6648, username: "Hαzε", + pronouns: null, discordId: "195618756800675841", discordAvatar: "a_03ec4bbcb2a4ab000237c9f3e9e71508", customUrl: "sdomi19", @@ -7470,6 +7479,7 @@ export const PADDLING_POOL_255 = () => { id: 12717, username: "Browni", + pronouns: null, discordId: "413759870333091884", discordAvatar: "a_b55f70ada809a600e73c5088b910e659", customUrl: "brufnie", @@ -13715,6 +13725,7 @@ export const IN_THE_ZONE_32 = ({ author: { id: 274, username: "Sendou", + pronouns: null, discordId: "79237403620945920", discordAvatar: "6fc41a44b069a0d2152ac06d1e496c6c", customUrl: "sendou", @@ -13724,6 +13735,7 @@ export const IN_THE_ZONE_32 = ({ { id: 860, username: "공주 Alice", + pronouns: null, discordId: "163771047068303360", discordAvatar: "b33d8f230218d6a92705a63fdf803851", customUrl: "alicetheto", @@ -13733,6 +13745,7 @@ export const IN_THE_ZONE_32 = ({ { id: 12717, username: "Browni", + pronouns: null, discordId: "413759870333091884", discordAvatar: "a_b55f70ada809a600e73c5088b910e659", customUrl: "brufnie", diff --git a/app/features/tournament-bracket/core/tests/test-utils.ts b/app/features/tournament-bracket/core/tests/test-utils.ts index 81a8f6931..c16f3efe3 100644 --- a/app/features/tournament-bracket/core/tests/test-utils.ts +++ b/app/features/tournament-bracket/core/tests/test-utils.ts @@ -96,6 +96,7 @@ export const testTournament = ({ discordAvatar: null, discordId: "123", username: "test", + pronouns: null, id: 1, }, ...ctx, diff --git a/app/features/tournament-bracket/queries/findMatchById.server.ts b/app/features/tournament-bracket/queries/findMatchById.server.ts index 4cfb6e907..52feb6795 100644 --- a/app/features/tournament-bracket/queries/findMatchById.server.ts +++ b/app/features/tournament-bracket/queries/findMatchById.server.ts @@ -31,7 +31,8 @@ const stm = sql.prepare(/* sql */ ` "User"."customUrl", 'discordAvatar', "User"."discordAvatar", - 'chatNameColor', IIF(COALESCE("User"."patronTier", 0) >= 2, "User"."css" ->> 'chat', null) + 'chatNameColor', IIF(COALESCE("User"."patronTier", 0) >= 2, "User"."css" ->> 'chat', null), + 'pronouns', json("User"."pronouns") ) ) as "players" from "TournamentMatch" @@ -85,6 +86,7 @@ export const findMatchById = (id: number) => { customUrl: Tables["User"]["customUrl"]; discordAvatar: Tables["User"]["discordAvatar"]; chatNameColor: string | null; + pronouns: Tables["User"]["pronouns"]; }> ).filter((player) => player.id), }; diff --git a/app/features/tournament-bracket/routes/to.$id.matches.$mid.tsx b/app/features/tournament-bracket/routes/to.$id.matches.$mid.tsx index 00e0a1bdd..1d501be9f 100644 --- a/app/features/tournament-bracket/routes/to.$id.matches.$mid.tsx +++ b/app/features/tournament-bracket/routes/to.$id.matches.$mid.tsx @@ -146,11 +146,11 @@ function BeforeMatchChat() { ...data.match.players.map((p) => ({ ...p, title: undefined })), ...(tournament.ctx.organization?.members ?? []).map((m) => ({ ...m, - title: m.role === "STREAMER" ? "Stream" : "TO", + title: m.role === "STREAMER" ? "Cast" : "TO", })), ...tournament.ctx.staff.map((s) => ({ ...s, - title: s.role === "STREAMER" ? "Stream" : "TO", + title: s.role === "STREAMER" ? "Cast" : "TO", })), { ...tournament.ctx.author, diff --git a/app/features/tournament/TournamentRepository.server.ts b/app/features/tournament/TournamentRepository.server.ts index ec66adddf..6341025e8 100644 --- a/app/features/tournament/TournamentRepository.server.ts +++ b/app/features/tournament/TournamentRepository.server.ts @@ -83,6 +83,7 @@ export async function findById(id: number) { "TournamentOrganizationMember.role", ...COMMON_USER_FIELDS, userChatNameColor, + "User.pronouns", ]) .whereRef( "TournamentOrganizationMember.organizationId", @@ -101,7 +102,7 @@ export async function findById(id: number) { jsonObjectFrom( eb .selectFrom("User") - .select([...COMMON_USER_FIELDS, userChatNameColor]) + .select([...COMMON_USER_FIELDS, userChatNameColor, "User.pronouns"]) .whereRef("User.id", "=", "CalendarEvent.authorId"), ).as("author"), jsonArrayFrom( @@ -111,6 +112,7 @@ export async function findById(id: number) { .select([ ...COMMON_USER_FIELDS, userChatNameColor, + "User.pronouns", "TournamentStaff.role", ]) .where("TournamentStaff.tournamentId", "=", id), diff --git a/app/features/user-page/UserRepository.server.ts b/app/features/user-page/UserRepository.server.ts index a21dd3a44..4390e5cfb 100644 --- a/app/features/user-page/UserRepository.server.ts +++ b/app/features/user-page/UserRepository.server.ts @@ -167,6 +167,7 @@ export async function findProfileByIdentifier( "User.favoriteBadgeIds", "User.patronTier", "PlusTier.tier as plusTier", + "User.pronouns", jsonArrayFrom( eb .selectFrom("UserWeapon") @@ -453,6 +454,7 @@ export async function findChatUsersByUserIds(userIds: number[]) { "User.discordId", "User.discordAvatar", "User.username", + "User.pronouns", userChatNameColor, ]) .where("User.id", "in", userIds) @@ -895,6 +897,7 @@ type UpdateProfileArgs = Pick< | "customName" | "motionSens" | "stickSens" + | "pronouns" | "inGameName" | "battlefy" | "css" @@ -936,6 +939,7 @@ export function updateProfile(args: UpdateProfileArgs) { customName: args.customName, motionSens: args.motionSens, stickSens: args.stickSens, + pronouns: args.pronouns, inGameName: args.inGameName, css: args.css, battlefy: args.battlefy, diff --git a/app/features/user-page/actions/u.$identifier.edit.server.ts b/app/features/user-page/actions/u.$identifier.edit.server.ts index 15741598d..6ea8ce170 100644 --- a/app/features/user-page/actions/u.$identifier.edit.server.ts +++ b/app/features/user-page/actions/u.$identifier.edit.server.ts @@ -28,9 +28,18 @@ export const action: ActionFunction = async ({ request }) => { ? `${inGameNameText}#${inGameNameDiscriminator}` : null; + const pronouns = + data.subjectPronoun && data.objectPronoun + ? JSON.stringify({ + subject: data.subjectPronoun, + object: data.objectPronoun, + }) + : null; + try { const editedUser = await UserRepository.updateProfile({ ...data, + pronouns, inGameName, userId: user.id, }); diff --git a/app/features/user-page/routes/u.$identifier.edit.test.ts b/app/features/user-page/routes/u.$identifier.edit.test.ts index bd2fa2bc3..8754cf70c 100644 --- a/app/features/user-page/routes/u.$identifier.edit.test.ts +++ b/app/features/user-page/routes/u.$identifier.edit.test.ts @@ -22,6 +22,8 @@ const DEFAULT_FIELDS = { motionSens: null, showDiscordUniqueName: 1, stickSens: null, + objectPronoun: null, + subjectPronoun: null, weapons: JSON.stringify([ { weaponSplId: 1 as MainWeaponId, isFavorite: 0 }, ]) as any, diff --git a/app/features/user-page/routes/u.$identifier.edit.tsx b/app/features/user-page/routes/u.$identifier.edit.tsx index 4c492865a..2e7701eb6 100644 --- a/app/features/user-page/routes/u.$identifier.edit.tsx +++ b/app/features/user-page/routes/u.$identifier.edit.tsx @@ -16,7 +16,7 @@ import { TrashIcon } from "~/components/icons/Trash"; import { Label } from "~/components/Label"; import { SubmitButton } from "~/components/SubmitButton"; import { WeaponSelect } from "~/components/WeaponSelect"; -import type { Tables } from "~/db/tables"; +import { OBJECT_PRONOUNS, SUBJECT_PRONOUNS, type Tables } from "~/db/tables"; import { BADGE } from "~/features/badges/badges-constants"; import { BadgesSelector } from "~/features/badges/components/BadgesSelector"; import { useIsMounted } from "~/hooks/useIsMounted"; @@ -53,6 +53,7 @@ export default function UserEditPage() { + @@ -210,6 +211,52 @@ function SensSelects() { ); } +function PronounsSelect() { + const { t } = useTranslation(["user"]); + const data = useLoaderData(); + + return ( +
    +
    +
    + + + / +
    +
    + + +
    +
    + {t("user:pronounsInfo")} +
    + ); +} + function CountrySelect() { const { t, i18n } = useTranslation(["user"]); const data = useLoaderData(); diff --git a/app/features/user-page/routes/u.$identifier.index.tsx b/app/features/user-page/routes/u.$identifier.index.tsx index f2341911e..c2df664f0 100644 --- a/app/features/user-page/routes/u.$identifier.index.tsx +++ b/app/features/user-page/routes/u.$identifier.index.tsx @@ -261,6 +261,14 @@ function ExtraInfos() { {data.user.discordUniqueName} )} + {data.user.pronouns && ( +
    + + {t("user:usesPronouns")} + {" "} + {data.user.pronouns.subject}/{data.user.pronouns.object} +
    + )} {data.user.inGameName && (
    {t("user:ign.short")}{" "} diff --git a/app/features/user-page/user-page-schemas.ts b/app/features/user-page/user-page-schemas.ts index 129e3ea27..9960119c1 100644 --- a/app/features/user-page/user-page-schemas.ts +++ b/app/features/user-page/user-page-schemas.ts @@ -1,4 +1,5 @@ import { z } from "zod"; +import { OBJECT_PRONOUNS, SUBJECT_PRONOUNS } from "~/db/tables"; import { BADGE } from "~/features/badges/badges-constants"; import { isCustomUrl } from "~/utils/urls"; import { @@ -10,6 +11,7 @@ import { emptyArrayToNull, falsyToNull, id, + nullLiteraltoNull, processMany, safeJSONParse, safeNullableStringSchema, @@ -84,6 +86,14 @@ export const userEditActionSchema = z .refine((val) => val % 5 === 0) .nullable(), ), + subjectPronoun: z.preprocess( + processMany(nullLiteraltoNull, falsyToNull), + z.enum(SUBJECT_PRONOUNS).nullable(), + ), + objectPronoun: z.preprocess( + processMany(nullLiteraltoNull, falsyToNull), + z.enum(OBJECT_PRONOUNS).nullable(), + ), inGameNameText: z.preprocess( falsyToNull, z.string().max(USER.IN_GAME_NAME_TEXT_MAX_LENGTH).nullable(), diff --git a/app/styles/common.css b/app/styles/common.css index 596ae5e2c..672483a00 100644 --- a/app/styles/common.css +++ b/app/styles/common.css @@ -1126,6 +1126,49 @@ html[dir="rtl"] .fix-rtl { gap: var(--s-2-5); } +.chat__message__info { + display: flex; + flex-direction: row; + gap: 0 var(--s-1-5); + align-items: center; + flex-wrap: wrap; +} + +.chat__avatar-wrapper { + position: relative; + flex-shrink: 0; +} + +.chat__avatar-wrapper--staff .avatar { + border: 2px solid var(--theme-secondary); + border-radius: 50%; +} + +.chat__avatar-badge { + position: absolute; + bottom: 4px; + left: 50%; + transform: translateX(-50%); + background-color: var(--theme-secondary); + color: var(--black-text); + font-size: var(--fonts-xxxxs); + font-weight: var(--bold); + padding: 1px 4px; + border-radius: var(--rounded-full); + white-space: nowrap; + line-height: 1.2; +} + +.chat__pronouns-tag { + background-color: var(--bg-lightest); + color: var(--text-lighter); + font-size: var(--fonts-xxxs); + font-weight: var(--semi-bold); + padding: 1px 5px; + border-radius: var(--rounded-full); + white-space: nowrap; +} + .chat__message__user { font-weight: var(--semi-bold); font-size: var(--fonts-sm); @@ -1137,9 +1180,8 @@ html[dir="rtl"] .fix-rtl { } .chat__message__time { - font-size: var(--fonts-xxs); + font-size: var(--fonts-xxxs); color: var(--text-lighter); - margin-block-start: 3px; } .chat__input-container { diff --git a/app/styles/u.$identifier.module.css b/app/styles/u.$identifier.module.css index f6d6e2035..8958c997d 100644 --- a/app/styles/u.$identifier.module.css +++ b/app/styles/u.$identifier.module.css @@ -22,6 +22,10 @@ width: 6rem; } +.seperator { + margin-left: var(--s-4); +} + .weaponPool { width: 20rem; } diff --git a/db-test.sqlite3 b/db-test.sqlite3 index 32ef80776..57af7c03d 100644 Binary files a/db-test.sqlite3 and b/db-test.sqlite3 differ diff --git a/locales/da/user.json b/locales/da/user.json index 3778cc05c..e24e69ee7 100644 --- a/locales/da/user.json +++ b/locales/da/user.json @@ -10,6 +10,9 @@ "motion": "Bevægelse", "stick": "Styrepind", "sens": "Følsomhed", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "Våbenpulje", "discordExplanation": "Brugernavn, Profilbillede, Youtube-, Bluesky- og Twitch-konter er hentet via din Discord-konto. Se <1>FAQ for yderligere information.", "favoriteBadges": "", diff --git a/locales/de/user.json b/locales/de/user.json index bafe936b6..e95e1a93d 100644 --- a/locales/de/user.json +++ b/locales/de/user.json @@ -10,6 +10,9 @@ "motion": "Bewegungssteuerung", "stick": "Stick", "sens": "Empfindlichkeit", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "Waffenpool", "discordExplanation": "Der Username, Profilbild, YouTube-, Bluesky- und Twitch-Konten stammen von deinem Discord-Konto. Mehr Infos in den <1>FAQ.", "favoriteBadges": "", diff --git a/locales/en/user.json b/locales/en/user.json index 071a76f46..c7cdc88d9 100644 --- a/locales/en/user.json +++ b/locales/en/user.json @@ -10,6 +10,9 @@ "motion": "Motion", "stick": "Stick", "sens": "Sens", + "pronoun": "Pronoun", + "usesPronouns": "Uses", + "pronounsInfo": "This setting is optional! Your pronouns will be displayed on your profile, tournament rosters, SendouQ groups, and text channels.", "weaponPool": "Weapon pool", "discordExplanation": "Username, profile picture, YouTube, Bluesky and Twitch accounts come from your Discord account. See <1>FAQ for more information.", "favoriteBadges": "Favorite badges", diff --git a/locales/es-ES/user.json b/locales/es-ES/user.json index 7ae20db1a..38f3cc5f7 100644 --- a/locales/es-ES/user.json +++ b/locales/es-ES/user.json @@ -10,6 +10,9 @@ "motion": "Giroscopio", "stick": "Palanca", "sens": "Sens", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "Grupo de armas", "discordExplanation": "Tu nombre, foto, y cuentas de YouTube, Bluesky y Twitch se obtienen por tu cuenta en Discord. Ver <1>FAQ para más información.", "favoriteBadges": "", diff --git a/locales/es-US/user.json b/locales/es-US/user.json index 82208654a..1eebacb36 100644 --- a/locales/es-US/user.json +++ b/locales/es-US/user.json @@ -10,6 +10,9 @@ "motion": "Giroscopio", "stick": "Palanca", "sens": "Sens", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "Grupo de armas", "discordExplanation": "Tu nombre, foto, y cuentas de YouTube, Bluesky y Twitch se obtienen por tu cuenta en Discord. Ver <1>FAQ para más información.", "favoriteBadges": "", diff --git a/locales/fr-CA/user.json b/locales/fr-CA/user.json index 81cab5775..c71f5a53c 100644 --- a/locales/fr-CA/user.json +++ b/locales/fr-CA/user.json @@ -10,6 +10,9 @@ "motion": "Gyro", "stick": "Stick", "sens": "Sens", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "Armes jouées", "discordExplanation": "Votre pseudo, votre photo de profil et vos comptes Youtube, Bluesky et Twitch viennent de votre compte Discord. Voir la <1>FAQ pour plus d'informations.", "favoriteBadges": "", diff --git a/locales/fr-EU/user.json b/locales/fr-EU/user.json index a5f511ab6..5c9deec1c 100644 --- a/locales/fr-EU/user.json +++ b/locales/fr-EU/user.json @@ -10,6 +10,9 @@ "motion": "Gyro", "stick": "Stick", "sens": "Sens", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "Armes jouées", "discordExplanation": "Votre pseudo, votre photo de profil et vos comptes Youtube, Bluesky et Twitch viennent de votre compte Discord. Voir la <1>FAQ pour plus d'informations.", "favoriteBadges": "Badge favori", diff --git a/locales/he/user.json b/locales/he/user.json index a7ce6c55f..b20995e79 100644 --- a/locales/he/user.json +++ b/locales/he/user.json @@ -10,6 +10,9 @@ "motion": "תנועה", "stick": "סטיק", "sens": "רגישות", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "מאגר נשקים", "discordExplanation": "שם משתמש, תמונת פרופיל, חשבונות YouTube, Bluesky ו-Twitch מגיעים מחשבון Discord שלך. ראו <1>שאלות נפוצות למידע נוסף.", "favoriteBadges": "", diff --git a/locales/it/user.json b/locales/it/user.json index 9c2215e6f..a9e665d2f 100644 --- a/locales/it/user.json +++ b/locales/it/user.json @@ -10,6 +10,9 @@ "motion": "Giroscopio", "stick": "Joystick", "sens": "Sens.", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "Pool armi", "discordExplanation": "Username, foto profilo, account YouTube, Bluesky e Twitch vengono dal tuo account Discord. Visita <1>FAQ per ulteriori informazioni.", "favoriteBadges": "", diff --git a/locales/ja/user.json b/locales/ja/user.json index 751ddcd3b..53036d465 100644 --- a/locales/ja/user.json +++ b/locales/ja/user.json @@ -10,6 +10,9 @@ "motion": "モーション", "stick": "スティック", "sens": "感度", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "使用ブキ", "discordExplanation": "ユーザー名、プロファイル画像、YouTube、Bluesky と Twitch アカウントは Discord のアカウントに設定されているものが使用されます。詳しくは <1>FAQ をご覧ください。", "favoriteBadges": "", diff --git a/locales/ko/user.json b/locales/ko/user.json index f8d9e22df..65134ad40 100644 --- a/locales/ko/user.json +++ b/locales/ko/user.json @@ -10,6 +10,9 @@ "motion": "", "stick": "", "sens": "", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "", "discordExplanation": "", "favoriteBadges": "", diff --git a/locales/nl/user.json b/locales/nl/user.json index 32692b540..95d3a2d08 100644 --- a/locales/nl/user.json +++ b/locales/nl/user.json @@ -10,6 +10,9 @@ "motion": "Beweging", "stick": "Stick", "sens": "Gevoeligheid", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "", "discordExplanation": "", "favoriteBadges": "", diff --git a/locales/pl/user.json b/locales/pl/user.json index 92ba9f723..d31d62ce3 100644 --- a/locales/pl/user.json +++ b/locales/pl/user.json @@ -10,6 +10,9 @@ "motion": "Motion", "stick": "Stick", "sens": "Sens", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "Pula broni", "discordExplanation": "Nazwa, profilowe oraz połączone konta brane są z konta Discord. Zobacz <1>FAQ by dowiedzieć się więcej.", "favoriteBadges": "", diff --git a/locales/pt-BR/user.json b/locales/pt-BR/user.json index e2ac5cd09..7a29ea536 100644 --- a/locales/pt-BR/user.json +++ b/locales/pt-BR/user.json @@ -10,6 +10,9 @@ "motion": "Movimento (Giroscópio)", "stick": "Analógico", "sens": "Sens", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "Seleção de armas", "discordExplanation": "Nome de usuário, foto de perfil, conta do YouTube, Bluesky e Twitch vêm da sua conta do Discord. Veja o <1>Perguntas Frequentes para mais informações.", "favoriteBadges": "", diff --git a/locales/ru/user.json b/locales/ru/user.json index 71c4b2a74..8a04e5ba8 100644 --- a/locales/ru/user.json +++ b/locales/ru/user.json @@ -10,6 +10,9 @@ "motion": "Наклон", "stick": "Стик", "sens": "Чувствительность", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "Используемое оружие", "discordExplanation": "Имя пользователя, аватар, ссылка на аккаунты YouTube, Bluesky и Twitch берутся из вашего аккаунта в Discord. Посмотрите <1>FAQ для дополнительной информации.", "favoriteBadges": "Любимые награды", diff --git a/locales/zh/user.json b/locales/zh/user.json index ad47710ac..81c923ab5 100644 --- a/locales/zh/user.json +++ b/locales/zh/user.json @@ -10,6 +10,9 @@ "motion": "体感", "stick": "摇杆", "sens": "感度", + "pronoun": "", + "usesPronouns": "", + "pronounsInfo": "", "weaponPool": "武器池", "discordExplanation": "用户名、头像、Youtube、Bluesky和Twitch账号皆来自您的Discord账号。查看 <1>FAQ 以获得更多相关信息。", "favoriteBadges": "", diff --git a/migrations/110-pronouns.js b/migrations/110-pronouns.js new file mode 100644 index 000000000..7ecbf7fba --- /dev/null +++ b/migrations/110-pronouns.js @@ -0,0 +1,7 @@ +export function up(db) { + db.transaction(() => { + db.prepare( + /* sql */ `alter table "User" add "pronouns" text default null`, + ).run(); + })(); +}