diff --git a/dashboard/index.html b/dashboard/index.html index 0b16999..c70b45b 100644 --- a/dashboard/index.html +++ b/dashboard/index.html @@ -4,7 +4,7 @@ - + PiOSK @@ -68,8 +68,8 @@

PiOSK

- - + + diff --git a/scripts/setup.sh b/scripts/setup.sh index f1cf1f2..7b8e4ee 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -94,7 +94,6 @@ esac echo -e "${DEBUG}Architecture: '$ARCH', Binary: '$BINARY_NAME'${RESET}" - DOWNLOAD_URL="https://github.com/debloper/piosk/releases/download/$LATEST_RELEASE/$BINARY_NAME.tar.gz" echo -e "${INFO}Downloading from: $DOWNLOAD_URL${RESET}" @@ -107,6 +106,29 @@ chmod +x "$BINARY_NAME" mv "$BINARY_NAME" piosk echo -e "${SUCCESS}PiOSK binary downloaded successfully.${RESET}" +# --- JS/CSS Download --- + +FILES=( + "jquery-3.7.1.min.js|https://code.jquery.com/" + "bootstrap.bundle.min.js|https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/" + "bootstrap.min.css|https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/" +) + +mkdir -p "$PIOSK_DIR/dashboard/libs" + +for entry in "${FILES[@]}"; do + FILE="${entry%%|*}" + URL="${entry#*|}${FILE}" + echo -e "${INFO}Downloading from: $URL${RESET}" + + if ! curl -fL --progress-bar "$URL" -o "$PIOSK_DIR/dashboard/libs/$FILE"; then + echo -e "${ERROR}Failed to download $URL.${RESET}" + exit 1 + fi +done + +echo -e "${SUCCESS}External scripts downloaded successfully.${RESET}" + # --- Configuration Setup --- echo -e "${INFO}Restoring configurations...${RESET}" if [ ! -f /opt/piosk/config.json ]; then