Commit Graph

17 Commits

Author SHA1 Message Date
f765fecf24 fix: check skin_hash/cape_hash instead of skin/cape in profile JS
All checks were successful
CI / lint (push) Successful in 16s
CI / test (push) Successful in 41s
CI / build (push) Successful in 17s
CI / docker (push) Successful in 1m13s
2026-06-06 20:36:19 +03:00
f4f7a52749 fix: remove inline onerror from skin/cape images in template
All checks were successful
CI / lint (push) Successful in 16s
CI / docker (push) Successful in 1m10s
CI / test (push) Successful in 40s
CI / build (push) Successful in 17s
Inline onerror was firing on empty src, hiding images before JS could load them
2026-06-06 20:27:18 +03:00
b8c136878b fix: pass os/arch to launcher latest endpoint and improve skin/cape loading
All checks were successful
CI / lint (push) Successful in 16s
CI / test (push) Successful in 41s
CI / build (push) Successful in 17s
CI / docker (push) Successful in 1m7s
2026-06-06 20:08:37 +03:00
329c0d3fda fix: skin/cape image loading with error handling
All checks were successful
CI / lint (push) Successful in 17s
CI / test (push) Successful in 43s
CI / build (push) Successful in 18s
CI / docker (push) Successful in 1m10s
2026-06-06 20:00:26 +03:00
6a8213a234 fix: use skin_hash and cape_hash for skin/cape URLs in profile page
All checks were successful
CI / lint (push) Successful in 17s
CI / test (push) Successful in 43s
CI / build (push) Successful in 17s
CI / docker (push) Successful in 1m17s
2026-06-06 19:44:58 +03:00
7ae0f44fd6 fix: skin and cape URLs in profile page to use /skins/ endpoint
All checks were successful
CI / lint (push) Successful in 1m0s
CI / test (push) Successful in 42s
CI / build (push) Successful in 18s
CI / docker (push) Successful in 1m23s
2026-06-06 19:29:14 +03:00
74ad023a36 fix: align form field names in skin/cape upload (file → skin/cape)
All checks were successful
CI / lint (push) Successful in 18s
CI / test (push) Successful in 20s
CI / build (push) Successful in 20s
CI / docker (push) Successful in 1m7s
JS sent fd.append('file', ...) but Go expected r.FormFile("skin") / r.FormFile("cape").
2026-06-04 18:33:05 +03:00
c22c860ec5 fix: set base.html as root template name and use ExecuteTemplate
All checks were successful
CI / lint (push) Successful in 19s
CI / test (push) Successful in 20s
CI / build (push) Successful in 20s
CI / docker (push) Successful in 1m11s
template.New("base.html") makes base.html the root template instead of ""
2026-06-04 17:30:46 +03:00
3f2fe0043a chore: gofmt
All checks were successful
CI / docker (push) Successful in 1m12s
CI / lint (push) Successful in 19s
CI / test (push) Successful in 20s
CI / build (push) Successful in 20s
2026-06-04 17:06:31 +03:00
21d48200f5 fix: parse templates individually to prevent content block overwrite
Some checks failed
CI / lint (push) Failing after 19s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / docker (push) Has been skipped
Root cause: ParseFS with wildcard html/*.html caused all {{define "content"}}

blocks to overwrite each other — last alphabetically (register.html) won for

all pages. Now each page is parsed separately with base.html as its own template.

Also fix footer link: GitHub → Gitea project page.
2026-06-04 16:57:34 +03:00
2f1f1ef7d6 fix: embed HTML templates into binary via go:embed
All checks were successful
CI / lint (push) Successful in 17s
CI / test (push) Successful in 18s
CI / build (push) Successful in 18s
CI / docker (push) Successful in 1m1s
Switched from runtime file-based template loading (os.Stat + ParseGlob)
to compile-time embedding (embed.FS + ParseFS). Templates are now
bundled into the binary — no need to COPY them into Docker image.

This fixes the fallback response issue where h.loaded was always false
because templates weren't present in the container filesystem.
2026-06-04 06:51:11 +03:00
394003d8c0 fix: render base.html layout instead of bare page templates
All checks were successful
CI / lint (push) Successful in 48s
CI / test (push) Successful in 18s
CI / build (push) Successful in 17s
CI / docker (push) Successful in 1m10s
ExecuteTemplate now renders base.html which calls {{template "content" .}},
so the full layout (header, footer, styles) wraps each page.
2026-06-04 06:29:46 +03:00
008d9a129e feat: redesign website templates with full pages
All checks were successful
CI / lint (push) Successful in 18s
CI / test (push) Successful in 20s
CI / build (push) Successful in 19s
CI / docker (push) Successful in 1m7s
- Redesigned base.html: dark Minecraft theme, sticky header, responsive grid, cards, server cards with status indicators, profile styles
- index.html: hero section, server list grid, how-to-start steps, features section
- login.html: centered card layout, client-side validation, fetch API
- registration.html: password confirmation, pattern validation, error alerts
- profile.html: new page — skin/cape upload & delete, launcher download links, auth-gated via localStorage token
- templates.go: added /profile route, extended pageData with Username/UUID
2026-06-03 20:37:24 +03:00
4efcc770ac fix: format all Go files with gofmt
All checks were successful
CI / lint (push) Successful in 9m54s
CI / test (push) Successful in 10m19s
CI / build (push) Successful in 9m58s
CI / docker (push) Has been skipped
- Fix alignment in struct fields (sessionProfileResponse, textureInfo, Handler)
- Align struct field values in internal/templates/templates.go, internal/api/api.go
2026-05-30 20:00:54 +03:00
7ad02cb1b2 feat: implement email validation, CI/CD pipeline, migration history, and web templates
Some checks failed
CI / lint (push) Failing after 21s
CI / build (push) Has been skipped
CI / test (push) Has been skipped
CI / docker (push) Has been skipped
Email validation:
- Replace @/. check with net/mail.ParseAddress on register
- Add size limit check (max 254 chars, RFC 5321)

CI/CD Pipeline:
- Add .gitea/workflows/ci.yml (lint → test → build → docker push)
- Registry: gitea.mrixs.me/Mrixs/MrixsCraft-server
- Push only on main branch

Database:
- Add migrations/002_migration_history.sql (tracking applied migrations)
- Add migrations/README.md (manual apply instructions)

Web Templates:
- Add base.html with Minecraft-themed layout (dark + green accent)
- Add index.html, login.html, register.html with POST forms
- Rewrite templates.go for data-driven rendering with pageData struct
- Fallback placeholder preserved when templates dir missing
2026-05-30 00:39:51 +03:00
e4fea937aa feat: implement CAS module, middleware, utils, and templates
- CAS: GET /files/{hash} with immutable cache headers, launcher asset
  serving, hash validation, StoreFile/VerifyAndStore helpers
- Middleware: CORS, request logging, per-IP token bucket rate limiter
- Utils: SHA1Bytes, SHA256Bytes, SHA1File, Unzip with zip-slip protection
- Templates: placeholder handler with html/template discovery
- Wire CAS routes and middleware chain (Logging → CORS) in main.go
2026-05-26 15:11:41 +03:00
551c75a232 chore: initial project structure 2026-05-23 17:57:37 +03:00