Commit Graph

13 Commits

Author SHA1 Message Date
loveuer
ef6347a8b4 feat: add token-based API access (v0.6.0)
Some checks are pending
Release Binaries / Build and Release (.exe, amd64, windows, windows-amd64) (push) Waiting to run
Release Binaries / Build and Release (amd64, darwin, darwin-amd64) (push) Waiting to run
Release Binaries / Build and Release (amd64, linux, linux-amd64) (push) Waiting to run
Release Binaries / Build and Release (arm64, darwin, darwin-arm64) (push) Waiting to run
Release Binaries / Build and Release (arm64, linux, linux-arm64) (push) Waiting to run
- 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]
2026-02-28 01:32:08 -08:00
loveuer
5f187bb5d6 feat: add user management system with roles and permissions
Some checks failed
/ build ushare (push) Failing after 1m40s
/ clean (push) Successful in 2s
- 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]
2026-02-27 19:40:31 -08:00
loveuer
d38fa7a507 feat: optimize mobile responsive layout for share page
- 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
2026-01-18 17:12:07 +08:00
loveuer
56874b754e feat: implement single binary build and env-based auth
Some checks failed
/ build ushare (push) Has been cancelled
/ clean (push) Has been cancelled
- 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
2026-01-17 23:28:21 +08:00
loveuer
f8372b8de8 feat:
All checks were successful
/ build ushare (push) Successful in 45s
/ clean (push) Successful in 0s
1. local msg/file share by webrtc
fix:
  1. meta clean goroutine walk error
  2. clean interval to args(--clean)
2025-06-23 23:08:29 +08:00
loveuer
7c089bbe84 wip: 0.2.2
1. rtc init
2025-05-16 16:14:40 +08:00
loveuer
3053394f03 wip: 0.2.1
1. websocket 连接,退出 优化
  2. 基本页面
2025-05-15 17:39:56 +08:00
loveuer
ec3f76e0c0 wip: 0.2.0
1. websocket 连接,退出,消息
  2. 基本页面
2025-05-14 17:48:06 +08:00
loveuer
b1b3ac5b6b feat: 0.1.2
1. login page && auth required
  2. file dir cleanup
2025-05-12 15:54:52 +08:00
loveuer
a2635698e0 init: 0.1.1
feat: login page && auth required
todo: 断点上传
2025-05-12 15:54:49 +08:00
loveuer
b3ff70167f init: 0.1.0
feat: 基本功能有了
  1. 分片上传
  2. code 回显
  3. 下载
todo: 断点上传
2025-05-12 15:54:49 +08:00
loveuer
7ec8cd5c0e init: 0.0.8
feat: 实现了分片上传
todo:
  1. 上传完成后 code 回显
  2. 清理不用的临时 code file
  3. 断点续传
  4. 多 chunk 并发上传
2025-05-12 15:54:43 +08:00
loveuer
fb96934abe init: 0.0.4 2025-05-12 15:54:40 +08:00