diff --git a/app/components/MobileNav.tsx b/app/components/MobileNav.tsx index 3b3c733d1..729124379 100644 --- a/app/components/MobileNav.tsx +++ b/app/components/MobileNav.tsx @@ -31,8 +31,8 @@ import { userPage, } from "~/utils/urls"; import { Avatar } from "./Avatar"; -import { LinkButton } from "./elements/Button"; import { EventsList } from "./EventsList"; +import { LinkButton } from "./elements/Button"; import { Image } from "./Image"; import { ChatSidebar } from "./layout/ChatSidebar"; import { LogInButtonContainer } from "./layout/LogInButtonContainer"; diff --git a/app/features/sendouq-match/SQMatchRepository.server.ts b/app/features/sendouq-match/SQMatchRepository.server.ts index 4714f9e4e..bc386617e 100644 --- a/app/features/sendouq-match/SQMatchRepository.server.ts +++ b/app/features/sendouq-match/SQMatchRepository.server.ts @@ -15,7 +15,6 @@ import { COMMON_USER_FIELDS, concatUserSubmittedImagePrefix, tournamentLogoWithDefault, - userChatNameHue, } from "~/utils/kysely.server"; import type { Unpacked } from "~/utils/types"; import { FULL_GROUP_SIZE } from "../sendouq/q-constants"; @@ -130,7 +129,6 @@ function groupWithTeamAndMembers( .orderBy("UserFriendCode.createdAt", "desc") .limit(1) .as("friendCode"), - userChatNameHue, ]) .whereRef("GroupMember.groupId", "=", groupIdRef) .orderBy("GroupMember.userId", "asc"), diff --git a/app/features/sendouq/SQGroupRepository.server.ts b/app/features/sendouq/SQGroupRepository.server.ts index 615d46996..46ba00f26 100644 --- a/app/features/sendouq/SQGroupRepository.server.ts +++ b/app/features/sendouq/SQGroupRepository.server.ts @@ -6,10 +6,7 @@ import type { DB, Tables, UserMapModePreferences } from "~/db/tables"; import { databaseTimestampNow, dateToDatabaseTimestamp } from "~/utils/dates"; import { shortNanoid } from "~/utils/id"; import invariant from "~/utils/invariant"; -import { - COMMON_USER_FIELDS, - userChatNameHueForJson, -} from "~/utils/kysely.server"; +import { COMMON_USER_FIELDS } from "~/utils/kysely.server"; import { errorIsSqliteForeignKeyConstraintFailure } from "~/utils/sql"; import { userIsBanned } from "../ban/core/banned.server"; import { FULL_GROUP_SIZE } from "./q-constants"; @@ -41,7 +38,6 @@ export async function findCurrentGroups() { role: Tables["GroupMember"]["role"]; note: Tables["GroupMember"]["note"]; weapons: Tables["User"]["qWeaponPool"]; - chatNameHue: string | null; plusTier: Tables["PlusTier"]["tier"] | null; }; @@ -83,7 +79,6 @@ export async function findCurrentGroups() { languages: eb.ref("User.languages"), plusTier: eb.ref("PlusTier.tier"), vc: eb.ref("User.vc"), - chatNameHue: userChatNameHueForJson, }), ]) .$castTo() diff --git a/app/features/sendouq/components/GroupCard.browser.test.tsx b/app/features/sendouq/components/GroupCard.browser.test.tsx index 5e56e0055..6d0d60442 100644 --- a/app/features/sendouq/components/GroupCard.browser.test.tsx +++ b/app/features/sendouq/components/GroupCard.browser.test.tsx @@ -36,7 +36,7 @@ function createMember(overrides: Partial = {}): SQGroupMember { pronouns: null, skillDifference: undefined, noScreen: undefined, - chatNameHue: null, + mapModePreferences: undefined, ...overrides, }; @@ -89,7 +89,7 @@ function createOwnGroupMember( pronouns: null, skillDifference: undefined, noScreen: undefined, - chatNameHue: null, + mapModePreferences: undefined, ...overrides, } satisfies OwnGroupMember; diff --git a/app/features/tournament-bracket/core/tests/mocks-li.ts b/app/features/tournament-bracket/core/tests/mocks-li.ts index a9437e435..de7379f4e 100644 --- a/app/features/tournament-bracket/core/tests/mocks-li.ts +++ b/app/features/tournament-bracket/core/tests/mocks-li.ts @@ -6936,7 +6936,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "260999523806085120", discordAvatar: "4f15f20946fbd992ee9d694a539e6317", customUrl: "elemental", - chatNameHue: null, }, { userId: 622, @@ -6947,7 +6946,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "201922904781357057", discordAvatar: "7fa46b7dc27fa589d3d278ba4b60224f", customUrl: "dotjpg", - chatNameHue: null, }, { userId: 680, @@ -6958,7 +6956,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "87494390724964352", discordAvatar: "3b82ee3101ba39120b6a65c042a04a37", customUrl: "inkfarer", - chatNameHue: null, }, { userId: 936, @@ -6969,7 +6966,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "119620026767507456", discordAvatar: "aa1ff5b8eefd5a26657c411138a160b8", customUrl: null, - chatNameHue: null, }, { userId: 1402, @@ -6980,7 +6976,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "216335108037148673", discordAvatar: "458f1e233a3b590a62f6b867b95a6241", customUrl: "grace", - chatNameHue: null, }, { userId: 1755, @@ -6991,7 +6986,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "200777324520538113", discordAvatar: "a_d71ac2f474ce422ce711e8e74d657b2f", customUrl: "brushstrokes", - chatNameHue: null, }, { userId: 2908, @@ -7002,7 +6996,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "112254088992792576", discordAvatar: "711e8d48f316687faa4fdb41ab9298f0", customUrl: "kitsunekeira", - chatNameHue: null, }, { userId: 3742, @@ -7013,7 +7006,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "124007565758693376", discordAvatar: "ca9e37c9b31dfa39f88b2a2da2d4af21", customUrl: "thoma", - chatNameHue: "40", }, { userId: 3806, @@ -7024,7 +7016,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "113026708071821312", discordAvatar: "4b3f0da55a834acc0beb258edd9c7e34", customUrl: null, - chatNameHue: null, }, { userId: 4941, @@ -7035,7 +7026,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "236292964052107264", discordAvatar: "c95b9a8cfb9164f3a66267a5e8cfe8b1", customUrl: "hoeenhero", - chatNameHue: null, }, { userId: 5036, @@ -7046,7 +7036,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "248232091005747201", discordAvatar: "40a21a204f8fae6ae2e7e8c5de70de83", customUrl: "toasty", - chatNameHue: null, }, { userId: 8098, @@ -7057,7 +7046,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "442431978269310987", discordAvatar: "e0fd0fed98a4d3c3bfd56332678d4e6c", customUrl: "popgun", - chatNameHue: null, }, { userId: 8750, @@ -7068,7 +7056,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "273188925189914628", discordAvatar: "c62afa020e24ead92cc043ffa809ffdc", customUrl: "liberowolf", - chatNameHue: null, }, { userId: 9222, @@ -7079,7 +7066,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "298241282550267906", discordAvatar: "f69bb5af745eca4e9b7f55504c641f78", customUrl: "jardonian", - chatNameHue: null, }, { userId: 9719, @@ -7090,7 +7076,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "184478601171828737", discordAvatar: "75dedb3527b73d9571151f0a00d1c365", customUrl: "scepidilionz", - chatNameHue: "180", }, { userId: 18720, @@ -7101,7 +7086,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "103988435785650176", discordAvatar: "df9936bea9dcbd250daf8e2ef2d7c04a", customUrl: "tulip", - chatNameHue: null, }, ], }, @@ -7113,7 +7097,6 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "236292964052107264", discordAvatar: "c95b9a8cfb9164f3a66267a5e8cfe8b1", customUrl: "hoeenhero", - chatNameHue: null, }, staff: [ { @@ -7123,7 +7106,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "260999523806085120", discordAvatar: "4f15f20946fbd992ee9d694a539e6317", customUrl: "elemental", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7133,7 +7116,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "176095582534762496", discordAvatar: "89e15b6e74f5abdef1183c9416434dde", customUrl: "pock", - chatNameHue: "220", + role: "ORGANIZER", }, { @@ -7143,7 +7126,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "87494390724964352", discordAvatar: "3b82ee3101ba39120b6a65c042a04a37", customUrl: "inkfarer", - chatNameHue: null, + role: "STREAMER", }, { @@ -7153,7 +7136,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "334504066405367808", discordAvatar: "0d31f0d52ebfeaa0216fcacb86eb140a", customUrl: "shads", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7163,7 +7146,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "112254088992792576", discordAvatar: "711e8d48f316687faa4fdb41ab9298f0", customUrl: "kitsunekeira", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7173,7 +7156,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "412316772637736981", discordAvatar: "1408d204fa8a128efd2d2625476468c2", customUrl: null, - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7183,7 +7166,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "578038263433134080", discordAvatar: "f552df977e0165e7fb93d1ce2a7512d4", customUrl: "bars", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7193,7 +7176,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "230161540299489280", discordAvatar: "a_3ca2a0737b2c1e2b5e82ddc98fe79c8b", customUrl: "bowen", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7203,7 +7186,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "678892046534311936", discordAvatar: "11490e6c0ace327ebc32a117b9e0510c", customUrl: "toes", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7213,7 +7196,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "512418782933811221", discordAvatar: "c3afd465b53dedbb97fb9dd504d01305", customUrl: "neato", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7223,7 +7206,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "182994907907096585", discordAvatar: "31da63dcb6dd1dbe4c3f135c105f07e7", customUrl: "strings", - chatNameHue: "220", + role: "ORGANIZER", }, { @@ -7233,7 +7216,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "725416982681223259", discordAvatar: "cb9bf51b05f22c763a2b4812bdd574cc", customUrl: "michi", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7243,7 +7226,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "367803257717784599", discordAvatar: "b8ad30de9487a9699093b728098e01d0", customUrl: "glumbaron", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7253,7 +7236,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "1058063829973618698", discordAvatar: "dc110c2d77ea84e470c87a18ac0b7e5d", customUrl: "lemon7890", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7263,7 +7246,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "1132918323697418310", discordAvatar: "48089383c5d666ae7ef8417d205bfa1f", customUrl: "eemeee", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -7273,7 +7256,7 @@ export const LOW_INK_DECEMBER_2024 = (): TournamentData => ({ discordId: "689577992430944281", discordAvatar: "911c0ac66f9489406ea4ae970e7ed5b0", customUrl: "pin-eye", - chatNameHue: null, + role: "ORGANIZER", }, ], diff --git a/app/features/tournament-bracket/core/tests/mocks-sos.ts b/app/features/tournament-bracket/core/tests/mocks-sos.ts index b761f2816..fd50c25b9 100644 --- a/app/features/tournament-bracket/core/tests/mocks-sos.ts +++ b/app/features/tournament-bracket/core/tests/mocks-sos.ts @@ -2039,7 +2039,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "260999523806085120", discordAvatar: "a_71a6a4b4f76bd79bc9d7743e322a879d", customUrl: "elemental", - chatNameHue: null, }, { userId: 622, @@ -2050,7 +2049,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "201922904781357057", discordAvatar: "7fa46b7dc27fa589d3d278ba4b60224f", customUrl: "dotjpg", - chatNameHue: null, }, { userId: 680, @@ -2061,7 +2059,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "87494390724964352", discordAvatar: "3b82ee3101ba39120b6a65c042a04a37", customUrl: "inkfarer", - chatNameHue: null, }, { userId: 936, @@ -2072,7 +2069,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "119620026767507456", discordAvatar: "aa1ff5b8eefd5a26657c411138a160b8", customUrl: null, - chatNameHue: null, }, { userId: 1402, @@ -2083,7 +2079,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "216335108037148673", discordAvatar: "458f1e233a3b590a62f6b867b95a6241", customUrl: "grace", - chatNameHue: null, }, { userId: 1755, @@ -2094,7 +2089,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "200777324520538113", discordAvatar: "a_d71ac2f474ce422ce711e8e74d657b2f", customUrl: "brushstrokes", - chatNameHue: null, }, { userId: 2908, @@ -2105,7 +2099,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "112254088992792576", discordAvatar: "711e8d48f316687faa4fdb41ab9298f0", customUrl: "kitsunekeira", - chatNameHue: null, }, { userId: 3742, @@ -2116,7 +2109,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "124007565758693376", discordAvatar: "702429723f31a57326f87d11063139f7", customUrl: "thoma", - chatNameHue: "180", }, { userId: 3806, @@ -2127,7 +2119,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "113026708071821312", discordAvatar: "4b3f0da55a834acc0beb258edd9c7e34", customUrl: null, - chatNameHue: null, }, { userId: 4941, @@ -2138,7 +2129,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "236292964052107264", discordAvatar: "c95b9a8cfb9164f3a66267a5e8cfe8b1", customUrl: "hoeenhero", - chatNameHue: null, }, { userId: 5036, @@ -2149,7 +2139,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "248232091005747201", discordAvatar: "40a21a204f8fae6ae2e7e8c5de70de83", customUrl: "toasty", - chatNameHue: null, }, { userId: 8098, @@ -2160,7 +2149,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "442431978269310987", discordAvatar: "e0fd0fed98a4d3c3bfd56332678d4e6c", customUrl: "popgun", - chatNameHue: null, }, { userId: 8750, @@ -2171,7 +2159,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "273188925189914628", discordAvatar: "c62afa020e24ead92cc043ffa809ffdc", customUrl: "liberowolf", - chatNameHue: null, }, { userId: 9222, @@ -2182,7 +2169,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "298241282550267906", discordAvatar: "f69bb5af745eca4e9b7f55504c641f78", customUrl: "jardonian", - chatNameHue: null, }, { userId: 9719, @@ -2193,7 +2179,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "184478601171828737", discordAvatar: "75dedb3527b73d9571151f0a00d1c365", customUrl: "scepidilionz", - chatNameHue: "120", }, { userId: 18720, @@ -2204,7 +2189,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "103988435785650176", discordAvatar: "5fef4bf0c1b8a6a76fe2f43b956bfc3d", customUrl: "tulip", - chatNameHue: null, }, ], }, @@ -2216,7 +2200,6 @@ export const SWIM_OR_SINK_167 = ( discordId: "216335108037148673", discordAvatar: "458f1e233a3b590a62f6b867b95a6241", customUrl: "grace", - chatNameHue: null, }, staff: [ { @@ -2226,7 +2209,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "333766288969302018", discordAvatar: "42d40d5ae6ff7081ae57bc02b6e2f717", customUrl: null, - chatNameHue: null, + role: "ORGANIZER", }, { @@ -2236,7 +2219,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "260999523806085120", discordAvatar: "a_71a6a4b4f76bd79bc9d7743e322a879d", customUrl: "elemental", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -2246,7 +2229,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "468596581357060097", discordAvatar: "940589e5c6793a5cbbab2adebd84fe0b", customUrl: null, - chatNameHue: "30", + role: "ORGANIZER", }, { @@ -2256,7 +2239,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "418176537561661441", discordAvatar: "bab3e7a9cdb2071de7f2ae29256fc83b", customUrl: null, - chatNameHue: null, + role: "ORGANIZER", }, { @@ -2266,7 +2249,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "302160815132246016", discordAvatar: "da7cfcd1a5b8bee37cfa5d308b0898eb", customUrl: "mashimashi", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -2276,7 +2259,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "183025242266927104", discordAvatar: "a9475b488962953152c60f4f138b1618", customUrl: "tux", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -2286,7 +2269,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "343219263655510021", discordAvatar: "f30c675fc07203ca112d93fd03b5cc96", customUrl: "tbob408", - chatNameHue: "120", + role: "ORGANIZER", }, { @@ -2296,7 +2279,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "390444783425945602", discordAvatar: "e821ac7a457033d6c990bcaf518287e5", customUrl: null, - chatNameHue: null, + role: "STREAMER", }, { @@ -2306,7 +2289,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "422790410566500352", discordAvatar: "77b479e49ec0d09edb8f9b975bff04ce", customUrl: "reefsixes", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -2316,7 +2299,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "360259023389327361", discordAvatar: "c5a2506e46e135b2568ef48242f669e8", customUrl: "kloud", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -2326,7 +2309,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "247504664378081280", discordAvatar: "a_a60bcc9c76d4baa9814287fdc5c28fe9", customUrl: "pipedreamdx", - chatNameHue: null, + role: "STREAMER", }, { @@ -2336,7 +2319,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "184478601171828737", discordAvatar: "75dedb3527b73d9571151f0a00d1c365", customUrl: "scepidilionz", - chatNameHue: "120", + role: "ORGANIZER", }, { @@ -2346,7 +2329,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "565712290020589569", discordAvatar: "498b21d6f64dcd56d06e61c2ec39e571", customUrl: "rooster", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -2356,7 +2339,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "103988435785650176", discordAvatar: "5fef4bf0c1b8a6a76fe2f43b956bfc3d", customUrl: "tulip", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -2366,7 +2349,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "221418644297482250", discordAvatar: "6b7156dcd0582ee160564bfa0c5cdc0e", customUrl: "fusionboltzgx", - chatNameHue: "180", + role: "ORGANIZER", }, { @@ -2376,7 +2359,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "458714559855722497", discordAvatar: "b815bb6090c2b32fec23f1336fae5663", customUrl: null, - chatNameHue: null, + role: "ORGANIZER", }, { @@ -2386,7 +2369,7 @@ export const SWIM_OR_SINK_167 = ( discordId: "599633578648928307", discordAvatar: "f5139304fb364bca35634a8e5cd11c0f", customUrl: "phantom_spl", - chatNameHue: null, + role: "ORGANIZER", }, ], 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 d13ba51a9..2af5b11cc 100644 --- a/app/features/tournament-bracket/core/tests/mocks-zones-weekly.ts +++ b/app/features/tournament-bracket/core/tests/mocks-zones-weekly.ts @@ -338,7 +338,6 @@ export const ZONES_WEEKLY_38 = (): TournamentData => ({ discordId: "308483655515373570", discordAvatar: "a5fff2b4706d99364e646cab28c8085b", customUrl: "puma", - chatNameHue: null, }, staff: [ { @@ -348,7 +347,7 @@ export const ZONES_WEEKLY_38 = (): TournamentData => ({ discordId: "395757059922198548", discordAvatar: "2a569302e9545c6a07f8f8aa337d139d", customUrl: "penis", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -358,7 +357,7 @@ export const ZONES_WEEKLY_38 = (): TournamentData => ({ discordId: "267963609924108288", discordAvatar: "85090cfe2e0da693355bcec9740c1eaa", customUrl: "cookie", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -368,7 +367,7 @@ export const ZONES_WEEKLY_38 = (): TournamentData => ({ discordId: "507102073427460098", discordAvatar: "bd634c91f7d0475f3671956fa9a2110a", customUrl: null, - chatNameHue: null, + role: "ORGANIZER", }, { @@ -378,7 +377,7 @@ export const ZONES_WEEKLY_38 = (): TournamentData => ({ discordId: "111682034056835072", discordAvatar: "f1191c94b1da5396a06b620408017c1f", customUrl: "weizihao", - chatNameHue: null, + role: "ORGANIZER", }, ], diff --git a/app/features/tournament-bracket/core/tests/mocks.ts b/app/features/tournament-bracket/core/tests/mocks.ts index 9ff42f3b2..5b03407ba 100644 --- a/app/features/tournament-bracket/core/tests/mocks.ts +++ b/app/features/tournament-bracket/core/tests/mocks.ts @@ -1469,7 +1469,6 @@ export const PADDLING_POOL_257 = () => discordId: "163771047068303360", discordAvatar: "b33d8f230218d6a92705a63fdf803851", customUrl: "alicetheto", - chatNameHue: "180", }, staff: [ { @@ -1479,7 +1478,7 @@ export const PADDLING_POOL_257 = () => discordId: "178489224192851969", discordAvatar: "8b8c1d85cc525ea366f3ce2a6a594c05", customUrl: "pinky", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -1489,7 +1488,7 @@ export const PADDLING_POOL_257 = () => discordId: "275213752025088000", discordAvatar: "25bf68c5aa4e622ceb5a241c34841c6d", customUrl: null, - chatNameHue: null, + role: "ORGANIZER", }, { @@ -1499,7 +1498,7 @@ export const PADDLING_POOL_257 = () => discordId: "195618756800675841", discordAvatar: "a_03ec4bbcb2a4ab000237c9f3e9e71508", customUrl: "sdomi19", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -1509,7 +1508,7 @@ export const PADDLING_POOL_257 = () => discordId: "413759870333091884", discordAvatar: "a_b55f70ada809a600e73c5088b910e659", customUrl: "brufnie", - chatNameHue: null, + role: "STREAMER", }, ], @@ -8068,7 +8067,6 @@ export const PADDLING_POOL_255 = () => discordId: "163771047068303360", discordAvatar: "b33d8f230218d6a92705a63fdf803851", customUrl: "alicetheto", - chatNameHue: "0", }, staff: [ { @@ -8078,7 +8076,7 @@ export const PADDLING_POOL_255 = () => discordId: "178489224192851969", discordAvatar: "8b8c1d85cc525ea366f3ce2a6a594c05", customUrl: "pinky", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -8088,7 +8086,7 @@ export const PADDLING_POOL_255 = () => discordId: "275213752025088000", discordAvatar: "25bf68c5aa4e622ceb5a241c34841c6d", customUrl: null, - chatNameHue: null, + role: "ORGANIZER", }, { @@ -8098,7 +8096,7 @@ export const PADDLING_POOL_255 = () => discordId: "195618756800675841", discordAvatar: "a_03ec4bbcb2a4ab000237c9f3e9e71508", customUrl: "sdomi19", - chatNameHue: null, + role: "ORGANIZER", }, { @@ -8108,7 +8106,7 @@ export const PADDLING_POOL_255 = () => discordId: "413759870333091884", discordAvatar: "a_b55f70ada809a600e73c5088b910e659", customUrl: "brufnie", - chatNameHue: null, + role: "STREAMER", }, ], @@ -14993,7 +14991,6 @@ export const IN_THE_ZONE_32 = ({ discordId: "79237403620945920", discordAvatar: "6fc41a44b069a0d2152ac06d1e496c6c", customUrl: "sendou", - chatNameHue: null, }, staff: [ { @@ -15003,7 +15000,7 @@ export const IN_THE_ZONE_32 = ({ discordId: "163771047068303360", discordAvatar: "b33d8f230218d6a92705a63fdf803851", customUrl: "alicetheto", - chatNameHue: "0", + role: "STREAMER", }, { @@ -15013,7 +15010,7 @@ export const IN_THE_ZONE_32 = ({ discordId: "413759870333091884", discordAvatar: "a_b55f70ada809a600e73c5088b910e659", customUrl: "brufnie", - chatNameHue: null, + role: "STREAMER", }, ], diff --git a/app/features/tournament-bracket/core/tests/test-utils.ts b/app/features/tournament-bracket/core/tests/test-utils.ts index 59cdfbd85..ed1426958 100644 --- a/app/features/tournament-bracket/core/tests/test-utils.ts +++ b/app/features/tournament-bracket/core/tests/test-utils.ts @@ -95,7 +95,6 @@ export const testTournament = ({ seedingSnapshot: null, teams: nTeams(participant.length, Math.min(...participant)), author: { - chatNameHue: null, customUrl: null, discordAvatar: null, discordId: "123", diff --git a/app/features/tournament-bracket/queries/findMatchById.server.ts b/app/features/tournament-bracket/queries/findMatchById.server.ts index 8dd4bc3ed..74bdc5a39 100644 --- a/app/features/tournament-bracket/queries/findMatchById.server.ts +++ b/app/features/tournament-bracket/queries/findMatchById.server.ts @@ -31,7 +31,6 @@ const stm = sql.prepare(/* sql */ ` "User"."customUrl", 'discordAvatar', "User"."discordAvatar", - 'chatNameHue', IIF(COALESCE("User"."patronTier", 0) >= 2, "User"."customTheme" ->> '--_chat-h', null), 'pronouns', json("User"."pronouns") ) ) as "players" @@ -85,7 +84,6 @@ export const findMatchById = (id: number) => { discordId: Tables["User"]["discordId"]; customUrl: Tables["User"]["customUrl"]; discordAvatar: Tables["User"]["discordAvatar"]; - chatNameHue: string | null; pronouns: Tables["User"]["pronouns"]; }> ).filter((player) => player.id), diff --git a/app/features/tournament-lfg/TournamentLFGRepository.server.ts b/app/features/tournament-lfg/TournamentLFGRepository.server.ts index ac4652d27..0e678031d 100644 --- a/app/features/tournament-lfg/TournamentLFGRepository.server.ts +++ b/app/features/tournament-lfg/TournamentLFGRepository.server.ts @@ -67,7 +67,6 @@ type TournamentLFGMemberObject = { role: Tables["TournamentTeamMember"]["role"]; isStayAsSub: Tables["TournamentTeamMember"]["isStayAsSub"]; weapons: Tables["User"]["qWeaponPool"]; - chatNameColor: string | null; plusTier: Tables["PlusTier"]["tier"] | null; }; diff --git a/app/features/tournament-lfg/components/LFGGroupCard.tsx b/app/features/tournament-lfg/components/LFGGroupCard.tsx index 912b1aabe..29f2d2588 100644 --- a/app/features/tournament-lfg/components/LFGGroupCard.tsx +++ b/app/features/tournament-lfg/components/LFGGroupCard.tsx @@ -30,7 +30,6 @@ export type LFGGroupMember = { role: "OWNER" | "MANAGER" | "REGULAR"; isStayAsSub: boolean; weapons: Array<{ weaponSplId: MainWeaponId; isFavorite: boolean }> | null; - chatNameColor: string | null; plusTier: number | null; }; diff --git a/app/features/tournament-lfg/loaders/to.$id.looking.server.ts b/app/features/tournament-lfg/loaders/to.$id.looking.server.ts index c7618784e..a66c396d3 100644 --- a/app/features/tournament-lfg/loaders/to.$id.looking.server.ts +++ b/app/features/tournament-lfg/loaders/to.$id.looking.server.ts @@ -155,7 +155,6 @@ async function resolveOwnTeam({ role: m.isOwner ? "OWNER" : "REGULAR", isStayAsSub: false, weapons: null, - chatNameColor: null, plusTier: m.plusTier, })); @@ -196,7 +195,6 @@ function transformMembers( role: m.role, isStayAsSub: m.isStayAsSub === 1, weapons, - chatNameColor: m.chatNameColor, plusTier: m.plusTier, }; }); diff --git a/app/features/tournament/TournamentRepository.server.ts b/app/features/tournament/TournamentRepository.server.ts index 48d695cac..17144c941 100644 --- a/app/features/tournament/TournamentRepository.server.ts +++ b/app/features/tournament/TournamentRepository.server.ts @@ -20,7 +20,6 @@ import { COMMON_USER_FIELDS, concatUserSubmittedImagePrefix, tournamentLogoWithDefault, - userChatNameHue, } from "~/utils/kysely.server"; import type { Unwrapped } from "~/utils/types"; import type { TournamentTierNumber } from "./core/tiering"; @@ -86,7 +85,7 @@ export async function findById(id: number) { "TournamentOrganizationMember.userId", "TournamentOrganizationMember.role", ...COMMON_USER_FIELDS, - userChatNameHue, + "User.pronouns", ]) .whereRef( @@ -106,7 +105,7 @@ export async function findById(id: number) { jsonObjectFrom( eb .selectFrom("User") - .select([...COMMON_USER_FIELDS, userChatNameHue, "User.pronouns"]) + .select([...COMMON_USER_FIELDS, "User.pronouns"]) .whereRef("User.id", "=", "CalendarEvent.authorId"), ).as("author"), jsonArrayFrom( @@ -115,7 +114,7 @@ export async function findById(id: number) { .innerJoin("User", "TournamentStaff.userId", "User.id") .select([ ...COMMON_USER_FIELDS, - userChatNameHue, + "User.pronouns", "TournamentStaff.role", ]) diff --git a/app/utils/kysely.server.ts b/app/utils/kysely.server.ts index 5e21e389d..d3d22ee2b 100644 --- a/app/utils/kysely.server.ts +++ b/app/utils/kysely.server.ts @@ -28,8 +28,6 @@ const userChatNameHueRaw = sql< export const userChatNameHue = userChatNameHueRaw.as("chatNameHue"); -export const userChatNameHueForJson = userChatNameHueRaw; - export function commonUserJsonObject(eb: ExpressionBuilder) { return jsonBuildObject({ id: eb.ref("User.id"),