-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add game_dlcs table To store dlcs in the future * ci: manage game dlcs * ci: automate dlc management * ci: dlcs_as_json sql * feat: api route for dlcs * chore: add dlc api in store * feat: DLC page
- Loading branch information
Showing
17 changed files
with
322 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: 🧩 Manage dlcs | ||
description: Manage dlcs about a given game into the database | ||
title: '[MANAGE_DLCS] ' | ||
labels: ["database","[MANAGE_DLCS]"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Please fill in the following fields to manage dlcs about a given game into the database ! | ||
- type: input | ||
id: gameID | ||
attributes: | ||
label: ID of the game | ||
description: What is the ID of the game (playlistId or videoId) ? | ||
placeholder: ex. PLRfhDHeBTBJ6POjMkqqeCliq5jrCWagcg | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: dlcs_textarea | ||
attributes: | ||
label: Dlcs | ||
description: Put the ID of each dlc (playlistId or videoId) in the order you want them to be | ||
placeholder: | | ||
ID_1 | ||
ID_2 | ||
ID_3 | ||
... | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><sqlb_project><db path="GamesPassionFR.db" readonly="0" foreign_keys="1" case_sensitive_like="0" temp_store="0" wal_autocheckpoint="1000" synchronous="2"/><attached/><window><main_tabs open="structure browser pragmas query" current="0"/></window><tab_structure><column_width id="0" width="300"/><column_width id="1" width="0"/><column_width id="2" width="100"/><column_width id="3" width="2450"/><column_width id="4" width="0"/><expanded_item id="0" parent="1"/><expanded_item id="1" parent="1"/><expanded_item id="2" parent="1"/><expanded_item id="3" parent="1"/></tab_structure><tab_browse><table title="games" custom_title="0" dock_id="2" table="4,5:maingames"/><table title="games_schedules" custom_title="0" dock_id="1" table="4,15:maingames_schedules"/><dock_state state="000000ff00000000fd00000001000000020000043c000002b6fc0100000001fc000000000000043c0000011b00fffffffa000000000100000002fb000000160064006f0063006b00420072006f00770073006500310100000000ffffffff0000011b00fffffffb000000160064006f0063006b00420072006f00770073006500320100000000ffffffff0000011b00ffffff0000043c0000000000000004000000040000000800000008fc00000000"/><default_encoding codec=""/><browse_table_settings><table schema="main" name="all_series_as_json" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths/><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="backlog" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="31"/><column index="2" value="300"/><column index="3" value="58"/><column index="4" value="257"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort><column index="0" mode="0"/></sort><column_widths><column index="1" value="31"/><column index="2" value="93"/><column index="3" value="273"/><column index="4" value="300"/><column index="5" value="85"/><column index="6" value="70"/><column index="7" value="58"/><column index="8" value="70"/><column index="9" value="41"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games_available_time" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="40"/><column index="2" value="53"/><column index="3" value="53"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games_genres" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="41"/><column index="2" value="42"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games_schedules" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="31"/><column index="2" value="85"/><column index="3" value="85"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table></browse_table_settings></tab_browse><tab_sql><sql name="SQL 1"></sql><current_tab id="0"/></tab_sql></sqlb_project> | ||
<?xml version="1.0" encoding="UTF-8"?><sqlb_project><db path="GamesPassionFR.db" readonly="0" foreign_keys="1" case_sensitive_like="0" temp_store="0" wal_autocheckpoint="1000" synchronous="2"/><attached/><window><main_tabs open="structure browser pragmas query" current="3"/></window><tab_structure><column_width id="0" width="300"/><column_width id="1" width="0"/><column_width id="2" width="100"/><column_width id="3" width="3140"/><column_width id="4" width="0"/><expanded_item id="0" parent="1"/><expanded_item id="1" parent="1"/><expanded_item id="2" parent="1"/><expanded_item id="3" parent="1"/></tab_structure><tab_browse><table title="all_series_as_json" custom_title="0" dock_id="1" table="4,18:mainall_series_as_json"/><table title="games" custom_title="0" dock_id="2" table="4,5:maingames"/><dock_state state="000000ff00000000fd00000001000000020000043c000002b6fc0100000001fc000000000000043c0000011e00fffffffa000000010100000002fb000000160064006f0063006b00420072006f00770073006500310100000000ffffffff0000011e00fffffffb000000160064006f0063006b00420072006f00770073006500320100000000ffffffff0000011b00ffffff0000043c0000000000000004000000040000000800000008fc00000000"/><default_encoding codec=""/><browse_table_settings><table schema="main" name="all_series_as_json" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="156"/><column index="2" value="429"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="backlog" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="31"/><column index="2" value="300"/><column index="3" value="58"/><column index="4" value="257"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort><column index="0" mode="0"/></sort><column_widths><column index="1" value="31"/><column index="2" value="93"/><column index="3" value="273"/><column index="4" value="300"/><column index="5" value="85"/><column index="6" value="70"/><column index="7" value="58"/><column index="8" value="70"/><column index="9" value="41"/></column_widths><filter_values><column index="3" value="prince "/></filter_values><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games_available_time" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="40"/><column index="2" value="53"/><column index="3" value="53"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games_genres" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="41"/><column index="2" value="42"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table><table schema="main" name="games_schedules" show_row_id="0" encoding="" plot_x_axis="" unlock_view_pk="_rowid_" freeze_columns="0"><sort/><column_widths><column index="1" value="31"/><column index="2" value="85"/><column index="3" value="85"/></column_widths><filter_values/><conditional_formats/><row_id_formats/><display_formats/><hidden_columns/><plot_y_axes/><global_filter/></table></browse_table_settings></tab_browse><tab_sql><sql name="SQL 1*">SELECT * FROM dlcs_as_json</sql><current_tab id="0"/></tab_sql></sqlb_project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
"use client"; | ||
|
||
// Next js | ||
import dynamic from 'next/dynamic' | ||
|
||
// Hooks | ||
import { useGetDLCsQuery } from "@/redux/services/dlcsAPI"; | ||
|
||
// MUI component | ||
import Grid from "@mui/material/Grid"; | ||
import Skeleton from '@mui/material/Skeleton'; | ||
import Accordion from '@mui/material/Accordion'; | ||
import AccordionSummary from '@mui/material/AccordionSummary'; | ||
import Typography from '@mui/material/Typography'; | ||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; | ||
|
||
// Custom | ||
const CardEntry = dynamic(() => import('@/components/GamesView/CardEntry'), { ssr: false }); | ||
const AccordionDetails = dynamic(() => import('@mui/material/AccordionDetails'), { ssr: false }); | ||
|
||
// The gallery component | ||
function GamesGalleryList() { | ||
|
||
const { data, error, isLoading } = useGetDLCsQuery(); | ||
|
||
if (error) { | ||
return <>Something bad happened</>; | ||
} | ||
|
||
if (isLoading) { | ||
return ( | ||
<div> | ||
{Array.from({ length: 5 }).map((_, index) => ( | ||
<div key={index} style={{ marginBottom: '15px' }}> | ||
<Skeleton variant="rectangular" width="100%" height={50} /> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
} | ||
|
||
if (!data) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div> | ||
{ | ||
data.map(game => | ||
<Accordion key={game.name}> | ||
<AccordionSummary | ||
expandIcon={<ExpandMoreIcon />} | ||
aria-controls={"panel-content" + game.name} | ||
id={"panel-header" + game.name} | ||
> | ||
<Typography>{game.name}</Typography> | ||
</AccordionSummary> | ||
<AccordionDetails> | ||
<Grid | ||
container | ||
spacing={1} | ||
style={ | ||
{ | ||
rowGap: "15px" | ||
} | ||
} | ||
> | ||
{ | ||
game | ||
.items | ||
.map(dlc => | ||
<Grid | ||
key={dlc.id} | ||
item | ||
xs={6} | ||
md={4} | ||
lg={1.5} | ||
> | ||
<CardEntry game={dlc}/> | ||
</Grid> | ||
) | ||
} | ||
</Grid> | ||
</AccordionDetails> | ||
</Accordion> | ||
) | ||
} | ||
</div> | ||
) | ||
} | ||
|
||
export default GamesGalleryList; |
Oops, something went wrong.