mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 23:54:48 +01:00
Mod browser page number
This commit is contained in:
@@ -17,7 +17,7 @@ pub async fn get_latest_release() -> Release {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
let text = response.text().await.unwrap();
|
let text = response.text().await.unwrap();
|
||||||
|
|
||||||
println!("Response: {}", text);
|
//println!("Response: {}", text);
|
||||||
|
|
||||||
// Parse "tag_name" from JSON
|
// Parse "tag_name" from JSON
|
||||||
let json: serde_json::Value = serde_json::from_str(&text).unwrap();
|
let json: serde_json::Value = serde_json::from_str(&text).unwrap();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.Mods {
|
.Mods {
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
height: 90%;
|
height: 80%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -188,7 +188,12 @@ export class Mods extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
<ModHeader onChange={this.setCategory} headers={headers} defaultHeader={'ripe'} />
|
<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
|
<ModList
|
||||||
key={`${this.state.category}_${this.state.page}`}
|
key={`${this.state.category}_${this.state.page}`}
|
||||||
|
|||||||
@@ -4,8 +4,10 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
z-index: 2;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
padding: 10px;
|
padding: 5px;
|
||||||
|
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -16,6 +18,7 @@
|
|||||||
.ModPagesTitle {
|
.ModPagesTitle {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
z-index: 3;
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 20%;
|
max-width: 20%;
|
||||||
@@ -28,3 +31,19 @@
|
|||||||
.ModPagesTitle.selected {
|
.ModPagesTitle.selected {
|
||||||
border-bottom: 0px solid #fff;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ export default class NewsSection extends React.Component<IProps, IState> {
|
|||||||
case 'latest_version':
|
case 'latest_version':
|
||||||
news = (
|
news = (
|
||||||
<tr>
|
<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>
|
</tr>
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user