mirror of
https://github.com/hubHarmony/servii-frontend.git
synced 2024-11-18 05:40:31 +00:00
modif framework
This commit is contained in:
parent
f0b3fc7137
commit
c8f787c362
@ -91,7 +91,7 @@ const CreateServer = ({ user, onCreateServer, onSubdomainUpdate }) => {
|
|||||||
value={serverVersion}
|
value={serverVersion}
|
||||||
onChange={(e) => setServerVersion(e.target.value)}
|
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.21">1.21</option>
|
||||||
<option value="1.20.6">1.20.6</option>
|
<option value="1.20.6">1.20.6</option>
|
||||||
</select>
|
</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) => {
|
const handleCreateServer = async (serverName, serverVersion) => {
|
||||||
try {
|
try {
|
||||||
if (!serverName || !serverVersion) return;
|
if (!serverName || !serverVersion) return;
|
||||||
await serviiApi.serverCreate(serverName, serverVersion, "paper");
|
await serviiApi.serverCreate(serverName, serverVersion, "spiggot");
|
||||||
await loadServers();
|
await loadServers();
|
||||||
setShowCreateServer(false);
|
setShowCreateServer(false);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user