diff --git a/admin/package.json b/admin/package.json index a5eab53..490963a 100644 --- a/admin/package.json +++ b/admin/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite --port 5174", - "build": "tsc -b && vite build", + "build": "tsc --noEmit --project tsconfig.check.json && vite build", "lint": "eslint .", "preview": "vite preview --port 5174", "test": "vitest" diff --git a/admin/tsconfig.app.json b/admin/tsconfig.app.json index b470819..ea1bf21 100644 --- a/admin/tsconfig.app.json +++ b/admin/tsconfig.app.json @@ -28,7 +28,8 @@ "baseUrl": ".", "paths": { "@/*": ["./src/*"] - } + }, + "resolveJsonModule": true }, "include": ["src"] } diff --git a/admin/tsconfig.check.json b/admin/tsconfig.check.json new file mode 100644 index 0000000..08c56fd --- /dev/null +++ b/admin/tsconfig.check.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.app.json", + "compilerOptions": { + "moduleResolution": "node", + "allowImportingTsExtensions": false + } +} + diff --git a/src/index.css b/src/index.css index f752061..f7d8622 100644 --- a/src/index.css +++ b/src/index.css @@ -269,6 +269,152 @@ body { box-shadow: 0 4px 20px rgba(255, 215, 0, 0.6); } +.button-group button.secondary { + background: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(10px); + border: 2px solid rgba(255, 255, 255, 0.3); + color: #fff; +} + +.button-group button.secondary:hover:not(:disabled) { + background: rgba(255, 255, 255, 0.2); + border-color: rgba(255, 215, 0, 0.6); +} + +/* Question Pack Section */ +.question-pack-section { + margin: 1.5rem 0; + padding: 1.5rem; + background: rgba(255, 255, 255, 0.05); + border: 2px solid rgba(255, 215, 0, 0.2); + border-radius: 12px; +} + +.question-pack-section h3 { + color: gold; + margin-bottom: 1rem; + font-size: 1.3rem; + text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); +} + +.pack-info { + margin-bottom: 1rem; +} + +.pack-info p { + color: #fff; + margin: 0.5rem 0; +} + +.pack-info strong { + color: gold; +} + +.pack-hint { + color: rgba(255, 255, 255, 0.7); + font-size: 0.9rem; + font-style: italic; +} + +.pack-warning { + color: #ffd700; + font-weight: 500; +} + +.pack-selector { + display: flex; + gap: 1rem; + align-items: center; + margin-top: 1rem; + flex-wrap: wrap; +} + +.pack-selector select { + flex: 1; + min-width: 200px; + padding: 0.75rem; + border: 2px solid rgba(255, 215, 0, 0.3); + border-radius: 8px; + background: rgba(255, 255, 255, 0.1); + color: #fff; + font-size: 1rem; + outline: none; + transition: all 0.3s ease; +} + +.pack-selector select:focus { + border-color: gold; + background: rgba(255, 255, 255, 0.15); + box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); +} + +.pack-selector select:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.pack-selector select option { + background: #1a1f3a; + color: #fff; +} + +.pack-selector button { + background: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(10px); + border: 2px solid rgba(255, 255, 255, 0.3); + border-radius: 12px; + padding: 0.75rem 1.5rem; + color: #fff; + font-size: 1rem; + font-weight: bold; + cursor: pointer; + transition: all 0.3s ease; + white-space: nowrap; +} + +.pack-selector button:hover:not(:disabled) { + background: rgba(255, 255, 255, 0.2); + border-color: rgba(255, 215, 0, 0.6); + transform: translateY(-2px); + box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3); +} + +.pack-selector button:active:not(:disabled) { + transform: translateY(0); +} + +.pack-selector button:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.pack-selector button.secondary { + background: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(10px); + border: 2px solid rgba(255, 255, 255, 0.3); + color: #fff; +} + +.pack-selector button.secondary:hover:not(:disabled) { + background: rgba(255, 255, 255, 0.2); + border-color: rgba(255, 215, 0, 0.6); +} + +@media (max-width: 768px) { + .pack-selector { + flex-direction: column; + align-items: stretch; + } + + .pack-selector select { + width: 100%; + } + + .pack-selector button { + width: 100%; + } +} + .loading, .error-page { min-height: 100vh; diff --git a/src/pages/RoomPage.jsx b/src/pages/RoomPage.jsx index e2a644d..66ddefe 100644 --- a/src/pages/RoomPage.jsx +++ b/src/pages/RoomPage.jsx @@ -232,7 +232,6 @@ const RoomPage = () => { {isHost && room.status === 'WAITING' && (