Feat: Add toggle switches for server props editor modal
Feat: Add search for settings in modal Update: CSS
This commit is contained in:
@ -11,43 +11,33 @@
|
||||
@layer base {
|
||||
/* Sticky footer base styles */
|
||||
html {
|
||||
height: 100%;
|
||||
@apply h-full;
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@apply min-h-full flex flex-col;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: 'Minecraft', sans-serif; /* Apply Minecraft font to headers */
|
||||
font-family: 'Minecraft', sans-serif;
|
||||
}
|
||||
|
||||
#app {
|
||||
flex: 1 0 auto; /* Make #app grow to fill available space */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@apply flex-1 flex flex-col;
|
||||
}
|
||||
|
||||
main {
|
||||
flex-grow: 1; /* Ensure main grows within #app */
|
||||
@apply flex-grow;
|
||||
}
|
||||
|
||||
footer {
|
||||
flex-shrink: 0; /* Prevent footer from shrinking */
|
||||
@apply flex-shrink-0;
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
.spinner {
|
||||
border: 4px solid rgba(255, 225, 225, 0.3);
|
||||
border-top: 4px solid #ffffff;
|
||||
border-radius: 50%;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
animation: spin 1s linear infinite;
|
||||
display: inline-block;
|
||||
@apply border-4 border-gray-700 border-t-white rounded-full w-6 h-6 animate-spin inline-block;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
@ -56,234 +46,208 @@
|
||||
}
|
||||
|
||||
#notificationContainer {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
gap: 8px;
|
||||
@apply fixed bottom-5 right-5 z-[1000] flex flex-col-reverse gap-2;
|
||||
}
|
||||
|
||||
.notification {
|
||||
background-color: #1f2937;
|
||||
color: white;
|
||||
padding: 16px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
transition: opacity 0.3s ease;
|
||||
@apply bg-gray-800 text-white p-4 rounded-lg flex items-center gap-3 shadow-lg transition-opacity duration-300;
|
||||
}
|
||||
|
||||
.notification.success {
|
||||
background-color: #158106;
|
||||
@apply bg-green-700;
|
||||
}
|
||||
|
||||
.notification.error {
|
||||
background-color: #b91c1c;
|
||||
@apply bg-red-700;
|
||||
}
|
||||
|
||||
#dockerLogsTerminal {
|
||||
background-color: #1f2937;
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
max-height: 12rem;
|
||||
width: 100%;
|
||||
@apply bg-gray-800 p-4 rounded-lg max-h-48 w-full;
|
||||
}
|
||||
|
||||
.xterm .xterm-viewport {
|
||||
overflow-y: auto;
|
||||
@apply overflow-y-auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #4b5563 #1f2937;
|
||||
scrollbar-color: #4B5563 #1F2937;
|
||||
}
|
||||
|
||||
.xterm .xterm-viewport::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
@apply w-2;
|
||||
}
|
||||
|
||||
.xterm .xterm-viewport::-webkit-scrollbar-track {
|
||||
background: #1f2937;
|
||||
@apply bg-gray-800;
|
||||
}
|
||||
|
||||
.xterm .xterm-viewport::-webkit-scrollbar-thumb {
|
||||
background: #4b5563;
|
||||
border-radius: 4px;
|
||||
@apply bg-gray-600 rounded;
|
||||
}
|
||||
|
||||
.xterm .xterm-viewport::-webkit-scrollbar-thumb:hover {
|
||||
background: #6b7280;
|
||||
@apply bg-gray-500;
|
||||
}
|
||||
|
||||
.xterm .xterm-screen {
|
||||
width: 100% !important;
|
||||
@apply w-full;
|
||||
}
|
||||
|
||||
.control-btn {
|
||||
padding: 0.5rem 1rem;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
transition: all 0.2s ease;
|
||||
min-width: 80px;
|
||||
text-align: center;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
@apply px-4 py-2 text-sm font-medium transition-all duration-200 min-w-[80px] text-center shadow-sm;
|
||||
}
|
||||
|
||||
.control-btn:hover:not(.disabled-btn) {
|
||||
transform: translateY(-1px);
|
||||
@apply -translate-y-px;
|
||||
}
|
||||
|
||||
.control-btn:active:not(.disabled-btn) {
|
||||
transform: translateY(0);
|
||||
@apply translate-y-0;
|
||||
}
|
||||
|
||||
/* Existing player button styles */
|
||||
/* Player button styles */
|
||||
.tell-player {
|
||||
@apply bg-blue-600 hover:bg-blue-700 px-2 py-1 rounded text-sm;
|
||||
font-family: 'Minecraft', sans-serif;
|
||||
transition: all 0.2s ease;
|
||||
@apply bg-blue-600 hover:bg-blue-700 px-2 py-1 rounded text-sm font-[Minecraft] transition-all duration-200;
|
||||
}
|
||||
|
||||
.give-player {
|
||||
@apply bg-green-600 hover:bg-green-700 px-2 py-1 rounded text-sm;
|
||||
font-family: 'Minecraft', sans-serif;
|
||||
transition: all 0.2s ease;
|
||||
@apply bg-green-600 hover:bg-green-700 px-2 py-1 rounded text-sm font-[Minecraft] transition-all duration-200;
|
||||
}
|
||||
|
||||
.op-player, .deop-player {
|
||||
@apply bg-purple-600 hover:bg-purple-700 px-2 py-1 rounded text-sm;
|
||||
font-family: 'Minecraft', sans-serif;
|
||||
transition: all 0.2s ease;
|
||||
@apply bg-purple-600 hover:bg-purple-700 px-2 py-1 rounded text-sm font-[Minecraft] transition-all duration-200;
|
||||
}
|
||||
|
||||
.kick-player, .ban-player {
|
||||
@apply bg-red-600 hover:bg-red-700 px-2 py-1 rounded text-sm;
|
||||
font-family: 'Minecraft', sans-serif;
|
||||
transition: all 0.2s ease;
|
||||
@apply bg-red-600 hover:bg-red-700 px-2 py-1 rounded text-sm font-[Minecraft] transition-all duration-200;
|
||||
}
|
||||
|
||||
/* New player button styles */
|
||||
.teleport-player {
|
||||
@apply bg-cyan-600 hover:bg-cyan-700 px-2 py-1 rounded text-sm;
|
||||
font-family: 'Minecraft', sans-serif;
|
||||
transition: all 0.2s ease;
|
||||
@apply bg-cyan-600 hover:bg-cyan-700 px-2 py-1 rounded text-sm font-[Minecraft] transition-all duration-200;
|
||||
}
|
||||
|
||||
.teleport-player:hover:not(.disabled-btn) {
|
||||
transform: translateY(-1px);
|
||||
@apply -translate-y-px;
|
||||
}
|
||||
|
||||
.teleport-player:active:not(.disabled-btn) {
|
||||
transform: translateY(0);
|
||||
@apply translate-y-0;
|
||||
}
|
||||
|
||||
.effect-player {
|
||||
@apply bg-teal-600 hover:bg-teal-700 px-2 py-1 rounded text-sm;
|
||||
font-family: 'Minecraft', sans-serif;
|
||||
transition: all 0.2s ease;
|
||||
@apply bg-teal-600 hover:bg-teal-700 px-2 py-1 rounded text-sm font-[Minecraft] transition-all duration-200;
|
||||
}
|
||||
|
||||
.effect-player:hover:not(.disabled-btn) {
|
||||
transform: translateY(-1px);
|
||||
@apply -translate-y-px;
|
||||
}
|
||||
|
||||
.effect-player:active:not(.disabled-btn) {
|
||||
transform: translateY(0);
|
||||
@apply translate-y-0;
|
||||
}
|
||||
|
||||
.modal {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
@apply fixed inset-0 bg-black/75 flex items-center justify-center z-[1000];
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: #1f2937;
|
||||
padding: 1.5rem;
|
||||
border-radius: 0.5rem;
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
position: relative;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
@apply bg-gray-800 p-6 rounded-lg w-full max-w-xl relative max-h-[80vh] overflow-y-auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #4b5563 #1f2937;
|
||||
scrollbar-color: #4B5563 #1F2937;
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
@apply w-2;
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar-track {
|
||||
background: #1f2937;
|
||||
@apply bg-gray-800;
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar-thumb {
|
||||
background: #4b5563;
|
||||
border-radius: 4px;
|
||||
@apply bg-gray-600 rounded;
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar-thumb:hover {
|
||||
background: #6b7280;
|
||||
@apply bg-gray-500;
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
position: absolute;
|
||||
top: 0.5rem;
|
||||
right: 0.5rem;
|
||||
background: none;
|
||||
border: none;
|
||||
color: white;
|
||||
font-size: 1.25rem;
|
||||
cursor: pointer;
|
||||
@apply absolute top-2 right-2 bg-transparent border-none text-white text-xl cursor-pointer;
|
||||
}
|
||||
|
||||
.disabled-btn {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
@apply opacity-50 cursor-not-allowed pointer-events-none;
|
||||
}
|
||||
|
||||
.disabled-btn:hover {
|
||||
cursor: not-allowed;
|
||||
@apply cursor-not-allowed;
|
||||
}
|
||||
|
||||
/* Search box and properties fields */
|
||||
#searchContainer {
|
||||
@apply mb-4 block;
|
||||
}
|
||||
|
||||
#propertiesSearch {
|
||||
@apply bg-gray-700 px-4 py-2 rounded text-white w-full block;
|
||||
}
|
||||
|
||||
#propertiesList {
|
||||
@apply space-y-2;
|
||||
}
|
||||
|
||||
/* Toggle switch styles */
|
||||
[role="switch"] {
|
||||
@apply inline-block relative w-10 h-6 cursor-pointer z-10;
|
||||
}
|
||||
|
||||
[role="switch"] > div:first-child {
|
||||
@apply w-full h-full rounded-full transition-colors duration-200 ease-in-out;
|
||||
}
|
||||
|
||||
[role="switch"] > div:last-child {
|
||||
@apply absolute w-4 h-4 rounded-full bg-white top-1 transition-all duration-200 ease-in-out z-[11];
|
||||
}
|
||||
|
||||
[role="switch"][aria-checked="true"] > div:first-child {
|
||||
@apply bg-green-600;
|
||||
}
|
||||
|
||||
[role="switch"][aria-checked="false"] > div:first-child {
|
||||
@apply bg-gray-600;
|
||||
}
|
||||
|
||||
[role="switch"][aria-checked="true"] > div:last-child {
|
||||
@apply left-6;
|
||||
}
|
||||
|
||||
[role="switch"][aria-checked="false"] > div:last-child {
|
||||
@apply left-1;
|
||||
}
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
/* Add any custom utilities if needed */
|
||||
/* Custom utilities */
|
||||
}
|
||||
|
||||
/* Media queries */
|
||||
@media (max-width: 640px) {
|
||||
.bg-gray-800.p-6.rounded-lg.shadow-lg .grid {
|
||||
grid-template-columns: 1fr;
|
||||
@apply grid-cols-1;
|
||||
}
|
||||
|
||||
.bg-gray-800.p-6.rounded-lg.shadow-lg p {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
word-break: break-all;
|
||||
@apply flex flex-col gap-2 break-all;
|
||||
}
|
||||
|
||||
.bg-gray-800.p-6.rounded-lg.shadow-lg a,
|
||||
.bg-gray-800.p-6.rounded-lg.shadow-lg span {
|
||||
word-break: break-all;
|
||||
overflow-wrap: anywhere;
|
||||
white-space: normal;
|
||||
@apply break-words whitespace-normal;
|
||||
}
|
||||
|
||||
.bg-gray-800.p-6.rounded-lg.shadow-lg button {
|
||||
width: 100%;
|
||||
margin-top: 0.5rem;
|
||||
@apply w-full mt-2;
|
||||
}
|
||||
|
||||
/* Ensure player buttons stack nicely on mobile */
|
||||
.tell-player,
|
||||
.give-player,
|
||||
.teleport-player,
|
||||
@ -292,17 +256,15 @@
|
||||
.deop-player,
|
||||
.kick-player,
|
||||
.ban-player {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 0.25rem;
|
||||
@apply w-full text-center mt-1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Additional styles */
|
||||
.bg-gray-800.p-6.rounded-lg.shadow-lg .grid {
|
||||
overflow-x: hidden;
|
||||
@apply overflow-x-hidden;
|
||||
}
|
||||
|
||||
.bg-gray-800.p-6.rounded-lg.shadow p {
|
||||
max-width: 100%;
|
||||
.bg-gray-800.p-6.rounded-lg.shadow-lg p {
|
||||
@apply max-w-full;
|
||||
}
|
Reference in New Issue
Block a user