From e40f07211f5f15dcb138e2520a76d13afd3c0cfd Mon Sep 17 00:00:00 2001 From: FifthWit Date: Thu, 30 Jan 2025 10:44:30 -0600 Subject: formatted with prettier --- frontend/src/types/Chapters.ts | 22 ++-- frontend/src/types/Content.ts | 8 +- frontend/src/types/Game.ts | 13 ++- frontend/src/types/Map.ts | 36 +++---- frontend/src/types/MapNames.ts | 220 +++++++++++++++++++-------------------- frontend/src/types/Pagination.ts | 2 +- frontend/src/types/Profile.ts | 21 ++-- frontend/src/types/Ranking.ts | 40 +++---- frontend/src/types/Search.ts | 6 +- 9 files changed, 183 insertions(+), 185 deletions(-) (limited to 'frontend/src/types') diff --git a/frontend/src/types/Chapters.ts b/frontend/src/types/Chapters.ts index 1d48306..8924b97 100644 --- a/frontend/src/types/Chapters.ts +++ b/frontend/src/types/Chapters.ts @@ -1,19 +1,19 @@ -import type { Game } from "@customTypes/Game"; -import type { Map } from "@customTypes/Map"; +import type { Game } from '@customTypes/Game'; +import type { Map } from '@customTypes/Map'; interface Chapter { - id: number; - name: string; - image: string; - is_disabled: boolean; + id: number; + name: string; + image: string; + is_disabled: boolean; } export interface GameChapter { - chapter: Chapter; - maps: Map[]; + chapter: Chapter; + maps: Map[]; } export interface GamesChapters { - game: Game; - chapters: Chapter[]; -} \ No newline at end of file + game: Game; + chapters: Chapter[]; +} diff --git a/frontend/src/types/Content.ts b/frontend/src/types/Content.ts index 775fab4..77b3970 100644 --- a/frontend/src/types/Content.ts +++ b/frontend/src/types/Content.ts @@ -6,18 +6,18 @@ export interface ModMenuContent { showcase: string; description: string; category_id: number; -}; +} export interface MapDiscussionContent { title: string; content: string; -}; +} export interface MapDiscussionCommentContent { comment: string; -}; +} export interface UploadRunContent { host_demo: File | null; partner_demo: File | null; -}; +} diff --git a/frontend/src/types/Game.ts b/frontend/src/types/Game.ts index 1a80341..be2cd73 100644 --- a/frontend/src/types/Game.ts +++ b/frontend/src/types/Game.ts @@ -1,37 +1,36 @@ import type { Map } from '@customTypes/Map'; - export interface Game { id: number; name: string; image: string; is_coop: boolean; category_portals: GameCategoryPortals[]; -}; +} export interface GameChapters { game: Game; chapters: Chapter[]; -}; +} export interface GameMaps { game: Game; maps: Map[]; -}; +} export interface Category { id: number; name: string; -}; +} interface Chapter { id: number; name: string; image: string; is_disabled: boolean; -}; +} export interface GameCategoryPortals { category: Category; portal_count: number; -}; +} diff --git a/frontend/src/types/Map.ts b/frontend/src/types/Map.ts index 89c66d5..6bc6369 100644 --- a/frontend/src/types/Map.ts +++ b/frontend/src/types/Map.ts @@ -9,15 +9,15 @@ export interface Map { is_disabled: boolean; difficulty: number; category_portals: GameCategoryPortals[]; -}; +} export interface MapDiscussion { discussion: MapDiscussionsDetail; -}; +} export interface MapDiscussions { discussions: MapDiscussionsDetail[]; -}; +} export interface MapDiscussionsDetail { id: number; @@ -27,22 +27,24 @@ export interface MapDiscussionsDetail { comments: MapDiscussionDetailComment[]; created_at: string; updated_at: string; -}; +} interface MapDiscussionDetailComment { comment: string; date: string; user: UserShort; -}; +} export interface MapLeaderboard { map: MapSummaryMap; - records: MapLeaderboardRecordSingleplayer[] | MapLeaderboardRecordMultiplayer[]; + records: + | MapLeaderboardRecordSingleplayer[] + | MapLeaderboardRecordMultiplayer[]; pagination: Pagination; -}; +} export interface MapLeaderboardRecordSingleplayer { - kind: "singleplayer"; + kind: 'singleplayer'; placement: number; record_id: number; score_count: number; @@ -50,10 +52,10 @@ export interface MapLeaderboardRecordSingleplayer { user: UserShort; demo_id: string; record_date: string; -}; +} export interface MapLeaderboardRecordMultiplayer { - kind: "multiplayer"; + kind: 'multiplayer'; placement: number; record_id: number; score_count: number; @@ -63,13 +65,12 @@ export interface MapLeaderboardRecordMultiplayer { host_demo_id: string; partner_demo_id: string; record_date: string; -}; - +} export interface MapSummary { map: MapSummaryMap; summary: MapSummaryDetails; -}; +} interface MapSummaryMap { id: number; @@ -79,11 +80,11 @@ interface MapSummaryMap { map_name: string; is_coop: boolean; is_disabled: boolean; -}; +} interface MapSummaryDetails { routes: MapSummaryDetailsRoute[]; -}; +} interface MapSummaryDetailsRoute { route_id: number; @@ -93,16 +94,15 @@ interface MapSummaryDetailsRoute { completion_count: number; description: string; showcase: string; -}; +} interface MapSummaryDetailsRouteHistory { runner_name: string; score_count: number; date: string; -}; +} export interface MapDeleteEndpoint { map_id: number; record_id: number; } - diff --git a/frontend/src/types/MapNames.ts b/frontend/src/types/MapNames.ts index b6313e7..9ea9851 100644 --- a/frontend/src/types/MapNames.ts +++ b/frontend/src/types/MapNames.ts @@ -1,127 +1,127 @@ export const MapNames: { [key: string]: number } = { - "sp_a1_intro1": 1, - "sp_a1_intro2": 2, - "sp_a1_intro3": 3, - "sp_a1_intro4": 4, - "sp_a1_intro5": 5, - "sp_a1_intro6": 6, - "sp_a1_intro7": 7, - "sp_a1_wakeup": 8, - "sp_a2_intro": 9, + sp_a1_intro1: 1, + sp_a1_intro2: 2, + sp_a1_intro3: 3, + sp_a1_intro4: 4, + sp_a1_intro5: 5, + sp_a1_intro6: 6, + sp_a1_intro7: 7, + sp_a1_wakeup: 8, + sp_a2_intro: 9, - "sp_a2_laser_intro": 10, - "sp_a2_laser_stairs": 11, - "sp_a2_dual_lasers": 12, - "sp_a2_laser_over_goo": 13, - "sp_a2_catapult_intro": 14, - "sp_a2_trust_fling": 15, - "sp_a2_pit_flings": 16, - "sp_a2_fizzler_intro": 17, + sp_a2_laser_intro: 10, + sp_a2_laser_stairs: 11, + sp_a2_dual_lasers: 12, + sp_a2_laser_over_goo: 13, + sp_a2_catapult_intro: 14, + sp_a2_trust_fling: 15, + sp_a2_pit_flings: 16, + sp_a2_fizzler_intro: 17, - "sp_a2_sphere_peek": 18, - "sp_a2_ricochet": 19, - "sp_a2_bridge_intro": 20, - "sp_a2_bridge_the_gap": 21, - "sp_a2_turret_intro": 22, - "sp_a2_laser_relays": 23, - "sp_a2_turret_blocker": 24, - "sp_a2_laser_vs_turret": 25, - "sp_a2_pull_the_rug": 26, + sp_a2_sphere_peek: 18, + sp_a2_ricochet: 19, + sp_a2_bridge_intro: 20, + sp_a2_bridge_the_gap: 21, + sp_a2_turret_intro: 22, + sp_a2_laser_relays: 23, + sp_a2_turret_blocker: 24, + sp_a2_laser_vs_turret: 25, + sp_a2_pull_the_rug: 26, - "sp_a2_column_blocker": 27, - "sp_a2_laser_chaining": 28, - "sp_a2_triple_laser": 29, - "sp_a2_bts1": 30, - "sp_a2_bts2": 31, + sp_a2_column_blocker: 27, + sp_a2_laser_chaining: 28, + sp_a2_triple_laser: 29, + sp_a2_bts1: 30, + sp_a2_bts2: 31, - "sp_a2_bts3": 32, - "sp_a2_bts4": 33, - "sp_a2_bts5": 34, - "sp_a2_core": 35, + sp_a2_bts3: 32, + sp_a2_bts4: 33, + sp_a2_bts5: 34, + sp_a2_core: 35, - "sp_a3_01": 36, - "sp_a3_03": 37, - "sp_a3_jump_intro": 38, - "sp_a3_bomb_flings": 39, - "sp_a3_crazy_box": 40, - "sp_a3_transition01": 41, + sp_a3_01: 36, + sp_a3_03: 37, + sp_a3_jump_intro: 38, + sp_a3_bomb_flings: 39, + sp_a3_crazy_box: 40, + sp_a3_transition01: 41, - "sp_a3_speed_ramp": 42, - "sp_a3_speed_flings": 43, - "sp_a3_portal_intro": 44, - "sp_a3_end": 45, + sp_a3_speed_ramp: 42, + sp_a3_speed_flings: 43, + sp_a3_portal_intro: 44, + sp_a3_end: 45, - "sp_a4_intro": 46, - "sp_a4_tb_intro": 47, - "sp_a4_tb_trust_drop": 48, - "sp_a4_tb_wall_button": 49, - "sp_a4_tb_polarity": 50, - "sp_a4_tb_catch": 51, - "sp_a4_stop_the_box": 52, - "sp_a4_laser_catapult": 53, - "sp_a4_laser_platform": 54, - "sp_a4_speed_tb_catch": 55, - "sp_a4_jump_polarity": 56, + sp_a4_intro: 46, + sp_a4_tb_intro: 47, + sp_a4_tb_trust_drop: 48, + sp_a4_tb_wall_button: 49, + sp_a4_tb_polarity: 50, + sp_a4_tb_catch: 51, + sp_a4_stop_the_box: 52, + sp_a4_laser_catapult: 53, + sp_a4_laser_platform: 54, + sp_a4_speed_tb_catch: 55, + sp_a4_jump_polarity: 56, - "sp_a4_finale1": 57, - "sp_a4_finale2": 58, - "sp_a4_finale3": 59, - "sp_a4_finale4": 60, + sp_a4_finale1: 57, + sp_a4_finale2: 58, + sp_a4_finale3: 59, + sp_a4_finale4: 60, - "mp_coop_start": 61, - "mp_coop_lobby_3": 62, + mp_coop_start: 61, + mp_coop_lobby_3: 62, - "mp_coop_doors": 63, - "mp_coop_race_2": 64, - "mp_coop_laser_2": 65, - "mp_coop_rat_maze": 66, - "mp_coop_laser_crusher": 67, - "mp_coop_teambts": 68, + mp_coop_doors: 63, + mp_coop_race_2: 64, + mp_coop_laser_2: 65, + mp_coop_rat_maze: 66, + mp_coop_laser_crusher: 67, + mp_coop_teambts: 68, - "mp_coop_fling_3": 69, - "mp_coop_infinifling_train": 70, - "mp_coop_come_along": 71, - "mp_coop_fling_1": 72, - "mp_coop_catapult_1": 73, - "mp_coop_multifling_1": 74, - "mp_coop_fling_crushers": 75, - "mp_coop_fan": 76, + mp_coop_fling_3: 69, + mp_coop_infinifling_train: 70, + mp_coop_come_along: 71, + mp_coop_fling_1: 72, + mp_coop_catapult_1: 73, + mp_coop_multifling_1: 74, + mp_coop_fling_crushers: 75, + mp_coop_fan: 76, - "mp_coop_wall_intro": 77, - "mp_coop_wall_2": 78, - "mp_coop_catapult_wall_intro": 79, - "mp_coop_wall_block": 80, - "mp_coop_catapult_2": 81, - "mp_coop_turret_walls": 82, - "mp_coop_turret_ball": 83, - "mp_coop_wall_5": 84, + mp_coop_wall_intro: 77, + mp_coop_wall_2: 78, + mp_coop_catapult_wall_intro: 79, + mp_coop_wall_block: 80, + mp_coop_catapult_2: 81, + mp_coop_turret_walls: 82, + mp_coop_turret_ball: 83, + mp_coop_wall_5: 84, - "mp_coop_tbeam_redirect": 85, - "mp_coop_tbeam_drill": 86, - "mp_coop_tbeam_catch_grind_1": 87, - "mp_coop_tbeam_laser_1": 88, - "mp_coop_tbeam_polarity": 89, - "mp_coop_tbeam_polarity2": 90, - "mp_coop_tbeam_polarity3": 91, - "mp_coop_tbeam_maze": 92, - "mp_coop_tbeam_end": 93, + mp_coop_tbeam_redirect: 85, + mp_coop_tbeam_drill: 86, + mp_coop_tbeam_catch_grind_1: 87, + mp_coop_tbeam_laser_1: 88, + mp_coop_tbeam_polarity: 89, + mp_coop_tbeam_polarity2: 90, + mp_coop_tbeam_polarity3: 91, + mp_coop_tbeam_maze: 92, + mp_coop_tbeam_end: 93, - "mp_coop_paint_come_along": 94, - "mp_coop_paint_redirect": 95, - "mp_coop_paint_bridge": 96, - "mp_coop_paint_walljumps": 97, - "mp_coop_paint_speed_fling": 98, - "mp_coop_paint_red_racer": 99, - "mp_coop_paint_speed_catch": 100, - "mp_coop_paint_longjump_intro": 101, + mp_coop_paint_come_along: 94, + mp_coop_paint_redirect: 95, + mp_coop_paint_bridge: 96, + mp_coop_paint_walljumps: 97, + mp_coop_paint_speed_fling: 98, + mp_coop_paint_red_racer: 99, + mp_coop_paint_speed_catch: 100, + mp_coop_paint_longjump_intro: 101, - "mp_coop_separation_1": 102, - "mp_coop_tripleaxis": 103, - "mp_coop_catapult_catch": 104, - "mp_coop_2paints_1bridge": 105, - "mp_coop_paint_conversion": 106, - "mp_coop_bridge_catch": 107, - "mp_coop_laser_tbeam": 108, - "mp_coop_paint_rat_maze": 109, - "mp_coop_paint_crazy_box": 110, + mp_coop_separation_1: 102, + mp_coop_tripleaxis: 103, + mp_coop_catapult_catch: 104, + mp_coop_2paints_1bridge: 105, + mp_coop_paint_conversion: 106, + mp_coop_bridge_catch: 107, + mp_coop_laser_tbeam: 108, + mp_coop_paint_rat_maze: 109, + mp_coop_paint_crazy_box: 110, }; diff --git a/frontend/src/types/Pagination.ts b/frontend/src/types/Pagination.ts index ccff04b..18494eb 100644 --- a/frontend/src/types/Pagination.ts +++ b/frontend/src/types/Pagination.ts @@ -3,4 +3,4 @@ export interface Pagination { total_pages: number; current_page: number; page_size: number; -}; +} diff --git a/frontend/src/types/Profile.ts b/frontend/src/types/Profile.ts index 42e5c3e..8051ae5 100644 --- a/frontend/src/types/Profile.ts +++ b/frontend/src/types/Profile.ts @@ -1,10 +1,10 @@ -import type { Pagination } from "@customTypes/Pagination"; +import type { Pagination } from '@customTypes/Pagination'; export interface UserShort { steam_id: string; user_name: string; avatar_link: string; -}; +} export interface UserProfile { profile: boolean; @@ -17,25 +17,25 @@ export interface UserProfile { rankings: UserProfileRankings; records: UserProfileRecords[]; pagination: Pagination; -}; +} interface UserProfileTitles { name: string; color: string; -}; +} interface UserProfileLinks { p2sr: string; steam: string; youtube: string; twitch: string; -}; +} interface UserProfileRankings { overall: UserProfileRankingsDetail; singleplayer: UserProfileRankingsDetail; cooperative: UserProfileRankingsDetail; -}; +} interface UserProfileRecords { game_id: number; @@ -44,8 +44,8 @@ interface UserProfileRecords { map_name: string; map_wr_count: number; placement: number; - scores: UserProfileRecordsScores[] -}; + scores: UserProfileRecordsScores[]; +} interface UserProfileRecordsScores { record_id: number; @@ -53,11 +53,10 @@ interface UserProfileRecordsScores { score_count: number; score_time: number; date: string; -}; +} interface UserProfileRankingsDetail { rank: number; completion_count: number; completion_total: number; -}; - +} diff --git a/frontend/src/types/Ranking.ts b/frontend/src/types/Ranking.ts index a143355..06a5ca4 100644 --- a/frontend/src/types/Ranking.ts +++ b/frontend/src/types/Ranking.ts @@ -1,31 +1,31 @@ -import type { UserShort } from "@customTypes/Profile"; +import type { UserShort } from '@customTypes/Profile'; export interface RankingType { - placement: number; - user: UserShort; - total_score: number; + placement: number; + user: UserShort; + total_score: number; } export interface SteamRankingType { - user_name: string; - avatar_link: string; - steam_id: string; - sp_score: number; - mp_score: number; - overall_score: number; - sp_rank: number; - mp_rank: number; - overall_rank: number; + user_name: string; + avatar_link: string; + steam_id: string; + sp_score: number; + mp_score: number; + overall_score: number; + sp_rank: number; + mp_rank: number; + overall_rank: number; } export interface Ranking { - rankings_overall: RankingType[]; - rankings_singleplayer: RankingType[]; - rankings_multiplayer: RankingType[]; + rankings_overall: RankingType[]; + rankings_singleplayer: RankingType[]; + rankings_multiplayer: RankingType[]; } export interface SteamRanking { - rankings_overall: SteamRankingType[]; - rankings_singleplayer: SteamRankingType[]; - rankings_multiplayer: SteamRankingType[]; -} \ No newline at end of file + rankings_overall: SteamRankingType[]; + rankings_singleplayer: SteamRankingType[]; + rankings_multiplayer: SteamRankingType[]; +} diff --git a/frontend/src/types/Search.ts b/frontend/src/types/Search.ts index d218806..48b9169 100644 --- a/frontend/src/types/Search.ts +++ b/frontend/src/types/Search.ts @@ -1,13 +1,13 @@ -import type { UserShort } from "@customTypes/Profile"; +import type { UserShort } from '@customTypes/Profile'; export interface Search { players: UserShort[]; maps: SearchMap[]; -}; +} interface SearchMap { id: number; game: string; chapter: string; map: string; -}; +} -- cgit v1.2.3