Mod browser page number

This commit is contained in:
Thoronium
2023-04-25 14:19:17 -06:00
parent b78479a293
commit df48f888ff
5 changed files with 29 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ pub async fn get_latest_release() -> Release {
.unwrap();
let text = response.text().await.unwrap();
println!("Response: {}", text);
//println!("Response: {}", text);
// Parse "tag_name" from JSON
let json: serde_json::Value = serde_json::from_str(&text).unwrap();

View File

@@ -1,6 +1,6 @@
.Mods {
backdrop-filter: blur(10px);
height: 90%;
height: 80%;
width: 100%;
}

View File

@@ -188,7 +188,12 @@ export class Mods extends React.Component<IProps, IState> {
<ModHeader onChange={this.setCategory} headers={headers} defaultHeader={'ripe'} />
<ModPages onClick={this.setPage} headers={pages} defaultHeader={1} />
{this.state.category != 'installed' && (
<>
<p className="ModPagesPage">{this.state.page} </p>
<ModPages onClick={this.setPage} headers={pages} defaultHeader={this.state.page} />
</>
)}
<ModList
key={`${this.state.category}_${this.state.page}`}

View File

@@ -4,8 +4,10 @@
align-items: center;
justify-content: space-around;
width: 100%;
z-index: 2;
position: relative;
padding: 10px;
padding: 5px;
font-size: 20px;
font-weight: bold;
@@ -16,6 +18,7 @@
.ModPagesTitle {
display: flex;
justify-content: center;
z-index: 3;
width: 100%;
max-width: 20%;
@@ -28,3 +31,19 @@
.ModPagesTitle.selected {
border-bottom: 0px solid #fff;
}
.ModPagesPage {
position: absolute;
justify-self: center;
left: 50%;
margin-top: 10px;
transform: translateX(-50%);
text-align: center;
padding: -5px;
z-index: 3;
font-size: 15px;
font-weight: bold;
color: #fff;
}

View File

@@ -124,7 +124,7 @@ export default class NewsSection extends React.Component<IProps, IState> {
case 'latest_version':
news = (
<tr>
<td>Latest version: Grasscutter 1.4.6 - Cultivation 1.0.10</td>
<td>Latest version: Grasscutter 1.4.8 - Cultivation 1.0.26</td>
</tr>
)
break