Merge branch 'main' of https://git.mdnd-it.cc/Donat/SerpentRace into 1024zsola
This commit is contained in:
@@ -199,12 +199,13 @@ deckRouter.patch('/:id', authRequired, async (req, res) => {
|
|||||||
try {
|
try {
|
||||||
const deckId = req.params.id;
|
const deckId = req.params.id;
|
||||||
const userId = (req as any).user.userId;
|
const userId = (req as any).user.userId;
|
||||||
|
const authLevel = (req as any).user.authLevel;
|
||||||
|
logRequest('Update deck endpoint accessed', req, res, { deckId, userId, updateFields: Object.keys(req.body) });
|
||||||
|
|
||||||
// Convert string enum values to integers
|
// Convert string enum values to integers
|
||||||
const updateData = convertEnumValues(req.body);
|
const updateData = convertEnumValues(req.body);
|
||||||
|
|
||||||
const result = await container.updateDeckCommandHandler.execute({ id: deckId, userstate: userState, ...updateData });
|
const result = await container.updateDeckCommandHandler.execute({ userid: userId, authLevel: authLevel, id: deckId, ...updateData });
|
||||||
|
|
||||||
logRequest('Deck updated successfully', req, res, { deckId, userId });
|
logRequest('Deck updated successfully', req, res, { deckId, userId });
|
||||||
res.json(result);
|
res.json(result);
|
||||||
@@ -244,9 +245,11 @@ deckRouter.delete('/:id', authRequired, async (req, res) => {
|
|||||||
try {
|
try {
|
||||||
const deckId = req.params.id;
|
const deckId = req.params.id;
|
||||||
const userId = (req as any).user.userId;
|
const userId = (req as any).user.userId;
|
||||||
|
const authLevel = (req as any).user.authLevel;
|
||||||
const result = await container.deleteDeckCommandHandler.execute({ id: deckId, soft: true });
|
logRequest('Soft delete deck endpoint accessed', req, res, { deckId, userId });
|
||||||
|
|
||||||
|
const result = await container.deleteDeckCommandHandler.execute({ userid: userId, authLevel: authLevel, id: deckId, soft: true });
|
||||||
|
|
||||||
logRequest('Deck soft delete successful', req, res, { deckId, userId, success: result });
|
logRequest('Deck soft delete successful', req, res, { deckId, userId, success: result });
|
||||||
res.json({ success: result });
|
res.json({ success: result });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
export interface DeleteDeckCommand {
|
export interface DeleteDeckCommand {
|
||||||
|
userid: string;
|
||||||
|
authLevel: number;
|
||||||
id: string;
|
id: string;
|
||||||
soft?: boolean;
|
soft?: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,24 @@
|
|||||||
import { IDeckRepository } from '../../../Domain/IRepository/IDeckRepository';
|
import { IDeckRepository } from '../../../Domain/IRepository/IDeckRepository';
|
||||||
|
import { logAuth, logError } from '../../Services/Logger';
|
||||||
import { DeleteDeckCommand } from './DeleteDeckCommand';
|
import { DeleteDeckCommand } from './DeleteDeckCommand';
|
||||||
|
|
||||||
export class DeleteDeckCommandHandler {
|
export class DeleteDeckCommandHandler {
|
||||||
constructor(private readonly deckRepo: IDeckRepository) {}
|
constructor(private readonly deckRepo: IDeckRepository) {}
|
||||||
|
|
||||||
async execute(cmd: DeleteDeckCommand): Promise<boolean> {
|
async execute(cmd: DeleteDeckCommand): Promise<boolean> {
|
||||||
|
|
||||||
|
//get decks userid
|
||||||
|
const deck = await this.deckRepo.findById(cmd.id);
|
||||||
|
if (!deck) {
|
||||||
|
logError(`Deck not found with ID: ${cmd.id}`);
|
||||||
|
throw new Error('Deck not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cmd.authLevel !==1 && deck.userid !== cmd.userid) {
|
||||||
|
logAuth(`Unauthorized access attempt to deck with ID: ${cmd.id}, UserID: ${cmd.userid}`);
|
||||||
|
throw new Error('Unauthorized');
|
||||||
|
}
|
||||||
|
|
||||||
if (cmd.soft) {
|
if (cmd.soft) {
|
||||||
await this.deckRepo.softDelete(cmd.id);
|
await this.deckRepo.softDelete(cmd.id);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import { n } from "framer-motion/dist/types.d-D0HXPxHm";
|
|
||||||
|
|
||||||
export interface UpdateDeckCommand {
|
export interface UpdateDeckCommand {
|
||||||
|
userid: string;
|
||||||
|
authLevel: number;
|
||||||
id: string;
|
id: string;
|
||||||
userstate?: number;
|
userstate?: number;
|
||||||
name?: string;
|
name?: string;
|
||||||
type?: number;
|
type?: number;
|
||||||
userid?: string;
|
|
||||||
cards?: any[];
|
cards?: any[];
|
||||||
ctype?: number;
|
ctype?: number;
|
||||||
state?: number;
|
state?: number;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { UpdateDeckCommand } from './UpdateDeckCommand';
|
|||||||
import { ShortDeckDto } from '../../DTOs/DeckDto';
|
import { ShortDeckDto } from '../../DTOs/DeckDto';
|
||||||
import { DeckMapper } from '../../DTOs/Mappers/DeckMapper';
|
import { DeckMapper } from '../../DTOs/Mappers/DeckMapper';
|
||||||
import { DeckAggregate } from '../../../Domain/Deck/DeckAggregate';
|
import { DeckAggregate } from '../../../Domain/Deck/DeckAggregate';
|
||||||
import { logError } from '../../Services/Logger';
|
import { logAuth, logError } from '../../Services/Logger';
|
||||||
|
|
||||||
export class UpdateDeckCommandHandler {
|
export class UpdateDeckCommandHandler {
|
||||||
constructor(private readonly deckRepo: IDeckRepository) {}
|
constructor(private readonly deckRepo: IDeckRepository) {}
|
||||||
@@ -24,6 +24,11 @@ export class UpdateDeckCommandHandler {
|
|||||||
throw new Error('Deck not found');
|
throw new Error('Deck not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(cmd.authLevel !==1 && existingDeck.userid !== cmd.userid) {
|
||||||
|
logAuth(`Unauthorized access attempt to deck with ID: ${cmd.id}, UserID: ${cmd.userid}`);
|
||||||
|
throw new Error('Unauthorized');
|
||||||
|
}
|
||||||
|
|
||||||
const for_update: Partial<DeckAggregate> = {};
|
const for_update: Partial<DeckAggregate> = {};
|
||||||
if(cmd.name !== undefined) for_update.name = cmd.name;
|
if(cmd.name !== undefined) for_update.name = cmd.name;
|
||||||
if(cmd.type !== undefined) for_update.type = cmd.type;
|
if(cmd.type !== undefined) for_update.type = cmd.type;
|
||||||
|
|||||||
@@ -76,8 +76,7 @@ services:
|
|||||||
- NODE_ENV=development
|
- NODE_ENV=development
|
||||||
- VITE_API_URL=http://localhost:3000
|
- VITE_API_URL=http://localhost:3000
|
||||||
volumes:
|
volumes:
|
||||||
- ../SerpentRace_Frontend:/app
|
[]
|
||||||
- /app/node_modules
|
|
||||||
develop:
|
develop:
|
||||||
watch:
|
watch:
|
||||||
- action: sync
|
- action: sync
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import Landingpage from "./pages/Landing/Landingpage"
|
|||||||
import Home from "./pages/Landing/Home"
|
import Home from "./pages/Landing/Home"
|
||||||
import DeckManagerPage from "./pages/Decks/DeckManagerPage"
|
import DeckManagerPage from "./pages/Decks/DeckManagerPage"
|
||||||
import DeckCreator from "./pages/DeckCreator/DeckCreator"
|
import DeckCreator from "./pages/DeckCreator/DeckCreator"
|
||||||
import CompanyHub from "./pages/Companies/Companies"
|
import CompanyHub from "./pages/Contacts/Contacts"
|
||||||
import About from "./pages/About/About"
|
import About from "./pages/About/About"
|
||||||
import ScrollToTop from "./components/ScrollToTop"
|
import ScrollToTop from "./components/ScrollToTop"
|
||||||
import GameScreen from "./pages/Game/GameScreen"
|
import GameScreen from "./pages/Game/GameScreen"
|
||||||
@@ -64,7 +64,7 @@ function App() {
|
|||||||
<Route path="/deck-creator" element={<DeckCreator />} />
|
<Route path="/deck-creator" element={<DeckCreator />} />
|
||||||
<Route path="/deck-creator/:deckId" element={<DeckCreator />} />
|
<Route path="/deck-creator/:deckId" element={<DeckCreator />} />
|
||||||
<Route path="/game" element={<GameScreen />} />
|
<Route path="/game" element={<GameScreen />} />
|
||||||
<Route path="/companies" element={<CompanyHub />} />
|
<Route path="/contacts" element={<CompanyHub />} />
|
||||||
<Route path="/report" element={<Reports />} />
|
<Route path="/report" element={<Reports />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</Router>
|
</Router>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ const Footer = () => {
|
|||||||
<a href="/about" className="hover:underline hover:text-green-500">
|
<a href="/about" className="hover:underline hover:text-green-500">
|
||||||
Rólunk
|
Rólunk
|
||||||
</a>
|
</a>
|
||||||
<a href="/contact" className="hover:underline hover:text-green-500">
|
<a href="/contacts" className="hover:underline hover:text-green-500">
|
||||||
Kapcsolat
|
Kapcsolat
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { motion } from "framer-motion"
|
|||||||
import { isAuthenticated } from "../../hooks/useRequireAuth" // <-- added import
|
import { isAuthenticated } from "../../hooks/useRequireAuth" // <-- added import
|
||||||
import { useNavigate } from "react-router-dom" // <-- NEW
|
import { useNavigate } from "react-router-dom" // <-- NEW
|
||||||
|
|
||||||
const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame }) => {
|
const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame, onNavigateToContacts }) => {
|
||||||
const auth = isAuthenticated() // <-- check without redirect
|
const auth = isAuthenticated() // <-- check without redirect
|
||||||
const navigate = useNavigate() // <-- NEW
|
const navigate = useNavigate() // <-- NEW
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame }) =
|
|||||||
<ButtonGreen text="Játék" onClick={onNavigateToGame} width="w-60" />
|
<ButtonGreen text="Játék" onClick={onNavigateToGame} width="w-60" />
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<ButtonGreen text="Játék" onClick={() => navigate("/home")} width="w-60" />
|
<ButtonGreen text="Játék" onClick={onNavigateToGame} width="w-60" />
|
||||||
)}
|
)}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
@@ -178,7 +178,7 @@ const LandingPage = ({ onNavigateToPlay, onNavigateToAuth, onNavigateToGame }) =
|
|||||||
|
|
||||||
<ButtonGreen
|
<ButtonGreen
|
||||||
text="Kapcsolatfelvétel"
|
text="Kapcsolatfelvétel"
|
||||||
onClick={onNavigateToAuth}
|
onClick={onNavigateToContacts}
|
||||||
className="px-12 py-4 text-xl font-bold"
|
className="px-12 py-4 text-xl font-bold"
|
||||||
/>
|
/>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ const Navbar = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className="bg-gradient-to-r from-green-700 to-emerald-500 shadow-lg">
|
<nav className="bg-gradient-to-r from-green-700 to-emerald-500 shadow-lg">
|
||||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-0">
|
||||||
<div className="flex justify-between h-16 items-center">
|
<div className="flex justify-between h-16 items-center">
|
||||||
{/* Logo */}
|
{/* Logo + Brand */}
|
||||||
<div className="flex-shrink-0 flex items-center gap-2">
|
<div className="flex-shrink-0 flex items-center gap-2">
|
||||||
<Link to="/" className="flex items-center mt-1 h-9">
|
<Link to="/" className="flex items-center mt-1 h-9">
|
||||||
<Logo size={36} />
|
<Logo size={36} />
|
||||||
@@ -32,33 +32,47 @@ const Navbar = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Desktop Menu */}
|
{/* Desktop Menu */}
|
||||||
<div className="hidden md:flex space-x-8 items-center">
|
<div className="hidden md:flex items-center space-x-6">
|
||||||
{isLoggedIn ? (
|
{/* Bal oldali linkek */}
|
||||||
|
<Link to="/" className={navLinkClass}>Főoldal</Link>
|
||||||
|
<Link to="/about" className={navLinkClass}>Rólunk</Link>
|
||||||
|
<Link to="/contacts" className={navLinkClass}>Kapcsolat</Link>
|
||||||
|
|
||||||
|
{/* Csak bejelentkezve */}
|
||||||
|
{isLoggedIn && (
|
||||||
<>
|
<>
|
||||||
<Link to="/home" className={navLinkClass}>Játék</Link>
|
|
||||||
<Link to="/decks" className={navLinkClass}>Paklik</Link>
|
<Link to="/decks" className={navLinkClass}>Paklik</Link>
|
||||||
<Link to="/report" className={navLinkClass}>Statisztikák</Link>
|
<Link to="/report" className={navLinkClass}>Statisztikák</Link>
|
||||||
</>
|
</>
|
||||||
) : (
|
|
||||||
<Link to="/" className={navLinkClass}>Főoldal</Link>
|
|
||||||
)}
|
)}
|
||||||
<Link to="/about" className={navLinkClass}>Rólunk</Link>
|
|
||||||
<Link to="/companies" className={navLinkClass}>Kontakt</Link>
|
{/* Játék gomb */}
|
||||||
{!isLoggedIn && (
|
<Link to="/home" className={navLinkClassPlay}>Játék</Link>
|
||||||
<>
|
|
||||||
<Link to="/home" className={navLinkClassPlay}>Játék</Link>
|
{/* Jobb oldali akciók */}
|
||||||
|
{!isLoggedIn ? (
|
||||||
|
<div className="flex items-center space-x-4">
|
||||||
<Link
|
<Link
|
||||||
to="/login"
|
to="/login"
|
||||||
|
className="px-4 py-2 rounded-lg hover:bg-white/20 text-white font-semibold transition-all"
|
||||||
|
>
|
||||||
|
Bejelentkezés
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
{/* Elválasztó vonal */}
|
||||||
|
<div className="w-px h-10 bg-white/100"></div>
|
||||||
|
|
||||||
|
<Link
|
||||||
|
to="/register"
|
||||||
className="px-4 py-2 rounded-lg bg-white/10 hover:bg-white/20 text-white font-semibold transition-all"
|
className="px-4 py-2 rounded-lg bg-white/10 hover:bg-white/20 text-white font-semibold transition-all"
|
||||||
>
|
>
|
||||||
Bejelentkezés / Regisztráció
|
Regisztráció
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</div>
|
||||||
)}
|
) : (
|
||||||
{isLoggedIn && (
|
|
||||||
<button
|
<button
|
||||||
onClick={handleLogout}
|
onClick={handleLogout}
|
||||||
className="ml-4 p-2 rounded-full bg-[#166534] hover:bg-[#1f7a45] text-white shadow-lg hover:shadow-green-400/40 transition-all transform hover:scale-105 cursor-pointer"
|
className="ml-2 p-2 rounded-full bg-[#166534] hover:bg-[#1f7a45] text-white shadow-lg hover:shadow-green-400/40 transition-all transform hover:scale-105 cursor-pointer"
|
||||||
title="Kijelentkezés"
|
title="Kijelentkezés"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
@@ -107,39 +121,45 @@ const Navbar = () => {
|
|||||||
{/* Mobile Menu */}
|
{/* Mobile Menu */}
|
||||||
{menuOpen && (
|
{menuOpen && (
|
||||||
<div className="md:hidden bg-emerald-600 px-2 pt-2 pb-3 space-y-1">
|
<div className="md:hidden bg-emerald-600 px-2 pt-2 pb-3 space-y-1">
|
||||||
{isLoggedIn ? (
|
<Link to="/" onClick={() => setMenuOpen(false)} className={navLinkClass}>Főoldal</Link>
|
||||||
<Link to="/home" className={navLinkClass}>Home</Link>
|
<Link to="/about" onClick={() => setMenuOpen(false)} className={navLinkClass}>Rólunk</Link>
|
||||||
) : (
|
<Link to="/contacts" onClick={() => setMenuOpen(false)} className={navLinkClass}>Kapcsolat</Link>
|
||||||
<Link to="/" className={navLinkClass}>Főoldal</Link>
|
{isLoggedIn && (
|
||||||
)}
|
|
||||||
<Link to="/leaderboard" className={navLinkClass}>Leaderboard</Link>
|
|
||||||
<Link to="/about" className={navLinkClass}>Rólunk</Link>
|
|
||||||
<Link to="/companies" className={navLinkClass}>Kontakt</Link>
|
|
||||||
{!isLoggedIn && (
|
|
||||||
<>
|
<>
|
||||||
<div className="px-2">
|
<Link to="/decks" onClick={() => setMenuOpen(false)} className={navLinkClass}>Paklik</Link>
|
||||||
<button
|
<Link to="/report" onClick={() => setMenuOpen(false)} className={navLinkClass}>Statisztikák</Link>
|
||||||
onClick={() => {
|
|
||||||
setMenuOpen(false)
|
|
||||||
navigate("/")
|
|
||||||
}}
|
|
||||||
className="w-full text-left px-3 py-2 rounded-lg bg-white/10 hover:bg-white/20 text-white transition-all"
|
|
||||||
>
|
|
||||||
Játék
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<Link
|
|
||||||
to="/login"
|
|
||||||
className="block px-3 py-2 rounded-lg bg-white/10 hover:bg-white/20 text-white font-semibold transition-all"
|
|
||||||
>
|
|
||||||
Bejelentkezés / Regisztráció
|
|
||||||
</Link>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{isLoggedIn && (
|
<Link to="/home" onClick={() => setMenuOpen(false)} className={navLinkClassPlay}>Játék</Link>
|
||||||
|
|
||||||
|
{!isLoggedIn ? (
|
||||||
|
<div className="flex flex-col space-y-2">
|
||||||
|
<Link
|
||||||
|
to="/login"
|
||||||
|
onClick={() => setMenuOpen(false)}
|
||||||
|
className="block px-3 py-2 rounded-lg hover:bg-white/20 text-white font-semibold transition-all"
|
||||||
|
>
|
||||||
|
Bejelentkezés
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
{/* Elválasztó vonal mobilon */}
|
||||||
|
<div className="w-full h-px bg-white/30"></div>
|
||||||
|
|
||||||
|
<Link
|
||||||
|
to="/register"
|
||||||
|
onClick={() => setMenuOpen(false)}
|
||||||
|
className="block px-3 py-2 rounded-lg bg-white/10 hover:bg-white/20 text-white font-semibold transition-all"
|
||||||
|
>
|
||||||
|
Regisztráció
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
<div className="flex justify-end px-2 pb-2">
|
<div className="flex justify-end px-2 pb-2">
|
||||||
<button
|
<button
|
||||||
onClick={handleLogout}
|
onClick={() => {
|
||||||
|
handleLogout()
|
||||||
|
setMenuOpen(false)
|
||||||
|
}}
|
||||||
className="p-2 rounded-full bg-[#166534] hover:bg-[#1f7a45] text-white shadow-lg hover:shadow-green-400/40 transition-all transform hover:scale-105 cursor-pointer"
|
className="p-2 rounded-full bg-[#166534] hover:bg-[#1f7a45] text-white shadow-lg hover:shadow-green-400/40 transition-all transform hover:scale-105 cursor-pointer"
|
||||||
title="Kijelentkezés"
|
title="Kijelentkezés"
|
||||||
>
|
>
|
||||||
|
|||||||
+85
-64
@@ -1,7 +1,7 @@
|
|||||||
import React from "react"
|
import React, { useEffect, useRef, useState } from "react"
|
||||||
import Navbar from "../../components/Navbar/Navbar.jsx"
|
import Navbar from "../../components/Navbar/Navbar.jsx"
|
||||||
import Footer from "../../components/Footer/Footer.jsx"
|
import Footer from "../../components/Footer/Footer.jsx"
|
||||||
import Background from "../../assets/backgrounds/Background"
|
import Background from "../../assets/backgrounds/Background.jsx"
|
||||||
import {
|
import {
|
||||||
FaBuilding,
|
FaBuilding,
|
||||||
FaEnvelope,
|
FaEnvelope,
|
||||||
@@ -56,8 +56,22 @@ const SectionContainer = ({ id, title, children }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const CompanyHub = () => {
|
const CompanyHub = () => {
|
||||||
|
|
||||||
|
const [visible, setVisible] = useState(false)
|
||||||
|
const sectionRef = useRef(null)
|
||||||
|
useEffect(() => {
|
||||||
|
const observer = new IntersectionObserver(
|
||||||
|
([entry]) => {
|
||||||
|
if (entry.isIntersecting) setVisible(true)
|
||||||
|
},
|
||||||
|
{ threshold: 0.3 }
|
||||||
|
)
|
||||||
|
if (sectionRef.current) observer.observe(sectionRef.current)
|
||||||
|
return () => observer.disconnect()
|
||||||
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative min-h-screen text-white">
|
<div className=" relative min-h-screen text-white">
|
||||||
{/* Background fixed behind everything */}
|
{/* Background fixed behind everything */}
|
||||||
<div className="fixed inset-0 -z-10">
|
<div className="fixed inset-0 -z-10">
|
||||||
<Background />
|
<Background />
|
||||||
@@ -67,6 +81,12 @@ const CompanyHub = () => {
|
|||||||
<Navbar />
|
<Navbar />
|
||||||
|
|
||||||
<main className="flex-grow relative px-4 py-8 md:px-12 md:py-16 overflow-y-auto scroll-smooth">
|
<main className="flex-grow relative px-4 py-8 md:px-12 md:py-16 overflow-y-auto scroll-smooth">
|
||||||
|
<section
|
||||||
|
ref={sectionRef}
|
||||||
|
className={`max-w-5xl mx-auto transition-all duration-1000 ease-out ${
|
||||||
|
visible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-10"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<div className="flex justify-center gap-6 mt-8 flex-wrap">
|
<div className="flex justify-center gap-6 mt-8 flex-wrap">
|
||||||
<Card
|
<Card
|
||||||
icon={<FaBuilding />}
|
icon={<FaBuilding />}
|
||||||
@@ -152,68 +172,69 @@ const CompanyHub = () => {
|
|||||||
</div>
|
</div>
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
|
|
||||||
{/* Contact + Join Section */}
|
{/* Contact + Join Section */}
|
||||||
<section className="grid md:grid-cols-2 gap-10 max-w-6xl mx-auto mt-20 mb-28 px-4 md:px-0">
|
<section className="grid md:grid-cols-2 gap-10 max-w-6xl mx-auto mt-20 mb-28 px-4 md:px-0">
|
||||||
{/* Contact */}
|
{/* Contact */}
|
||||||
<div
|
<div
|
||||||
id="contact"
|
id="contact"
|
||||||
className="bg-white/10 p-8 rounded-xl border border-gray-500 shadow-lg"
|
className="bg-white/10 p-8 rounded-xl border border-gray-500 shadow-lg"
|
||||||
>
|
>
|
||||||
<h2 className="text-3xl font-bold mb-6 text-center border-b-4 border-emerald-400 pb-2 text-white">
|
<h2 className="text-3xl font-bold mb-6 text-center border-b-4 border-emerald-400 pb-2 text-white">
|
||||||
Kapcsolatfelvétel cégeknek
|
Kapcsolatfelvétel cégeknek
|
||||||
</h2>
|
</h2>
|
||||||
<form className="grid gap-6 md:grid-cols-2">
|
<form className="grid gap-6 md:grid-cols-2">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Cég neve"
|
placeholder="Cég neve"
|
||||||
className="bg-white/20 text-white placeholder-white px-5 py-4 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-400 col-span-2"
|
className="bg-white/20 text-white placeholder-white px-5 py-4 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-400 col-span-2"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
className="bg-white/20 text-white placeholder-white px-5 py-4 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-400 col-span-2 md:col-span-1"
|
className="bg-white/20 text-white placeholder-white px-5 py-4 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-400 col-span-2 md:col-span-1"
|
||||||
/>
|
/>
|
||||||
<textarea
|
<textarea
|
||||||
placeholder="Üzenet"
|
placeholder="Üzenet"
|
||||||
rows="6"
|
rows="6"
|
||||||
className="bg-white/20 text-white placeholder-white px-5 py-4 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-400 col-span-2"
|
className="bg-white/20 text-white placeholder-white px-5 py-4 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-400 col-span-2"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="bg-emerald-500 hover:bg-emerald-400 text-white px-8 py-4 rounded-lg font-bold col-span-2 md:col-span-1 transition"
|
className="bg-emerald-500 hover:bg-emerald-400 text-white px-8 py-4 rounded-lg font-bold col-span-2 md:col-span-1 transition"
|
||||||
>
|
>
|
||||||
Küldés
|
Küldés
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Join */}
|
{/* Join */}
|
||||||
<div
|
<div
|
||||||
id="join"
|
id="join"
|
||||||
className="bg-white/10 p-8 rounded-xl border border-gray-500 shadow-lg"
|
className="bg-white/10 p-8 rounded-xl border border-gray-500 shadow-lg"
|
||||||
>
|
>
|
||||||
<h2 className="text-3xl font-bold mb-6 text-center border-b-4 border-emerald-400 pb-2 text-white">
|
<h2 className="text-3xl font-bold mb-6 text-center border-b-4 border-emerald-400 pb-2 text-white">
|
||||||
Csatlakozz partnerként
|
Csatlakozz partnerként
|
||||||
</h2>
|
</h2>
|
||||||
<ul className="list-disc space-y-4 ml-8 text-base text-white/90">
|
<ul className="list-disc space-y-4 ml-8 text-base text-white/90">
|
||||||
<li className="flex gap-3 items-center">
|
<li className="flex gap-3 items-center">
|
||||||
<FaHandsHelping className="text-green-400 text-xl flex-shrink-0" />
|
<FaHandsHelping className="text-green-400 text-xl flex-shrink-0" />
|
||||||
Gamification a vállalati kultúrában
|
Gamification a vállalati kultúrában
|
||||||
</li>
|
</li>
|
||||||
<li className="flex gap-3 items-center">
|
<li className="flex gap-3 items-center">
|
||||||
<FaChartBar className="text-blue-400 text-xl flex-shrink-0" />
|
<FaChartBar className="text-blue-400 text-xl flex-shrink-0" />
|
||||||
Teljesítménymérés játékosan
|
Teljesítménymérés játékosan
|
||||||
</li>
|
</li>
|
||||||
<li className="flex gap-3 items-center">
|
<li className="flex gap-3 items-center">
|
||||||
<FaUserCheck className="text-yellow-400 text-xl flex-shrink-0" />
|
<FaUserCheck className="text-yellow-400 text-xl flex-shrink-0" />
|
||||||
Személyre szabott riportok
|
Személyre szabott riportok
|
||||||
</li>
|
</li>
|
||||||
<li className="flex gap-3 items-center">
|
<li className="flex gap-3 items-center">
|
||||||
<FaHeadset className="text-pink-400 text-xl flex-shrink-0" />
|
<FaHeadset className="text-pink-400 text-xl flex-shrink-0" />
|
||||||
Dedikált ügyfélszolgálat
|
Dedikált ügyfélszolgálat
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
// Főoldal - Landing Page
|
// Főoldal - Landing Page
|
||||||
|
|
||||||
|
|
||||||
import { useNavigate } from "react-router-dom"
|
import { data, useNavigate } from "react-router-dom"
|
||||||
import Navbar from "../../components/Navbar/Navbar"
|
import Navbar from "../../components/Navbar/Navbar"
|
||||||
import Footer from "../../components/Footer/Footer.jsx"
|
import Footer from "../../components/Footer/Footer.jsx"
|
||||||
import Background from "../../assets/backgrounds/Background.jsx"
|
import Background from "../../assets/backgrounds/Background.jsx"
|
||||||
@@ -12,15 +12,22 @@ export default function LandingPageMain() {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handleNavigateToPlay = () => {
|
const handleNavigateToPlay = () => {
|
||||||
navigate("/login");
|
navigate("/login", { preventScrollReset: false });
|
||||||
|
window.scrollTo(0, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleNavigateToAuth = () => {
|
const handleNavigateToAuth = () => {
|
||||||
navigate("/register");
|
navigate("/companies", { preventScrollReset: false });
|
||||||
|
window.scrollTo(0, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleNavigateToGame = () => {
|
const handleNavigateToGame = () => {
|
||||||
navigate("/home");
|
navigate("/home", { preventScrollReset: false });
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleNavigateToContacts = () => {
|
||||||
|
navigate("/contacts");
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -32,7 +39,7 @@ export default function LandingPageMain() {
|
|||||||
<Navbar />
|
<Navbar />
|
||||||
</div>
|
</div>
|
||||||
<main className="flex-1 flex flex-col items-center justify-start py-15 min-h-0 mt-[64px]">
|
<main className="flex-1 flex flex-col items-center justify-start py-15 min-h-0 mt-[64px]">
|
||||||
<LandingPage onNavigateToPlay={handleNavigateToPlay} onNavigateToAuth={handleNavigateToAuth} onNavigateToGame={handleNavigateToGame} />
|
<LandingPage onNavigateToContacts={handleNavigateToContacts} onNavigateToPlay={handleNavigateToPlay} onNavigateToAuth={handleNavigateToAuth} onNavigateToGame={handleNavigateToGame} />
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Logo from "../../assets/pictures/Logo.jsx"
|
|||||||
import Navbar from "../../components/Navbar/Navbar"
|
import Navbar from "../../components/Navbar/Navbar"
|
||||||
import Footer from "../../components/Footer/Footer.jsx"
|
import Footer from "../../components/Footer/Footer.jsx"
|
||||||
import UserProfile from "../../components/Userdetails/Userdetails.jsx"
|
import UserProfile from "../../components/Userdetails/Userdetails.jsx"
|
||||||
import CompanyHub from "../Companies/Companies.jsx"
|
import CompanyHub from "../Contacts/Contacts.jsx"
|
||||||
|
|
||||||
import RatingSet from "../../components/PopUp/RatingSet" // <- statisztikai komponens
|
import RatingSet from "../../components/PopUp/RatingSet" // <- statisztikai komponens
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user