- Remove Role association field from User model
- Remove User association field from Token model
- controller/user.go: query Role separately after loading User
- controller/token.go: query User and Role with separate DB calls
- handler/admin.go: introduce userResp type, build role info manually;
batch-load roles in AdminListUsers to avoid N+1
🤖 Generated with [Qoder][https://qoder.com]
- Add Token GORM model with UserID/Name/Token/LastUsedAt/ExpiresAt fields
- Add TokenManager controller: List/Create/Delete/Verify operations
- Add token HTTP handlers: list, create, revoke
- Update AuthVerify to support Bearer token auth; API tokens use "ust_" prefix to distinguish from session tokens
- Add one-step file upload endpoint: PUT /api/v1/upload/:filename (returns {"status":200,"data":{"code":"..."}})
- Add token management routes: GET/POST/DELETE /api/token
- Add /self page: personal center with account info, token management table, and curl usage guide
- Add "个人中心 / API Token" nav link for users with token_manage permission
🤖 Generated with [Qoder][https://qoder.com]
- build.yaml: remove docker login/push, only verify image builds
- release.yaml: new workflow to cross-compile binaries for
linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64
and publish them as Gitea Release assets on tag push
🤖 Generated with [Qoder][https://qoder.com]
The backend Go build embeds the frontend via //go:embed frontend/dist
in internal/static/static.go. The Dockerfile was missing a
COPY --from=frontend-builder step to place the built dist at the
expected path before running go build, causing the build to fail.
🤖 Generated with [Qoder][https://qoder.com]
- Introduce SQLite persistence via GORM (stored at <data>/.ushare.db)
- Add Role model with two built-in roles: admin (all perms) and user (upload only)
- Add three permissions: user_manage, upload, token_manage (reserved)
- Rewrite UserManager: DB-backed login with in-memory session tokens
- Auto-seed default roles and admin user on first startup
- Add AuthPermission middleware for fine-grained permission checks
- Add /api/uauth/me endpoint for current session info
- Add /api/admin/* CRUD routes for user and role management
- Add admin console page (/admin) with user table and role permissions view
- Show admin console link in share page for users with user_manage permission
🤖 Generated with [Qoder][https://qoder.com]
- Add project introduction and features
- Add quick start guide (development and production)
- Add configuration documentation
- Add usage instructions
- Add mobile support section
- Add development guide and directory structure
- Add responsive design for mobile devices (≤768px)
- Switch from horizontal to vertical layout on mobile
- Hide middle divider panel on mobile
- Optimize button sizes for mobile touch interaction
- Improve input field and button alignment on mobile
- Unify login page styling with share page
- Add AGENTS.md with build commands and code style guidelines
- Add dev.sh and make.sh for development and production builds
- Implement single binary build with embedded frontend using embed.FS
- Change auth configuration from CLI flag to env variables (USHARE_USERNAME, USHARE_PASSWORD)
- Set default credentials: admin / ushare@123
- Fix static file serving for SPA routes