fix for feat(web): implement macOS app feature and file logger (#1735)

This commit is contained in:
Cytown
2026-03-18 18:00:14 +08:00
committed by GitHub
parent b6c5f587c9
commit affd77f989
4 changed files with 4 additions and 3 deletions
-2
View File
@@ -80,8 +80,6 @@ cat > "${APP_CONTENTS}/Info.plist" << 'EOF'
<true/>
<key>LSUIElement</key>
<string>1</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
EOF
+1 -1
View File
@@ -92,5 +92,5 @@ lint:
# Clean build artifacts
clean:
rm -rf frontend/dist backend/dist $(BUILD_DIR)/*
rm -rf frontend/dist backend/dist $(BUILD_DIR)
mkdir -p backend/dist && touch backend/dist/.gitkeep
+2
View File
@@ -566,6 +566,8 @@ func (h *Handler) handleGatewayStart(w http.ResponseWriter, r *http.Request) {
}
// handleGatewayStop stops the running gateway subprocess gracefully.
// Note: Unlike StopGateway (which only stops self-started processes), this API endpoint
// stops any gateway process, including attached ones. This is intentional for user control.
//
// POST /api/gateway/stop
func (h *Handler) handleGatewayStop(w http.ResponseWriter, r *http.Request) {
+1
View File
@@ -81,6 +81,7 @@ func main() {
logPath := filepath.Join(picoHome, "logs", "web.log")
if err := logger.EnableFileLogging(logPath); err != nil {
// FIXME: https://github.com/sipeed/picoclaw/issues/1734
fmt.Fprintf(os.Stderr, "Failed to initialize logger: %v\n", err)
os.Exit(1)
}