feat(ui): improve lesson cards and theme button, optimize dependency checks

UI Improvements:
- Highlight classroom number in lesson cards using Badge component
  * Applied to both mobile and desktop views
  * Improved visual distinction for classroom information

- Fix theme switcher button layout on mobile
  * Add "Тема" text label inside the button (visible on all devices)
  * Remove redundant absolute positioned span below button
  * Fix text overflow issues on mobile devices
  * Improve button isolation to prevent text escaping

Performance Optimization:
- Optimize dependency installation check in deployment scripts
  * Replace timestamp-based check with content hash comparison
  * Use MD5 hash of package.json and lock files to detect real changes
  * Save hash after successful installation for future comparisons
  * Significantly reduce unnecessary npm install runs during updates
  * Add .dependencies.hash to .gitignore

Files changed:
- src/widgets/schedule/lesson.tsx - Added Badge for classroom
- src/features/theme-switch/index.tsx - Added text label to button
- src/widgets/navbar/index.tsx - Improved button container structure
- src/pages/index.tsx - Removed redundant theme label span
- scripts/manage.sh - Optimized dependency check logic
- scripts/install.sh - Optimized dependency check logic
- .gitignore - Added .dependencies.hash exclusion
This commit is contained in:
kilyabin
2025-11-26 01:09:46 +04:00
parent 2225851177
commit 24bb531dfb
7 changed files with 102 additions and 58 deletions

View File

@@ -162,13 +162,10 @@ export default function HomePage({ groups, groupsByCourse }: HomePageProps) {
</Button>
</div>
<div
className="relative stagger-card"
className="stagger-card"
style={{ animationDelay: `${0.15 + courseOffsets.totalGroups * 0.04 + 0.08}s` } as React.CSSProperties}
>
<ThemeSwitcher />
<span className="absolute -bottom-5 left-1/2 transform -translate-x-1/2 text-xs text-muted-foreground whitespace-nowrap sm:hidden">
Тема
</span>
</div>
<div
className="stagger-card"