feat: API key management improvements
- Rename routes: /dashboard/tokens → /dashboard/apikeys, /dashboard/manager/keys → /dashboard/manager/channels - Add KeyPlain field to store plaintext API keys for re-viewing - API key list shows masked key (sk-ot-123456****abcd) with eye toggle to reveal - Copy button with 2s feedback on key list - TokenNew shows full key + copy after creation - Increase key prefix display to 12 characters - Fix SQLite driver: replace gorm.io/driver/sqlite with ncruces/go-sqlite3/gormlite - Fix user.status === 'active' checks across frontend views - Add channel store for new channels API - Update Makefile frontend build to work reliably BREAKING CHANGE: Existing API keys created before this change will not show their plaintext value (only prefix visible).
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
.PHONY: build run test clean fmt lint
|
||||
.PHONY: build run test clean fmt lint frontend
|
||||
|
||||
BINARY_NAME=openteam
|
||||
BUILD_DIR=bin
|
||||
BACKEND_DIR=backend
|
||||
|
||||
# Build
|
||||
build:
|
||||
cd $(BACKEND_DIR) && CGO_ENABLED=1 go build -o ../$(BUILD_DIR)/$(BINARY_NAME) ./cmd/openteam
|
||||
build: frontend
|
||||
cd $(BACKEND_DIR) && CGO_ENABLED=0 go build -o ../$(BUILD_DIR)/$(BINARY_NAME) ./cmd/openteam
|
||||
|
||||
# Build frontend and copy dist
|
||||
frontend:
|
||||
cd frontend && pnpm install && pnpm build
|
||||
rm -rf $(BACKEND_DIR)/cmd/openteam/dist
|
||||
cp -r frontend/dist $(BACKEND_DIR)/cmd/openteam/dist
|
||||
|
||||
# Run
|
||||
run: build
|
||||
|
||||
Reference in New Issue
Block a user