mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Compare commits
	
		
			17 Commits
		
	
	
		
			2024-12-03
			...
			2024-12-06
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					59deaa0a19 | ||
| 
						 | 
					a4803d178d | ||
| 
						 | 
					259203ee51 | ||
| 
						 | 
					944328625a | ||
| 
						 | 
					3d38ad0288 | ||
| 
						 | 
					c46f15cdc1 | ||
| 
						 | 
					e2aa5fe627 | ||
| 
						 | 
					493c2c931c | ||
| 
						 | 
					ce545bd499 | ||
| 
						 | 
					0ba2ea9183 | ||
| 
						 | 
					cff3fa8696 | ||
| 
						 | 
					871fd6517d | ||
| 
						 | 
					3a876c99ef | ||
| 
						 | 
					5c3fe0e802 | ||
| 
						 | 
					3ec3478b2d | ||
| 
						 | 
					67524454d7 | ||
| 
						 | 
					ec27e92833 | 
							
								
								
									
										79
									
								
								.github/workflows/deploy-pages.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										79
									
								
								.github/workflows/deploy-pages.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,79 +0,0 @@
 | 
				
			|||||||
# Sample workflow for building and deploying a Next.js site to GitHub Pages
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# To get started with Next.js see: https://nextjs.org/docs/getting-started
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
name: Deploy Next.js site to Pages
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  push:
 | 
					 | 
				
			||||||
    branches: ["main"]
 | 
					 | 
				
			||||||
    paths:
 | 
					 | 
				
			||||||
      - frontend/**
 | 
					 | 
				
			||||||
      - json/**
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  workflow_dispatch:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
permissions:
 | 
					 | 
				
			||||||
  contents: read
 | 
					 | 
				
			||||||
  pages: write
 | 
					 | 
				
			||||||
  id-token: write
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
concurrency:
 | 
					 | 
				
			||||||
  group: "pages"
 | 
					 | 
				
			||||||
  cancel-in-progress: false
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  build:
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    defaults:
 | 
					 | 
				
			||||||
      run:
 | 
					 | 
				
			||||||
        working-directory: frontend  # Set default working directory for all run steps
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Checkout
 | 
					 | 
				
			||||||
        uses: actions/checkout@v4
 | 
					 | 
				
			||||||
      - name: Detect package manager
 | 
					 | 
				
			||||||
        id: detect-package-manager
 | 
					 | 
				
			||||||
        run: |
 | 
					 | 
				
			||||||
          if [ -f "${{ github.workspace }}/frontend/yarn.lock" ]; then
 | 
					 | 
				
			||||||
            echo "manager=yarn" >> $GITHUB_OUTPUT
 | 
					 | 
				
			||||||
            echo "command=install" >> $GITHUB_OUTPUT
 | 
					 | 
				
			||||||
            echo "runner=yarn" >> $GITHUB_OUTPUT
 | 
					 | 
				
			||||||
            exit 0
 | 
					 | 
				
			||||||
          elif [ -f "${{ github.workspace }}/frontend/package.json" ]; then
 | 
					 | 
				
			||||||
            echo "manager=npm" >> $GITHUB_OUTPUT
 | 
					 | 
				
			||||||
            echo "command=ci" >> $GITHUB_OUTPUT
 | 
					 | 
				
			||||||
            echo "runner=npx --no-install" >> $GITHUB_OUTPUT
 | 
					 | 
				
			||||||
            exit 0
 | 
					 | 
				
			||||||
          else
 | 
					 | 
				
			||||||
            echo "Unable to determine package manager"
 | 
					 | 
				
			||||||
            exit 1
 | 
					 | 
				
			||||||
          fi
 | 
					 | 
				
			||||||
      - name: Setup Node
 | 
					 | 
				
			||||||
        uses: actions/setup-node@v4
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          node-version: "20"
 | 
					 | 
				
			||||||
          cache: ${{ steps.detect-package-manager.outputs.manager }}
 | 
					 | 
				
			||||||
          cache-dependency-path: frontend/package-lock.json  # Specify the path to package-lock.json
 | 
					 | 
				
			||||||
      - name: Setup Pages
 | 
					 | 
				
			||||||
        uses: actions/configure-pages@v5
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          static_site_generator: next
 | 
					 | 
				
			||||||
      - name: Install dependencies
 | 
					 | 
				
			||||||
        run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} --legacy-peer-deps
 | 
					 | 
				
			||||||
      - name: Build with Next.js
 | 
					 | 
				
			||||||
        run: ${{ steps.detect-package-manager.outputs.runner }} next build
 | 
					 | 
				
			||||||
      - name: Upload artifact
 | 
					 | 
				
			||||||
        uses: actions/upload-pages-artifact@v3
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          path: frontend/out
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  deploy:
 | 
					 | 
				
			||||||
    environment:
 | 
					 | 
				
			||||||
      name: github-pages
 | 
					 | 
				
			||||||
      url: ${{ steps.deployment.outputs.page_url }}
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    needs: build
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Deploy to GitHub Pages
 | 
					 | 
				
			||||||
        id: deployment
 | 
					 | 
				
			||||||
        uses: actions/deploy-pages@v4
 | 
					 | 
				
			||||||
							
								
								
									
										78
									
								
								.github/workflows/frontend-cicd.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								.github/workflows/frontend-cicd.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,78 @@
 | 
				
			|||||||
 | 
					# Based on https://github.com/actions/starter-workflows/blob/main/pages/nextjs.yml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: Frontend CI/CD
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches: ["main"]
 | 
				
			||||||
 | 
					    paths:
 | 
				
			||||||
 | 
					      - frontend/**
 | 
				
			||||||
 | 
					      - json/**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					    branches: ["main"]
 | 
				
			||||||
 | 
					    types: [opened, synchronize, reopened, edited]
 | 
				
			||||||
 | 
					    paths:
 | 
				
			||||||
 | 
					      - frontend/**
 | 
				
			||||||
 | 
					      - json/**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					permissions:
 | 
				
			||||||
 | 
					  contents: read
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					concurrency:
 | 
				
			||||||
 | 
					  group: pages-${{ github.ref }}
 | 
				
			||||||
 | 
					  cancel-in-progress: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  build:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    defaults:
 | 
				
			||||||
 | 
					      run:
 | 
				
			||||||
 | 
					        working-directory: frontend  # Set default working directory for all run steps
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Checkout
 | 
				
			||||||
 | 
					        uses: actions/checkout@v4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Setup Node
 | 
				
			||||||
 | 
					        uses: actions/setup-node@v4
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          node-version: "20"
 | 
				
			||||||
 | 
					          cache: npm
 | 
				
			||||||
 | 
					          cache-dependency-path: frontend/package-lock.json
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Install dependencies
 | 
				
			||||||
 | 
					        run: npm ci --prefer-offline --legacy-peer-deps
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Run tests
 | 
				
			||||||
 | 
					        run: npm run test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Configure Next.js for pages
 | 
				
			||||||
 | 
					        uses: actions/configure-pages@v5
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          static_site_generator: next
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Build with Next.js
 | 
				
			||||||
 | 
					        run: npm run build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Upload artifact
 | 
				
			||||||
 | 
					        if: github.ref == 'refs/heads/main'
 | 
				
			||||||
 | 
					        uses: actions/upload-pages-artifact@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          path: frontend/out
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  deploy:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    needs: build
 | 
				
			||||||
 | 
					    if: github.ref == 'refs/heads/main'
 | 
				
			||||||
 | 
					    permissions:
 | 
				
			||||||
 | 
					      pages: write
 | 
				
			||||||
 | 
					      id-token: write
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      name: github-pages
 | 
				
			||||||
 | 
					      url: ${{ steps.deployment.outputs.page_url }}
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Deploy to GitHub Pages
 | 
				
			||||||
 | 
					        id: deployment
 | 
				
			||||||
 | 
					        uses: actions/deploy-pages@v4
 | 
				
			||||||
							
								
								
									
										39
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										39
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@@ -16,6 +16,45 @@ All LXC instances created using this repository come pre-installed with Midnight
 | 
				
			|||||||
> [!IMPORTANT]
 | 
					> [!IMPORTANT]
 | 
				
			||||||
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
 | 
					Do not break established syntax in this file, as it is automatically updated by a Github Workflow
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 2024-12-06
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Changed
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 🚀 Updated Scripts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Fix bugs in Komga update [@DysfunctionalProgramming](https://github.com/DysfunctionalProgramming) ([#717](https://github.com/community-scripts/ProxmoxVE/pull/717))
 | 
				
			||||||
 | 
					- Bookstack: Fix Update function composer [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#700](https://github.com/community-scripts/ProxmoxVE/pull/700))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 🌐 Website
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- fix: note component in json-editor getting out of focus when typing and revert theme switch animation [@BramSuurdje](https://github.com/BramSuurdje) ([#706](https://github.com/community-scripts/ProxmoxVE/pull/706))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 🧰 Maintenance
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Update frontend CI/CD workflow [@havardthom](https://github.com/havardthom) ([#703](https://github.com/community-scripts/ProxmoxVE/pull/703))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 2024-12-05
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Changed
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 🚀 Updated Scripts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- PostgreSQL: Change authentication method from peer to md5 for UNIX sockets [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#650](https://github.com/community-scripts/ProxmoxVE/pull/650))
 | 
				
			||||||
 | 
					- Fix stdout in unifi.sh [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#688](https://github.com/community-scripts/ProxmoxVE/pull/688))
 | 
				
			||||||
 | 
					- Fix `rm` bug in Vikunja update [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#692](https://github.com/community-scripts/ProxmoxVE/pull/692))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 2024-12-04
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Changed
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 🚀 Updated Scripts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Update Spelling 'Environment' in nginxproxymanager [@MathijsG](https://github.com/MathijsG) ([#676](https://github.com/community-scripts/ProxmoxVE/pull/676))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 🌐 Website
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Update homepage.json documentation and website links [@patchmonkey](https://github.com/patchmonkey) ([#668](https://github.com/community-scripts/ProxmoxVE/pull/668))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 2024-12-03
 | 
					## 2024-12-03
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Changed
 | 
					### Changed
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -70,9 +70,10 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
 | 
				
			|||||||
  unzip -q v${RELEASE}.zip
 | 
					  unzip -q v${RELEASE}.zip
 | 
				
			||||||
  mv BookStack-${RELEASE} /opt/bookstack
 | 
					  mv BookStack-${RELEASE} /opt/bookstack
 | 
				
			||||||
  mv /opt/.env /opt/bookstack/.env
 | 
					  mv /opt/.env /opt/bookstack/.env
 | 
				
			||||||
 | 
					  cd /opt/bookstack
 | 
				
			||||||
  COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev  &>/dev/null
 | 
					  COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev  &>/dev/null
 | 
				
			||||||
  php artisan key:generate &>/dev/null
 | 
					  php artisan key:generate --force &>/dev/null
 | 
				
			||||||
  php artisan migrate &>/dev/null
 | 
					  php artisan migrate --force &>/dev/null
 | 
				
			||||||
  echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
					  echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
				
			||||||
  msg_ok "Updated ${APP}"
 | 
					  msg_ok "Updated ${APP}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -56,7 +56,7 @@ function update_script() {
 | 
				
			|||||||
header_info
 | 
					header_info
 | 
				
			||||||
check_container_storage
 | 
					check_container_storage
 | 
				
			||||||
check_container_resources
 | 
					check_container_resources
 | 
				
			||||||
if [[ ! -f /opt/komga/komga*.jar ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
 | 
					if [[ ! -f /opt/komga/komga.jar ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
 | 
				
			||||||
msg_info "Updating ${APP}"
 | 
					msg_info "Updating ${APP}"
 | 
				
			||||||
RELEASE=$(curl -s https://api.github.com/repos/gotson/komga/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
					RELEASE=$(curl -s https://api.github.com/repos/gotson/komga/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
 | 
				
			||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
 | 
					if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
 | 
				
			||||||
@@ -65,8 +65,8 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
 | 
				
			|||||||
  msg_ok "Stopped ${APP}"
 | 
					  msg_ok "Stopped ${APP}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  msg_info "Updating ${APP} to ${RELEASE}"
 | 
					  msg_info "Updating ${APP} to ${RELEASE}"
 | 
				
			||||||
  rm -rf /opt/komga/komga*.jar
 | 
					  wget -q "https://github.com/gotson/komga/releases/download/${RELEASE}/komga-${RELEASE}.jar"
 | 
				
			||||||
  wget -q "https://github.com/gotson/komga/releases/download/v${RELEASE}/komga-${RELEASE}.jar"
 | 
					  rm -rf /opt/komga/komga.jar
 | 
				
			||||||
  mv -f komga-${RELEASE}.jar /opt/komga/komga.jar
 | 
					  mv -f komga-${RELEASE}.jar /opt/komga/komga.jar
 | 
				
			||||||
  echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
					  echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
				
			||||||
  msg_ok "Updated ${APP} to ${RELEASE}"
 | 
					  msg_ok "Updated ${APP} to ${RELEASE}"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -58,8 +58,8 @@ check_container_storage
 | 
				
			|||||||
check_container_resources
 | 
					check_container_resources
 | 
				
			||||||
if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
 | 
					if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
 | 
				
			||||||
msg_info "Updating ${APP}"
 | 
					msg_info "Updating ${APP}"
 | 
				
			||||||
apt-get update --allow-releaseinfo-change
 | 
					apt-get update --allow-releaseinfo-change &>/dev/null
 | 
				
			||||||
apt-get install -y unifi
 | 
					apt-get install -y unifi &>/dev/null
 | 
				
			||||||
msg_ok "Updated Successfully"
 | 
					msg_ok "Updated Successfully"
 | 
				
			||||||
exit
 | 
					exit
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -67,7 +67,7 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  msg_info "Updating ${APP} to ${RELEASE}"
 | 
					  msg_info "Updating ${APP} to ${RELEASE}"
 | 
				
			||||||
  cd /opt
 | 
					  cd /opt
 | 
				
			||||||
  rm -rf /opt/*
 | 
					  rm -rf /opt/vikunja/vikunja
 | 
				
			||||||
  wget -q "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb"
 | 
					  wget -q "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb"
 | 
				
			||||||
  DEBIAN_FRONTEND=noninteractive dpkg -i vikunja-$RELEASE-amd64.deb &>/dev/null
 | 
					  DEBIAN_FRONTEND=noninteractive dpkg -i vikunja-$RELEASE-amd64.deb &>/dev/null
 | 
				
			||||||
  echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
					  echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@ import { cn } from "@/lib/utils";
 | 
				
			|||||||
import { PlusCircle, Trash2 } from "lucide-react";
 | 
					import { PlusCircle, Trash2 } from "lucide-react";
 | 
				
			||||||
import { z } from "zod";
 | 
					import { z } from "zod";
 | 
				
			||||||
import { ScriptSchema, type Script } from "../_schemas/schemas";
 | 
					import { ScriptSchema, type Script } from "../_schemas/schemas";
 | 
				
			||||||
import { memo, useCallback } from "react";
 | 
					import { memo, useCallback, useRef } from "react";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type NoteProps = {
 | 
					type NoteProps = {
 | 
				
			||||||
  script: Script;
 | 
					  script: Script;
 | 
				
			||||||
@@ -27,6 +27,8 @@ function Note({
 | 
				
			|||||||
  setIsValid,
 | 
					  setIsValid,
 | 
				
			||||||
  setZodErrors,
 | 
					  setZodErrors,
 | 
				
			||||||
}: NoteProps) {
 | 
					}: NoteProps) {
 | 
				
			||||||
 | 
					  const inputRefs = useRef<(HTMLInputElement | null)[]>([]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const addNote = useCallback(() => {
 | 
					  const addNote = useCallback(() => {
 | 
				
			||||||
    setScript({
 | 
					    setScript({
 | 
				
			||||||
      ...script,
 | 
					      ...script,
 | 
				
			||||||
@@ -49,6 +51,12 @@ function Note({
 | 
				
			|||||||
    setIsValid(result.success);
 | 
					    setIsValid(result.success);
 | 
				
			||||||
    setZodErrors(result.success ? null : result.error);
 | 
					    setZodErrors(result.success ? null : result.error);
 | 
				
			||||||
    setScript(updated);
 | 
					    setScript(updated);
 | 
				
			||||||
 | 
					    // Restore focus after state update
 | 
				
			||||||
 | 
					    if (key === "text") {
 | 
				
			||||||
 | 
					      setTimeout(() => {
 | 
				
			||||||
 | 
					        inputRefs.current[index]?.focus();
 | 
				
			||||||
 | 
					      }, 0);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }, [script, setScript, setIsValid, setZodErrors]);
 | 
					  }, [script, setScript, setIsValid, setZodErrors]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const removeNote = useCallback((index: number) => {
 | 
					  const removeNote = useCallback((index: number) => {
 | 
				
			||||||
@@ -58,46 +66,51 @@ function Note({
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
  }, [script, setScript]);
 | 
					  }, [script, setScript]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const NoteItem = memo(({ note, index }: { note: Script["notes"][number], index: number }) => (
 | 
					  const NoteItem = memo(
 | 
				
			||||||
    <div className="space-y-2 border p-4 rounded">
 | 
					    ({ note, index }: { note: Script["notes"][number]; index: number }) => (
 | 
				
			||||||
      <Input
 | 
					      <div className="space-y-2 border p-4 rounded">
 | 
				
			||||||
        placeholder="Note Text"
 | 
					        <Input
 | 
				
			||||||
        value={note.text}
 | 
					          placeholder="Note Text"
 | 
				
			||||||
        onChange={(e) => updateNote(index, "text", e.target.value)}
 | 
					          value={note.text}
 | 
				
			||||||
      />
 | 
					          onChange={(e) => updateNote(index, "text", e.target.value)}
 | 
				
			||||||
      <Select
 | 
					          ref={(el) => {
 | 
				
			||||||
        value={note.type}
 | 
					            inputRefs.current[index] = el;
 | 
				
			||||||
        onValueChange={(value) => updateNote(index, "type", value)}
 | 
					          }}
 | 
				
			||||||
      >
 | 
					        />
 | 
				
			||||||
        <SelectTrigger className="flex-1">
 | 
					        <Select
 | 
				
			||||||
          <SelectValue placeholder="Type" />
 | 
					          value={note.type}
 | 
				
			||||||
        </SelectTrigger>
 | 
					          onValueChange={(value) => updateNote(index, "type", value)}
 | 
				
			||||||
        <SelectContent>
 | 
					        >
 | 
				
			||||||
          {Object.keys(AlertColors).map((type) => (
 | 
					          <SelectTrigger className="flex-1">
 | 
				
			||||||
            <SelectItem key={type} value={type}>
 | 
					            <SelectValue placeholder="Type" />
 | 
				
			||||||
              <span className="flex items-center gap-2">
 | 
					          </SelectTrigger>
 | 
				
			||||||
                {type.charAt(0).toUpperCase() + type.slice(1)}{" "}
 | 
					          <SelectContent>
 | 
				
			||||||
                <div
 | 
					            {Object.keys(AlertColors).map((type) => (
 | 
				
			||||||
                  className={cn(
 | 
					              <SelectItem key={type} value={type}>
 | 
				
			||||||
                    "size-4 rounded-full border",
 | 
					                <span className="flex items-center gap-2">
 | 
				
			||||||
                    AlertColors[type as keyof typeof AlertColors],
 | 
					                  {type.charAt(0).toUpperCase() + type.slice(1)}{" "}
 | 
				
			||||||
                  )}
 | 
					                  <div
 | 
				
			||||||
                />
 | 
					                    className={cn(
 | 
				
			||||||
              </span>
 | 
					                      "size-4 rounded-full border",
 | 
				
			||||||
            </SelectItem>
 | 
					                      AlertColors[type as keyof typeof AlertColors],
 | 
				
			||||||
          ))}
 | 
					                    )}
 | 
				
			||||||
        </SelectContent>
 | 
					                  />
 | 
				
			||||||
      </Select>
 | 
					                </span>
 | 
				
			||||||
      <Button
 | 
					              </SelectItem>
 | 
				
			||||||
        size="sm"
 | 
					            ))}
 | 
				
			||||||
        variant="destructive"
 | 
					          </SelectContent>
 | 
				
			||||||
        type="button"
 | 
					        </Select>
 | 
				
			||||||
        onClick={() => removeNote(index)}
 | 
					        <Button
 | 
				
			||||||
      >
 | 
					          size="sm"
 | 
				
			||||||
        <Trash2 className="mr-2 h-4 w-4" /> Remove Note
 | 
					          variant="destructive"
 | 
				
			||||||
      </Button>
 | 
					          type="button"
 | 
				
			||||||
    </div>
 | 
					          onClick={() => removeNote(index)}
 | 
				
			||||||
  ));
 | 
					        >
 | 
				
			||||||
 | 
					          <Trash2 className="mr-2 h-4 w-4" /> Remove Note
 | 
				
			||||||
 | 
					        </Button>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  NoteItem.displayName = 'NoteItem';
 | 
					  NoteItem.displayName = 'NoteItem';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,24 +30,6 @@
 | 
				
			|||||||
    --chart-3: 197 37% 24%;
 | 
					    --chart-3: 197 37% 24%;
 | 
				
			||||||
    --chart-4: 43 74% 66%;
 | 
					    --chart-4: 43 74% 66%;
 | 
				
			||||||
    --chart-5: 27 87% 67%;
 | 
					    --chart-5: 27 87% 67%;
 | 
				
			||||||
    --expo-out: linear(
 | 
					 | 
				
			||||||
      0 0%,
 | 
					 | 
				
			||||||
      0.1684 2.66%,
 | 
					 | 
				
			||||||
      0.3165 5.49%,
 | 
					 | 
				
			||||||
      0.446 8.52%,
 | 
					 | 
				
			||||||
      0.5581 11.78%,
 | 
					 | 
				
			||||||
      0.6535 15.29%,
 | 
					 | 
				
			||||||
      0.7341 19.11%,
 | 
					 | 
				
			||||||
      0.8011 23.3%,
 | 
					 | 
				
			||||||
      0.8557 27.93%,
 | 
					 | 
				
			||||||
      0.8962 32.68%,
 | 
					 | 
				
			||||||
      0.9283 38.01%,
 | 
					 | 
				
			||||||
      0.9529 44.08%,
 | 
					 | 
				
			||||||
      0.9711 51.14%,
 | 
					 | 
				
			||||||
      0.9833 59.06%,
 | 
					 | 
				
			||||||
      0.9915 68.74%,
 | 
					 | 
				
			||||||
      1 100%
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ::selection {
 | 
					  ::selection {
 | 
				
			||||||
@@ -81,42 +63,6 @@
 | 
				
			|||||||
    --chart-4: 280 65% 60%;
 | 
					    --chart-4: 280 65% 60%;
 | 
				
			||||||
    --chart-5: 340 75% 55%;
 | 
					    --chart-5: 340 75% 55%;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					 | 
				
			||||||
  ::view-transition-group(root) {
 | 
					 | 
				
			||||||
    animation-duration: 0.7bun s;
 | 
					 | 
				
			||||||
    animation-timing-function: var(--expo-out);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  ::view-transition-new(root) {
 | 
					 | 
				
			||||||
    animation-name: reveal-light;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  ::view-transition-old(root),
 | 
					 | 
				
			||||||
  .dark::view-transition-old(root) {
 | 
					 | 
				
			||||||
    animation: none;
 | 
					 | 
				
			||||||
    z-index: -1;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .dark::view-transition-new(root) {
 | 
					 | 
				
			||||||
    animation-name: reveal-dark;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @keyframes reveal-dark {
 | 
					 | 
				
			||||||
    from {
 | 
					 | 
				
			||||||
      clip-path: polygon(50% -71%, -50% 71%, -50% 71%, 50% -71%);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    to {
 | 
					 | 
				
			||||||
      clip-path: polygon(50% -71%, -50% 71%, 50% 171%, 171% 50%);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  @keyframes reveal-light {
 | 
					 | 
				
			||||||
    from {
 | 
					 | 
				
			||||||
      clip-path: polygon(171% 50%, 50% 171%, 50% 171%, 171% 50%);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    to {
 | 
					 | 
				
			||||||
      clip-path: polygon(171% 50%, 50% 171%, -50% 71%, 50% -71%);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@layer base {
 | 
					@layer base {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -80,7 +80,7 @@ else
 | 
				
			|||||||
  cd ./nginx-proxy-manager-${RELEASE}
 | 
					  cd ./nginx-proxy-manager-${RELEASE}
 | 
				
			||||||
  msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}"
 | 
					  msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
msg_info "Setting up Enviroment"
 | 
					msg_info "Setting up Environment"
 | 
				
			||||||
ln -sf /usr/bin/python3 /usr/bin/python
 | 
					ln -sf /usr/bin/python3 /usr/bin/python
 | 
				
			||||||
ln -sf /usr/bin/certbot /opt/certbot/bin/certbot
 | 
					ln -sf /usr/bin/certbot /opt/certbot/bin/certbot
 | 
				
			||||||
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
 | 
					ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,7 +35,7 @@ cat <<EOF >/etc/postgresql/17/main/pg_hba.conf
 | 
				
			|||||||
local   all             postgres                                peer
 | 
					local   all             postgres                                peer
 | 
				
			||||||
# TYPE  DATABASE        USER            ADDRESS                 METHOD
 | 
					# TYPE  DATABASE        USER            ADDRESS                 METHOD
 | 
				
			||||||
# "local" is for Unix domain socket connections only
 | 
					# "local" is for Unix domain socket connections only
 | 
				
			||||||
local   all             all                                     peer
 | 
					local   all             all                                     md5
 | 
				
			||||||
# IPv4 local connections:
 | 
					# IPv4 local connections:
 | 
				
			||||||
host    all             all             127.0.0.1/32            scram-sha-256
 | 
					host    all             all             127.0.0.1/32            scram-sha-256
 | 
				
			||||||
host    all             all             0.0.0.0/24              md5
 | 
					host    all             all             0.0.0.0/24              md5
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,8 +9,8 @@
 | 
				
			|||||||
    "updateable": true,
 | 
					    "updateable": true,
 | 
				
			||||||
    "privileged": false,
 | 
					    "privileged": false,
 | 
				
			||||||
    "interface_port": 3000,
 | 
					    "interface_port": 3000,
 | 
				
			||||||
    "documentation": "https://gethomepage.dev/latest/configs/",
 | 
					    "documentation": "https://gethomepage.dev/configs/",
 | 
				
			||||||
    "website": "https://github.com/benphelps/homepage",
 | 
					    "website": "https://gethomepage.dev",
 | 
				
			||||||
    "logo": "https://avatars.githubusercontent.com/u/122929872?v=4",
 | 
					    "logo": "https://avatars.githubusercontent.com/u/122929872?v=4",
 | 
				
			||||||
    "description": "Homepage is a self-hosted dashboard solution for centralizing and organizing data and information.",
 | 
					    "description": "Homepage is a self-hosted dashboard solution for centralizing and organizing data and information.",
 | 
				
			||||||
    "install_methods": [
 | 
					    "install_methods": [
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,7 @@
 | 
				
			|||||||
    "install_methods": [
 | 
					    "install_methods": [
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        "type": "default",
 | 
					        "type": "default",
 | 
				
			||||||
        "script": "/ct/onedev.sh",
 | 
					        "script": "ct/onedev.sh",
 | 
				
			||||||
        "resources": {
 | 
					        "resources": {
 | 
				
			||||||
          "cpu": 2,
 | 
					          "cpu": 2,
 | 
				
			||||||
          "ram": 2048,
 | 
					          "ram": 2048,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user