mirror of
https://github.com/AtlasMediaGroup/Scissors-Website.git
synced 2024-12-26 11:57:40 +00:00
Clean clean clean
This commit is contained in:
parent
3b35680b72
commit
d69a7c1980
@ -1,4 +1,3 @@
|
|||||||
import React from 'react';
|
|
||||||
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
||||||
import HomePage from "./pages/HomePage";
|
import HomePage from "./pages/HomePage";
|
||||||
import { Button, Nav, Navbar, NavLink, NavDropdown, Container } from "react-bootstrap";
|
import { Button, Nav, Navbar, NavLink, NavDropdown, Container } from "react-bootstrap";
|
||||||
|
@ -50,6 +50,10 @@ tr:nth-child(odd) {
|
|||||||
background-color: #3c3c3c;
|
background-color: #3c3c3c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tr:nth-child(even) {
|
||||||
|
background-color: #2c2c2c;
|
||||||
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
height: 70px;
|
height: 70px;
|
||||||
color: white;
|
color: white;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import React from 'react';
|
|
||||||
import ReactDOM from 'react-dom/client';
|
import ReactDOM from 'react-dom/client';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
|
@ -10,8 +10,7 @@ const DownloadPage = () => {
|
|||||||
const [version, setVersion] = useState("1.19")
|
const [version, setVersion] = useState("1.19")
|
||||||
const versions = ["1.17.1", "1.18.2", "1.19"]
|
const versions = ["1.17.1", "1.18.2", "1.19"]
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
doJobs().then(value => {
|
doJobs()
|
||||||
})
|
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
function doJobs(): Promise<void> {
|
function doJobs(): Promise<void> {
|
||||||
@ -25,9 +24,7 @@ const DownloadPage = () => {
|
|||||||
|
|
||||||
getBuilds(job.name).then(value1 => {
|
getBuilds(job.name).then(value1 => {
|
||||||
setJobs(prevState => {
|
setJobs(prevState => {
|
||||||
let newState = new Map(prevState)
|
return new Map(prevState).set(job, value1)
|
||||||
newState.set(job, value1)
|
|
||||||
return newState
|
|
||||||
})
|
})
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
@ -47,10 +44,10 @@ const DownloadPage = () => {
|
|||||||
{Array.from(jobs.keys()).sort(function (x, y) {
|
{Array.from(jobs.keys()).sort(function (x, y) {
|
||||||
let x1 = x.name.split(".")
|
let x1 = x.name.split(".")
|
||||||
let y1 = y.name.split(".")
|
let y1 = y.name.split(".")
|
||||||
if (x1.length >= 3) {
|
if (x1.length === 3) {
|
||||||
x1 = x1.slice(0, x1.length - 1)
|
x1 = x1.slice(0, x1.length - 1)
|
||||||
}
|
}
|
||||||
if (y1.length >= 3) {
|
if (y1.length === 3) {
|
||||||
y1 = y1.slice(0, y1.length - 1)
|
y1 = y1.slice(0, y1.length - 1)
|
||||||
}
|
}
|
||||||
return y1.join(".") > x1.join(".") ? 1 : -1
|
return y1.join(".") > x1.join(".") ? 1 : -1
|
||||||
@ -61,7 +58,7 @@ const DownloadPage = () => {
|
|||||||
<br /><br />
|
<br /><br />
|
||||||
<table className="downloads">
|
<table className="downloads">
|
||||||
<tbody>
|
<tbody>
|
||||||
{jobs.get(Array.from(jobs.keys()).filter(value => value.name == version)[0])?.map(value => {
|
{jobs.get(Array.from(jobs.keys()).filter(value => value.name === version)[0])?.map(value => {
|
||||||
return <tr key={value.number}>
|
return <tr key={value.number}>
|
||||||
<td align="center"><Button className="download" href={value.artifact ? `${value.url}/artifact/${value.artifact}` : value.url}>#{value.number}</Button></td>
|
<td align="center"><Button className="download" href={value.artifact ? `${value.url}/artifact/${value.artifact}` : value.url}>#{value.number}</Button></td>
|
||||||
<td className="commits"><ul>{value.changes?.map(value1 => {
|
<td className="commits"><ul>{value.changes?.map(value1 => {
|
||||||
|
Loading…
Reference in New Issue
Block a user