-
-
Notifications
You must be signed in to change notification settings - Fork 33
Local js/css scripts #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
marcogruhl
wants to merge
4
commits into
debloper:main
Choose a base branch
from
marcogruhl:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Local js/css scripts #115
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
|
|
@@ -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> | ||
|
|
||
| <script src="script.js"></script> | ||
| <script src="ui.js"></script> | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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/[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}" | ||
marcogruhl marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # --- Configuration Setup --- | ||
| echo -e "${INFO}Restoring configurations...${RESET}" | ||
| if [ ! -f /opt/piosk/config.json ]; then | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.