Escape env var values; update favicons & logo

Fix shell escaping when building env export commands by escaping backslashes and quotes (prevents broken exported values) in ScriptExecutionHandler (two locations). Update app metadata to point to favicon files under /favicon, add site manifest, and replace the header Package icon with a next/image using the android-chrome PNG (import Image and adjust markup) for consistent asset handling.
This commit is contained in:
CanbiZ (MickLesk)
2026-04-01 15:26:31 +02:00
parent adb1c05357
commit de4641ca66
3 changed files with 26 additions and 7 deletions

View File

@@ -1414,7 +1414,12 @@ class ScriptExecutionHandler {
// Build env export commands (e.g. for PHS_SILENT=1)
const envExports = Object.entries(envVars)
.filter(([key]) => key.startsWith('PHS_') || key.startsWith('var_'))
.map(([key, value]) => `export ${key}="${String(value).replace(/"/g, '\\"')}"`)
.map(([key, value]) => {
const safeValue = String(value)
.replace(/\\/g, '\\\\')
.replace(/"/g, '\\"');
return `export ${key}="${safeValue}"`;
})
.join('; ');
// Send the update command after a delay to ensure we're in the container
@@ -1489,7 +1494,12 @@ class ScriptExecutionHandler {
// Build env export commands (e.g. for PHS_SILENT=1)
const envExports = Object.entries(envVars)
.filter(([key]) => key.startsWith('PHS_') || key.startsWith('var_'))
.map(([key, value]) => `export ${key}="${String(value).replace(/"/g, '\\"')}"`)
.map(([key, value]) => {
const safeValue = String(value)
.replace(/\\/g, '\\\\')
.replace(/"/g, '\\"');
return `export ${key}="${safeValue}"`;
})
.join('; ');
// Send the update command after a delay to ensure we're in the container

View File

@@ -14,10 +14,11 @@ export const metadata: Metadata = {
description:
"Manage and execute Proxmox helper scripts locally with live output streaming",
icons: [
{ rel: "icon", url: "/favicon.png", type: "image/png" },
{ rel: "icon", url: "/favicon.ico", sizes: "any" },
{ rel: "apple-touch-icon", url: "/favicon.png" },
{ rel: "icon", url: "/favicon/favicon.png", type: "image/png" },
{ rel: "icon", url: "/favicon/favicon.ico", sizes: "any" },
{ rel: "apple-touch-icon", url: "/favicon/apple-touch-icon.png" },
],
manifest: "/favicon/site.webmanifest",
};
export const viewport: Viewport = {

View File

@@ -1,6 +1,7 @@
"use client";
import { useState, useRef, useEffect } from "react";
import Image from "next/image";
import { ScriptsGrid } from "./_components/ScriptsGrid";
import { DownloadedScriptsTab } from "./_components/DownloadedScriptsTab";
import { InstalledScriptsTab } from "./_components/InstalledScriptsTab";
@@ -243,8 +244,15 @@ export default function Home() {
<div className="mx-auto flex h-full max-w-[var(--layout-max-w)] items-center justify-between gap-4 px-4 sm:px-6">
{/* Left: Logo/Brand */}
<div className="flex items-center gap-3">
<div className="border-border/60 bg-card flex h-9 w-9 items-center justify-center rounded-xl border shadow-sm">
<Package className="text-primary h-5 w-5" />
<div className="flex h-9 w-9 items-center justify-center overflow-hidden rounded-xl">
<Image
src="/favicon/android-chrome-192x192.png"
alt="PVE Scripts Local"
width={36}
height={36}
className="h-9 w-9"
priority
/>
</div>
<div className="flex flex-col leading-tight">
<span className="text-muted-foreground text-[0.6rem] font-bold tracking-[0.16em] uppercase">