Update index.tsx

This commit is contained in:
Stefan Pejcic 2024-06-03 21:33:45 +02:00 committed by GitHub
parent 1e14a2dfc1
commit c3754d531c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,6 +16,7 @@ type InstallOptions = Record<string, InstallOption>;
const defaultOptions: InstallOptions = { const defaultOptions: InstallOptions = {
hostname: { value: "", description: "Set the FQDN hostname." }, hostname: { value: "", description: "Set the FQDN hostname." },
version: { value: "", description: "Set a custom OpenPanel version to be installed." }, version: { value: "", description: "Set a custom OpenPanel version to be installed." },
email: { value: "", description: "Email address to receive admin logins and future notifications." },
"skip-requirements": { value: false, description: "Skip the requirements check." }, "skip-requirements": { value: false, description: "Skip the requirements check." },
"skip-panel-check": { value: false, description: "Skip checking if existing panels are installed." }, "skip-panel-check": { value: false, description: "Skip checking if existing panels are installed." },
"skip-apt-update": { value: false, description: "Skip the APT update." }, "skip-apt-update": { value: false, description: "Skip the APT update." },
@ -65,7 +66,7 @@ const Install: React.FC = () => {
let command = "bash <(curl -sSL https://get.openpanel.co/)"; let command = "bash <(curl -sSL https://get.openpanel.co/)";
for (const [option, config] of Object.entries(installOptions)) { for (const [option, config] of Object.entries(installOptions)) {
if (option !== "version" || (option === "version" && config.value !== latestVersion)) { if (option !== "version" || (option === "version" && config.value !== latestVersion)) {
if (config.value || ["version", "hostname", "screenshots", "post-install"].includes(option)) { if (config.value || ["version", "hostname", "email", "screenshots", "post-install"].includes(option)) {
if (option === "screenshots" && config.value === "local") { if (option === "screenshots" && config.value === "local") {
command += ` --screenshots=local`; command += ` --screenshots=local`;
} else if (option === "screenshots" && config.value === "remote") { } else if (option === "screenshots" && config.value === "remote") {