mirror of
https://github.com/hubHarmony/servii-frontend.git
synced 2024-11-17 21:40:30 +00:00
modif framework
This commit is contained in:
parent
f0b3fc7137
commit
c8f787c362
@ -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>
|
||||
|
@ -1,14 +0,0 @@
|
||||
/* src/components/Sidebar.scss */
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.sidebar-left {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.sidebar-right {
|
||||
right: 0;
|
||||
}
|
@ -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;
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user