Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link href="libs/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<title>PiOSK</title>
</head>
Expand Down Expand Up @@ -68,8 +68,8 @@ <h1 class="my-1">Pi<span class="bg-danger mx-1 px-1 rounded">OSK</span></h1>
<div class="alert alert-danger m-4" role="alert"></div>
</template>

<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<script src="libs/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<script src="libs/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
Comment on lines +71 to +72
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integrity hashes will fail when loading local files since they were calculated for the original CDN versions. Remove the integrity attributes or update them to match the downloaded files' hashes.

Copilot uses AI. Check for mistakes.

<script src="script.js"></script>
<script src="ui.js"></script>
Expand Down
24 changes: 23 additions & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand All @@ -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/[email protected]/dist/js/"
"bootstrap.min.css|https://cdn.jsdelivr.net/npm/[email protected]/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
Expand Down