Update AppImage

This commit is contained in:
MacRimi
2025-09-29 17:46:37 +02:00
parent 6133a6d6d8
commit bc3e2ec358
6 changed files with 36 additions and 66 deletions

View File

@@ -20,40 +20,3 @@ A modern, responsive dashboard for monitoring Proxmox VE systems built with Next
- **UI Components**: Radix UI primitives with shadcn/ui - **UI Components**: Radix UI primitives with shadcn/ui
- **Backend**: Flask server for system data collection - **Backend**: Flask server for system data collection
- **Packaging**: AppImage for easy distribution - **Packaging**: AppImage for easy distribution
## Development
\`\`\`bash
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
\`\`\`
## Building AppImage
\`\`\`bash
# Make build script executable
chmod +x scripts/build_appimage.sh
# Build AppImage
./scripts/build_appimage.sh
\`\`\`
## Translation Support
The project includes a translation system for multi-language support:
\`\`\`bash
# Build translation AppImage
chmod +x scripts/build_translate_appimage.sh
./scripts/build_translate_appimage.sh
\`\`\`
## License
MIT License - see LICENSE file for details.

View File

@@ -60,8 +60,8 @@ export function SystemOverview() {
const fetchSystemData = async () => { const fetchSystemData = async () => {
try { try {
console.log("[v0] Fetching system data from API...") console.log("[v0] Fetching system data from Flask server...")
const response = await fetch("/api/system", { const response = await fetch("http://localhost:8008/api/system", {
method: "GET", method: "GET",
headers: { headers: {
Accept: "application/json", Accept: "application/json",
@@ -124,8 +124,8 @@ export function SystemOverview() {
const fetchVMData = async () => { const fetchVMData = async () => {
try { try {
console.log("[v0] Fetching VM data from API...") console.log("[v0] Fetching VM data from Flask server...")
const response = await fetch("/api/vms", { const response = await fetch("http://localhost:8008/api/vms", {
method: "GET", method: "GET",
headers: { headers: {
Accept: "application/json", Accept: "application/json",

View File

@@ -25,18 +25,6 @@ const nextConfig = {
} }
return config; return config;
}, },
async headers() {
return [
{
source: '/api/:path*',
headers: [
{ key: 'Access-Control-Allow-Origin', value: '*' },
{ key: 'Access-Control-Allow-Methods', value: 'GET, POST, PUT, DELETE, OPTIONS' },
{ key: 'Access-Control-Allow-Headers', value: 'Content-Type, Authorization' },
],
},
];
},
}; };
export default nextConfig; export default nextConfig;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -8,13 +8,8 @@
"theme_color": "#2b2f36", "theme_color": "#2b2f36",
"icons": [ "icons": [
{ {
"src": "/android-chrome-192x192.png", "src": "/images/proxmenux-logo.png",
"sizes": "192x192", "sizes": "256x256",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png" "type": "image/png"
} }
] ]

View File

@@ -35,6 +35,34 @@ mkdir -p "$APP_DIR/usr/share/applications"
mkdir -p "$APP_DIR/usr/share/icons/hicolor/256x256/apps" mkdir -p "$APP_DIR/usr/share/icons/hicolor/256x256/apps"
mkdir -p "$APP_DIR/web" mkdir -p "$APP_DIR/web"
echo "🔨 Building Next.js application..."
cd "$APPIMAGE_ROOT"
if [ ! -f "package.json" ]; then
echo "❌ Error: package.json not found in AppImage directory"
exit 1
fi
# Install dependencies if node_modules doesn't exist
if [ ! -d "node_modules" ]; then
echo "📦 Installing dependencies..."
npm install
fi
# Build Next.js application
echo "🏗️ Building Next.js application..."
npm run build
# Verify build was successful
if [ ! -d ".next" ]; then
echo "❌ Error: Next.js build failed - .next directory not found"
exit 1
fi
echo "✅ Next.js build completed successfully"
# Return to script directory
cd "$SCRIPT_DIR"
# Copy Flask server # Copy Flask server
echo "📋 Copying Flask server..." echo "📋 Copying Flask server..."
cp "$SCRIPT_DIR/flask_server.py" "$APP_DIR/usr/bin/" cp "$SCRIPT_DIR/flask_server.py" "$APP_DIR/usr/bin/"
@@ -171,12 +199,8 @@ if [ -d "$APPIMAGE_ROOT/.next" ]; then
cp "$APPIMAGE_ROOT/package.json" "$APP_DIR/web/" cp "$APPIMAGE_ROOT/package.json" "$APP_DIR/web/"
echo "✅ Next.js build copied successfully" echo "✅ Next.js build copied successfully"
else else
echo "⚠️ Warning: Next.js build not found in AppImage directory. Run 'npm run build' in AppImage directory first." echo "❌ Error: Next.js build not found even after building"
echo "📋 Creating minimal web structure..." exit 1
mkdir -p "$APP_DIR/web/public/images"
if [ -f "$APPIMAGE_ROOT/public/images/proxmenux-logo.png" ]; then
cp "$APPIMAGE_ROOT/public/images/proxmenux-logo.png" "$APP_DIR/web/public/images/"
fi
fi fi
# Create AppRun script # Create AppRun script