From ed902061141a7c84c9e3facb9ceee8dd3f0decba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 13:25:49 +0000 Subject: [PATCH 01/63] Bump bootstrap-vue-next from 0.10.8 to 0.13.2 Bumps [bootstrap-vue-next](https://github.com/bootstrap-vue-next/bootstrap-vue-next/tree/HEAD/packages/bootstrap-vue-next) from 0.10.8 to 0.13.2. - [Release notes](https://github.com/bootstrap-vue-next/bootstrap-vue-next/releases) - [Changelog](https://github.com/bootstrap-vue-next/bootstrap-vue-next/blob/main/packages/bootstrap-vue-next/CHANGELOG.md) - [Commits](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commits/nuxt-v0.13.2/packages/bootstrap-vue-next) --- updated-dependencies: - dependency-name: bootstrap-vue-next dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 86 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/package-lock.json b/package-lock.json index 21ee177..3d46c4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@popperjs/core": "^2.11.8", "animate.css": "^4.1.1", "axios": "^1.4.0", - "bootstrap-vue-next": "^0.10.8", + "bootstrap-vue-next": "^0.13.2", "copy-webpack-plugin": "^11.0.0", "core-js": "^3.32.2", "esp-web-tools": "^9.4.0", @@ -2937,13 +2937,13 @@ "integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==" }, "node_modules/@vueuse/core": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.3.0.tgz", - "integrity": "sha512-BEM5yxcFKb5btFjTSAFjTu5jmwoW66fyV9uJIP4wUXXU8aR5Hl44gndaaXp7dC5HSObmgbnR2RN+Un1p68Mf5Q==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.4.1.tgz", + "integrity": "sha512-DkHIfMIoSIBjMgRRvdIvxsyboRZQmImofLyOHADqiVbQVilP8VVHDhBX2ZqoItOgu7dWa8oXiNnScOdPLhdEXg==", "dependencies": { "@types/web-bluetooth": "^0.0.17", - "@vueuse/metadata": "10.3.0", - "@vueuse/shared": "10.3.0", + "@vueuse/metadata": "10.4.1", + "@vueuse/shared": "10.4.1", "vue-demi": ">=0.14.5" }, "funding": { @@ -2951,9 +2951,9 @@ } }, "node_modules/@vueuse/core/node_modules/vue-demi": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz", - "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", "hasInstallScript": true, "bin": { "vue-demi-fix": "bin/vue-demi-fix.js", @@ -2976,17 +2976,17 @@ } }, "node_modules/@vueuse/metadata": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.3.0.tgz", - "integrity": "sha512-Ema3YhNOa4swDsV0V7CEY5JXvK19JI/o1szFO1iWxdFg3vhdFtCtSTP26PCvbUpnUtNHBY2wx5y3WDXND5Pvnw==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.4.1.tgz", + "integrity": "sha512-2Sc8X+iVzeuMGHr6O2j4gv/zxvQGGOYETYXEc41h0iZXIRnRbJZGmY/QP8dvzqUelf8vg0p/yEA5VpCEu+WpZg==", "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/shared": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.3.0.tgz", - "integrity": "sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.4.1.tgz", + "integrity": "sha512-vz5hbAM4qA0lDKmcr2y3pPdU+2EVw/yzfRsBdu+6+USGa4PxqSQRYIUC9/NcT06y+ZgaTsyURw2I9qOFaaXHAg==", "dependencies": { "vue-demi": ">=0.14.5" }, @@ -2995,9 +2995,9 @@ } }, "node_modules/@vueuse/shared/node_modules/vue-demi": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz", - "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", "hasInstallScript": true, "bin": { "vue-demi-fix": "bin/vue-demi-fix.js", @@ -3619,12 +3619,12 @@ } }, "node_modules/bootstrap-vue-next": { - "version": "0.10.8", - "resolved": "https://registry.npmjs.org/bootstrap-vue-next/-/bootstrap-vue-next-0.10.8.tgz", - "integrity": "sha512-mpF36hzqkq7Qg35ABlBU9t6GUOv6ehNMxHEQSN4Bw5r5KQlnB72z57vNPs8UkwdcYPW8G/fc2fc8PApeJn7Hxg==", + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/bootstrap-vue-next/-/bootstrap-vue-next-0.13.2.tgz", + "integrity": "sha512-9kIAxdqNWWx40p8mEI4g8HZ3zNWM8i9sxVyn3dl4fN/yuL0d0NslZ9On9QD4dM0cz/d3owqzKztYFLb9HcaXcQ==", "dependencies": { "@floating-ui/vue": "^1.0.2", - "@vueuse/core": "^10.2.1" + "@vueuse/core": "^10.4.1" }, "funding": { "type": "opencollective", @@ -10855,41 +10855,41 @@ "integrity": "sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==" }, "@vueuse/core": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.3.0.tgz", - "integrity": "sha512-BEM5yxcFKb5btFjTSAFjTu5jmwoW66fyV9uJIP4wUXXU8aR5Hl44gndaaXp7dC5HSObmgbnR2RN+Un1p68Mf5Q==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.4.1.tgz", + "integrity": "sha512-DkHIfMIoSIBjMgRRvdIvxsyboRZQmImofLyOHADqiVbQVilP8VVHDhBX2ZqoItOgu7dWa8oXiNnScOdPLhdEXg==", "requires": { "@types/web-bluetooth": "^0.0.17", - "@vueuse/metadata": "10.3.0", - "@vueuse/shared": "10.3.0", + "@vueuse/metadata": "10.4.1", + "@vueuse/shared": "10.4.1", "vue-demi": ">=0.14.5" }, "dependencies": { "vue-demi": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz", - "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", "requires": {} } } }, "@vueuse/metadata": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.3.0.tgz", - "integrity": "sha512-Ema3YhNOa4swDsV0V7CEY5JXvK19JI/o1szFO1iWxdFg3vhdFtCtSTP26PCvbUpnUtNHBY2wx5y3WDXND5Pvnw==" + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.4.1.tgz", + "integrity": "sha512-2Sc8X+iVzeuMGHr6O2j4gv/zxvQGGOYETYXEc41h0iZXIRnRbJZGmY/QP8dvzqUelf8vg0p/yEA5VpCEu+WpZg==" }, "@vueuse/shared": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.3.0.tgz", - "integrity": "sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.4.1.tgz", + "integrity": "sha512-vz5hbAM4qA0lDKmcr2y3pPdU+2EVw/yzfRsBdu+6+USGa4PxqSQRYIUC9/NcT06y+ZgaTsyURw2I9qOFaaXHAg==", "requires": { "vue-demi": ">=0.14.5" }, "dependencies": { "vue-demi": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.5.tgz", - "integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", "requires": {} } } @@ -11358,12 +11358,12 @@ "requires": {} }, "bootstrap-vue-next": { - "version": "0.10.8", - "resolved": "https://registry.npmjs.org/bootstrap-vue-next/-/bootstrap-vue-next-0.10.8.tgz", - "integrity": "sha512-mpF36hzqkq7Qg35ABlBU9t6GUOv6ehNMxHEQSN4Bw5r5KQlnB72z57vNPs8UkwdcYPW8G/fc2fc8PApeJn7Hxg==", + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/bootstrap-vue-next/-/bootstrap-vue-next-0.13.2.tgz", + "integrity": "sha512-9kIAxdqNWWx40p8mEI4g8HZ3zNWM8i9sxVyn3dl4fN/yuL0d0NslZ9On9QD4dM0cz/d3owqzKztYFLb9HcaXcQ==", "requires": { "@floating-ui/vue": "^1.0.2", - "@vueuse/core": "^10.2.1" + "@vueuse/core": "^10.4.1" } }, "brace-expansion": { diff --git a/package.json b/package.json index cff9649..3872f14 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@popperjs/core": "^2.11.8", "animate.css": "^4.1.1", "axios": "^1.4.0", - "bootstrap-vue-next": "^0.10.8", + "bootstrap-vue-next": "^0.13.2", "copy-webpack-plugin": "^11.0.0", "core-js": "^3.32.2", "esp-web-tools": "^9.4.0", From aead00a21aa179eb9e3107bfddf40fb6547458e6 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Tue, 19 Sep 2023 13:51:45 +0200 Subject: [PATCH 02/63] Add node_modules to cache --- .github/workflows/ci-master.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 8f9cff7..bc7267f 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -34,6 +34,7 @@ jobs: with: path: | ~/.npm + ~/node_modules key: npm-${{ hashFiles('package-lock.json') }} restore-keys: npm- From a3e7458fd0750b8af11b9038e2e76a379b62cadd Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Tue, 19 Sep 2023 13:55:22 +0200 Subject: [PATCH 03/63] Fix npm not installing dev dependencies in CI --- .github/workflows/ci-develop.yml | 2 +- .github/workflows/ci-master.yml | 2 +- .github/workflows/push-tag.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index aa89037..ea5a344 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -38,7 +38,7 @@ jobs: restore-keys: npm- - name: Install dependencies - run: npm install --development + run: npm install --save-dev - name: Build run: npm run build --if-present diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index bc7267f..7918b31 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -39,7 +39,7 @@ jobs: restore-keys: npm- - name: Install dependencies - run: npm install --development + run: npm install --save-dev - name: Build run: npm run build --if-present diff --git a/.github/workflows/push-tag.yml b/.github/workflows/push-tag.yml index 365d6de..17f1c8f 100644 --- a/.github/workflows/push-tag.yml +++ b/.github/workflows/push-tag.yml @@ -34,7 +34,7 @@ jobs: restore-keys: npm- - name: Install dependencies - run: npm install --development + run: npm install --save-dev - name: Build run: npm run build --if-present From 9b7785c02e8d7ed8c0842f462f971ce688ac58a6 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Tue, 19 Sep 2023 13:59:14 +0200 Subject: [PATCH 04/63] Fix NODE_ENV=production messing up npm install --- .github/workflows/ci-develop.yml | 2 +- .github/workflows/ci-master.yml | 4 +++- .github/workflows/push-tag.yml | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index ea5a344..3a4e381 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -38,7 +38,7 @@ jobs: restore-keys: npm- - name: Install dependencies - run: npm install --save-dev + run: npm install - name: Build run: npm run build --if-present diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 7918b31..14e81cf 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -39,7 +39,9 @@ jobs: restore-keys: npm- - name: Install dependencies - run: npm install --save-dev + run: npm install --production=false + # ^ + # This is necessary since NODE_ENV=production, but we need dev dependencies to build. - name: Build run: npm run build --if-present diff --git a/.github/workflows/push-tag.yml b/.github/workflows/push-tag.yml index 17f1c8f..fdc5ac2 100644 --- a/.github/workflows/push-tag.yml +++ b/.github/workflows/push-tag.yml @@ -34,7 +34,9 @@ jobs: restore-keys: npm- - name: Install dependencies - run: npm install --save-dev + run: npm install --production=false + # ^ + # This is necessary since NODE_ENV=production, but we need dev dependencies to build. - name: Build run: npm run build --if-present From 1353530e914142774ecc1bbdfb5c72f3b0196166 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Tue, 19 Sep 2023 14:06:18 +0200 Subject: [PATCH 05/63] Remove old incomplete comments --- .github/workflows/ci-develop.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index 3a4e381..8dbbb41 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -81,9 +81,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - # - Tag as 'master' when master branch is pushed - # - Tag as pr-{n} when a PR is created - # - - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 From 1cf36587fe7cef588ae14cfaa1b1c395277e8547 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Tue, 19 Sep 2023 14:09:58 +0200 Subject: [PATCH 06/63] Fix capitalization in github.event_name reference --- .github/workflows/ci-develop.yml | 2 +- .github/workflows/ci-master.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index 8dbbb41..769f7b9 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -95,6 +95,6 @@ jobs: uses: docker/build-push-action@v5 with: context: . - push: ${{ github.event_Name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 14e81cf..3a70fa6 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -101,6 +101,6 @@ jobs: uses: docker/build-push-action@v5 with: context: . - push: ${{ github.event_Name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 5cb3da2ec3515e1e7d5ba9b3ec0895bcc3ab0bbc Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Tue, 19 Sep 2023 14:10:47 +0200 Subject: [PATCH 07/63] Remove more partial comments --- .github/workflows/ci-master.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 3a70fa6..405728e 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -84,9 +84,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - # - Tag as 'master' when master branch is pushed - # - Tag as pr-{n} when a PR is created - # - - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 From 80f62b15a25289ed7f3edb6eafee7414b2b3d736 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Tue, 19 Sep 2023 14:38:36 +0200 Subject: [PATCH 08/63] Skip root directory when zipping artifacts --- .github/workflows/ci-develop.yml | 8 ++++---- .github/workflows/ci-master.yml | 8 ++++---- .github/workflows/push-tag.yml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index 769f7b9..a8e149b 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -43,10 +43,10 @@ jobs: - name: Build run: npm run build --if-present - - name: Compress the artifact - run: zip -r ${{ env.ARTIFACT_NAME }} dist + - name: Compress internal artifacts + run: cd dist && zip -r ${{ env.ARTIFACT_NAME }} . - - name: Upload artifact + - name: Upload internal artifacts uses: actions/upload-artifact@v3 with: name: ${{ env.ARTIFACT_NAME }} @@ -63,7 +63,7 @@ jobs: sparse-checkout: | Dockerfile - - name: Download artifacts + - name: Download internal artifacts uses: actions/download-artifact@v3 with: name: ${{ env.ARTIFACT_NAME }} diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 405728e..d51e06a 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -46,10 +46,10 @@ jobs: - name: Build run: npm run build --if-present - - name: Compress the artifact - run: zip -r ${{ env.ARTIFACT_NAME }} dist + - name: Compress internal artifacts + run: cd dist && zip -r ${{ env.ARTIFACT_NAME }} . - - name: Upload artifact + - name: Upload internal artifacts uses: actions/upload-artifact@v3 with: name: ${{ env.ARTIFACT_NAME }} @@ -66,7 +66,7 @@ jobs: sparse-checkout: | Dockerfile - - name: Download artifacts + - name: Download internal artifacts uses: actions/download-artifact@v3 with: name: ${{ env.ARTIFACT_NAME }} diff --git a/.github/workflows/push-tag.yml b/.github/workflows/push-tag.yml index fdc5ac2..7b4cc8e 100644 --- a/.github/workflows/push-tag.yml +++ b/.github/workflows/push-tag.yml @@ -42,7 +42,7 @@ jobs: run: npm run build --if-present - name: Compress internal artifacts - run: zip -r ${{ env.ARTIFACT_NAME }} dist + run: cd dist && zip -r ${{ env.ARTIFACT_NAME }} . - name: Upload internal artifacts uses: actions/upload-artifact@v3 From 868c4439fefb65c51820b8d6612d2865a4d69226 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Tue, 19 Sep 2023 14:41:21 +0200 Subject: [PATCH 09/63] Rename push-tag.yml to ci-tag.yml --- .github/workflows/{push-tag.yml => ci-tag.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{push-tag.yml => ci-tag.yml} (100%) diff --git a/.github/workflows/push-tag.yml b/.github/workflows/ci-tag.yml similarity index 100% rename from .github/workflows/push-tag.yml rename to .github/workflows/ci-tag.yml From eb75d5dee1b772389e755b37f83d5e095d71654a Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Tue, 19 Sep 2023 14:51:32 +0200 Subject: [PATCH 10/63] Fix internal artifact being located in wrong location --- .github/workflows/ci-develop.yml | 6 +++++- .github/workflows/ci-master.yml | 6 +++++- .github/workflows/ci-tag.yml | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index a8e149b..6cda78b 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -44,7 +44,11 @@ jobs: run: npm run build --if-present - name: Compress internal artifacts - run: cd dist && zip -r ${{ env.ARTIFACT_NAME }} . + run: | + cd dist + zip -r ${{ env.ARTIFACT_NAME }} . + cd .. + mv dist/${{ env.ARTIFACT_NAME }} . - name: Upload internal artifacts uses: actions/upload-artifact@v3 diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index d51e06a..ef858bd 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -47,7 +47,11 @@ jobs: run: npm run build --if-present - name: Compress internal artifacts - run: cd dist && zip -r ${{ env.ARTIFACT_NAME }} . + run: | + cd dist + zip -r ${{ env.ARTIFACT_NAME }} . + cd .. + mv dist/${{ env.ARTIFACT_NAME }} . - name: Upload internal artifacts uses: actions/upload-artifact@v3 diff --git a/.github/workflows/ci-tag.yml b/.github/workflows/ci-tag.yml index 7b4cc8e..c9798fe 100644 --- a/.github/workflows/ci-tag.yml +++ b/.github/workflows/ci-tag.yml @@ -42,7 +42,11 @@ jobs: run: npm run build --if-present - name: Compress internal artifacts - run: cd dist && zip -r ${{ env.ARTIFACT_NAME }} . + run: | + cd dist + zip -r ${{ env.ARTIFACT_NAME }} . + cd .. + mv dist/${{ env.ARTIFACT_NAME }} . - name: Upload internal artifacts uses: actions/upload-artifact@v3 From b413b83c2ed71fdd52c83e1fb784117f2afb6116 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Tue, 19 Sep 2023 15:08:38 +0200 Subject: [PATCH 11/63] Rename push-tag workflow name to ci-tag --- .github/workflows/ci-tag.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-tag.yml b/.github/workflows/ci-tag.yml index c9798fe..196fc2c 100644 --- a/.github/workflows/ci-tag.yml +++ b/.github/workflows/ci-tag.yml @@ -3,7 +3,7 @@ on: tags: - 'v*' -name: push-tag +name: ci-tag # REGISTRY and IMAGE_NAME are for building and tagging the container. # TARGET_ENV is used by Webpack to determine the build target. From 42c9b1a7d73cce71de7ccee8cfba0db6ff0218af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 13:12:21 +0000 Subject: [PATCH 12/63] Bump postcss from 8.4.29 to 8.4.30 Bumps [postcss](https://github.com/postcss/postcss) from 8.4.29 to 8.4.30. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.29...8.4.30) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 391fa04..a7f3612 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,7 +46,7 @@ "file-loader": "^6.2.0", "html-webpack-plugin": "^5.5.3", "mini-css-extract-plugin": "^2.7.6", - "postcss": "^8.4.29", + "postcss": "^8.4.30", "postcss-loader": "^7.3.3", "sass": "^1.66.1", "sass-loader": "^13.3.2", @@ -6577,9 +6577,9 @@ } }, "node_modules/postcss": { - "version": "8.4.29", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz", - "integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==", + "version": "8.4.30", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.30.tgz", + "integrity": "sha512-7ZEao1g4kd68l97aWG/etQKPKq07us0ieSZ2TnFDk11i0ZfDW2AwKHYU8qv4MZKqN2fdBfg+7q0ES06UA73C1g==", "funding": [ { "type": "opencollective", @@ -13541,9 +13541,9 @@ } }, "postcss": { - "version": "8.4.29", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.29.tgz", - "integrity": "sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==", + "version": "8.4.30", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.30.tgz", + "integrity": "sha512-7ZEao1g4kd68l97aWG/etQKPKq07us0ieSZ2TnFDk11i0ZfDW2AwKHYU8qv4MZKqN2fdBfg+7q0ES06UA73C1g==", "requires": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", diff --git a/package.json b/package.json index 154e60a..a751cd6 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "file-loader": "^6.2.0", "html-webpack-plugin": "^5.5.3", "mini-css-extract-plugin": "^2.7.6", - "postcss": "^8.4.29", + "postcss": "^8.4.30", "postcss-loader": "^7.3.3", "sass": "^1.66.1", "sass-loader": "^13.3.2", From 5d02c3199e1e27950bb9bd3f5880080553320aff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 13:12:35 +0000 Subject: [PATCH 13/63] Bump bootstrap from 5.3.1 to 5.3.2 Bumps [bootstrap](https://github.com/twbs/bootstrap) from 5.3.1 to 5.3.2. - [Release notes](https://github.com/twbs/bootstrap/releases) - [Commits](https://github.com/twbs/bootstrap/compare/v5.3.1...v5.3.2) --- updated-dependencies: - dependency-name: bootstrap dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 391fa04..5d0602a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "@fortawesome/free-solid-svg-icons": "^6.4.2", "autoprefixer": "^10.4.15", "babel-loader": "^9.1.3", - "bootstrap": "^5.3.1", + "bootstrap": "^5.3.2", "clean-webpack-plugin": "^4.0.0", "css-loader": "5.2.7", "file-loader": "^6.2.0", @@ -3600,9 +3600,9 @@ "dev": true }, "node_modules/bootstrap": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.1.tgz", - "integrity": "sha512-jzwza3Yagduci2x0rr9MeFSORjcHpt0lRZukZPZQJT1Dth5qzV7XcgGqYzi39KGAVYR8QEDVoO0ubFKOxzMG+g==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.2.tgz", + "integrity": "sha512-D32nmNWiQHo94BKHLmOrdjlL05q1c8oxbtBphQFb9Z5to6eGRDCm0QgeaZ4zFBHzfg2++rqa2JkqCcxDy0sH0g==", "dev": true, "funding": [ { @@ -11351,9 +11351,9 @@ "dev": true }, "bootstrap": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.1.tgz", - "integrity": "sha512-jzwza3Yagduci2x0rr9MeFSORjcHpt0lRZukZPZQJT1Dth5qzV7XcgGqYzi39KGAVYR8QEDVoO0ubFKOxzMG+g==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.2.tgz", + "integrity": "sha512-D32nmNWiQHo94BKHLmOrdjlL05q1c8oxbtBphQFb9Z5to6eGRDCm0QgeaZ4zFBHzfg2++rqa2JkqCcxDy0sH0g==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index 154e60a..a86ec16 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@fortawesome/free-solid-svg-icons": "^6.4.2", "autoprefixer": "^10.4.15", "babel-loader": "^9.1.3", - "bootstrap": "^5.3.1", + "bootstrap": "^5.3.2", "clean-webpack-plugin": "^4.0.0", "css-loader": "5.2.7", "file-loader": "^6.2.0", From dc24a12dc74853e08adc2662b2cc1491e096ed8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 13:12:48 +0000 Subject: [PATCH 14/63] Bump sass from 1.66.1 to 1.67.0 Bumps [sass](https://github.com/sass/dart-sass) from 1.66.1 to 1.67.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.66.1...1.67.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 391fa04..223eae1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "mini-css-extract-plugin": "^2.7.6", "postcss": "^8.4.29", "postcss-loader": "^7.3.3", - "sass": "^1.66.1", + "sass": "^1.67.0", "sass-loader": "^13.3.2", "style-loader": "^3.3.3", "url-loader": "^4.1.1", @@ -7131,9 +7131,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.66.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.66.1.tgz", - "integrity": "sha512-50c+zTsZOJVgFfTgwwEzkjA3/QACgdNsKueWPyAR0mRINIvLAStVQBbPg14iuqEQ74NPDbXzJARJ/O4SI1zftA==", + "version": "1.67.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.67.0.tgz", + "integrity": "sha512-SVrO9ZeX/QQyEGtuZYCVxoeAL5vGlYjJ9p4i4HFuekWl8y/LtJ7tJc10Z+ck1c8xOuoBm2MYzcLfTAffD0pl/A==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -13927,9 +13927,9 @@ "dev": true }, "sass": { - "version": "1.66.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.66.1.tgz", - "integrity": "sha512-50c+zTsZOJVgFfTgwwEzkjA3/QACgdNsKueWPyAR0mRINIvLAStVQBbPg14iuqEQ74NPDbXzJARJ/O4SI1zftA==", + "version": "1.67.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.67.0.tgz", + "integrity": "sha512-SVrO9ZeX/QQyEGtuZYCVxoeAL5vGlYjJ9p4i4HFuekWl8y/LtJ7tJc10Z+ck1c8xOuoBm2MYzcLfTAffD0pl/A==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/package.json b/package.json index 154e60a..b05c90b 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "mini-css-extract-plugin": "^2.7.6", "postcss": "^8.4.29", "postcss-loader": "^7.3.3", - "sass": "^1.66.1", + "sass": "^1.67.0", "sass-loader": "^13.3.2", "style-loader": "^3.3.3", "url-loader": "^4.1.1", From 5eb461e81139196dcac32c650827e564e88b25e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 13:13:01 +0000 Subject: [PATCH 15/63] Bump @microsoft/signalr from 7.0.10 to 7.0.11 Bumps [@microsoft/signalr](https://github.com/dotnet/aspnetcore) from 7.0.10 to 7.0.11. - [Release notes](https://github.com/dotnet/aspnetcore/releases) - [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md) - [Commits](https://github.com/dotnet/aspnetcore/compare/v7.0.10...v7.0.11) --- updated-dependencies: - dependency-name: "@microsoft/signalr" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 391fa04..df58b7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@fontsource/poppins": "^4.5.10", "@imengyu/vue3-context-menu": "^1.3.3", - "@microsoft/signalr": "^7.0.10", + "@microsoft/signalr": "^7.0.11", "@popperjs/core": "^2.11.8", "animate.css": "^4.1.1", "axios": "^1.4.0", @@ -2561,9 +2561,9 @@ } }, "node_modules/@microsoft/signalr": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/@microsoft/signalr/-/signalr-7.0.10.tgz", - "integrity": "sha512-tOEn32i5EatAx4sZbzmLgcBc2VbKQmx+F4rI2/Ioq2MnBaYcFxbDzOoZgISIS4IR9H1ij/sKoU8zQOAFC8GJKg==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@microsoft/signalr/-/signalr-7.0.11.tgz", + "integrity": "sha512-//6ipnYKhHf2MJgM+MQSlgB5L/pcYeZ+v4w6YAr4epRM1iSDQ6WjUkCVX2ZMxcY06XGlLzggs3Z9ZIcL9ws9KQ==", "dependencies": { "abort-controller": "^3.0.0", "eventsource": "^2.0.2", @@ -10507,9 +10507,9 @@ } }, "@microsoft/signalr": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/@microsoft/signalr/-/signalr-7.0.10.tgz", - "integrity": "sha512-tOEn32i5EatAx4sZbzmLgcBc2VbKQmx+F4rI2/Ioq2MnBaYcFxbDzOoZgISIS4IR9H1ij/sKoU8zQOAFC8GJKg==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@microsoft/signalr/-/signalr-7.0.11.tgz", + "integrity": "sha512-//6ipnYKhHf2MJgM+MQSlgB5L/pcYeZ+v4w6YAr4epRM1iSDQ6WjUkCVX2ZMxcY06XGlLzggs3Z9ZIcL9ws9KQ==", "requires": { "abort-controller": "^3.0.0", "eventsource": "^2.0.2", diff --git a/package.json b/package.json index 154e60a..6f7457c 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "dependencies": { "@fontsource/poppins": "^4.5.10", "@imengyu/vue3-context-menu": "^1.3.3", - "@microsoft/signalr": "^7.0.10", + "@microsoft/signalr": "^7.0.11", "@popperjs/core": "^2.11.8", "animate.css": "^4.1.1", "axios": "^1.4.0", From 3a5b58927504bd4166ae06fbddf0d962b533b57a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 08:42:01 +0000 Subject: [PATCH 16/63] Bump bootstrap-vue-next from 0.13.2 to 0.13.3 Bumps [bootstrap-vue-next](https://github.com/bootstrap-vue-next/bootstrap-vue-next/tree/HEAD/packages/bootstrap-vue-next) from 0.13.2 to 0.13.3. - [Release notes](https://github.com/bootstrap-vue-next/bootstrap-vue-next/releases) - [Changelog](https://github.com/bootstrap-vue-next/bootstrap-vue-next/blob/main/packages/bootstrap-vue-next/CHANGELOG.md) - [Commits](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commits/nuxt-v0.13.3/packages/bootstrap-vue-next) --- updated-dependencies: - dependency-name: bootstrap-vue-next dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1f63f76..5a557d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@popperjs/core": "^2.11.8", "animate.css": "^4.1.1", "axios": "^1.4.0", - "bootstrap-vue-next": "^0.13.2", + "bootstrap-vue-next": "^0.13.3", "copy-webpack-plugin": "^11.0.0", "core-js": "^3.32.2", "esp-web-tools": "^9.4.0", @@ -3619,9 +3619,9 @@ } }, "node_modules/bootstrap-vue-next": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/bootstrap-vue-next/-/bootstrap-vue-next-0.13.2.tgz", - "integrity": "sha512-9kIAxdqNWWx40p8mEI4g8HZ3zNWM8i9sxVyn3dl4fN/yuL0d0NslZ9On9QD4dM0cz/d3owqzKztYFLb9HcaXcQ==", + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/bootstrap-vue-next/-/bootstrap-vue-next-0.13.3.tgz", + "integrity": "sha512-cmBkLebFrTF8gBeIEmPto9SCWS9iZcxv85f2zw4uxBoT7sKFBa1/Ctvk4GHFxn5gxIA4e7hD6RRsQSTryrFQnw==", "dependencies": { "@floating-ui/vue": "^1.0.2", "@vueuse/core": "^10.4.1" @@ -11358,9 +11358,9 @@ "requires": {} }, "bootstrap-vue-next": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/bootstrap-vue-next/-/bootstrap-vue-next-0.13.2.tgz", - "integrity": "sha512-9kIAxdqNWWx40p8mEI4g8HZ3zNWM8i9sxVyn3dl4fN/yuL0d0NslZ9On9QD4dM0cz/d3owqzKztYFLb9HcaXcQ==", + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/bootstrap-vue-next/-/bootstrap-vue-next-0.13.3.tgz", + "integrity": "sha512-cmBkLebFrTF8gBeIEmPto9SCWS9iZcxv85f2zw4uxBoT7sKFBa1/Ctvk4GHFxn5gxIA4e7hD6RRsQSTryrFQnw==", "requires": { "@floating-ui/vue": "^1.0.2", "@vueuse/core": "^10.4.1" diff --git a/package.json b/package.json index c6a7c72..8201510 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@popperjs/core": "^2.11.8", "animate.css": "^4.1.1", "axios": "^1.4.0", - "bootstrap-vue-next": "^0.13.2", + "bootstrap-vue-next": "^0.13.3", "copy-webpack-plugin": "^11.0.0", "core-js": "^3.32.2", "esp-web-tools": "^9.4.0", From dbba95665c0673eda38fbb592c46172163d2a12f Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Wed, 20 Sep 2023 11:26:06 +0200 Subject: [PATCH 17/63] Improve README --- README.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ed9f1de..eb59c72 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,68 @@ # ShockLink WebUI -Frontend written in JavaScript and Vue 3. +This is the ShockLink Web UI. It is a single-page application that communicates with the [ShockLink API](https://github.com/Shock-Link/API). It is written using JavaScript and SCSS using the Vue 3 framework. + +## Contents + +- [Deployment](#deployment) + - [Using Docker](#using-docker) + - [Using `docker-compose`](#using-docker-compose) +- [Development](#development) + - [Dependencies](#dependencies) + - [Development](#development-1) + - [Build](#build) + - [Support](#support) + +# Configuring + +The [shocklink-webui](https://github.com/Shock-Link/WebUI/pkgs/container/shocklink-webui) container unfortunately does not support any configuration beyond nginx configuration, as it is currently based on `nginx:alpine`. + +If you wish to change the API that the WebUI communicates with, locally modify the [configuration file](src/globals/config/config.production.js) and build the container manually. + +# Deployment + +This documentation describes how to self-host the WebUI container. This might not be of interest to you if you are content using [ShockLink.net](https://shocklink.net). + +## Using Docker + +```bash +$ docker run \ + -p 80:80/tcp \ + --name shocklink-webui \ + ghcr.io/shocklink/shocklink-webui:latest +``` + +## Using `docker-compose` +At the time of writing, the [ShockLink API](https://github.com/Shock-Link/API) is not yet readily available. This example contains **only** the WebUI. + +```yml +version: '3.9' + +services: + webui: + image: ghcr.io/shock-link/shocklink-webui:latest + container_name: shocklink-webui + ports: + - "80:80/tcp" +``` + +# Development +Contributions are welcome! We're eager to see what you come up with. Make sure to [join us on Discord]() ## Dependencies -Needed: -- NodeJs 17.9.1 or newer. -Recommended: -- VSCode -- Web- or PhpStorm +To get started with development, you will need the following things: +- NodeJs 17.9.1 or newer. +- An IDE or editor: + - VSCode + - Web- or PhpStorm ## Development -To start a local development server, use the command `npm run start`. +To start a local development server, check out the repository and run the command `npm run start`. ## Build -To make a production ready build, use the comman `npm run build`. -This will output static web files to `./dist/` which can be deployed on prettymuch any webserver. +To make a production ready build, use the command `npm run build`. +This will output static web files to `./dist/` which can be deployed on pretty much any webserver. This also works for cloudflare pages auto build pipeline. From 97cd803528dab6f063371b9ba23420f1460378d4 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Wed, 20 Sep 2023 11:41:09 +0200 Subject: [PATCH 18/63] Add missing Discord link to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb59c72..ace2563 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ services: ``` # Development -Contributions are welcome! We're eager to see what you come up with. Make sure to [join us on Discord]() +Contributions are welcome! We're eager to see what you come up with. Make sure to [join us on Discord](https://discord.gg/AHcCbXbEcF). ## Dependencies From ae65fd609330897c206c791b2e732fdbd700b326 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Wed, 20 Sep 2023 11:49:58 +0200 Subject: [PATCH 19/63] Add missing 'Configuration' TOC entry to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ace2563..c7909e3 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ This is the ShockLink Web UI. It is a single-page application that communicates ## Contents +- [Configuring](#configuring) - [Deployment](#deployment) - [Using Docker](#using-docker) - [Using `docker-compose`](#using-docker-compose) From 9a17b75b25661f11036fe357c891a48736828def Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 13:45:37 +0000 Subject: [PATCH 20/63] Bump sass from 1.67.0 to 1.68.0 Bumps [sass](https://github.com/sass/dart-sass) from 1.67.0 to 1.68.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.67.0...1.68.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a557d7..c1f24b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "mini-css-extract-plugin": "^2.7.6", "postcss": "^8.4.30", "postcss-loader": "^7.3.3", - "sass": "^1.67.0", + "sass": "^1.68.0", "sass-loader": "^13.3.2", "style-loader": "^3.3.3", "url-loader": "^4.1.1", @@ -7131,9 +7131,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.67.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.67.0.tgz", - "integrity": "sha512-SVrO9ZeX/QQyEGtuZYCVxoeAL5vGlYjJ9p4i4HFuekWl8y/LtJ7tJc10Z+ck1c8xOuoBm2MYzcLfTAffD0pl/A==", + "version": "1.68.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.68.0.tgz", + "integrity": "sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -13927,9 +13927,9 @@ "dev": true }, "sass": { - "version": "1.67.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.67.0.tgz", - "integrity": "sha512-SVrO9ZeX/QQyEGtuZYCVxoeAL5vGlYjJ9p4i4HFuekWl8y/LtJ7tJc10Z+ck1c8xOuoBm2MYzcLfTAffD0pl/A==", + "version": "1.68.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.68.0.tgz", + "integrity": "sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/package.json b/package.json index 8201510..a22dc25 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "mini-css-extract-plugin": "^2.7.6", "postcss": "^8.4.30", "postcss-loader": "^7.3.3", - "sass": "^1.67.0", + "sass": "^1.68.0", "sass-loader": "^13.3.2", "style-loader": "^3.3.3", "url-loader": "^4.1.1", From 58fb8e7e7c6233c0a9efae84320ed654005e66a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 13:45:53 +0000 Subject: [PATCH 21/63] Bump autoprefixer from 10.4.15 to 10.4.16 Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.15 to 10.4.16. - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/autoprefixer/compare/10.4.15...10.4.16) --- updated-dependencies: - dependency-name: autoprefixer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 48 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a557d7..770ee1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "@fortawesome/free-brands-svg-icons": "^6.4.2", "@fortawesome/free-regular-svg-icons": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.2", - "autoprefixer": "^10.4.15", + "autoprefixer": "^10.4.16", "babel-loader": "^9.1.3", "bootstrap": "^5.3.2", "clean-webpack-plugin": "^4.0.0", @@ -3396,9 +3396,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/autoprefixer": { - "version": "10.4.15", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.15.tgz", - "integrity": "sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==", + "version": "10.4.16", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz", + "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==", "dev": true, "funding": [ { @@ -3416,8 +3416,8 @@ ], "dependencies": { "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001520", - "fraction.js": "^4.2.0", + "caniuse-lite": "^1.0.30001538", + "fraction.js": "^4.3.6", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0" @@ -3733,9 +3733,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001522", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001522.tgz", - "integrity": "sha512-TKiyTVZxJGhsTszLuzb+6vUZSjVOAhClszBr2Ta2k9IwtNBT/4dzmL6aywt0HCgEZlmwJzXJd8yNiob6HgwTRg==", + "version": "1.0.30001538", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz", + "integrity": "sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==", "funding": [ { "type": "opencollective", @@ -5024,16 +5024,16 @@ } }, "node_modules/fraction.js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", - "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.6.tgz", + "integrity": "sha512-n2aZ9tNfYDwaHhvFTkhFErqOMIb8uyzSQ+vGJBjZyanAKZVbGUQ1sngfk9FdkBw7G26O7AgNjLcecLffD1c7eg==", "dev": true, "engines": { "node": "*" }, "funding": { "type": "patreon", - "url": "https://www.patreon.com/infusion" + "url": "https://github.com/sponsors/rawify" } }, "node_modules/fresh": { @@ -11197,14 +11197,14 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "autoprefixer": { - "version": "10.4.15", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.15.tgz", - "integrity": "sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==", + "version": "10.4.16", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz", + "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==", "dev": true, "requires": { "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001520", - "fraction.js": "^4.2.0", + "caniuse-lite": "^1.0.30001538", + "fraction.js": "^4.3.6", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0" @@ -11433,9 +11433,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001522", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001522.tgz", - "integrity": "sha512-TKiyTVZxJGhsTszLuzb+6vUZSjVOAhClszBr2Ta2k9IwtNBT/4dzmL6aywt0HCgEZlmwJzXJd8yNiob6HgwTRg==" + "version": "1.0.30001538", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz", + "integrity": "sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==" }, "chalk": { "version": "2.4.2", @@ -12393,9 +12393,9 @@ "dev": true }, "fraction.js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", - "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.6.tgz", + "integrity": "sha512-n2aZ9tNfYDwaHhvFTkhFErqOMIb8uyzSQ+vGJBjZyanAKZVbGUQ1sngfk9FdkBw7G26O7AgNjLcecLffD1c7eg==", "dev": true }, "fresh": { diff --git a/package.json b/package.json index 8201510..3b4606a 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@fortawesome/free-brands-svg-icons": "^6.4.2", "@fortawesome/free-regular-svg-icons": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.2", - "autoprefixer": "^10.4.15", + "autoprefixer": "^10.4.16", "babel-loader": "^9.1.3", "bootstrap": "^5.3.2", "clean-webpack-plugin": "^4.0.0", From b0b9fd6b46d64b894474506ec93f1409ec3f6e30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 13:50:22 +0000 Subject: [PATCH 22/63] Bump vue-router from 4.2.4 to 4.2.5 Bumps [vue-router](https://github.com/vuejs/router) from 4.2.4 to 4.2.5. - [Release notes](https://github.com/vuejs/router/releases) - [Commits](https://github.com/vuejs/router/compare/v4.2.4...v4.2.5) --- updated-dependencies: - dependency-name: vue-router dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index dc64779..cde3ade 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "toastr": "^2.1.4", "vue": "^3.3.4", "vue-cropperjs": "^5.0.0", - "vue-router": "^4.2.4", + "vue-router": "^4.2.5", "vue-sweetalert2": "^5.0.5", "vue-three-round-slider": "^1.2.7", "vuex": "^4.1.0" @@ -8107,9 +8107,9 @@ } }, "node_modules/vue-router": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.2.4.tgz", - "integrity": "sha512-9PISkmaCO02OzPVOMq2w82ilty6+xJmQrarYZDkjZBfl4RvYAlt4PKnEX21oW4KTtWfa9OuO/b3qk1Od3AEdCQ==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.2.5.tgz", + "integrity": "sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==", "dependencies": { "@vue/devtools-api": "^6.5.0" }, @@ -14629,9 +14629,9 @@ } }, "vue-router": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.2.4.tgz", - "integrity": "sha512-9PISkmaCO02OzPVOMq2w82ilty6+xJmQrarYZDkjZBfl4RvYAlt4PKnEX21oW4KTtWfa9OuO/b3qk1Od3AEdCQ==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.2.5.tgz", + "integrity": "sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==", "requires": { "@vue/devtools-api": "^6.5.0" } diff --git a/package.json b/package.json index bce9819..b83d8e1 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "toastr": "^2.1.4", "vue": "^3.3.4", "vue-cropperjs": "^5.0.0", - "vue-router": "^4.2.4", + "vue-router": "^4.2.5", "vue-sweetalert2": "^5.0.5", "vue-three-round-slider": "^1.2.7", "vuex": "^4.1.0" From 91de65f89fd61d21a3ae99302396b8848811f3e8 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sat, 23 Sep 2023 20:41:34 +0200 Subject: [PATCH 23/63] ci: Reference branch names directly in ci-master and ci-develop --- .github/workflows/ci-develop.yml | 3 ++- .github/workflows/ci-master.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index 6cda78b..c944d18 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -12,6 +12,7 @@ name: ci-develop # REGISTRY and IMAGE_NAME are for building and tagging the container. # TARGET_ENV is used by Webpack to determine the build target. env: + BRANCH: develop REGISTRY: ghcr.io ARTIFACT_NAME: shocklink-webui.zip IMAGE_NAME: ${{ github.repository_owner }}/shocklink-webui @@ -91,7 +92,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value={{branch}},enable=${{ github.ref_name == 'develop' }} + type=raw,value={{branch}},enable=${{ github.ref_name == env.BRANCH }} type=ref,event=branch type=ref,event=pr diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index ef858bd..63c43f7 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -12,6 +12,7 @@ name: ci-master # REGISTRY and IMAGE_NAME are for building and tagging the container. # TARGET_ENV is used by Webpack to determine the build target. env: + BRANCH: master REGISTRY: ghcr.io ARTIFACT_NAME: shocklink-webui.zip IMAGE_NAME: ${{ github.repository_owner }}/shocklink-webui @@ -94,7 +95,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value={{branch}},enabled={{is_default_branch}} + type=raw,value={{branch}},enable=${{ github.ref_name == env.BRANCH }} type=ref,event=branch type=ref,event=pr From 221c2fa43948c2661705f1a4ef2172379b00e033 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sat, 23 Sep 2023 20:41:48 +0200 Subject: [PATCH 24/63] ci: Actually check for latest tag when adding 'latest' container tag --- .github/workflows/ci-tag.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-tag.yml b/.github/workflows/ci-tag.yml index 196fc2c..6f96164 100644 --- a/.github/workflows/ci-tag.yml +++ b/.github/workflows/ci-tag.yml @@ -10,7 +10,7 @@ name: ci-tag env: REGISTRY: ghcr.io ARTIFACT_NAME: shocklink-webui.zip - IMAGE_NAME: ${{ github.repository_owner }}/shocklink-webui + IMAGE_NAME: ${{ github.repository_owner }}/webui TARGET_ENV: production NODE_ENV: production @@ -101,13 +101,21 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - uses: oprypin/find-latest-tag@v1 + id: latest-tag + with: + repository: ${{ github.repository }} + releases-only: false + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + flavor: | + latest=false tags: | - type=raw,value=latest + type=raw,value=latest,enable=${{ steps.latest-tag.outputs.tag == github.ref_name }} type=ref,event=tag type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} From 5a65a3f3c0c18ce21f7b7f71a62de57ee13824d3 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sat, 23 Sep 2023 20:42:44 +0200 Subject: [PATCH 25/63] ci: Rename container from 'shock-link/shocklink-webui' to 'shock-link/webui' --- .github/workflows/ci-develop.yml | 2 +- .github/workflows/ci-master.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index c944d18..b19dc42 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -15,7 +15,7 @@ env: BRANCH: develop REGISTRY: ghcr.io ARTIFACT_NAME: shocklink-webui.zip - IMAGE_NAME: ${{ github.repository_owner }}/shocklink-webui + IMAGE_NAME: ${{ github.repository_owner }}/webui TARGET_ENV: development NODE_ENV: development diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 63c43f7..d788706 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -15,7 +15,7 @@ env: BRANCH: master REGISTRY: ghcr.io ARTIFACT_NAME: shocklink-webui.zip - IMAGE_NAME: ${{ github.repository_owner }}/shocklink-webui + IMAGE_NAME: ${{ github.repository_owner }}/webui TARGET_ENV: production NODE_ENV: production From 0c498c0e30f8d4d4644faa3e35b151069bb48b49 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sat, 23 Sep 2023 20:48:28 +0200 Subject: [PATCH 26/63] docs: Fix container name reference --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c7909e3..13b4dfc 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ This documentation describes how to self-host the WebUI container. This might no $ docker run \ -p 80:80/tcp \ --name shocklink-webui \ - ghcr.io/shocklink/shocklink-webui:latest + ghcr.io/shocklink/webui:latest ``` ## Using `docker-compose` @@ -41,7 +41,7 @@ version: '3.9' services: webui: - image: ghcr.io/shock-link/shocklink-webui:latest + image: ghcr.io/shock-link/webui:latest container_name: shocklink-webui ports: - "80:80/tcp" From d93affb6358a48a30fc6175fe62234960084ffb3 Mon Sep 17 00:00:00 2001 From: LucHeart Date: Sat, 23 Sep 2023 22:38:41 +0200 Subject: [PATCH 27/63] Add a share code proxy --- src/globals/config/config.development.js | 2 +- src/globals/config/config.local.js | 2 +- src/globals/config/config.production.js | 2 +- src/router/index.js | 5 ++ .../dashboard/shares/links/ShareLinksRoot.vue | 2 +- .../dashboard/shares/links/ViewShareLink.vue | 2 +- .../shockers/own/shares/ShockerSharesRoot.vue | 2 +- src/views/public/proxy/ShareCodeProxy.vue | 60 +++++++++++++++++++ 8 files changed, 71 insertions(+), 6 deletions(-) create mode 100644 src/views/public/proxy/ShareCodeProxy.vue diff --git a/src/globals/config/config.development.js b/src/globals/config/config.development.js index bc4c40c..01f2d67 100644 --- a/src/globals/config/config.development.js +++ b/src/globals/config/config.development.js @@ -1,7 +1,7 @@ const config = { apiUrl: "https://dev-api.shocklink.net/", webUiUrl: "https://dev.shocklink.net/#/", - shortUrl: "https://shockl.ink/s/" + shortUrl: "https://shockl.ink/", } global.config = config; diff --git a/src/globals/config/config.local.js b/src/globals/config/config.local.js index ba34722..143fd59 100644 --- a/src/globals/config/config.local.js +++ b/src/globals/config/config.local.js @@ -1,7 +1,7 @@ const config = { apiUrl: "https://localhost/", webUiUrl: "https://localhost:8080/#/", - shortUrl: "https://shockl.ink/s/" + shortUrl: "https://shockl.ink/" } global.config = config; diff --git a/src/globals/config/config.production.js b/src/globals/config/config.production.js index e3536a3..ab1eacd 100644 --- a/src/globals/config/config.production.js +++ b/src/globals/config/config.production.js @@ -1,7 +1,7 @@ const config = { apiUrl: "https://api.shocklink.net/", webUiUrl: "https://shocklink.net/#/", - shortUrl: "https://shockl.ink/s/" + shortUrl: "https://shockl.ink/" } global.config = config; diff --git a/src/router/index.js b/src/router/index.js index 7f8b9a7..482d9a3 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -176,6 +176,11 @@ const routes = [ component: lazyLoad('public/proxy/ShareLinksProxy'), props: true }, + { + path: 'proxy/shares/code/:id', + component: lazyLoad('public/proxy/ShareCodeProxy'), + props: true + }, ] } ] diff --git a/src/views/dashboard/shares/links/ShareLinksRoot.vue b/src/views/dashboard/shares/links/ShareLinksRoot.vue index 0a29ca7..ada4e70 100644 --- a/src/views/dashboard/shares/links/ShareLinksRoot.vue +++ b/src/views/dashboard/shares/links/ShareLinksRoot.vue @@ -63,7 +63,7 @@ export default { }, methods: { copyUrl(id) { - navigator.clipboard.writeText(config.shortUrl + id); + navigator.clipboard.writeText(config.shortUrl + "s/" + id); toastr.success('Share Link copied to clipboard'); }, async loadShareLinks() { diff --git a/src/views/dashboard/shares/links/ViewShareLink.vue b/src/views/dashboard/shares/links/ViewShareLink.vue index be35e13..ffaa3bc 100644 --- a/src/views/dashboard/shares/links/ViewShareLink.vue +++ b/src/views/dashboard/shares/links/ViewShareLink.vue @@ -244,7 +244,7 @@ export default { return '/proxy/shares/links/' + this.id; }, shareLinkUrl() { - return config.shortUrl + this.id; + return config.shortUrl + "s/" + this.id; }, existingShockerIds() { var arr = []; diff --git a/src/views/dashboard/shockers/own/shares/ShockerSharesRoot.vue b/src/views/dashboard/shockers/own/shares/ShockerSharesRoot.vue index ad6383c..195949a 100644 --- a/src/views/dashboard/shockers/own/shares/ShockerSharesRoot.vue +++ b/src/views/dashboard/shockers/own/shares/ShockerSharesRoot.vue @@ -375,7 +375,7 @@ export default { } this.loadCodes(); - this.$swal('Successfully created share code!', `Code: ${res.data.data}`, 'success'); + this.$swal('Successfully created share code!', `Link: ${config.shortUrl}c/${res.data.data}

Code: ${res.data.data}`, 'success'); } } } diff --git a/src/views/public/proxy/ShareCodeProxy.vue b/src/views/public/proxy/ShareCodeProxy.vue new file mode 100644 index 0000000..4da5840 --- /dev/null +++ b/src/views/public/proxy/ShareCodeProxy.vue @@ -0,0 +1,60 @@ + + + + + From b123a2c72a349e93d15bc67d3270467e69ac6c74 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 10:13:06 +0200 Subject: [PATCH 28/63] build: Add init script to substitute env variables at runtime --- Dockerfile | 13 +++++++++++++ startup.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 startup.sh diff --git a/Dockerfile b/Dockerfile index 410596b..fccaac4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,15 @@ FROM nginx:1-alpine + +ENV SHOCKLINK_API_DOMAIN=api.shocklink.net + +# Copy release artifacts (static JS and CSS bundles) COPY dist /usr/share/nginx/html + +# Copy custom startup script. +# This script performs environment variable substitution! +COPY startup.sh . + +# Start up nginx using the alternative entrypoint, but with the default CMD. +# See: https://github.com/nginxinc/docker-nginx/blob/master/mainline/debian/Dockerfile#L113-L119 +ENTRYPOINT ["/startup.sh"] +CMD ["nginx", "-g", "daemon off;"] diff --git a/startup.sh b/startup.sh new file mode 100644 index 0000000..04ca164 --- /dev/null +++ b/startup.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +# Variables for startup script +SERVE_PATH=/usr/share/nginx/html +NAME=ShockLink + +require() { + if [ -z "$1" ]; then + echo "Env var '$1' is required. Specify it and restart the container." + exit 1 + fi +} + +# Method that accepts one argument, the name of the environment variable to inject. +# Will substitute said variable as a literal string +inject() { + if [ -z "$1" ] && [ -z "$2" ]; then + echo "[$NAME] Usage: inject " + fi + + # Ensure the environment variable has a value specified. + require $1 + + echo "[$NAME] Injecting variable: $1 = $2" + sed -i 's/$1/${!var}/g' $SERVE_PATH/*.js +} + +# Inject our variables. +inject SHOCKLINK_API_DOMAIN $SHOCKLINK_API_DOMAIN + +# Start nginx as normal. +# If something breaks, see: https://github.com/nginxinc/docker-nginx/blob/master/mainline/debian/Dockerfile +echo "[$NAME] Starting nginx" +./docker-entrypoint.sh "$@" From 64d883a5a045d9804a5b806a62ab7cb74c06e2b1 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 10:31:26 +0200 Subject: [PATCH 29/63] build: Consolidate production/development configurations to generalized container configuration --- .github/workflows/ci-develop.yml | 2 +- .github/workflows/ci-master.yml | 2 +- .github/workflows/ci-tag.yml | 2 +- Dockerfile | 1 + src/globals/config/config.container.js | 7 ++++ src/globals/config/config.development.js | 7 ---- src/globals/config/config.production.js | 7 ---- src/main.js | 47 +++++++++++++----------- 8 files changed, 36 insertions(+), 39 deletions(-) create mode 100644 src/globals/config/config.container.js delete mode 100644 src/globals/config/config.development.js delete mode 100644 src/globals/config/config.production.js diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index b19dc42..3665878 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -16,7 +16,7 @@ env: REGISTRY: ghcr.io ARTIFACT_NAME: shocklink-webui.zip IMAGE_NAME: ${{ github.repository_owner }}/webui - TARGET_ENV: development + TARGET_ENV: container NODE_ENV: development jobs: diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index d788706..02d5876 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -16,7 +16,7 @@ env: REGISTRY: ghcr.io ARTIFACT_NAME: shocklink-webui.zip IMAGE_NAME: ${{ github.repository_owner }}/webui - TARGET_ENV: production + TARGET_ENV: container NODE_ENV: production jobs: diff --git a/.github/workflows/ci-tag.yml b/.github/workflows/ci-tag.yml index 6f96164..7c2da80 100644 --- a/.github/workflows/ci-tag.yml +++ b/.github/workflows/ci-tag.yml @@ -11,7 +11,7 @@ env: REGISTRY: ghcr.io ARTIFACT_NAME: shocklink-webui.zip IMAGE_NAME: ${{ github.repository_owner }}/webui - TARGET_ENV: production + TARGET_ENV: container NODE_ENV: production jobs: diff --git a/Dockerfile b/Dockerfile index fccaac4..8b4774e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM nginx:1-alpine ENV SHOCKLINK_API_DOMAIN=api.shocklink.net +ENV SHOCKLINK_WEBUI_DOMAIN=shocklink.net # Copy release artifacts (static JS and CSS bundles) COPY dist /usr/share/nginx/html diff --git a/src/globals/config/config.container.js b/src/globals/config/config.container.js new file mode 100644 index 0000000..1df614e --- /dev/null +++ b/src/globals/config/config.container.js @@ -0,0 +1,7 @@ +const config = { + apiUrl: "https://SHOCKLINK_API_DOMAIN/", + webUiUrl: "https://SHOCKLINK_WEBUI_DOMAIN/#/", + shortUrl: "https://shockl.ink/s/" +} + +global.config = config; diff --git a/src/globals/config/config.development.js b/src/globals/config/config.development.js deleted file mode 100644 index bc4c40c..0000000 --- a/src/globals/config/config.development.js +++ /dev/null @@ -1,7 +0,0 @@ -const config = { - apiUrl: "https://dev-api.shocklink.net/", - webUiUrl: "https://dev.shocklink.net/#/", - shortUrl: "https://shockl.ink/s/" -} - -global.config = config; diff --git a/src/globals/config/config.production.js b/src/globals/config/config.production.js deleted file mode 100644 index e3536a3..0000000 --- a/src/globals/config/config.production.js +++ /dev/null @@ -1,7 +0,0 @@ -const config = { - apiUrl: "https://api.shocklink.net/", - webUiUrl: "https://shocklink.net/#/", - shortUrl: "https://shockl.ink/s/" -} - -global.config = config; diff --git a/src/main.js b/src/main.js index 758a922..d3d963b 100644 --- a/src/main.js +++ b/src/main.js @@ -5,20 +5,8 @@ global.env = { require("@/globals/config/config." + process.env.TARGET_ENV + ".js"); require("@/js/utils.js"); -import "bootstrap/scss/bootstrap.scss"; -import ApiCall from '/src/js/ApiCall'; -import toastr from 'toastr'; -toastr.options = { - "positionClass": "toast-bottom-right" -} -global.toastr = toastr; -global.apiCall = ApiCall; - -import jQuery from 'jquery'; -global.jQuery = jQuery; -global.$ = jQuery; -import {createApp} from 'vue'; +import "bootstrap/scss/bootstrap.scss"; import 'bootstrap/dist/css/bootstrap.css' import 'bootstrap-vue-next/dist/bootstrap-vue-next.css' import 'normalize.css'; @@ -26,22 +14,37 @@ import 'toastr/build/toastr.css'; import "@fontsource/poppins"; import "./App.scss"; import 'sweetalert2/dist/sweetalert2.min.css'; +import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css' +import { dom, library } from '@fortawesome/fontawesome-svg-core'; + +import ApiCall from '/src/js/ApiCall'; import App from '@/App'; +import BootstrapVueNext from 'bootstrap-vue-next' +import ContextMenu from '@imengyu/vue3-context-menu' import Footer from '@/Footer'; +import VueSweetalert2 from 'vue-sweetalert2'; +import {createApp} from 'vue'; +import { fab } from '@fortawesome/free-brands-svg-icons'; +import { far } from '@fortawesome/free-regular-svg-icons'; +import { fas } from '@fortawesome/free-solid-svg-icons'; +import jQuery from 'jquery'; +import mitt from 'mitt'; import router from '@/router'; import storeA from '@/store'; -import mitt from 'mitt'; -import BootstrapVueNext from 'bootstrap-vue-next' -import VueSweetalert2 from 'vue-sweetalert2'; +import toastr from 'toastr'; +toastr.options = { + "positionClass": "toast-bottom-right" +} +global.toastr = toastr; +global.apiCall = ApiCall; + +global.jQuery = jQuery; +global.$ = jQuery; + + -import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css' -import ContextMenu from '@imengyu/vue3-context-menu' -import { library, dom } from '@fortawesome/fontawesome-svg-core'; -import { fas } from '@fortawesome/free-solid-svg-icons'; -import { far } from '@fortawesome/free-regular-svg-icons'; -import { fab } from '@fortawesome/free-brands-svg-icons'; library.add(fas, far, fab); dom.watch(); From ce22866109357180d7e232ce6450d83cf7fe730e Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 10:41:07 +0200 Subject: [PATCH 30/63] build: Make startup.sh executable --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 8b4774e..4601e83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ COPY dist /usr/share/nginx/html # Copy custom startup script. # This script performs environment variable substitution! COPY startup.sh . +RUN ["chmod", "+x", "/startup.sh"] # Start up nginx using the alternative entrypoint, but with the default CMD. # See: https://github.com/nginxinc/docker-nginx/blob/master/mainline/debian/Dockerfile#L113-L119 From 935ca38a1c144fab1c56c125e462f71bb5a7bdee Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 10:44:23 +0200 Subject: [PATCH 31/63] build: Inject SHOCKLINK_WEBUI_DOMAIN env variable --- startup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/startup.sh b/startup.sh index 04ca164..df10265 100644 --- a/startup.sh +++ b/startup.sh @@ -27,6 +27,7 @@ inject() { # Inject our variables. inject SHOCKLINK_API_DOMAIN $SHOCKLINK_API_DOMAIN +inject SHOCKLINK_WEBUI_DOMAIN $SHOCKLINK_WEBUI_DOMAIN # Start nginx as normal. # If something breaks, see: https://github.com/nginxinc/docker-nginx/blob/master/mainline/debian/Dockerfile From 3336332cab09ce85f1132c261e1e59d7ed925ee0 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 11:03:12 +0200 Subject: [PATCH 32/63] build: Pipe find into sed when substituting env vars --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index df10265..ef90a69 100644 --- a/startup.sh +++ b/startup.sh @@ -22,7 +22,7 @@ inject() { require $1 echo "[$NAME] Injecting variable: $1 = $2" - sed -i 's/$1/${!var}/g' $SERVE_PATH/*.js + find . -name "*.js" -exec sed -i 's/$1/${!var}/g' {} + } # Inject our variables. From c9a954eb33509b96b7bba732443a02d7cf37cd47 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 11:12:56 +0200 Subject: [PATCH 33/63] build: Fix find/sed env var substitution --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index ef90a69..8141004 100644 --- a/startup.sh +++ b/startup.sh @@ -22,7 +22,7 @@ inject() { require $1 echo "[$NAME] Injecting variable: $1 = $2" - find . -name "*.js" -exec sed -i 's/$1/${!var}/g' {} + + find . -name "*.js" -exec sed -i 's/$1/$2/g' {} \; } # Inject our variables. From c320f1adec0e974f92d46fec53dcdc7276d1a39e Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 11:14:24 +0200 Subject: [PATCH 34/63] ci: Rename build-ui to build, build-container to containerize, publish-artifacts to publish --- .github/workflows/ci-develop.yml | 6 ++--- .github/workflows/ci-master.yml | 6 ++--- .github/workflows/ci-tag.yml | 43 ++++++++++++++++---------------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index 3665878..b22edfe 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -21,7 +21,7 @@ env: jobs: - build-ui: + build: runs-on: ubuntu-latest steps: @@ -58,9 +58,9 @@ jobs: path: ${{ github.workspace }}/${{ env.ARTIFACT_NAME }} retention-days: 1 - build-container: + containerize: runs-on: ubuntu-latest - needs: build-ui + needs: build steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 02d5876..ad8b8b8 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -21,7 +21,7 @@ env: jobs: - build-ui: + build: runs-on: ubuntu-latest steps: @@ -61,9 +61,9 @@ jobs: path: ${{ github.workspace }}/${{ env.ARTIFACT_NAME }} retention-days: 1 - build-container: + containerize: runs-on: ubuntu-latest - needs: build-ui + needs: build steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci-tag.yml b/.github/workflows/ci-tag.yml index 7c2da80..e39d49f 100644 --- a/.github/workflows/ci-tag.yml +++ b/.github/workflows/ci-tag.yml @@ -16,7 +16,7 @@ env: jobs: - build-ui: + build: runs-on: ubuntu-latest steps: @@ -55,27 +55,9 @@ jobs: path: ${{ github.workspace }}/${{ env.ARTIFACT_NAME }} retention-days: 1 - publish-artifacts: + containerize: runs-on: ubuntu-latest - needs: build-ui - - steps: - - name: Download internal artifacts - uses: actions/download-artifact@v3 - with: - name: ${{ env.ARTIFACT_NAME }} - - - name: Upload artifacts to tag - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.ARTIFACT_NAME }} - asset_name: ${{ env.ARTIFACT_NAME }} - tag: ${{ github.ref }} - - build-container: - runs-on: ubuntu-latest - needs: build-ui + needs: build steps: - uses: actions/checkout@v4 @@ -128,3 +110,22 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + publish: + runs-on: ubuntu-latest + needs: containerize + + steps: + - name: Download internal artifacts + uses: actions/download-artifact@v3 + with: + name: ${{ env.ARTIFACT_NAME }} + + - name: Upload artifacts to tag + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ env.ARTIFACT_NAME }} + asset_name: ${{ env.ARTIFACT_NAME }} + tag: ${{ github.ref }} + \ No newline at end of file From ea0a4753202744f4dd5d3cd9a727ac1bb1136cda Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 11:17:16 +0200 Subject: [PATCH 35/63] fix(build): Fix search path for find/sed environment variable substitution --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index 8141004..f3aa317 100644 --- a/startup.sh +++ b/startup.sh @@ -22,7 +22,7 @@ inject() { require $1 echo "[$NAME] Injecting variable: $1 = $2" - find . -name "*.js" -exec sed -i 's/$1/$2/g' {} \; + find $SERVE_PATH -name "*.js" -exec sed -i 's/$1/$2/g' {} \; } # Inject our variables. From 5ea63223dc5d4f1e45c12036cd37e6e0f8a831c1 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 11:25:43 +0200 Subject: [PATCH 36/63] fix(build): Use plus to reference all files when sed replacing --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index f3aa317..e2bd22d 100644 --- a/startup.sh +++ b/startup.sh @@ -22,7 +22,7 @@ inject() { require $1 echo "[$NAME] Injecting variable: $1 = $2" - find $SERVE_PATH -name "*.js" -exec sed -i 's/$1/$2/g' {} \; + find $SERVE_PATH -name "*.js" -exec sed -i 's/$1/$2/g' {} + } # Inject our variables. From 468138f50e1fc30a958c1994652f055853c9bd25 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 11:32:01 +0200 Subject: [PATCH 37/63] fix(build): Finally truly fix the problem with environment variable substitution --- startup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/startup.sh b/startup.sh index e2bd22d..6ca5bcc 100644 --- a/startup.sh +++ b/startup.sh @@ -17,12 +17,12 @@ inject() { if [ -z "$1" ] && [ -z "$2" ]; then echo "[$NAME] Usage: inject " fi - + # Ensure the environment variable has a value specified. require $1 echo "[$NAME] Injecting variable: $1 = $2" - find $SERVE_PATH -name "*.js" -exec sed -i 's/$1/$2/g' {} + + find $SERVE_PATH -name "*.js" -exec sed -i "s/$1/$2/g" {} + } # Inject our variables. From a3ae16138c61b6793a60377291c8e8deb371cc33 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 11:35:09 +0200 Subject: [PATCH 38/63] ci: Re-add dev/prod configurations to not break existing CI/CD --- src/globals/config/config.development.js | 7 +++++++ src/globals/config/config.production.js | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 src/globals/config/config.development.js create mode 100644 src/globals/config/config.production.js diff --git a/src/globals/config/config.development.js b/src/globals/config/config.development.js new file mode 100644 index 0000000..01f2d67 --- /dev/null +++ b/src/globals/config/config.development.js @@ -0,0 +1,7 @@ +const config = { + apiUrl: "https://dev-api.shocklink.net/", + webUiUrl: "https://dev.shocklink.net/#/", + shortUrl: "https://shockl.ink/", +} + +global.config = config; diff --git a/src/globals/config/config.production.js b/src/globals/config/config.production.js new file mode 100644 index 0000000..ab1eacd --- /dev/null +++ b/src/globals/config/config.production.js @@ -0,0 +1,7 @@ +const config = { + apiUrl: "https://api.shocklink.net/", + webUiUrl: "https://shocklink.net/#/", + shortUrl: "https://shockl.ink/" +} + +global.config = config; From 03f2d7e4f9ac942b76c381c43ac2776bb20c3209 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 12:05:55 +0200 Subject: [PATCH 39/63] build: Change env var name suffixes to _URL --- Dockerfile | 5 ++- README.md | 54 +++++++++++++++++++++++--- src/globals/config/config.container.js | 6 +-- 3 files changed, 54 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4601e83..587ac7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM nginx:1-alpine -ENV SHOCKLINK_API_DOMAIN=api.shocklink.net -ENV SHOCKLINK_WEBUI_DOMAIN=shocklink.net +ENV SHOCKLINK_API_URL=api.shocklink.net +ENV SHOCKLINK_WEBUI_URL=shocklink.net/#/ +ENV SHOCKLINK_SHARE_URL=shockl.ink/s/ # Copy release artifacts (static JS and CSS bundles) COPY dist /usr/share/nginx/html diff --git a/README.md b/README.md index 13b4dfc..0a563a5 100644 --- a/README.md +++ b/README.md @@ -16,35 +16,77 @@ This is the ShockLink Web UI. It is a single-page application that communicates # Configuring -The [shocklink-webui](https://github.com/Shock-Link/WebUI/pkgs/container/shocklink-webui) container unfortunately does not support any configuration beyond nginx configuration, as it is currently based on `nginx:alpine`. +The [shocklink-webui](https://github.com/Shock-Link/WebUI/pkgs/container/shocklink-webui) container supports configuration via environment variables. -If you wish to change the API that the WebUI communicates with, locally modify the [configuration file](src/globals/config/config.production.js) and build the container manually. +**NOTE:** All of the below values are always prefixed with `https://`. This cannot be omitted. + +|Variable|Default|Description| +|-|-|-| +|`SHOCKLINK_API_URL`|`api.shocklink.net/`| URL of the API. | +|`SHOCKLINK_WEBUI_URL`|`shocklink.net/#/`| URL of the ShockLink WebUI. | +|`SHOCKLINK_SHARE_URL`|`shockl.ink/s/`| URL to prefix share links with. When visited, should redirect to `${SHOCKLINK_WEBUI_URL}/public/proxy/shares/links/{ID}`. | # Deployment This documentation describes how to self-host the WebUI container. This might not be of interest to you if you are content using [ShockLink.net](https://shocklink.net). ## Using Docker +Assuming you are running on `localhost`, with [the API](https://github.com/Shock-Link/API) running on port `5001`: ```bash $ docker run \ - -p 80:80/tcp \ + -p 5002:80/tcp \ + -e SHOCKLINK_API_URL=localhost:5001/ \ + -e SHOCKLINK_WEBUI_URL=localhost:5002/#/ \ + -e SHOCKLINK_SHARE_URL=localhost:5002/#/public/proxy/shares/links/ \ --name shocklink-webui \ ghcr.io/shocklink/webui:latest ``` ## Using `docker-compose` -At the time of writing, the [ShockLink API](https://github.com/Shock-Link/API) is not yet readily available. This example contains **only** the WebUI. + +Assuming a deployment on `localhost`: ```yml version: '3.9' services: + + # Database. Only Postgres is currently supported. + db: + image: postgres:16 + environment: + - POSTGRES_PASSWORD=postgres + + # Redis with Redisearch. + redis: + image: redislabs/redisearch:latest + + # The API. + # Check https://github.com/Shock-Link/API for the latest configuration settings. + api: + image: ghcr.io/shock-link/api:latest + depends_on: + - db + - redis + ports: + - "5001:80/tcp" + environment: + - FRONTEND_BASE_URL=localhost + - REDIS_HOST=redis + - DB=db + + # The Web UI (this repository). webui: image: ghcr.io/shock-link/webui:latest - container_name: shocklink-webui + depends_on: + - api ports: - - "80:80/tcp" + - "5002:80/tcp" + environment: + - SHOCKLINK_API_URL=localhost:5001/ + - SHOCKLINK_WEBUI_URL=localhost:5002/#/ + - SHOCKLINK_SHARE_URL=localhost:5002/#/public/proxy/shares/links/ ``` # Development diff --git a/src/globals/config/config.container.js b/src/globals/config/config.container.js index 1df614e..2b06700 100644 --- a/src/globals/config/config.container.js +++ b/src/globals/config/config.container.js @@ -1,7 +1,7 @@ const config = { - apiUrl: "https://SHOCKLINK_API_DOMAIN/", - webUiUrl: "https://SHOCKLINK_WEBUI_DOMAIN/#/", - shortUrl: "https://shockl.ink/s/" + apiUrl: "https://SHOCKLINK_API_URL", + webUiUrl: "https://SHOCKLINK_WEBUI_URL", + shortUrl: "https://SHOCKLINK_SHARE_URL" } global.config = config; From 7d3dbd1fc6711bb6e6c0172ecb689b4e4595f73a Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 12:06:03 +0200 Subject: [PATCH 40/63] docs: Add docker-compose.yml --- docker-compose.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5ca4a72 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,39 @@ +version: '3.9' + +services: + + # Database. Only Postgres is currently supported. + db: + image: postgres:16 + environment: + - POSTGRES_PASSWORD=postgres + + # Redis with Redisearch. + redis: + image: redislabs/redisearch:latest + + # The API. + # Check https://github.com/Shock-Link/API for the latest configuration settings. + api: + image: ghcr.io/shock-link/api:latest + depends_on: + - db + - redis + ports: + - "5001:80/tcp" + environment: + - SHOCKLINK__DB=Host=docker-node;Port=1337;Database=root;Username=root;Password=root;Search Path=ShockLink + - SHOCKLINK__REDIS__HOST=redis + - SHOCKLINK__FRONTENDBASEURL=http://localhost:5002 + + # The Web UI (this repository). + webui: + image: ghcr.io/shock-link/webui:latest + depends_on: + - api + ports: + - "5002:80/tcp" + environment: + - SHOCKLINK_API_URL=localhost:5001/ + - SHOCKLINK_WEBUI_URL=localhost:5002/#/ + - SHOCKLINK_SHARE_URL=localhost:5002/#/public/proxy/shares/links/ \ No newline at end of file From a8dca7d131cdd9095f1eb8d2fd8608785dd104e7 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 12:16:19 +0200 Subject: [PATCH 41/63] build: Include full URL in env variables --- Dockerfile | 6 +++--- README.md | 14 ++++++-------- docker-compose.yml | 10 +++++----- src/globals/config/config.container.js | 6 +++--- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 587ac7e..ba8f2c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM nginx:1-alpine -ENV SHOCKLINK_API_URL=api.shocklink.net -ENV SHOCKLINK_WEBUI_URL=shocklink.net/#/ -ENV SHOCKLINK_SHARE_URL=shockl.ink/s/ +ENV SHOCKLINK_API_URL=https://api.shocklink.net +ENV SHOCKLINK_WEBUI_URL=https://shocklink.net/#/ +ENV SHOCKLINK_SHARE_URL=https://shockl.ink/s/ # Copy release artifacts (static JS and CSS bundles) COPY dist /usr/share/nginx/html diff --git a/README.md b/README.md index 0a563a5..af08ed7 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,11 @@ This is the ShockLink Web UI. It is a single-page application that communicates The [shocklink-webui](https://github.com/Shock-Link/WebUI/pkgs/container/shocklink-webui) container supports configuration via environment variables. -**NOTE:** All of the below values are always prefixed with `https://`. This cannot be omitted. - |Variable|Default|Description| |-|-|-| -|`SHOCKLINK_API_URL`|`api.shocklink.net/`| URL of the API. | -|`SHOCKLINK_WEBUI_URL`|`shocklink.net/#/`| URL of the ShockLink WebUI. | -|`SHOCKLINK_SHARE_URL`|`shockl.ink/s/`| URL to prefix share links with. When visited, should redirect to `${SHOCKLINK_WEBUI_URL}/public/proxy/shares/links/{ID}`. | +|`SHOCKLINK_API_URL`|`https://api.shocklink.net/`| URL of the API. | +|`SHOCKLINK_WEBUI_URL`|`https://shocklink.net/#/`| URL of the ShockLink WebUI. | +|`SHOCKLINK_SHARE_URL`|`https://shockl.ink/s/`| URL to prefix share links with. When visited, should redirect to `${SHOCKLINK_WEBUI_URL}/public/proxy/shares/links/{ID}`. | # Deployment @@ -36,9 +34,9 @@ Assuming you are running on `localhost`, with [the API](https://github.com/Shock ```bash $ docker run \ -p 5002:80/tcp \ - -e SHOCKLINK_API_URL=localhost:5001/ \ - -e SHOCKLINK_WEBUI_URL=localhost:5002/#/ \ - -e SHOCKLINK_SHARE_URL=localhost:5002/#/public/proxy/shares/links/ \ + -e SHOCKLINK_API_URL=http://localhost:5001/ \ + -e SHOCKLINK_WEBUI_URL=http://localhost:5002/#/ \ + -e SHOCKLINK_SHARE_URL=http://localhost:5002/#/public/proxy/shares/links/ \ --name shocklink-webui \ ghcr.io/shocklink/webui:latest ``` diff --git a/docker-compose.yml b/docker-compose.yml index 5ca4a72..e319f20 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,16 +24,16 @@ services: environment: - SHOCKLINK__DB=Host=docker-node;Port=1337;Database=root;Username=root;Password=root;Search Path=ShockLink - SHOCKLINK__REDIS__HOST=redis - - SHOCKLINK__FRONTENDBASEURL=http://localhost:5002 + - SHOCKLINK__FRONTENDBASEURL=http://local:5002 # The Web UI (this repository). webui: - image: ghcr.io/shock-link/webui:latest + image: ghcr.io/shock-link/webui:master depends_on: - api ports: - "5002:80/tcp" environment: - - SHOCKLINK_API_URL=localhost:5001/ - - SHOCKLINK_WEBUI_URL=localhost:5002/#/ - - SHOCKLINK_SHARE_URL=localhost:5002/#/public/proxy/shares/links/ \ No newline at end of file + - SHOCKLINK_API_URL=http://local:5001/ + - SHOCKLINK_WEBUI_URL=http://local:5002/#/ + - SHOCKLINK_SHARE_URL=http://local:5002/#/public/proxy/shares/links/ diff --git a/src/globals/config/config.container.js b/src/globals/config/config.container.js index 2b06700..abb9c70 100644 --- a/src/globals/config/config.container.js +++ b/src/globals/config/config.container.js @@ -1,7 +1,7 @@ const config = { - apiUrl: "https://SHOCKLINK_API_URL", - webUiUrl: "https://SHOCKLINK_WEBUI_URL", - shortUrl: "https://SHOCKLINK_SHARE_URL" + apiUrl: "SHOCKLINK_API_URL", + webUiUrl: "SHOCKLINK_WEBUI_URL", + shortUrl: "SHOCKLINK_SHARE_URL" } global.config = config; From 872c521c529183092e6661d9841961af3e54d379 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 12:20:23 +0200 Subject: [PATCH 42/63] build: Also apply new env names in startup.sh --- docker-compose.yml | 2 +- startup.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e319f20..3955a39 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: # The Web UI (this repository). webui: - image: ghcr.io/shock-link/webui:master + image: ghcr.io/redmushie/webui:master depends_on: - api ports: diff --git a/startup.sh b/startup.sh index 6ca5bcc..0c4837a 100644 --- a/startup.sh +++ b/startup.sh @@ -26,8 +26,9 @@ inject() { } # Inject our variables. -inject SHOCKLINK_API_DOMAIN $SHOCKLINK_API_DOMAIN -inject SHOCKLINK_WEBUI_DOMAIN $SHOCKLINK_WEBUI_DOMAIN +inject SHOCKLINK_API_URL $SHOCKLINK_API_URL +inject SHOCKLINK_WEBUI_URL $SHOCKLINK_WEBUI_URL +inject SHOCKLINK_SHARE_URL $SHOCKLINK_SHARE_URL # Start nginx as normal. # If something breaks, see: https://github.com/nginxinc/docker-nginx/blob/master/mainline/debian/Dockerfile From d0d5caeb5e1af231bd95f5c8c73a8d91678e2b54 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 12:23:56 +0200 Subject: [PATCH 43/63] build: Change sed delimiter to not conflict with URLs --- startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/startup.sh b/startup.sh index 0c4837a..d6945e5 100644 --- a/startup.sh +++ b/startup.sh @@ -22,7 +22,7 @@ inject() { require $1 echo "[$NAME] Injecting variable: $1 = $2" - find $SERVE_PATH -name "*.js" -exec sed -i "s/$1/$2/g" {} + + find $SERVE_PATH -name "*.js" -exec sed -i "s|$1|$2|g" {} + } # Inject our variables. From 528bf027817df2f323286ce6088fbaa77749aaf0 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 13:22:13 +0200 Subject: [PATCH 44/63] docs: Update docker-compose.yml --- docker-compose.yml | 10 +++++++--- redis-stack.conf | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 redis-stack.conf diff --git a/docker-compose.yml b/docker-compose.yml index 3955a39..0a52706 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,13 +5,17 @@ services: # Database. Only Postgres is currently supported. db: image: postgres:16 + ports: + - "5432:5432/tcp" environment: - POSTGRES_PASSWORD=postgres # Redis with Redisearch. redis: - image: redislabs/redisearch:latest - + image: redis/redis-stack-server:latest + volumes: + - /opt/docker/shocklink/redis/redis-stack.conf:/redis-stack.conf + # The API. # Check https://github.com/Shock-Link/API for the latest configuration settings. api: @@ -22,7 +26,7 @@ services: ports: - "5001:80/tcp" environment: - - SHOCKLINK__DB=Host=docker-node;Port=1337;Database=root;Username=root;Password=root;Search Path=ShockLink + - SHOCKLINK__DB=Host=db;Port=5432;Database=postgres;Username=postgres;Password=postgres;Search Path=ShockLink - SHOCKLINK__REDIS__HOST=redis - SHOCKLINK__FRONTENDBASEURL=http://local:5002 diff --git a/redis-stack.conf b/redis-stack.conf new file mode 100644 index 0000000..1bdda9c --- /dev/null +++ b/redis-stack.conf @@ -0,0 +1 @@ +notify-keyspace-events KEA From 13c871ddcc409db71d03718f4e60b9463669b03e Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 13:24:55 +0200 Subject: [PATCH 45/63] chore: Clean up ci-tag.yml --- .github/workflows/ci-tag.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-tag.yml b/.github/workflows/ci-tag.yml index e39d49f..55901ab 100644 --- a/.github/workflows/ci-tag.yml +++ b/.github/workflows/ci-tag.yml @@ -128,4 +128,3 @@ jobs: file: ${{ env.ARTIFACT_NAME }} asset_name: ${{ env.ARTIFACT_NAME }} tag: ${{ github.ref }} - \ No newline at end of file From dc071baa00c2d7bbaee2dc9ea00fb41d32af07c6 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 13:27:25 +0200 Subject: [PATCH 46/63] chore: Remove inlined docker-compose.yml from README and reference file instead --- README.md | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/README.md b/README.md index af08ed7..d365f27 100644 --- a/README.md +++ b/README.md @@ -43,49 +43,7 @@ $ docker run \ ## Using `docker-compose` -Assuming a deployment on `localhost`: - -```yml -version: '3.9' - -services: - - # Database. Only Postgres is currently supported. - db: - image: postgres:16 - environment: - - POSTGRES_PASSWORD=postgres - - # Redis with Redisearch. - redis: - image: redislabs/redisearch:latest - - # The API. - # Check https://github.com/Shock-Link/API for the latest configuration settings. - api: - image: ghcr.io/shock-link/api:latest - depends_on: - - db - - redis - ports: - - "5001:80/tcp" - environment: - - FRONTEND_BASE_URL=localhost - - REDIS_HOST=redis - - DB=db - - # The Web UI (this repository). - webui: - image: ghcr.io/shock-link/webui:latest - depends_on: - - api - ports: - - "5002:80/tcp" - environment: - - SHOCKLINK_API_URL=localhost:5001/ - - SHOCKLINK_WEBUI_URL=localhost:5002/#/ - - SHOCKLINK_SHARE_URL=localhost:5002/#/public/proxy/shares/links/ -``` +See [docker-compose.yml](docker-compose.yml). # Development Contributions are welcome! We're eager to see what you come up with. Make sure to [join us on Discord](https://discord.gg/AHcCbXbEcF). From dba888246edec724ae424daf341465c3c56560d1 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 13:28:28 +0200 Subject: [PATCH 47/63] docs: Update container name reference --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d365f27..0e2cba6 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This is the ShockLink Web UI. It is a single-page application that communicates # Configuring -The [shocklink-webui](https://github.com/Shock-Link/WebUI/pkgs/container/shocklink-webui) container supports configuration via environment variables. +The [webui](https://github.com/Shock-Link/WebUI/pkgs/container/webui) container supports configuration via environment variables. |Variable|Default|Description| |-|-|-| From d8a12826fee27a3c9c881f3fd16fde4a8c1d6a34 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 13:30:41 +0200 Subject: [PATCH 48/63] fix: main.js was accidentally autoformatted --- src/main.js | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/src/main.js b/src/main.js index d3d963b..758a922 100644 --- a/src/main.js +++ b/src/main.js @@ -5,33 +5,8 @@ global.env = { require("@/globals/config/config." + process.env.TARGET_ENV + ".js"); require("@/js/utils.js"); - import "bootstrap/scss/bootstrap.scss"; -import 'bootstrap/dist/css/bootstrap.css' -import 'bootstrap-vue-next/dist/bootstrap-vue-next.css' -import 'normalize.css'; -import 'toastr/build/toastr.css'; -import "@fontsource/poppins"; -import "./App.scss"; -import 'sweetalert2/dist/sweetalert2.min.css'; -import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css' - -import { dom, library } from '@fortawesome/fontawesome-svg-core'; - import ApiCall from '/src/js/ApiCall'; -import App from '@/App'; -import BootstrapVueNext from 'bootstrap-vue-next' -import ContextMenu from '@imengyu/vue3-context-menu' -import Footer from '@/Footer'; -import VueSweetalert2 from 'vue-sweetalert2'; -import {createApp} from 'vue'; -import { fab } from '@fortawesome/free-brands-svg-icons'; -import { far } from '@fortawesome/free-regular-svg-icons'; -import { fas } from '@fortawesome/free-solid-svg-icons'; -import jQuery from 'jquery'; -import mitt from 'mitt'; -import router from '@/router'; -import storeA from '@/store'; import toastr from 'toastr'; toastr.options = { "positionClass": "toast-bottom-right" @@ -39,12 +14,34 @@ toastr.options = { global.toastr = toastr; global.apiCall = ApiCall; +import jQuery from 'jquery'; global.jQuery = jQuery; global.$ = jQuery; +import {createApp} from 'vue'; +import 'bootstrap/dist/css/bootstrap.css' +import 'bootstrap-vue-next/dist/bootstrap-vue-next.css' +import 'normalize.css'; +import 'toastr/build/toastr.css'; +import "@fontsource/poppins"; +import "./App.scss"; +import 'sweetalert2/dist/sweetalert2.min.css'; +import App from '@/App'; +import Footer from '@/Footer'; +import router from '@/router'; +import storeA from '@/store'; +import mitt from 'mitt'; +import BootstrapVueNext from 'bootstrap-vue-next' +import VueSweetalert2 from 'vue-sweetalert2'; +import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css' +import ContextMenu from '@imengyu/vue3-context-menu' +import { library, dom } from '@fortawesome/fontawesome-svg-core'; +import { fas } from '@fortawesome/free-solid-svg-icons'; +import { far } from '@fortawesome/free-regular-svg-icons'; +import { fab } from '@fortawesome/free-brands-svg-icons'; library.add(fas, far, fab); dom.watch(); From 9a13047bcfdb5ebda769c8d5526ace27b4140680 Mon Sep 17 00:00:00 2001 From: Red Mushie Date: Sun, 24 Sep 2023 13:41:52 +0200 Subject: [PATCH 49/63] build: Fix default share URL containing one specific path --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ba8f2c8..36e64b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM nginx:1-alpine ENV SHOCKLINK_API_URL=https://api.shocklink.net ENV SHOCKLINK_WEBUI_URL=https://shocklink.net/#/ -ENV SHOCKLINK_SHARE_URL=https://shockl.ink/s/ +ENV SHOCKLINK_SHARE_URL=https://shockl.ink/ # Copy release artifacts (static JS and CSS bundles) COPY dist /usr/share/nginx/html From 5bb3a9d6c334ae566c944274170eafc879fae078 Mon Sep 17 00:00:00 2001 From: LucHeart Date: Sun, 24 Sep 2023 17:15:53 +0200 Subject: [PATCH 50/63] Version 1.4.0, gravatar --- src/Footer.vue | 2 +- src/views/dashboard/Navigation/Item.vue | 2 +- src/views/dashboard/shockers/own/ShockerLogs.vue | 2 +- src/views/dashboard/shockers/own/shares/ShockerSharesRoot.vue | 4 ++-- src/views/public/nav/PublicNavRoot.vue | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Footer.vue b/src/Footer.vue index ffc8a05..b2590ac 100644 --- a/src/Footer.vue +++ b/src/Footer.vue @@ -1,5 +1,5 @@