Fixed CraftingTab mobile version.
This commit is contained in:
parent
f2ed608bfc
commit
72359821b4
@ -5,6 +5,7 @@ import "./styles/CraftingTab.css";
|
||||
import CategorySelector from "../components/CategorySelector";
|
||||
import CraftModal from "./components/CraftModal";
|
||||
import { config } from "../../../config/api";
|
||||
import MeteorRegion from "../../../components/Meteor/MeteorRegion.jsx";
|
||||
|
||||
const CraftingTab = () => {
|
||||
const { socket } = useSocket();
|
||||
@ -109,8 +110,11 @@ const CraftingTab = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="tab-content active">
|
||||
<div className="crafting-container">
|
||||
<div
|
||||
className="tab-content active"
|
||||
style={{ height: "100%", display: "flex", flexDirection: "column" }}
|
||||
>
|
||||
<MeteorRegion className="crafting-container">
|
||||
{activeCraft && (
|
||||
<div className="active-craft-panel">
|
||||
<div className="craft-info">
|
||||
@ -184,7 +188,7 @@ const CraftingTab = () => {
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</MeteorRegion>
|
||||
|
||||
<CraftModal
|
||||
recipe={selectedRecipe}
|
||||
|
||||
@ -1,109 +1,145 @@
|
||||
.crafting-container {
|
||||
padding: 20px;
|
||||
padding: 20px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.crafting-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.crafting-header h2 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.crafting-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
||||
gap: 15px;
|
||||
margin-top: 20px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
||||
gap: 15px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.recipe-card {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.recipe-card:hover {
|
||||
transform: translateY(-5px);
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
|
||||
transform: translateY(-5px);
|
||||
border-color: var(--primary-color);
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.recipe-icon {
|
||||
font-size: 1.5rem;
|
||||
color: var(--primary-color);
|
||||
.recipe-icon img {
|
||||
max-width: 50px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.recipe-name {
|
||||
font-size: 0.9rem;
|
||||
color: #fff;
|
||||
font-size: 0.85rem;
|
||||
line-height: 1.2;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.badge-time {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* Категорії */
|
||||
.crafting-categories {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-bottom: 20px;
|
||||
padding: 10px 5px;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-bottom: 15px;
|
||||
padding: 5px 0;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.crafting-categories::-webkit-scrollbar {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.crafting-cat-btn {
|
||||
flex: 0 0 auto;
|
||||
padding: 10px 22px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 6px;
|
||||
color: var(--text-secondary);
|
||||
font-family: 'Orbitron', sans-serif;
|
||||
font-size: 0.85rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
}
|
||||
|
||||
.crafting-cat-btn:hover {
|
||||
background: rgba(var(--primary-rgb), 0.08);
|
||||
border-color: var(--primary-color);
|
||||
color: #fff;
|
||||
flex: 0 0 auto;
|
||||
padding: 8px 16px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
color: var(--text-secondary);
|
||||
font-family: "Orbitron", sans-serif;
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.crafting-cat-btn.active {
|
||||
background: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
|
||||
background: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.crafting-categories {
|
||||
gap: 8px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.crafting-cat-btn {
|
||||
padding: 8px 16px;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.crafting-container {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.crafting-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
.crafting-header {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.crafting-header h2 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.crafting-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.recipe-card {
|
||||
padding: 10px;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.recipe-icon img {
|
||||
max-width: 40px;
|
||||
}
|
||||
|
||||
.recipe-name {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.crafting-cat-btn {
|
||||
padding: 6px 12px;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-content.active {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.meteor-region-content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user