mirror of
https://github.com/hubHarmony/servii-frontend.git
synced 2024-11-18 05:40:31 +00:00
Revert "init test fix"
This commit is contained in:
parent
ac73fa7920
commit
b53a48e408
@ -8,6 +8,7 @@ import bukkitLogo from '../../assets/frameworks/bukkit.png';
|
|||||||
import paperLogo from '../../assets/frameworks/paper.png';
|
import paperLogo from '../../assets/frameworks/paper.png';
|
||||||
import spigotLogo from '../../assets/frameworks/spigot.png';
|
import spigotLogo from '../../assets/frameworks/spigot.png';
|
||||||
|
|
||||||
|
|
||||||
const frameworks = [
|
const frameworks = [
|
||||||
{ name: 'vanilla', logo: vanillaLogo },
|
{ name: 'vanilla', logo: vanillaLogo },
|
||||||
{ name: 'bukkit', logo: bukkitLogo },
|
{ name: 'bukkit', logo: bukkitLogo },
|
||||||
@ -38,6 +39,8 @@ const versions = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noServers }) => {
|
const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noServers }) => {
|
||||||
const [subdomain, setSubdomain] = useState(null);
|
const [subdomain, setSubdomain] = useState(null);
|
||||||
const [subdomainInput, setSubdomainInput] = useState('');
|
const [subdomainInput, setSubdomainInput] = useState('');
|
||||||
@ -75,7 +78,7 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
|
|||||||
|
|
||||||
const handleCreateServer = async () => {
|
const handleCreateServer = async () => {
|
||||||
try {
|
try {
|
||||||
await onCreateServer(serverName, serverVersion, selectedFramework);
|
await onCreateServer(serverName, serverVersion , selectedFramework);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error creating server:', error);
|
console.error('Error creating server:', error);
|
||||||
}
|
}
|
||||||
@ -90,7 +93,7 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
|
|||||||
{noServers ? (
|
{noServers ? (
|
||||||
<div className={styles.mainCardNoserveur}>
|
<div className={styles.mainCardNoserveur}>
|
||||||
<div className={styles.nsSubTitle}>Bonjour</div>
|
<div className={styles.nsSubTitle}>Bonjour</div>
|
||||||
<div className={styles.nsTitle}>Aucun serveur</div>
|
<div className={styles.nsTitle}>Aucun serveur </div>
|
||||||
<button className={styles.btnnoServCreate} onClick={onCreateServer}>Créer un nouveau serveur</button>
|
<button className={styles.btnnoServCreate} onClick={onCreateServer}>Créer un nouveau serveur</button>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
@ -130,12 +133,13 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
|
|||||||
|
|
||||||
<div className={styles.subtitle}>Sélection du framework</div>
|
<div className={styles.subtitle}>Sélection du framework</div>
|
||||||
<div className={styles.carreContainer}>
|
<div className={styles.carreContainer}>
|
||||||
{frameworks.map((framework, index) => (
|
|
||||||
|
{frameworks.map((framework, index) => (
|
||||||
<img
|
<img
|
||||||
key={index}
|
key={index}
|
||||||
className={`${styles.carre} ${selectedFramework === framework.name ? styles.selected : ''}`}
|
className={`${styles.carre} ${selectedFramework === framework.name ? styles.selected : ''}`}
|
||||||
src={framework.logo}
|
src={framework.logo.toLowerCase()}
|
||||||
alt={`${framework.name}`}
|
alt={`${framework.name} Logo`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSelectedFramework(framework.name);
|
setSelectedFramework(framework.name);
|
||||||
setServerVersion('');
|
setServerVersion('');
|
||||||
@ -145,6 +149,7 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate, onCancel, noSer
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.subtitle}>Sélection de la version</div>
|
<div className={styles.subtitle}>Sélection de la version</div>
|
||||||
|
|
||||||
<select
|
<select
|
||||||
className={styles.select}
|
className={styles.select}
|
||||||
name="version"
|
name="version"
|
||||||
|
Loading…
Reference in New Issue
Block a user