Fix study system: per-hour mana cost instead of upfront, fix game time freeze bug, improve mobile UI
All checks were successful
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m43s

This commit is contained in:
2026-03-27 09:33:48 +00:00
parent a5e37b9b24
commit 2f407071a4
6 changed files with 197 additions and 119 deletions

View File

@@ -4,18 +4,20 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip
import { MAX_DAY, INCURSION_START_DAY } from '@/lib/game/constants';
interface CalendarDisplayProps {
currentDay: number;
day: number;
hour: number;
incursionStrength?: number;
}
export function CalendarDisplay({ currentDay }: CalendarDisplayProps) {
export function CalendarDisplay({ day }: CalendarDisplayProps) {
const days: React.ReactElement[] = [];
for (let d = 1; d <= MAX_DAY; d++) {
let dayClass = 'w-7 h-7 rounded text-xs flex items-center justify-center font-mono border transition-all ';
let dayClass = 'w-6 h-6 sm:w-7 sm:h-7 rounded text-xs flex items-center justify-center font-mono border transition-all ';
if (d < currentDay) {
if (d < day) {
dayClass += 'bg-blue-900/30 border-blue-800/50 text-blue-400';
} else if (d === currentDay) {
} else if (d === day) {
dayClass += 'bg-blue-600/40 border-blue-500 text-blue-300 shadow-lg shadow-blue-500/30';
} else {
dayClass += 'bg-gray-800/30 border-gray-700/50 text-gray-500';
@@ -40,5 +42,9 @@ export function CalendarDisplay({ currentDay }: CalendarDisplayProps) {
);
}
return <>{days}</>;
return (
<div className="grid grid-cols-7 sm:grid-cols-7 md:grid-cols-14 gap-1">
{days}
</div>
);
}