diff --git a/package-lock.json b/package-lock.json
index cacaeac..ec0f6d3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -19,6 +19,7 @@
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
+ "react-icons": "^5.3.0",
"react-router-dom": "^6.24.0",
"react-toastify": "^10.0.5",
"sass": "^1.77.6",
@@ -9754,6 +9755,14 @@
"react": ">=16.3.0"
}
},
+ "node_modules/react-icons": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.3.0.tgz",
+ "integrity": "sha512-DnUk8aFbTyQPSkCfF8dbX6kQjXA9DktMeJqfjrg6cK9vwQVMxmcA3BfP4QoiztVmEHtwlTgLFsPuH2NskKT6eg==",
+ "peerDependencies": {
+ "react": "*"
+ }
+ },
"node_modules/react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
diff --git a/package.json b/package.json
index 0ff04ed..4659aff 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
+ "react-icons": "^5.3.0",
"react-router-dom": "^6.24.0",
"react-toastify": "^10.0.5",
"sass": "^1.77.6",
diff --git a/src/App.jsx b/src/App.jsx
index c2c8f18..edea5c8 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -33,7 +33,8 @@ const App = () => {
: } />
: } />
- : } />
+ } />
+ : } />
} />
} />
diff --git a/src/components/CreateServer/CreateServer.jsx b/src/components/CreateServer/CreateServer.jsx
index ebe5422..0b1eda1 100644
--- a/src/components/CreateServer/CreateServer.jsx
+++ b/src/components/CreateServer/CreateServer.jsx
@@ -10,26 +10,10 @@ import spigot from '../../assets/frameworks/spigot.png';
import paper from '../../assets/frameworks/paper.png';
const versions = {
- vanilla: ['1.21', '1.20', '1.19'],
- bukkit: [
- '1.15.0', '1.15.1', '1.15.2', '1.15.3', '1.15.4', '1.15.5',
- '1.16.0', '1.16.1', '1.16.2', '1.16.3', '1.16.4', '1.16.5',
- '1.17.0', '1.17.1', '1.17.2', '1.17.3', '1.17.4', '1.17.5',
- '1.18.1', '1.18.2',
- '1.19.1', '1.19.2', '1.19.3', '1.19.4',
- '1.20.1', '1.20.2', '1.20.4', '1.20.6'
- ],
- spigot: ['1.21', '1.20'],
- paper: [
- '1.13.1', '1.13.2',
- '1.14.1', '1.14.2', '1.14.3', '1.14.4',
- '1.15.1', '1.15.2',
- '1.16.1', '1.16.2', '1.16.3', '1.16.4', '1.16.5',
- '1.17.1',
- '1.18.1', '1.18.2',
- '1.19.1', '1.19.2', '1.19.3', '1.19.4',
- '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6'
- ],
+ vanilla:[ "1.21.1", "1.21", "1.20.6", "1.20.5", "1.20.4", "1.20.2", "1.20.1", "1.19.4", "1.19.3", "1.19.2", "1.19.1", "1.18.2", "1.18.1", "1.17.1", "1.16.5", "1.16.4", "1.16.3", "1.16.2", "1.16.1", "1.15.2", "1.15.1", "1.14.4", "1.14.3", "1.14.2", "1.14.1", "1.13.2", "1.13.1", "1.12.2", "1.12.1", "1.11.2", "1.10.2", "1.9.4"],
+ bukkit: [ "1.20.6", "1.20.4", "1.20.2", "1.20.1", "1.19.4", "1.19.3", "1.19.2", "1.19.1", "1.18.2", "1.17.5", "1.17.4", "1.17.3", "1.17.2", "1.17.0", "1.16.5", "1.16.4", "1.16.3", "1.16.2", "1.16.1", "1.16.0", "1.15.5", "1.15.4", "1.15.3", "1.15.2", "1.15.1", "1.15.0", "1.14.5", "1.14.4", "1.14.3", "1.14.2", "1.14.1", "1.14.0", "1.13.5", "1.13.4", "1.13.3", "1.13.2", "1.13.1", "1.13.0", "1.12.5", "1.12.4", "1.12.3", "1.12.2", "1.12.1", "1.12.0", "1.11.5", "1.11.4", "1.11.3", "1.11.2", "1.11.1", "1.11.0", "1.10.5", "1.10.4", "1.10.3", "1.10.2", "1.10.1", "1.10.0", "1.9.5", "1.9.4", "1.9.3", "1.9.2", "1.9.1", "1.9.0", "1.8.5", "1.8.4", "1.8.3", "1.8.2", "1.8.1", "1.8.0", "1.7.5", "1.7.4", "1.7.3", "1.7.2", "1.7.1", "1.7.0", "1.6.5", "1.6.4", "1.6.3", "1.6.2", "1.6.1", "1.6.0", "1.5.5", "1.5.4", "1.5.3", "1.5.2", "1.5.1", "1.5.0", "1.4.5", "1.4.4", "1.4.3", "1.4.2", "1.4.1", "1.4.0", "1.3.5", "1.3.4", "1.3.3", "1.3.2", "1.3.1", "1.3.0", "1.2.5", "1.2.4", "1.2.3", "1.2.2", "1.2.1", "1.2.0", "1.1.5", "1.1.4", "1.1.3", "1.1.2", "1.1.1", "1.1.0", "1.0.5", "1.0.4", "1.0.3", "1.0.2", "1.0.1", "1.0.0"],
+ spigot: [ "1.21", "1.20.6", "1.20.4", "1.20.2", "1.20.1", "1.19.4", "1.19.3", "1.19.2", "1.19.1", "1.18.2", "1.18.1", "1.17.1", "1.16.5", "1.16.4", "1.16.3", "1.16.2", "1.16.1", "1.15.2", "1.15.1", "1.14.4", "1.14.3", "1.14.2", "1.14.1", "1.13.2", "1.13.1", "1.12.2", "1.12.1", "1.11.2", "1.11.1", "1.10.2", "1.9.4", "1.9.2", "1.8.8", "1.8.7", "1.8.6", "1.8.5", "1.8.4", "1.8.3", "1.7.10", "1.7.9", "1.7.8", "1.7.5", "1.7.2", "1.6.4", "1.6.2", "1.5.2", "1.5.1", "1.4.7", "1.4.6"],
+ paper: [ "1.21.1", "1.21", "1.20.6", "1.20.5", "1.20.4", "1.20.2", "1.20.1", "1.19.4", "1.19.3", "1.19.2", "1.19.1", "1.18.2", "1.18.1", "1.17.1", "1.16.5", "1.16.4", "1.16.3", "1.16.2", "1.16.1", "1.15.2", "1.15.1", "1.14.4", "1.14.3", "1.14.2", "1.14.1", "1.13.2", "1.13.1", "1.12.2", "1.12.1", "1.11.2", "1.10.2", "1.9.4"]
};
const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noServers }) => {
@@ -37,7 +21,7 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
const [subdomainInput, setSubdomainInput] = useState('');
const [serverName, setServerName] = useState('');
const [serverVersion, setServerVersion] = useState();
- const [selectedFramework, setSelectedFramework] = useState("vanilla");
+ const [selectedFramework, setSelectedFramework] = useState("paper");
const loadSubdomain = async () => {
try {
@@ -69,11 +53,13 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
const handleCreateServer = async () => {
try {
- await onCreateServer(serverName, serverVersion, selectedFramework);
+ const frameworkToSend = selectedFramework === 'vanilla' ? 'paper' : selectedFramework;
+ await onCreateServer(serverName, serverVersion, frameworkToSend);
} catch (error) {
- console.error('Error creating server:', error);
+ console.error('Error creating server:', error);
}
- };
+};
+
const validateInput = (input) => {
return input.replace(/[^a-zA-Z]/g, '');
@@ -124,45 +110,56 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
Sélection du framework
-
{
- setSelectedFramework('vanilla');
- setServerVersion('');
- }}
- />
-
{
- setSelectedFramework('bukkit');
- setServerVersion('');
- }}
- />
-
{
- setSelectedFramework('spigot');
- setServerVersion('');
- }}
- />
-
{
- setSelectedFramework('paper');
- setServerVersion('');
- }}
- />
-
+
+
{
+ setSelectedFramework('vanilla');
+ setServerVersion('');
+ }}
+ />
+
+
+
+
{
+ setSelectedFramework('bukkit');
+ setServerVersion('');
+ }}
+ />
+
- Sélection de la version
+
+
{
+ setSelectedFramework('spigot');
+ setServerVersion('');
+ }}
+ />
+
+
+
+
{
+ setSelectedFramework('paper');
+ setServerVersion('');
+ }}
+ />
+
{}
+
+
+ Sélection de la version