From 493dfaa4b2bd35cb63986ebf2cf51fb06a60099d Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Sun, 17 Nov 2024 14:20:13 +0000 Subject: [PATCH] fix: merge --- .github/workflows/ci.yaml | 79 ------------------- .../components/dashboard/ApiKeyModal.tsx | 37 ++++----- .../dashboard/ssh/DeleteSSHKeyButton.tsx | 8 +- 3 files changed, 20 insertions(+), 104 deletions(-) delete mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 939fbee98..000000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,79 +0,0 @@ -name: Tests - -#on: - #push: - #branches: - #- "dev" - #- "main" - #pull_request: - # branches: - #- "dev" - #- "main" - -jobs: - tests: - name: Tests - runs-on: ubuntu-20.04 - permissions: - contents: read - strategy: - fail-fast: false - matrix: - #php: [8.2, 8.3] - php: [8.2] - database: - #- mariadb:10.5 - #- mariadb:10.11 - - mariadb:11.5 - #- mysql:8 - #- mysql:9 - services: - database: - image: ${{ matrix.database }} - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: testing - ports: - - 3306 - steps: - - name: Code Checkout - uses: actions/checkout@v4 - - - name: Get cache directory - id: composer-cache - run: | - echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Cache - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer-${{ matrix.php }}- - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: bcmath, cli, curl, gd, mbstring, mysql, openssl, pdo, tokenizer, xml, zip - tools: composer:v2 - coverage: none - - - name: Setup .env - run: cp .env.ci .env - - - name: Install dependencies - run: composer install --no-interaction --no-progress --no-suggest --prefer-dist - - - name: Unit tests - run: vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Unit - if: ${{ always() }} - env: - DB_HOST: UNIT_NO_DB - - - name: Integration tests - run: vendor/bin/phpunit tests/Integration - env: - DB_PORT: ${{ job.services.database.ports[3306] }} - DB_USERNAME: root diff --git a/resources/scripts/components/dashboard/ApiKeyModal.tsx b/resources/scripts/components/dashboard/ApiKeyModal.tsx index b6fa2f725..eb16b78aa 100644 --- a/resources/scripts/components/dashboard/ApiKeyModal.tsx +++ b/resources/scripts/components/dashboard/ApiKeyModal.tsx @@ -1,12 +1,12 @@ -import { faClone } from '@fortawesome/free-solid-svg-icons'; -import { useContext } from 'react'; import ModalContext from '@/context/ModalContext'; +import { faClone } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { useContext } from 'react'; import FlashMessageRender from '@/components/FlashMessageRender'; import Button from '@/components/elements/Button'; import CopyOnClick from '@/components/elements/CopyOnClick'; -import FlashMessageRender from '@/components/FlashMessageRender'; + import asModal from '@/hoc/asModal'; interface Props { @@ -17,39 +17,40 @@ const ApiKeyModal = ({ apiKey }: Props) => { const { dismiss } = useContext(ModalContext); return ( -
- The API key you have requested is shown below. Please store it in a safe place, as it will not be shown again. +
+ The API key you have requested is shown below. Please store it in a safe place, as it will not be shown + again.
{/* API Key Display Section */} -++- {/* Copy button with icon */} -{apiKey}
+{apiKey}
+{/* Action Buttons */} - +@@ -62,6 +63,6 @@ ApiKeyModal.displayName = 'ApiKeyModal'; export default asModal({ title: 'Your API Key', - closeOnEscape: true, // Allows closing the modal by pressing Escape - closeOnBackground: true, // Allows closing by clicking outside the modal + closeOnEscape: true, // Allows closing the modal by pressing Escape + closeOnBackground: true, // Allows closing by clicking outside the modal })(ApiKeyModal); diff --git a/resources/scripts/components/dashboard/ssh/DeleteSSHKeyButton.tsx b/resources/scripts/components/dashboard/ssh/DeleteSSHKeyButton.tsx index f4e2e022e..263a2de0a 100644 --- a/resources/scripts/components/dashboard/ssh/DeleteSSHKeyButton.tsx +++ b/resources/scripts/components/dashboard/ssh/DeleteSSHKeyButton.tsx @@ -2,15 +2,11 @@ import { useState } from 'react'; import Code from '@/components/elements/Code'; import { Dialog } from '@/components/elements/dialog'; -import HugeIconsTrash from '@/components/elements/hugeicons/Trash'; import { deleteSSHKey, useSSHKeys } from '@/api/account/ssh-keys'; import { useFlashKey } from '@/plugins/useFlash'; -import HugeIconsTrash from '@/components/elements/hugeicons/Trash'; - - export default ({ name, fingerprint }: { name: string; fingerprint: string }) => { const { clearAndAddHttpError } = useFlashKey('account'); const [visible, setVisible] = useState(false); @@ -39,9 +35,7 @@ export default ({ name, fingerprint }: { name: string; fingerprint: string }) => > Removing the {name}
SSH key will invalidate its usage across the Panel. - + > ); };