modif framework

This commit is contained in:
AntoninoP 2024-07-09 14:04:39 +02:00
parent f0b3fc7137
commit c8f787c362
4 changed files with 2 additions and 59 deletions

View File

@ -91,7 +91,7 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate }) => {
value={serverVersion}
onChange={(e) => setServerVersion(e.target.value)}
>
<option value="1.20.5">Version</option>
<option value="1.21">Version</option>
<option value="1.21">1.21</option>
<option value="1.20.6">1.20.6</option>
</select>

View File

@ -1,14 +0,0 @@
/* src/components/Sidebar.scss */
.sidebar {
position: fixed;
top: 0;
bottom: 0;
}
.sidebar-left {
left: 0;
}
.sidebar-right {
right: 0;
}

View File

@ -1,43 +0,0 @@
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
const Sidebar = ({ size, color, position, className, children }) => {
useEffect(() => {
document.documentElement.style.setProperty(
`--sidebar-width-${position}`, `${size}rem`
);
}, [size, position]);
const sidebarStyle = {
width: `${size}rem`,
backgroundColor: color,
height: '100vh',
position: 'fixed',
top: 0,
[position]: 0,
overflowY: 'auto'
};
return (
<div style={sidebarStyle} className={className}>
{children}
</div>
);
};
Sidebar.propTypes = {
size: PropTypes.number,
color: PropTypes.string,
position: PropTypes.oneOf(['left', 'right']),
className: PropTypes.string,
children: PropTypes.node
};
Sidebar.defaultProps = {
size: 5,
color: '#f8f9fa',
position: 'left',
className: ''
};
export default Sidebar;

View File

@ -42,7 +42,7 @@ const DashboardPage = ({ user }) => {
const handleCreateServer = async (serverName, serverVersion) => {
try {
if (!serverName || !serverVersion) return;
await serviiApi.serverCreate(serverName, serverVersion, "paper");
await serviiApi.serverCreate(serverName, serverVersion, "spiggot");
await loadServers();
setShowCreateServer(false);
} catch (error) {