From f896665dcf4d22dc1c341a84502e1abbc89ecd17 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Wed, 7 May 2025 13:36:13 +0200 Subject: [PATCH 01/48] chore(ci): Add labels to docker image --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5d16c45..faee65e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,10 @@ COPY --from=builder /app/public ./public COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/static ./.next/static +LABEL org.opencontainers.image.source="https://git.dominikstahl.dev/DHBW-WE/MeetUp" +LABEL org.opencontainers.image.title="MeetUp" +LABEL org.opencontainers.image.description="A web application for managing meetups" + EXPOSE 3000 ENV HOSTNAME="0.0.0.0" From e7fc02c8c99a73b65f989fc67433fd3583d624c4 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Wed, 7 May 2025 13:38:03 +0200 Subject: [PATCH 02/48] chore(ci): example environment variables add example environment variables to docker-compose.yml to prevent errors --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 9cff22a..e5c4b78 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,3 +5,5 @@ services: dockerfile: Dockerfile ports: - '3000:3000' + environment: + - AUTH_SECRET=secret From 2c384187708cc878b8677e92ffe74b4d3ddb43be Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Wed, 7 May 2025 13:39:29 +0200 Subject: [PATCH 03/48] chore(ci): remove sha_ tags from build docker images --- .github/workflows/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 69147b5..a3723c9 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -53,7 +53,7 @@ jobs: if: github.event_name == 'pull_request' with: push: true - tags: git.dominikstahl.dev/${{ env.REPO }}:sha_${{ github.sha }},git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag}} + tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag}} - name: Build and push (push_tag) uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6 @@ -67,4 +67,4 @@ jobs: if: github.event_name == 'push' && github.ref_type == 'branch' with: push: true - tags: git.dominikstahl.dev/${{ env.REPO }}:sha_${{ github.sha }},git.dominikstahl.dev/${{ env.REPO }}:main + tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag }} From 0927116a2caea67cbd269bc5f8cccd2c534fba6a Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Thu, 8 May 2025 14:31:45 +0200 Subject: [PATCH 04/48] fix: add missing env variable to docker-compose added the missing AUTH_URL variable to the example docker-compose.yml --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index e5c4b78..cee59f7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,9 @@ services: build: context: . dockerfile: Dockerfile + image: git.dominikstahl.dev/dhbw-we/meetup:main ports: - '3000:3000' environment: - AUTH_SECRET=secret + - AUTH_URL=http://localhost:3000 From ef65c5bbf65e66df71f8c7e28ec09e6ae3a08726 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Fri, 9 May 2025 22:11:48 +0200 Subject: [PATCH 05/48] chore: add Docker cleanup steps to workflows --- .github/workflows/container-scan.yml | 7 +++++++ .github/workflows/docker-build.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/container-scan.yml b/.github/workflows/container-scan.yml index 0266cdc..1c5ac22 100644 --- a/.github/workflows/container-scan.yml +++ b/.github/workflows/container-scan.yml @@ -41,3 +41,10 @@ jobs: uses: forgejo/upload-artifact@v4 with: path: trivy-report.json + + - name: Clean up Docker + run: | + docker system prune -af + docker volume prune -f + docker network prune -f + docker builder prune -af diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index a3723c9..e7f8888 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -68,3 +68,10 @@ jobs: with: push: true tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag }} + + - name: Clean up Docker + run: | + docker system prune -af + docker volume prune -f + docker network prune -f + docker builder prune -af From 794ed5483260e1591fa8f35bf422beaf1d8fe5d8 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Fri, 9 May 2025 22:48:12 +0200 Subject: [PATCH 06/48] chore: remove docker installs from workflows --- .github/workflows/container-scan.yml | 13 ------------- .github/workflows/docker-build.yml | 11 ----------- 2 files changed, 24 deletions(-) diff --git a/.github/workflows/container-scan.yml b/.github/workflows/container-scan.yml index 1c5ac22..8720c0b 100644 --- a/.github/workflows/container-scan.yml +++ b/.github/workflows/container-scan.yml @@ -8,23 +8,10 @@ jobs: container-scan: name: Container Scan runs-on: docker - container: - image: node:22-bullseye@sha256:ed0338dd02fd86861a59dc1cbc2e12152f3a93c4ce5933d347d6677232000dc7 steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - name: Install Docker - run: | - apt-get update - apt-get install -y ca-certificates curl - install -m 0755 -d /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc - chmod a+r /etc/apt/keyrings/docker.asc - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null - apt-get update - apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - - name: Build an image from Dockerfile run: docker build -t git.dominikstahl.dev/dhbw-we/meetup:${{ github.sha }} . diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e7f8888..674b4c4 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -13,17 +13,6 @@ jobs: docker: runs-on: docker steps: - - name: Install Docker - run: | - apt-get update - apt-get install -y ca-certificates curl - install -m 0755 -d /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc - chmod a+r /etc/apt/keyrings/docker.asc - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null - apt-get update - apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - - name: Login to Docker Hub uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 with: From ae2d7005e6a7196729ccc72e2bb7d762d7aff78e Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Fri, 9 May 2025 23:11:50 +0200 Subject: [PATCH 07/48] fix: keep some build caches to speed up builds --- .github/workflows/container-scan.yml | 7 +++---- .github/workflows/docker-build.yml | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/container-scan.yml b/.github/workflows/container-scan.yml index 8720c0b..e55bd72 100644 --- a/.github/workflows/container-scan.yml +++ b/.github/workflows/container-scan.yml @@ -31,7 +31,6 @@ jobs: - name: Clean up Docker run: | - docker system prune -af - docker volume prune -f - docker network prune -f - docker builder prune -af + docker builder prune -af --keep-storage 2GB + docker rmi $(docker images --filter=reference="git.dominikstahl.dev/dhbw-we/meetup:*" -q) + docker image prune -f diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 674b4c4..b061608 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -60,7 +60,6 @@ jobs: - name: Clean up Docker run: | - docker system prune -af - docker volume prune -f - docker network prune -f - docker builder prune -af + docker builder prune -af --keep-storage 2GB + docker rmi $(docker images --filter=reference="git.dominikstahl.dev/dhbw-we/meetup:*" -q) + docker image prune -f From dcb9dda000f7ca77c8aa17b39c3ab785d2c62ea3 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Fri, 9 May 2025 23:17:46 +0200 Subject: [PATCH 08/48] fix: set container image in workflow files --- .github/workflows/container-scan.yml | 2 ++ .github/workflows/docker-build.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/container-scan.yml b/.github/workflows/container-scan.yml index e55bd72..2139ad7 100644 --- a/.github/workflows/container-scan.yml +++ b/.github/workflows/container-scan.yml @@ -8,6 +8,8 @@ jobs: container-scan: name: Container Scan runs-on: docker + container: + image: ghcr.io/di0ik/forgejo_runner_container:main steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index b061608..1c6fa1b 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -12,6 +12,8 @@ on: jobs: docker: runs-on: docker + container: + image: ghcr.io/di0ik/forgejo_runner_container:main steps: - name: Login to Docker Hub uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 From aeb904dcde6492d41dbbbd33c04bd275a57bca95 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Fri, 9 May 2025 23:37:01 +0200 Subject: [PATCH 09/48] fix: make repo to lower workflow step posix compatible --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 1c6fa1b..0042890 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -37,7 +37,7 @@ jobs: - name: lowercase repo name run: | - echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} + echo "REPO=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')" >>${GITHUB_ENV} - name: Build and push (pull_request) uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6 From 96d2852c2dc9aaf1df41de5d0e814258ab2fb430 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Sat, 10 May 2025 00:01:34 +0200 Subject: [PATCH 10/48] fix: dont try to remove already removed tags --- .github/workflows/docker-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 0042890..6ecc55f 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -63,5 +63,4 @@ jobs: - name: Clean up Docker run: | docker builder prune -af --keep-storage 2GB - docker rmi $(docker images --filter=reference="git.dominikstahl.dev/dhbw-we/meetup:*" -q) docker image prune -f From cdc24c6ab39e85b1b8aabf78bfdc8c7391358a8e Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 9 May 2025 23:00:25 +0000 Subject: [PATCH 11/48] chore(deps): pin ghcr.io/di0ik/forgejo_runner_container docker tag to 672aee9 --- .github/workflows/container-scan.yml | 2 +- .github/workflows/docker-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/container-scan.yml b/.github/workflows/container-scan.yml index 2139ad7..e6b0ca5 100644 --- a/.github/workflows/container-scan.yml +++ b/.github/workflows/container-scan.yml @@ -9,7 +9,7 @@ jobs: name: Container Scan runs-on: docker container: - image: ghcr.io/di0ik/forgejo_runner_container:main + image: ghcr.io/di0ik/forgejo_runner_container:main@sha256:672aee9a5dfc35531db3a218ad9486eb5c5d7d9ac10bdcba13110470c10403ee steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 6ecc55f..9ed6a6b 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -13,7 +13,7 @@ jobs: docker: runs-on: docker container: - image: ghcr.io/di0ik/forgejo_runner_container:main + image: ghcr.io/di0ik/forgejo_runner_container:main@sha256:672aee9a5dfc35531db3a218ad9486eb5c5d7d9ac10bdcba13110470c10403ee steps: - name: Login to Docker Hub uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 From 8e3786ae6b1610029aaae8faddc7f9f44fe8ea46 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 10 May 2025 06:00:38 +0000 Subject: [PATCH 12/48] fix(deps): update dependency next-auth to v5.0.0-beta.28 --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 249a2ad..9d4f71f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,10 +15,10 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@auth/core@0.39.0": - version "0.39.0" - resolved "https://registry.yarnpkg.com/@auth/core/-/core-0.39.0.tgz#39468332bdd6d710f859dcfb6597618f6d99efff" - integrity sha512-jusviw/sUSfAh6S/wjY5tRmJOq0Itd3ImF+c/b4HB9DfmfChtcfVJTNJeqCeExeCG8oh4PBKRsMQJsn2W6NhFQ== +"@auth/core@0.39.1": + version "0.39.1" + resolved "https://registry.yarnpkg.com/@auth/core/-/core-0.39.1.tgz#2b42697154f29b9f8c4c76f6978ed94ea6e19219" + integrity sha512-McD8slui0oOA1pjR5sPjLPl5Zm//nLP/8T3kr8hxIsvNLvsiudYvPHhDFPjh1KcZ2nFxCkZmP6bRxaaPd/AnLA== dependencies: "@panva/hkdf" "^1.2.1" jose "^6.0.6" @@ -2713,11 +2713,11 @@ negotiator@^1.0.0: integrity sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg== next-auth@^5.0.0-beta.25: - version "5.0.0-beta.27" - resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-5.0.0-beta.27.tgz#dff4cbedc07dc3e6a88148ffd8bdd41c1e87ff13" - integrity sha512-/QtP9C0C99YpEuBEJqMaDXH3ISWMgObQalwVZEoC7sskaIPhv5fQl6fXS/rXJQKqLY6MNJ42rqjqmRdoXZH2EQ== + version "5.0.0-beta.28" + resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-5.0.0-beta.28.tgz#6a7673f858980aaa92668d5c41e5ec3d800866bc" + integrity sha512-2RDR1h3DJb4nizcd5UBBwC2gtyP7j/jTvVLvEtDaFSKUWNfou3Gek2uTNHSga/Q4I/GF+OJobA4mFbRaWJgIDQ== dependencies: - "@auth/core" "0.39.0" + "@auth/core" "0.39.1" next-themes@^0.4.6: version "0.4.6" From 2f81a099d49cd8ec0d3711b47d1519bb8fce06ea Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 9 May 2025 19:02:28 +0000 Subject: [PATCH 13/48] fix(deps): update dependency lucide-react to ^0.509.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f50124c..1a21262 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@radix-ui/react-slot": "^1.2.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", - "lucide-react": "^0.508.0", + "lucide-react": "^0.509.0", "next": "15.3.2", "next-auth": "^5.0.0-beta.25", "next-themes": "^0.4.6", diff --git a/yarn.lock b/yarn.lock index 9d4f71f..83f34eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2604,10 +2604,10 @@ loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -lucide-react@^0.508.0: - version "0.508.0" - resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-0.508.0.tgz#9155465e2051bb42a0ebb2d806f25a8b7125225f" - integrity sha512-gcP16PnexqtOFrTtv98kVsGzTfnbPekzZiQfByi2S89xfk7E/4uKE1USZqccIp58v42LqkO7MuwpCqshwSrJCg== +lucide-react@^0.509.0: + version "0.509.0" + resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-0.509.0.tgz#faf65740f603708fd09d21fabf88950d362dbf8c" + integrity sha512-xCJHn6Uh5qF6PGml25vveCTrHJZcqS1G1MVzWZK54ZQsOiCVJk4fwY3oyo5EXS2S+aqvTpWYIfJN+PesJ0quxg== magic-string@^0.30.17: version "0.30.17" From 8298dbba28453dc40423763ac8e06b748e2fc291 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 12:07:29 +0200 Subject: [PATCH 14/48] fix: update middleware to redirect authenticated users to home Automatically redirectis authenticated users from root path ('/') to the '/home' page. --- src/middleware.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/middleware.ts b/src/middleware.ts index a35c316..175bedc 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -8,6 +8,9 @@ export default auth((req) => { ) { const newUrl = new URL('/login', req.nextUrl.origin); return Response.redirect(newUrl); + } else if (req.auth != null && req.nextUrl.pathname === '/') { + const newUrl = new URL('/home', req.nextUrl.origin); + return Response.redirect(newUrl); } }); From 66cc84d6345ba08372641fc781fa319135b0ee92 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Wed, 7 May 2025 13:36:13 +0200 Subject: [PATCH 15/48] chore(ci): Add labels to docker image --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5d16c45..faee65e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,10 @@ COPY --from=builder /app/public ./public COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/static ./.next/static +LABEL org.opencontainers.image.source="https://git.dominikstahl.dev/DHBW-WE/MeetUp" +LABEL org.opencontainers.image.title="MeetUp" +LABEL org.opencontainers.image.description="A web application for managing meetups" + EXPOSE 3000 ENV HOSTNAME="0.0.0.0" From bbdecc8b2f68004fc8a1ed660451741400a2e8fb Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Wed, 7 May 2025 13:38:03 +0200 Subject: [PATCH 16/48] chore(ci): example environment variables add example environment variables to docker-compose.yml to prevent errors --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 9cff22a..e5c4b78 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,3 +5,5 @@ services: dockerfile: Dockerfile ports: - '3000:3000' + environment: + - AUTH_SECRET=secret From 2bb330245fcace4ea807bf0e2b046de6cb9294b2 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Wed, 7 May 2025 13:39:29 +0200 Subject: [PATCH 17/48] chore(ci): remove sha_ tags from build docker images --- .github/workflows/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 69147b5..a3723c9 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -53,7 +53,7 @@ jobs: if: github.event_name == 'pull_request' with: push: true - tags: git.dominikstahl.dev/${{ env.REPO }}:sha_${{ github.sha }},git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag}} + tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag}} - name: Build and push (push_tag) uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6 @@ -67,4 +67,4 @@ jobs: if: github.event_name == 'push' && github.ref_type == 'branch' with: push: true - tags: git.dominikstahl.dev/${{ env.REPO }}:sha_${{ github.sha }},git.dominikstahl.dev/${{ env.REPO }}:main + tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag }} From e0b0dd05dc5b76bbfda5872960ba8a5bdae4b509 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Thu, 8 May 2025 14:31:45 +0200 Subject: [PATCH 18/48] fix: add missing env variable to docker-compose added the missing AUTH_URL variable to the example docker-compose.yml --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index e5c4b78..cee59f7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,9 @@ services: build: context: . dockerfile: Dockerfile + image: git.dominikstahl.dev/dhbw-we/meetup:main ports: - '3000:3000' environment: - AUTH_SECRET=secret + - AUTH_URL=http://localhost:3000 From 90474882ea37ed15474f8daecdacf5c7378f500a Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Fri, 9 May 2025 22:11:48 +0200 Subject: [PATCH 19/48] chore: add Docker cleanup steps to workflows --- .github/workflows/container-scan.yml | 7 +++++++ .github/workflows/docker-build.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/container-scan.yml b/.github/workflows/container-scan.yml index 0266cdc..1c5ac22 100644 --- a/.github/workflows/container-scan.yml +++ b/.github/workflows/container-scan.yml @@ -41,3 +41,10 @@ jobs: uses: forgejo/upload-artifact@v4 with: path: trivy-report.json + + - name: Clean up Docker + run: | + docker system prune -af + docker volume prune -f + docker network prune -f + docker builder prune -af diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index a3723c9..e7f8888 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -68,3 +68,10 @@ jobs: with: push: true tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag }} + + - name: Clean up Docker + run: | + docker system prune -af + docker volume prune -f + docker network prune -f + docker builder prune -af From a3b6e857662e7d6fcf51fd992968672cca4c4aef Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Fri, 9 May 2025 22:48:12 +0200 Subject: [PATCH 20/48] chore: remove docker installs from workflows --- .github/workflows/container-scan.yml | 13 ------------- .github/workflows/docker-build.yml | 11 ----------- 2 files changed, 24 deletions(-) diff --git a/.github/workflows/container-scan.yml b/.github/workflows/container-scan.yml index 1c5ac22..8720c0b 100644 --- a/.github/workflows/container-scan.yml +++ b/.github/workflows/container-scan.yml @@ -8,23 +8,10 @@ jobs: container-scan: name: Container Scan runs-on: docker - container: - image: node:22-bullseye@sha256:ed0338dd02fd86861a59dc1cbc2e12152f3a93c4ce5933d347d6677232000dc7 steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - name: Install Docker - run: | - apt-get update - apt-get install -y ca-certificates curl - install -m 0755 -d /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc - chmod a+r /etc/apt/keyrings/docker.asc - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null - apt-get update - apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - - name: Build an image from Dockerfile run: docker build -t git.dominikstahl.dev/dhbw-we/meetup:${{ github.sha }} . diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e7f8888..674b4c4 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -13,17 +13,6 @@ jobs: docker: runs-on: docker steps: - - name: Install Docker - run: | - apt-get update - apt-get install -y ca-certificates curl - install -m 0755 -d /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc - chmod a+r /etc/apt/keyrings/docker.asc - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null - apt-get update - apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - - name: Login to Docker Hub uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 with: From 76059363355350515d01e8b17c8ec766a71f28f5 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Fri, 9 May 2025 23:11:50 +0200 Subject: [PATCH 21/48] fix: keep some build caches to speed up builds --- .github/workflows/container-scan.yml | 7 +++---- .github/workflows/docker-build.yml | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/container-scan.yml b/.github/workflows/container-scan.yml index 8720c0b..e55bd72 100644 --- a/.github/workflows/container-scan.yml +++ b/.github/workflows/container-scan.yml @@ -31,7 +31,6 @@ jobs: - name: Clean up Docker run: | - docker system prune -af - docker volume prune -f - docker network prune -f - docker builder prune -af + docker builder prune -af --keep-storage 2GB + docker rmi $(docker images --filter=reference="git.dominikstahl.dev/dhbw-we/meetup:*" -q) + docker image prune -f diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 674b4c4..b061608 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -60,7 +60,6 @@ jobs: - name: Clean up Docker run: | - docker system prune -af - docker volume prune -f - docker network prune -f - docker builder prune -af + docker builder prune -af --keep-storage 2GB + docker rmi $(docker images --filter=reference="git.dominikstahl.dev/dhbw-we/meetup:*" -q) + docker image prune -f From 99eb22d471ef52ea6f26c2054032f513d0ee3f1a Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Fri, 9 May 2025 23:17:46 +0200 Subject: [PATCH 22/48] fix: set container image in workflow files --- .github/workflows/container-scan.yml | 2 ++ .github/workflows/docker-build.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/container-scan.yml b/.github/workflows/container-scan.yml index e55bd72..2139ad7 100644 --- a/.github/workflows/container-scan.yml +++ b/.github/workflows/container-scan.yml @@ -8,6 +8,8 @@ jobs: container-scan: name: Container Scan runs-on: docker + container: + image: ghcr.io/di0ik/forgejo_runner_container:main steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index b061608..1c6fa1b 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -12,6 +12,8 @@ on: jobs: docker: runs-on: docker + container: + image: ghcr.io/di0ik/forgejo_runner_container:main steps: - name: Login to Docker Hub uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 From e99a6374353970851f87ddd6cd907037b6cce179 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Fri, 9 May 2025 23:37:01 +0200 Subject: [PATCH 23/48] fix: make repo to lower workflow step posix compatible --- .github/workflows/docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 1c6fa1b..0042890 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -37,7 +37,7 @@ jobs: - name: lowercase repo name run: | - echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} + echo "REPO=$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')" >>${GITHUB_ENV} - name: Build and push (pull_request) uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6 From 235d2cefc3e1c03c2baacf78798a4f7f982ce507 Mon Sep 17 00:00:00 2001 From: Dominik Stahl Date: Sat, 10 May 2025 00:01:34 +0200 Subject: [PATCH 24/48] fix: dont try to remove already removed tags --- .github/workflows/docker-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 0042890..6ecc55f 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -63,5 +63,4 @@ jobs: - name: Clean up Docker run: | docker builder prune -af --keep-storage 2GB - docker rmi $(docker images --filter=reference="git.dominikstahl.dev/dhbw-we/meetup:*" -q) docker image prune -f From e3a53aa1cee93ca7dec250bc1ce3acd52e915d3d Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 10 May 2025 06:00:38 +0000 Subject: [PATCH 25/48] fix(deps): update dependency next-auth to v5.0.0-beta.28 --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 249a2ad..9d4f71f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,10 +15,10 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@auth/core@0.39.0": - version "0.39.0" - resolved "https://registry.yarnpkg.com/@auth/core/-/core-0.39.0.tgz#39468332bdd6d710f859dcfb6597618f6d99efff" - integrity sha512-jusviw/sUSfAh6S/wjY5tRmJOq0Itd3ImF+c/b4HB9DfmfChtcfVJTNJeqCeExeCG8oh4PBKRsMQJsn2W6NhFQ== +"@auth/core@0.39.1": + version "0.39.1" + resolved "https://registry.yarnpkg.com/@auth/core/-/core-0.39.1.tgz#2b42697154f29b9f8c4c76f6978ed94ea6e19219" + integrity sha512-McD8slui0oOA1pjR5sPjLPl5Zm//nLP/8T3kr8hxIsvNLvsiudYvPHhDFPjh1KcZ2nFxCkZmP6bRxaaPd/AnLA== dependencies: "@panva/hkdf" "^1.2.1" jose "^6.0.6" @@ -2713,11 +2713,11 @@ negotiator@^1.0.0: integrity sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg== next-auth@^5.0.0-beta.25: - version "5.0.0-beta.27" - resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-5.0.0-beta.27.tgz#dff4cbedc07dc3e6a88148ffd8bdd41c1e87ff13" - integrity sha512-/QtP9C0C99YpEuBEJqMaDXH3ISWMgObQalwVZEoC7sskaIPhv5fQl6fXS/rXJQKqLY6MNJ42rqjqmRdoXZH2EQ== + version "5.0.0-beta.28" + resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-5.0.0-beta.28.tgz#6a7673f858980aaa92668d5c41e5ec3d800866bc" + integrity sha512-2RDR1h3DJb4nizcd5UBBwC2gtyP7j/jTvVLvEtDaFSKUWNfou3Gek2uTNHSga/Q4I/GF+OJobA4mFbRaWJgIDQ== dependencies: - "@auth/core" "0.39.0" + "@auth/core" "0.39.1" next-themes@^0.4.6: version "0.4.6" From b795d6a66ac40e21d2b7ba6f7736ad1fd75a44b3 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 01:43:00 +0200 Subject: [PATCH 26/48] feat: add Tabs component with Radix UI integration --- src/app/settings/page.tsx | 10 ++++ src/components/ui/tabs.tsx | 66 +++++++++++++++++++++++++ src/components/user/redirect-button.tsx | 16 ++++++ 3 files changed, 92 insertions(+) create mode 100644 src/app/settings/page.tsx create mode 100644 src/components/ui/tabs.tsx create mode 100644 src/components/user/redirect-button.tsx diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx new file mode 100644 index 0000000..8d31232 --- /dev/null +++ b/src/app/settings/page.tsx @@ -0,0 +1,10 @@ +import { RedirectButton } from '@/components/user/redirect-button'; + +export default function Home() { + return ( +
+

Settings

+ +
+ ); +} diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx new file mode 100644 index 0000000..497ba5e --- /dev/null +++ b/src/components/ui/tabs.tsx @@ -0,0 +1,66 @@ +"use client" + +import * as React from "react" +import * as TabsPrimitive from "@radix-ui/react-tabs" + +import { cn } from "@/lib/utils" + +function Tabs({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsList({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsTrigger({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Tabs, TabsList, TabsTrigger, TabsContent } diff --git a/src/components/user/redirect-button.tsx b/src/components/user/redirect-button.tsx new file mode 100644 index 0000000..c4bf997 --- /dev/null +++ b/src/components/user/redirect-button.tsx @@ -0,0 +1,16 @@ +import { Button } from '../ui/button'; +import Link from 'next/link'; + +export function RedirectButton({ + redirectUrl, + buttonText, +}: { + redirectUrl: string; + buttonText: string; +}) { + return ( + + + + ); +} From 29a1dd8d7ce952ecb981406dcd8829ede25823ca Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 01:43:18 +0200 Subject: [PATCH 27/48] feat: add Radix UI Tabs component and update dependencies --- package.json | 1 + src/app/home/page.tsx | 2 + yarn.lock | 103 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 105 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f50124c..4a8368b 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", "@radix-ui/react-slot": "^1.2.2", + "@radix-ui/react-tabs": "^1.1.11", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.508.0", diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx index b28c508..c85d75b 100644 --- a/src/app/home/page.tsx +++ b/src/app/home/page.tsx @@ -1,10 +1,12 @@ import { Logout } from '@/components/user/sso-logout-button'; +import { RedirectButton } from '@/components/user/redirect-button'; export default function Home() { return (

Home

+
); } diff --git a/yarn.lock b/yarn.lock index 9d4f71f..4ddd750 100644 --- a/yarn.lock +++ b/yarn.lock @@ -625,18 +625,119 @@ dependencies: "@prisma/debug" "6.7.0" +"@radix-ui/primitive@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.1.2.tgz#83f415c4425f21e3d27914c12b3272a32e3dae65" + integrity sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA== + +"@radix-ui/react-collection@1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.1.6.tgz#fecf74475e4660ee99c7eb1ebfa5ccfb1a219fe4" + integrity sha512-PbhRFK4lIEw9ADonj48tiYWzkllz81TM7KVYyyMMw2cwHO7D5h4XKEblL8NlaRisTK3QTe6tBEhDccFUryxHBQ== + dependencies: + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-slot" "1.2.2" + "@radix-ui/react-compose-refs@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz#a2c4c47af6337048ee78ff6dc0d090b390d2bb30" integrity sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg== -"@radix-ui/react-slot@^1.2.2": +"@radix-ui/react-context@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.1.2.tgz#61628ef269a433382c364f6f1e3788a6dc213a36" + integrity sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA== + +"@radix-ui/react-direction@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.1.1.tgz#39e5a5769e676c753204b792fbe6cf508e550a14" + integrity sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw== + +"@radix-ui/react-id@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.1.1.tgz#1404002e79a03fe062b7e3864aa01e24bd1471f7" + integrity sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg== + dependencies: + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-presence@1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.4.tgz#253ac0ad4946c5b4a9c66878335f5cf07c967ced" + integrity sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA== + dependencies: + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-primitive@2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-primitive/-/react-primitive-2.1.2.tgz#03f64f957719c761d22c2f92cc43ffb64bd42cc8" + integrity sha512-uHa+l/lKfxuDD2zjN/0peM/RhhSmRjr5YWdk/37EnSv1nJ88uvG85DPexSm8HdFQROd2VdERJ6ynXbkCFi+APw== + dependencies: + "@radix-ui/react-slot" "1.2.2" + +"@radix-ui/react-roving-focus@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.9.tgz#37fcacb7dfcc9ea45401b2dd07bd97ccbb8911b2" + integrity sha512-ZzrIFnMYHHCNqSNCsuN6l7wlewBEq0O0BCSBkabJMFXVO51LRUTq71gLP1UxFvmrXElqmPjA5VX7IqC9VpazAQ== + dependencies: + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-collection" "1.1.6" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-direction" "1.1.1" + "@radix-ui/react-id" "1.1.1" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-controllable-state" "1.2.2" + +"@radix-ui/react-slot@1.2.2", "@radix-ui/react-slot@^1.2.2": version "1.2.2" resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.2.2.tgz#18e6533e778a2051edc2ad0773da8e22f03f626a" integrity sha512-y7TBO4xN4Y94FvcWIOIh18fM4R1A8S4q1jhoz4PNzOoHsFcN8pogcFmZrTYAm4F9VRUrWP/Mw7xSKybIeRI+CQ== dependencies: "@radix-ui/react-compose-refs" "1.1.2" +"@radix-ui/react-tabs@^1.1.11": + version "1.1.11" + resolved "https://registry.yarnpkg.com/@radix-ui/react-tabs/-/react-tabs-1.1.11.tgz#9dc002ea6f8ad6830bc20f349afdc57c6039009c" + integrity sha512-4FiKSVoXqPP/KfzlB7lwwqoFV6EPwkrrqGp9cUYXjwDYHhvpnqq79P+EPHKcdoTE7Rl8w/+6s9rTlsfXHES9GA== + dependencies: + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-direction" "1.1.1" + "@radix-ui/react-id" "1.1.1" + "@radix-ui/react-presence" "1.1.4" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-roving-focus" "1.1.9" + "@radix-ui/react-use-controllable-state" "1.2.2" + +"@radix-ui/react-use-callback-ref@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz#62a4dba8b3255fdc5cc7787faeac1c6e4cc58d40" + integrity sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg== + +"@radix-ui/react-use-controllable-state@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz#905793405de57d61a439f4afebbb17d0645f3190" + integrity sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg== + dependencies: + "@radix-ui/react-use-effect-event" "0.0.2" + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-use-effect-event@0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz#090cf30d00a4c7632a15548512e9152217593907" + integrity sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA== + dependencies: + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-use-layout-effect@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz#0c4230a9eed49d4589c967e2d9c0d9d60a23971e" + integrity sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ== + "@rtsao/scc@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" From bfe63179542359fcf5a9e50419f8d1ccee8fb032 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 9 May 2025 19:02:28 +0000 Subject: [PATCH 28/48] fix(deps): update dependency lucide-react to ^0.509.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4a8368b..affda80 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@radix-ui/react-tabs": "^1.1.11", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", - "lucide-react": "^0.508.0", + "lucide-react": "^0.509.0", "next": "15.3.2", "next-auth": "^5.0.0-beta.25", "next-themes": "^0.4.6", diff --git a/yarn.lock b/yarn.lock index 4ddd750..b66e349 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2705,10 +2705,10 @@ loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -lucide-react@^0.508.0: - version "0.508.0" - resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-0.508.0.tgz#9155465e2051bb42a0ebb2d806f25a8b7125225f" - integrity sha512-gcP16PnexqtOFrTtv98kVsGzTfnbPekzZiQfByi2S89xfk7E/4uKE1USZqccIp58v42LqkO7MuwpCqshwSrJCg== +lucide-react@^0.509.0: + version "0.509.0" + resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-0.509.0.tgz#faf65740f603708fd09d21fabf88950d362dbf8c" + integrity sha512-xCJHn6Uh5qF6PGml25vveCTrHJZcqS1G1MVzWZK54ZQsOiCVJk4fwY3oyo5EXS2S+aqvTpWYIfJN+PesJ0quxg== magic-string@^0.30.17: version "0.30.17" From ed6eb6f022470b2c2840f4577cf83ead29610b8b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 9 May 2025 23:00:25 +0000 Subject: [PATCH 29/48] chore(deps): pin ghcr.io/di0ik/forgejo_runner_container docker tag to 672aee9 --- .github/workflows/container-scan.yml | 2 +- .github/workflows/docker-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/container-scan.yml b/.github/workflows/container-scan.yml index 2139ad7..e6b0ca5 100644 --- a/.github/workflows/container-scan.yml +++ b/.github/workflows/container-scan.yml @@ -9,7 +9,7 @@ jobs: name: Container Scan runs-on: docker container: - image: ghcr.io/di0ik/forgejo_runner_container:main + image: ghcr.io/di0ik/forgejo_runner_container:main@sha256:672aee9a5dfc35531db3a218ad9486eb5c5d7d9ac10bdcba13110470c10403ee steps: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 6ecc55f..9ed6a6b 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -13,7 +13,7 @@ jobs: docker: runs-on: docker container: - image: ghcr.io/di0ik/forgejo_runner_container:main + image: ghcr.io/di0ik/forgejo_runner_container:main@sha256:672aee9a5dfc35531db3a218ad9486eb5c5d7d9ac10bdcba13110470c10403ee steps: - name: Login to Docker Hub uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 From 90b088b7c32c1202cbf3e698b37b5bc23a2b8a67 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 12:07:29 +0200 Subject: [PATCH 30/48] fix: update middleware to redirect authenticated users to home Automatically redirectis authenticated users from root path ('/') to the '/home' page. --- src/middleware.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/middleware.ts b/src/middleware.ts index a35c316..175bedc 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -8,6 +8,9 @@ export default auth((req) => { ) { const newUrl = new URL('/login', req.nextUrl.origin); return Response.redirect(newUrl); + } else if (req.auth != null && req.nextUrl.pathname === '/') { + const newUrl = new URL('/home', req.nextUrl.origin); + return Response.redirect(newUrl); } }); From 4c31fc459f675cc85b650f177e4f99f3414cc59a Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 13:30:26 +0200 Subject: [PATCH 31/48] fix: standardize quotes and formatting in Tabs component --- src/components/ui/tabs.tsx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx index 497ba5e..4a9fbd0 100644 --- a/src/components/ui/tabs.tsx +++ b/src/components/ui/tabs.tsx @@ -1,9 +1,9 @@ -"use client" +'use client'; -import * as React from "react" -import * as TabsPrimitive from "@radix-ui/react-tabs" +import * as React from 'react'; +import * as TabsPrimitive from '@radix-ui/react-tabs'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; function Tabs({ className, @@ -11,11 +11,11 @@ function Tabs({ }: React.ComponentProps) { return ( - ) + ); } function TabsList({ @@ -24,14 +24,14 @@ function TabsList({ }: React.ComponentProps) { return ( - ) + ); } function TabsTrigger({ @@ -40,14 +40,14 @@ function TabsTrigger({ }: React.ComponentProps) { return ( - ) + ); } function TabsContent({ @@ -56,11 +56,11 @@ function TabsContent({ }: React.ComponentProps) { return ( - ) + ); } -export { Tabs, TabsList, TabsTrigger, TabsContent } +export { Tabs, TabsList, TabsTrigger, TabsContent }; From fc273906bd6e5a68a2e39d4c81e8dc1a624c50d0 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 13:30:46 +0200 Subject: [PATCH 32/48] feat: add Radix UI Label component and update dependencies --- package.json | 1 + src/components/ui/label.tsx | 24 ++++++++++++++++++++++++ yarn.lock | 7 +++++++ 3 files changed, 32 insertions(+) create mode 100644 src/components/ui/label.tsx diff --git a/package.json b/package.json index affda80..84de5e2 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@fortawesome/free-regular-svg-icons": "^6.7.2", "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", + "@radix-ui/react-label": "^2.1.6", "@radix-ui/react-slot": "^1.2.2", "@radix-ui/react-tabs": "^1.1.11", "class-variance-authority": "^0.7.1", diff --git a/src/components/ui/label.tsx b/src/components/ui/label.tsx new file mode 100644 index 0000000..6bc5f71 --- /dev/null +++ b/src/components/ui/label.tsx @@ -0,0 +1,24 @@ +'use client'; + +import * as React from 'react'; +import * as LabelPrimitive from '@radix-ui/react-label'; + +import { cn } from '@/lib/utils'; + +function Label({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +export { Label }; diff --git a/yarn.lock b/yarn.lock index b66e349..e35d14f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -662,6 +662,13 @@ dependencies: "@radix-ui/react-use-layout-effect" "1.1.1" +"@radix-ui/react-label@^2.1.6": + version "2.1.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-label/-/react-label-2.1.6.tgz#45ebd1381996d0311d199781bed15a092c7978dd" + integrity sha512-S/hv1mTlgcPX2gCTJrWuTjSXf7ER3Zf7zWGtOprxhIIY93Qin3n5VgNA0Ez9AgrK/lEtlYgzLd4f5x6AVar4Yw== + dependencies: + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-presence@1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.4.tgz#253ac0ad4946c5b4a9c66878335f5cf07c967ced" From 42f299c27e47d3ba02e9a7a6b0831c6f23428e47 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 13:31:12 +0200 Subject: [PATCH 33/48] feat: implement Settings page with tabs --- src/app/settings/page.tsx | 73 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index 8d31232..983acf7 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -1,10 +1,79 @@ -import { RedirectButton } from '@/components/user/redirect-button'; +//import { RedirectButton } from '@/components/user/redirect-button'; +import { Button } from '@/components/ui/button'; +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from '@/components/ui/card'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; -export default function Home() { +/*export default function Settings() { return (

Settings

); +}*/ + +export default function Settings() { + return ( +
+ + + General + Account + + + + + General + + Make changes to your account here. Click save when you're done. + + + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + Account Settings + + + +
+ + +
+
+ + +
+
+ + + +
+
+
+
+ ); } From 41a08a4c377e77eaba0843ad169d24dde7a5cac4 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 13:32:51 +0200 Subject: [PATCH 34/48] feat: implement Settings page with tabs --- src/app/settings/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index 983acf7..a0a1d37 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -34,7 +34,7 @@ export default function Settings() { General - Make changes to your account here. Click save when you're done. + Make changes to your account here. Click save when you are done. From ec66b94f64a064f323a14a036f05e3a0c974b42d Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 16:34:53 +0200 Subject: [PATCH 35/48] feat: add Radix UI Select, Separator, and Switch components --- package.json | 4 + src/components/ui/select.tsx | 185 ++++++++++++++++++++++++ src/components/ui/separator.tsx | 28 ++++ src/components/ui/switch.tsx | 31 ++++ yarn.lock | 249 +++++++++++++++++++++++++++++++- 5 files changed, 496 insertions(+), 1 deletion(-) create mode 100644 src/components/ui/select.tsx create mode 100644 src/components/ui/separator.tsx create mode 100644 src/components/ui/switch.tsx diff --git a/package.json b/package.json index 84de5e2..552ac7b 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,11 @@ "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", "@radix-ui/react-label": "^2.1.6", + "@radix-ui/react-scroll-area": "^1.2.8", + "@radix-ui/react-select": "^2.2.4", + "@radix-ui/react-separator": "^1.1.6", "@radix-ui/react-slot": "^1.2.2", + "@radix-ui/react-switch": "^1.2.4", "@radix-ui/react-tabs": "^1.1.11", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx new file mode 100644 index 0000000..dcbbc0c --- /dev/null +++ b/src/components/ui/select.tsx @@ -0,0 +1,185 @@ +"use client" + +import * as React from "react" +import * as SelectPrimitive from "@radix-ui/react-select" +import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react" + +import { cn } from "@/lib/utils" + +function Select({ + ...props +}: React.ComponentProps) { + return +} + +function SelectGroup({ + ...props +}: React.ComponentProps) { + return +} + +function SelectValue({ + ...props +}: React.ComponentProps) { + return +} + +function SelectTrigger({ + className, + size = "default", + children, + ...props +}: React.ComponentProps & { + size?: "sm" | "default" +}) { + return ( + + {children} + + + + + ) +} + +function SelectContent({ + className, + children, + position = "popper", + ...props +}: React.ComponentProps) { + return ( + + + + + {children} + + + + + ) +} + +function SelectLabel({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function SelectItem({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + + + + + + {children} + + ) +} + +function SelectSeparator({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function SelectScrollUpButton({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +function SelectScrollDownButton({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +export { + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectLabel, + SelectScrollDownButton, + SelectScrollUpButton, + SelectSeparator, + SelectTrigger, + SelectValue, +} diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsx new file mode 100644 index 0000000..67c73e5 --- /dev/null +++ b/src/components/ui/separator.tsx @@ -0,0 +1,28 @@ +"use client" + +import * as React from "react" +import * as SeparatorPrimitive from "@radix-ui/react-separator" + +import { cn } from "@/lib/utils" + +function Separator({ + className, + orientation = "horizontal", + decorative = true, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Separator } diff --git a/src/components/ui/switch.tsx b/src/components/ui/switch.tsx new file mode 100644 index 0000000..6a2b524 --- /dev/null +++ b/src/components/ui/switch.tsx @@ -0,0 +1,31 @@ +"use client" + +import * as React from "react" +import * as SwitchPrimitive from "@radix-ui/react-switch" + +import { cn } from "@/lib/utils" + +function Switch({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +export { Switch } diff --git a/yarn.lock b/yarn.lock index e35d14f..dcf7130 100644 --- a/yarn.lock +++ b/yarn.lock @@ -239,6 +239,33 @@ "@eslint/core" "^0.13.0" levn "^0.4.1" +"@floating-ui/core@^1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.7.0.tgz#1aff27a993ea1b254a586318c29c3b16ea0f4d0a" + integrity sha512-FRdBLykrPPA6P76GGGqlex/e7fbe0F1ykgxHYNXQsH/iTEtjMj/f9bpY5oQqbjt5VgZvgz/uKXbGuROijh3VLA== + dependencies: + "@floating-ui/utils" "^0.2.9" + +"@floating-ui/dom@^1.0.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.7.0.tgz#f9f83ee4fee78ac23ad9e65b128fc11a27857532" + integrity sha512-lGTor4VlXcesUMh1cupTUTDoCxMb0V6bm3CnxHzQcw8Eaf1jQbgQX4i02fYgT0vJ82tb5MZ4CZk1LRGkktJCzg== + dependencies: + "@floating-ui/core" "^1.7.0" + "@floating-ui/utils" "^0.2.9" + +"@floating-ui/react-dom@^2.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.1.2.tgz#a1349bbf6a0e5cb5ded55d023766f20a4d439a31" + integrity sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A== + dependencies: + "@floating-ui/dom" "^1.0.0" + +"@floating-ui/utils@^0.2.9": + version "0.2.9" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.9.tgz#50dea3616bc8191fb8e112283b49eaff03e78429" + integrity sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg== + "@fortawesome/fontawesome-common-types@6.7.2": version "6.7.2" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz#7123d74b0c1e726794aed1184795dbce12186470" @@ -625,11 +652,23 @@ dependencies: "@prisma/debug" "6.7.0" +"@radix-ui/number@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/number/-/number-1.1.1.tgz#7b2c9225fbf1b126539551f5985769d0048d9090" + integrity sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g== + "@radix-ui/primitive@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.1.2.tgz#83f415c4425f21e3d27914c12b3272a32e3dae65" integrity sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA== +"@radix-ui/react-arrow@1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-arrow/-/react-arrow-1.1.6.tgz#4b460fdbc1ac097a4964e04ca404c25c2f6d7d3f" + integrity sha512-2JMfHJf/eVnwq+2dewT3C0acmCWD3XiVA1Da+jTDqo342UlU13WvXtqHhG+yJw5JeQmu4ue2eMy6gcEArLBlcw== + dependencies: + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-collection@1.1.6": version "1.1.6" resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.1.6.tgz#fecf74475e4660ee99c7eb1ebfa5ccfb1a219fe4" @@ -655,6 +694,31 @@ resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.1.1.tgz#39e5a5769e676c753204b792fbe6cf508e550a14" integrity sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw== +"@radix-ui/react-dismissable-layer@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.9.tgz#46e025ba6e6f403677e22fbb7d99b63cf7b32bca" + integrity sha512-way197PiTvNp+WBP7svMJasHl+vibhWGQDb6Mgf5mhEWJkgb85z7Lfl9TUdkqpWsf8GRNmoopx9ZxCyDzmgRMQ== + dependencies: + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-escape-keydown" "1.1.1" + +"@radix-ui/react-focus-guards@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.2.tgz#4ec9a7e50925f7fb661394460045b46212a33bed" + integrity sha512-fyjAACV62oPV925xFCrH8DR5xWhg9KYtJT4s3u54jxp+L/hbpTY2kIeEFFbFe+a/HCE94zGQMZLIpVTPVZDhaA== + +"@radix-ui/react-focus-scope@1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.6.tgz#a265c5f2c6fa4365cb16bdf4fee69e36b62f728a" + integrity sha512-r9zpYNUQY+2jWHWZGyddQLL9YHkM/XvSFHVcWs7bdVuxMAnCwTAuy6Pf47Z4nw7dYcUou1vg/VgjjrrH03VeBw== + dependencies: + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-id@1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.1.1.tgz#1404002e79a03fe062b7e3864aa01e24bd1471f7" @@ -669,6 +733,30 @@ dependencies: "@radix-ui/react-primitive" "2.1.2" +"@radix-ui/react-popper@1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-popper/-/react-popper-1.2.6.tgz#227d2882f19d80933796525c7bbd0d3ddf699ac0" + integrity sha512-7iqXaOWIjDBfIG7aq8CUEeCSsQMLFdn7VEE8TaFz704DtEzpPHR7w/uuzRflvKgltqSAImgcmxQ7fFX3X7wasg== + dependencies: + "@floating-ui/react-dom" "^2.0.0" + "@radix-ui/react-arrow" "1.1.6" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-layout-effect" "1.1.1" + "@radix-ui/react-use-rect" "1.1.1" + "@radix-ui/react-use-size" "1.1.1" + "@radix-ui/rect" "1.1.1" + +"@radix-ui/react-portal@1.1.8": + version "1.1.8" + resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.1.8.tgz#0181e85bc0d8c67229dd8cf198204f5f4cc7c09c" + integrity sha512-hQsTUIn7p7fxCPvao/q6wpbxmCwgLrlz+nOrJgC+RwfZqWY/WN+UMqkXzrtKbPrF82P43eCTl3ekeKuyAQbFeg== + dependencies: + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-layout-effect" "1.1.1" + "@radix-ui/react-presence@1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.4.tgz#253ac0ad4946c5b4a9c66878335f5cf07c967ced" @@ -699,6 +787,55 @@ "@radix-ui/react-use-callback-ref" "1.1.1" "@radix-ui/react-use-controllable-state" "1.2.2" +"@radix-ui/react-scroll-area@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@radix-ui/react-scroll-area/-/react-scroll-area-1.2.8.tgz#98a11fe9ca086e403d5c8b5b4c8f781439b45e68" + integrity sha512-K5h1RkYA6M0Sn61BV5LQs686zqBsSC0sGzL4/Gw4mNnjzrQcGSc6YXfC6CRFNaGydSdv5+M8cb0eNsOGo0OXtQ== + dependencies: + "@radix-ui/number" "1.1.1" + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-direction" "1.1.1" + "@radix-ui/react-presence" "1.1.4" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-select@^2.2.4": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-select/-/react-select-2.2.4.tgz#56eeffd9d5ee23392bba4635e7ae3f381ada793d" + integrity sha512-/OOm58Gil4Ev5zT8LyVzqfBcij4dTHYdeyuF5lMHZ2bIp0Lk9oETocYiJ5QC0dHekEQnK6L/FNJCceeb4AkZ6Q== + dependencies: + "@radix-ui/number" "1.1.1" + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-collection" "1.1.6" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-direction" "1.1.1" + "@radix-ui/react-dismissable-layer" "1.1.9" + "@radix-ui/react-focus-guards" "1.1.2" + "@radix-ui/react-focus-scope" "1.1.6" + "@radix-ui/react-id" "1.1.1" + "@radix-ui/react-popper" "1.2.6" + "@radix-ui/react-portal" "1.1.8" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-slot" "1.2.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-controllable-state" "1.2.2" + "@radix-ui/react-use-layout-effect" "1.1.1" + "@radix-ui/react-use-previous" "1.1.1" + "@radix-ui/react-visually-hidden" "1.2.2" + aria-hidden "^1.2.4" + react-remove-scroll "^2.6.3" + +"@radix-ui/react-separator@^1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-separator/-/react-separator-1.1.6.tgz#e58500b0e54ba71023955175c7897542bf143271" + integrity sha512-Izof3lPpbCfTM7WDta+LRkz31jem890VjEvpVRoWQNKpDUMMVffuyq854XPGP1KYGWWmjmYvHvPFeocWhFCy1w== + dependencies: + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-slot@1.2.2", "@radix-ui/react-slot@^1.2.2": version "1.2.2" resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.2.2.tgz#18e6533e778a2051edc2ad0773da8e22f03f626a" @@ -706,6 +843,19 @@ dependencies: "@radix-ui/react-compose-refs" "1.1.2" +"@radix-ui/react-switch@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-switch/-/react-switch-1.2.4.tgz#3318007c4147df69c04141aa7a77c034baea7169" + integrity sha512-yZCky6XZFnR7pcGonJkr9VyNRu46KcYAbyg1v/gVVCZUr8UJ4x+RpncC27hHtiZ15jC+3WS8Yg/JSgyIHnYYsQ== + dependencies: + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-controllable-state" "1.2.2" + "@radix-ui/react-use-previous" "1.1.1" + "@radix-ui/react-use-size" "1.1.1" + "@radix-ui/react-tabs@^1.1.11": version "1.1.11" resolved "https://registry.yarnpkg.com/@radix-ui/react-tabs/-/react-tabs-1.1.11.tgz#9dc002ea6f8ad6830bc20f349afdc57c6039009c" @@ -740,11 +890,49 @@ dependencies: "@radix-ui/react-use-layout-effect" "1.1.1" +"@radix-ui/react-use-escape-keydown@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.1.tgz#b3fed9bbea366a118f40427ac40500aa1423cc29" + integrity sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g== + dependencies: + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-layout-effect@1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz#0c4230a9eed49d4589c967e2d9c0d9d60a23971e" integrity sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ== +"@radix-ui/react-use-previous@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz#1a1ad5568973d24051ed0af687766f6c7cb9b5b5" + integrity sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ== + +"@radix-ui/react-use-rect@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-rect/-/react-use-rect-1.1.1.tgz#01443ca8ed071d33023c1113e5173b5ed8769152" + integrity sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w== + dependencies: + "@radix-ui/rect" "1.1.1" + +"@radix-ui/react-use-size@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz#6de276ffbc389a537ffe4316f5b0f24129405b37" + integrity sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ== + dependencies: + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-visually-hidden@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.2.tgz#aa6d0f95b0cd50f08b02393d25132f52ca7861dc" + integrity sha512-ORCmRUbNiZIv6uV5mhFrhsIKw4UX/N3syZtyqvry61tbGm4JlgQuSn0hk5TwCARsCjkcnuRkSdCE3xfb+ADHew== + dependencies: + "@radix-ui/react-primitive" "2.1.2" + +"@radix-ui/rect@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.1.1.tgz#78244efe12930c56fd255d7923865857c41ac8cb" + integrity sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw== + "@rtsao/scc@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" @@ -1123,6 +1311,13 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +aria-hidden@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.2.4.tgz#b78e383fdbc04d05762c78b4a25a501e736c4522" + integrity sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A== + dependencies: + tslib "^2.0.0" + aria-query@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.2.tgz#93f81a43480e33a338f19163a3d10a50c01dcd59" @@ -1525,6 +1720,11 @@ detect-libc@^2.0.4: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8" integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA== +detect-node-es@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493" + integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== + doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -2164,6 +2364,11 @@ get-intrinsic@^1.2.4, get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@ hasown "^2.0.2" math-intrinsics "^1.1.0" +get-nonce@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-nonce/-/get-nonce-1.0.1.tgz#fdf3f0278073820d2ce9426c18f07481b1e0cdf3" + integrity sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q== + get-proto@^1.0.0, get-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" @@ -3141,6 +3346,33 @@ react-is@^16.13.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-remove-scroll-bar@^2.3.7: + version "2.3.8" + resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz#99c20f908ee467b385b68a3469b4a3e750012223" + integrity sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q== + dependencies: + react-style-singleton "^2.2.2" + tslib "^2.0.0" + +react-remove-scroll@^2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz#df02cde56d5f2731e058531f8ffd7f9adec91ac2" + integrity sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ== + dependencies: + react-remove-scroll-bar "^2.3.7" + react-style-singleton "^2.2.3" + tslib "^2.1.0" + use-callback-ref "^1.3.3" + use-sidecar "^1.1.3" + +react-style-singleton@^2.2.2, react-style-singleton@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-2.2.3.tgz#4265608be69a4d70cfe3047f2c6c88b2c3ace388" + integrity sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ== + dependencies: + get-nonce "^1.0.0" + tslib "^2.0.0" + react@^19.0.0: version "19.1.0" resolved "https://registry.yarnpkg.com/react/-/react-19.1.0.tgz#926864b6c48da7627f004795d6cce50e90793b75" @@ -3607,7 +3839,7 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.4.0, tslib@^2.8.0: +tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.8.0: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -3732,6 +3964,21 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +use-callback-ref@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.3.3.tgz#98d9fab067075841c5b2c6852090d5d0feabe2bf" + integrity sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg== + dependencies: + tslib "^2.0.0" + +use-sidecar@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.1.3.tgz#10e7fd897d130b896e2c546c63a5e8233d00efdb" + integrity sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ== + dependencies: + detect-node-es "^1.1.0" + tslib "^2.0.0" + vary@^1, vary@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" From d547a93a40f5d63c2ded8f50537cfbcf48c731d3 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 16:35:12 +0200 Subject: [PATCH 36/48] feat: add ScrollableSettingsWrapper component for scrollable settings --- src/components/wrappers/settings-scroll.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/components/wrappers/settings-scroll.tsx diff --git a/src/components/wrappers/settings-scroll.tsx b/src/components/wrappers/settings-scroll.tsx new file mode 100644 index 0000000..e0f7251 --- /dev/null +++ b/src/components/wrappers/settings-scroll.tsx @@ -0,0 +1,16 @@ +import React from 'react'; + +interface ScrollableContentWrapperProps { + children: React.ReactNode; + className?: string; +} + +export const ScrollableSettingsWrapper: React.FC< + ScrollableContentWrapperProps +> = ({ children, className = '' }) => { + return ( +
+ {children} +
+ ); +}; From 40fd42db32dbdd0708a45f3e7adff71f792fb5c6 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 16:35:22 +0200 Subject: [PATCH 37/48] feat: added tabs to settings window and created general settings window design --- src/app/settings/page.tsx | 511 ++++++++++++++++++++++++++++++++++---- 1 file changed, 459 insertions(+), 52 deletions(-) diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index a0a1d37..d371912 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -11,6 +11,15 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { ScrollableSettingsWrapper } from '@/components/wrappers/settings-scroll'; // Adjust path as needed +import { Switch } from '@/components/ui/switch'; // Assuming you have this or will create/import it +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@/components/ui/select'; // Assuming you have this /*export default function Settings() { return ( @@ -21,59 +30,457 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; ); }*/ -export default function Settings() { +export default function SettingsPage() { return ( -
- - - General - Account - - - - - General - - Make changes to your account here. Click save when you are done. - - - -
- - -
-
- - -
-
- - - -
-
- - - - Account Settings - - - -
- - -
-
- - -
-
- - - -
-
-
+
+
+ + + Account + Notifications + Calendar + Privacy + Appearance + + + + + + + Account Settings + + Manage your account details and preferences. + + + +
+ + +
+
+ + +

+ Email is managed by your SSO provider. +

+
+
+ + +

+ Upload a new profile picture. +

+
+
+ + +
+ +
+ + +
+
+ +

+ Permanently delete your account and all associated data. +

+
+
+
+ + + + +
+
+ + + + + + Notification Preferences + + Choose how you want to be notified. + + + +
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + + +
+
+ + + + + + Calendar & Availability + + Manage your calendar display, default availability, and iCal + integrations. + + + +
+ + Display + +
+ + +
+
+ + +
+
+ + +
+
+ +
+ + Availability + +
+ +

+ Define your typical available hours (e.g., + Monday-Friday, 9 AM - 5 PM). +

+ +
+
+ +

+ Min time before a booking can be made. +

+
+ +
+
+
+ +

+ Max time in advance a booking can be made. +

+ +
+
+ +
+ + iCalendar Integration + +
+ + + +
+
+ + + +
+
+
+
+ + + + +
+
+ + + + + + Sharing & Privacy + + Control who can see your calendar and book time with you. + + + +
+ + +
+
+ +

+ (Override for Default Visibility) +
+ + This setting will override the default visibility for + your calendar. You can set specific friends or groups to + see your full calendar details. + +

+ +
+
+ + +
+
+ + +

+ Prevent specific users from seeing your calendar or + booking time. +

+
+
+
+ + + + +
+
+ + + + + + Appearance + + Customize the look and feel of the application. + + + +
+ + +
+
+ + +
+
+ + +
+
+
+ + + + +
+
+
+
); } From fbf504d44825073c9d138d65f5201eaacb8db1e3 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 16:48:41 +0200 Subject: [PATCH 38/48] fix: standardize quotes and formatting in Select, Separator, and Switch components --- src/components/ui/select.tsx | 92 ++++++++++++++++----------------- src/components/ui/separator.tsx | 20 +++---- src/components/ui/switch.tsx | 22 ++++---- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx index dcbbc0c..90f7ef0 100644 --- a/src/components/ui/select.tsx +++ b/src/components/ui/select.tsx @@ -1,70 +1,70 @@ -"use client" +'use client'; -import * as React from "react" -import * as SelectPrimitive from "@radix-ui/react-select" -import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react" +import * as React from 'react'; +import * as SelectPrimitive from '@radix-ui/react-select'; +import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; function Select({ ...props }: React.ComponentProps) { - return + return ; } function SelectGroup({ ...props }: React.ComponentProps) { - return + return ; } function SelectValue({ ...props }: React.ComponentProps) { - return + return ; } function SelectTrigger({ className, - size = "default", + size = 'default', children, ...props }: React.ComponentProps & { - size?: "sm" | "default" + size?: 'sm' | 'default'; }) { return ( {children} - + - ) + ); } function SelectContent({ className, children, - position = "popper", + position = 'popper', ...props }: React.ComponentProps) { return ( {children} @@ -82,7 +82,7 @@ function SelectContent({ - ) + ); } function SelectLabel({ @@ -91,11 +91,11 @@ function SelectLabel({ }: React.ComponentProps) { return ( - ) + ); } function SelectItem({ @@ -105,21 +105,21 @@ function SelectItem({ }: React.ComponentProps) { return ( - + - + {children} - ) + ); } function SelectSeparator({ @@ -128,11 +128,11 @@ function SelectSeparator({ }: React.ComponentProps) { return ( - ) + ); } function SelectScrollUpButton({ @@ -141,16 +141,16 @@ function SelectScrollUpButton({ }: React.ComponentProps) { return ( - + - ) + ); } function SelectScrollDownButton({ @@ -159,16 +159,16 @@ function SelectScrollDownButton({ }: React.ComponentProps) { return ( - + - ) + ); } export { @@ -182,4 +182,4 @@ export { SelectSeparator, SelectTrigger, SelectValue, -} +}; diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsx index 67c73e5..39eb020 100644 --- a/src/components/ui/separator.tsx +++ b/src/components/ui/separator.tsx @@ -1,28 +1,28 @@ -"use client" +'use client'; -import * as React from "react" -import * as SeparatorPrimitive from "@radix-ui/react-separator" +import * as React from 'react'; +import * as SeparatorPrimitive from '@radix-ui/react-separator'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; function Separator({ className, - orientation = "horizontal", + orientation = 'horizontal', decorative = true, ...props }: React.ComponentProps) { return ( - ) + ); } -export { Separator } +export { Separator }; diff --git a/src/components/ui/switch.tsx b/src/components/ui/switch.tsx index 6a2b524..39e25af 100644 --- a/src/components/ui/switch.tsx +++ b/src/components/ui/switch.tsx @@ -1,9 +1,9 @@ -"use client" +'use client'; -import * as React from "react" -import * as SwitchPrimitive from "@radix-ui/react-switch" +import * as React from 'react'; +import * as SwitchPrimitive from '@radix-ui/react-switch'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; function Switch({ className, @@ -11,21 +11,21 @@ function Switch({ }: React.ComponentProps) { return ( - ) + ); } -export { Switch } +export { Switch }; From 23af17df5f32bd179ccbed04539bb06de3ee70d5 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 01:43:00 +0200 Subject: [PATCH 39/48] feat: add Tabs component with Radix UI integration --- src/app/settings/page.tsx | 10 ++++ src/components/ui/tabs.tsx | 66 +++++++++++++++++++++++++ src/components/user/redirect-button.tsx | 16 ++++++ 3 files changed, 92 insertions(+) create mode 100644 src/app/settings/page.tsx create mode 100644 src/components/ui/tabs.tsx create mode 100644 src/components/user/redirect-button.tsx diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx new file mode 100644 index 0000000..8d31232 --- /dev/null +++ b/src/app/settings/page.tsx @@ -0,0 +1,10 @@ +import { RedirectButton } from '@/components/user/redirect-button'; + +export default function Home() { + return ( +
+

Settings

+ +
+ ); +} diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx new file mode 100644 index 0000000..497ba5e --- /dev/null +++ b/src/components/ui/tabs.tsx @@ -0,0 +1,66 @@ +"use client" + +import * as React from "react" +import * as TabsPrimitive from "@radix-ui/react-tabs" + +import { cn } from "@/lib/utils" + +function Tabs({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsList({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsTrigger({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function TabsContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Tabs, TabsList, TabsTrigger, TabsContent } diff --git a/src/components/user/redirect-button.tsx b/src/components/user/redirect-button.tsx new file mode 100644 index 0000000..c4bf997 --- /dev/null +++ b/src/components/user/redirect-button.tsx @@ -0,0 +1,16 @@ +import { Button } from '../ui/button'; +import Link from 'next/link'; + +export function RedirectButton({ + redirectUrl, + buttonText, +}: { + redirectUrl: string; + buttonText: string; +}) { + return ( + + + + ); +} From 48531e383aee5af625ff7d394067b80154a8da39 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 01:43:18 +0200 Subject: [PATCH 40/48] feat: add Radix UI Tabs component and update dependencies --- package.json | 1 + src/app/home/page.tsx | 2 + yarn.lock | 103 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 105 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1a21262..affda80 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", "@radix-ui/react-slot": "^1.2.2", + "@radix-ui/react-tabs": "^1.1.11", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.509.0", diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx index b28c508..c85d75b 100644 --- a/src/app/home/page.tsx +++ b/src/app/home/page.tsx @@ -1,10 +1,12 @@ import { Logout } from '@/components/user/sso-logout-button'; +import { RedirectButton } from '@/components/user/redirect-button'; export default function Home() { return (

Home

+
); } diff --git a/yarn.lock b/yarn.lock index 83f34eb..b66e349 100644 --- a/yarn.lock +++ b/yarn.lock @@ -625,18 +625,119 @@ dependencies: "@prisma/debug" "6.7.0" +"@radix-ui/primitive@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.1.2.tgz#83f415c4425f21e3d27914c12b3272a32e3dae65" + integrity sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA== + +"@radix-ui/react-collection@1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.1.6.tgz#fecf74475e4660ee99c7eb1ebfa5ccfb1a219fe4" + integrity sha512-PbhRFK4lIEw9ADonj48tiYWzkllz81TM7KVYyyMMw2cwHO7D5h4XKEblL8NlaRisTK3QTe6tBEhDccFUryxHBQ== + dependencies: + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-slot" "1.2.2" + "@radix-ui/react-compose-refs@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz#a2c4c47af6337048ee78ff6dc0d090b390d2bb30" integrity sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg== -"@radix-ui/react-slot@^1.2.2": +"@radix-ui/react-context@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.1.2.tgz#61628ef269a433382c364f6f1e3788a6dc213a36" + integrity sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA== + +"@radix-ui/react-direction@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.1.1.tgz#39e5a5769e676c753204b792fbe6cf508e550a14" + integrity sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw== + +"@radix-ui/react-id@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.1.1.tgz#1404002e79a03fe062b7e3864aa01e24bd1471f7" + integrity sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg== + dependencies: + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-presence@1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.4.tgz#253ac0ad4946c5b4a9c66878335f5cf07c967ced" + integrity sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA== + dependencies: + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-primitive@2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-primitive/-/react-primitive-2.1.2.tgz#03f64f957719c761d22c2f92cc43ffb64bd42cc8" + integrity sha512-uHa+l/lKfxuDD2zjN/0peM/RhhSmRjr5YWdk/37EnSv1nJ88uvG85DPexSm8HdFQROd2VdERJ6ynXbkCFi+APw== + dependencies: + "@radix-ui/react-slot" "1.2.2" + +"@radix-ui/react-roving-focus@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.9.tgz#37fcacb7dfcc9ea45401b2dd07bd97ccbb8911b2" + integrity sha512-ZzrIFnMYHHCNqSNCsuN6l7wlewBEq0O0BCSBkabJMFXVO51LRUTq71gLP1UxFvmrXElqmPjA5VX7IqC9VpazAQ== + dependencies: + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-collection" "1.1.6" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-direction" "1.1.1" + "@radix-ui/react-id" "1.1.1" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-controllable-state" "1.2.2" + +"@radix-ui/react-slot@1.2.2", "@radix-ui/react-slot@^1.2.2": version "1.2.2" resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.2.2.tgz#18e6533e778a2051edc2ad0773da8e22f03f626a" integrity sha512-y7TBO4xN4Y94FvcWIOIh18fM4R1A8S4q1jhoz4PNzOoHsFcN8pogcFmZrTYAm4F9VRUrWP/Mw7xSKybIeRI+CQ== dependencies: "@radix-ui/react-compose-refs" "1.1.2" +"@radix-ui/react-tabs@^1.1.11": + version "1.1.11" + resolved "https://registry.yarnpkg.com/@radix-ui/react-tabs/-/react-tabs-1.1.11.tgz#9dc002ea6f8ad6830bc20f349afdc57c6039009c" + integrity sha512-4FiKSVoXqPP/KfzlB7lwwqoFV6EPwkrrqGp9cUYXjwDYHhvpnqq79P+EPHKcdoTE7Rl8w/+6s9rTlsfXHES9GA== + dependencies: + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-direction" "1.1.1" + "@radix-ui/react-id" "1.1.1" + "@radix-ui/react-presence" "1.1.4" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-roving-focus" "1.1.9" + "@radix-ui/react-use-controllable-state" "1.2.2" + +"@radix-ui/react-use-callback-ref@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.1.tgz#62a4dba8b3255fdc5cc7787faeac1c6e4cc58d40" + integrity sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg== + +"@radix-ui/react-use-controllable-state@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz#905793405de57d61a439f4afebbb17d0645f3190" + integrity sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg== + dependencies: + "@radix-ui/react-use-effect-event" "0.0.2" + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-use-effect-event@0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz#090cf30d00a4c7632a15548512e9152217593907" + integrity sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA== + dependencies: + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-use-layout-effect@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz#0c4230a9eed49d4589c967e2d9c0d9d60a23971e" + integrity sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ== + "@rtsao/scc@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" From 7701665aa27018b8253535301e970def214cac96 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 13:30:26 +0200 Subject: [PATCH 41/48] fix: standardize quotes and formatting in Tabs component --- src/components/ui/tabs.tsx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx index 497ba5e..4a9fbd0 100644 --- a/src/components/ui/tabs.tsx +++ b/src/components/ui/tabs.tsx @@ -1,9 +1,9 @@ -"use client" +'use client'; -import * as React from "react" -import * as TabsPrimitive from "@radix-ui/react-tabs" +import * as React from 'react'; +import * as TabsPrimitive from '@radix-ui/react-tabs'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; function Tabs({ className, @@ -11,11 +11,11 @@ function Tabs({ }: React.ComponentProps) { return ( - ) + ); } function TabsList({ @@ -24,14 +24,14 @@ function TabsList({ }: React.ComponentProps) { return ( - ) + ); } function TabsTrigger({ @@ -40,14 +40,14 @@ function TabsTrigger({ }: React.ComponentProps) { return ( - ) + ); } function TabsContent({ @@ -56,11 +56,11 @@ function TabsContent({ }: React.ComponentProps) { return ( - ) + ); } -export { Tabs, TabsList, TabsTrigger, TabsContent } +export { Tabs, TabsList, TabsTrigger, TabsContent }; From 09c7dd0eaa7ea26fbccdd020f9b6ba5bf4ac6fa4 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 13:30:46 +0200 Subject: [PATCH 42/48] feat: add Radix UI Label component and update dependencies --- package.json | 1 + src/components/ui/label.tsx | 24 ++++++++++++++++++++++++ yarn.lock | 7 +++++++ 3 files changed, 32 insertions(+) create mode 100644 src/components/ui/label.tsx diff --git a/package.json b/package.json index affda80..84de5e2 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@fortawesome/free-regular-svg-icons": "^6.7.2", "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", + "@radix-ui/react-label": "^2.1.6", "@radix-ui/react-slot": "^1.2.2", "@radix-ui/react-tabs": "^1.1.11", "class-variance-authority": "^0.7.1", diff --git a/src/components/ui/label.tsx b/src/components/ui/label.tsx new file mode 100644 index 0000000..6bc5f71 --- /dev/null +++ b/src/components/ui/label.tsx @@ -0,0 +1,24 @@ +'use client'; + +import * as React from 'react'; +import * as LabelPrimitive from '@radix-ui/react-label'; + +import { cn } from '@/lib/utils'; + +function Label({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +export { Label }; diff --git a/yarn.lock b/yarn.lock index b66e349..e35d14f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -662,6 +662,13 @@ dependencies: "@radix-ui/react-use-layout-effect" "1.1.1" +"@radix-ui/react-label@^2.1.6": + version "2.1.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-label/-/react-label-2.1.6.tgz#45ebd1381996d0311d199781bed15a092c7978dd" + integrity sha512-S/hv1mTlgcPX2gCTJrWuTjSXf7ER3Zf7zWGtOprxhIIY93Qin3n5VgNA0Ez9AgrK/lEtlYgzLd4f5x6AVar4Yw== + dependencies: + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-presence@1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.4.tgz#253ac0ad4946c5b4a9c66878335f5cf07c967ced" From 64d6c181f41163a10e900cbddb209d37208c7c6a Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 13:31:12 +0200 Subject: [PATCH 43/48] feat: implement Settings page with tabs --- src/app/settings/page.tsx | 73 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index 8d31232..983acf7 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -1,10 +1,79 @@ -import { RedirectButton } from '@/components/user/redirect-button'; +//import { RedirectButton } from '@/components/user/redirect-button'; +import { Button } from '@/components/ui/button'; +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from '@/components/ui/card'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; -export default function Home() { +/*export default function Settings() { return (

Settings

); +}*/ + +export default function Settings() { + return ( +
+ + + General + Account + + + + + General + + Make changes to your account here. Click save when you're done. + + + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + Account Settings + + + +
+ + +
+
+ + +
+
+ + + +
+
+
+
+ ); } From 4d800086908a89ccb8f436d2d0f0f8580c5f426c Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 13:32:51 +0200 Subject: [PATCH 44/48] feat: implement Settings page with tabs --- src/app/settings/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index 983acf7..a0a1d37 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -34,7 +34,7 @@ export default function Settings() { General - Make changes to your account here. Click save when you're done. + Make changes to your account here. Click save when you are done. From 09581f4363cd8333ab255283a0dd5cb6b46886f7 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 16:34:53 +0200 Subject: [PATCH 45/48] feat: add Radix UI Select, Separator, and Switch components --- package.json | 4 + src/components/ui/select.tsx | 185 ++++++++++++++++++++++++ src/components/ui/separator.tsx | 28 ++++ src/components/ui/switch.tsx | 31 ++++ yarn.lock | 249 +++++++++++++++++++++++++++++++- 5 files changed, 496 insertions(+), 1 deletion(-) create mode 100644 src/components/ui/select.tsx create mode 100644 src/components/ui/separator.tsx create mode 100644 src/components/ui/switch.tsx diff --git a/package.json b/package.json index 84de5e2..552ac7b 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,11 @@ "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", "@radix-ui/react-label": "^2.1.6", + "@radix-ui/react-scroll-area": "^1.2.8", + "@radix-ui/react-select": "^2.2.4", + "@radix-ui/react-separator": "^1.1.6", "@radix-ui/react-slot": "^1.2.2", + "@radix-ui/react-switch": "^1.2.4", "@radix-ui/react-tabs": "^1.1.11", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx new file mode 100644 index 0000000..dcbbc0c --- /dev/null +++ b/src/components/ui/select.tsx @@ -0,0 +1,185 @@ +"use client" + +import * as React from "react" +import * as SelectPrimitive from "@radix-ui/react-select" +import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react" + +import { cn } from "@/lib/utils" + +function Select({ + ...props +}: React.ComponentProps) { + return +} + +function SelectGroup({ + ...props +}: React.ComponentProps) { + return +} + +function SelectValue({ + ...props +}: React.ComponentProps) { + return +} + +function SelectTrigger({ + className, + size = "default", + children, + ...props +}: React.ComponentProps & { + size?: "sm" | "default" +}) { + return ( + + {children} + + + + + ) +} + +function SelectContent({ + className, + children, + position = "popper", + ...props +}: React.ComponentProps) { + return ( + + + + + {children} + + + + + ) +} + +function SelectLabel({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function SelectItem({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + + + + + + {children} + + ) +} + +function SelectSeparator({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function SelectScrollUpButton({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +function SelectScrollDownButton({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +export { + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectLabel, + SelectScrollDownButton, + SelectScrollUpButton, + SelectSeparator, + SelectTrigger, + SelectValue, +} diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsx new file mode 100644 index 0000000..67c73e5 --- /dev/null +++ b/src/components/ui/separator.tsx @@ -0,0 +1,28 @@ +"use client" + +import * as React from "react" +import * as SeparatorPrimitive from "@radix-ui/react-separator" + +import { cn } from "@/lib/utils" + +function Separator({ + className, + orientation = "horizontal", + decorative = true, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Separator } diff --git a/src/components/ui/switch.tsx b/src/components/ui/switch.tsx new file mode 100644 index 0000000..6a2b524 --- /dev/null +++ b/src/components/ui/switch.tsx @@ -0,0 +1,31 @@ +"use client" + +import * as React from "react" +import * as SwitchPrimitive from "@radix-ui/react-switch" + +import { cn } from "@/lib/utils" + +function Switch({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +export { Switch } diff --git a/yarn.lock b/yarn.lock index e35d14f..dcf7130 100644 --- a/yarn.lock +++ b/yarn.lock @@ -239,6 +239,33 @@ "@eslint/core" "^0.13.0" levn "^0.4.1" +"@floating-ui/core@^1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.7.0.tgz#1aff27a993ea1b254a586318c29c3b16ea0f4d0a" + integrity sha512-FRdBLykrPPA6P76GGGqlex/e7fbe0F1ykgxHYNXQsH/iTEtjMj/f9bpY5oQqbjt5VgZvgz/uKXbGuROijh3VLA== + dependencies: + "@floating-ui/utils" "^0.2.9" + +"@floating-ui/dom@^1.0.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.7.0.tgz#f9f83ee4fee78ac23ad9e65b128fc11a27857532" + integrity sha512-lGTor4VlXcesUMh1cupTUTDoCxMb0V6bm3CnxHzQcw8Eaf1jQbgQX4i02fYgT0vJ82tb5MZ4CZk1LRGkktJCzg== + dependencies: + "@floating-ui/core" "^1.7.0" + "@floating-ui/utils" "^0.2.9" + +"@floating-ui/react-dom@^2.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.1.2.tgz#a1349bbf6a0e5cb5ded55d023766f20a4d439a31" + integrity sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A== + dependencies: + "@floating-ui/dom" "^1.0.0" + +"@floating-ui/utils@^0.2.9": + version "0.2.9" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.9.tgz#50dea3616bc8191fb8e112283b49eaff03e78429" + integrity sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg== + "@fortawesome/fontawesome-common-types@6.7.2": version "6.7.2" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz#7123d74b0c1e726794aed1184795dbce12186470" @@ -625,11 +652,23 @@ dependencies: "@prisma/debug" "6.7.0" +"@radix-ui/number@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/number/-/number-1.1.1.tgz#7b2c9225fbf1b126539551f5985769d0048d9090" + integrity sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g== + "@radix-ui/primitive@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.1.2.tgz#83f415c4425f21e3d27914c12b3272a32e3dae65" integrity sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA== +"@radix-ui/react-arrow@1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-arrow/-/react-arrow-1.1.6.tgz#4b460fdbc1ac097a4964e04ca404c25c2f6d7d3f" + integrity sha512-2JMfHJf/eVnwq+2dewT3C0acmCWD3XiVA1Da+jTDqo342UlU13WvXtqHhG+yJw5JeQmu4ue2eMy6gcEArLBlcw== + dependencies: + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-collection@1.1.6": version "1.1.6" resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.1.6.tgz#fecf74475e4660ee99c7eb1ebfa5ccfb1a219fe4" @@ -655,6 +694,31 @@ resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.1.1.tgz#39e5a5769e676c753204b792fbe6cf508e550a14" integrity sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw== +"@radix-ui/react-dismissable-layer@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.9.tgz#46e025ba6e6f403677e22fbb7d99b63cf7b32bca" + integrity sha512-way197PiTvNp+WBP7svMJasHl+vibhWGQDb6Mgf5mhEWJkgb85z7Lfl9TUdkqpWsf8GRNmoopx9ZxCyDzmgRMQ== + dependencies: + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-escape-keydown" "1.1.1" + +"@radix-ui/react-focus-guards@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.2.tgz#4ec9a7e50925f7fb661394460045b46212a33bed" + integrity sha512-fyjAACV62oPV925xFCrH8DR5xWhg9KYtJT4s3u54jxp+L/hbpTY2kIeEFFbFe+a/HCE94zGQMZLIpVTPVZDhaA== + +"@radix-ui/react-focus-scope@1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.6.tgz#a265c5f2c6fa4365cb16bdf4fee69e36b62f728a" + integrity sha512-r9zpYNUQY+2jWHWZGyddQLL9YHkM/XvSFHVcWs7bdVuxMAnCwTAuy6Pf47Z4nw7dYcUou1vg/VgjjrrH03VeBw== + dependencies: + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-id@1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.1.1.tgz#1404002e79a03fe062b7e3864aa01e24bd1471f7" @@ -669,6 +733,30 @@ dependencies: "@radix-ui/react-primitive" "2.1.2" +"@radix-ui/react-popper@1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-popper/-/react-popper-1.2.6.tgz#227d2882f19d80933796525c7bbd0d3ddf699ac0" + integrity sha512-7iqXaOWIjDBfIG7aq8CUEeCSsQMLFdn7VEE8TaFz704DtEzpPHR7w/uuzRflvKgltqSAImgcmxQ7fFX3X7wasg== + dependencies: + "@floating-ui/react-dom" "^2.0.0" + "@radix-ui/react-arrow" "1.1.6" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-layout-effect" "1.1.1" + "@radix-ui/react-use-rect" "1.1.1" + "@radix-ui/react-use-size" "1.1.1" + "@radix-ui/rect" "1.1.1" + +"@radix-ui/react-portal@1.1.8": + version "1.1.8" + resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.1.8.tgz#0181e85bc0d8c67229dd8cf198204f5f4cc7c09c" + integrity sha512-hQsTUIn7p7fxCPvao/q6wpbxmCwgLrlz+nOrJgC+RwfZqWY/WN+UMqkXzrtKbPrF82P43eCTl3ekeKuyAQbFeg== + dependencies: + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-layout-effect" "1.1.1" + "@radix-ui/react-presence@1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.4.tgz#253ac0ad4946c5b4a9c66878335f5cf07c967ced" @@ -699,6 +787,55 @@ "@radix-ui/react-use-callback-ref" "1.1.1" "@radix-ui/react-use-controllable-state" "1.2.2" +"@radix-ui/react-scroll-area@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@radix-ui/react-scroll-area/-/react-scroll-area-1.2.8.tgz#98a11fe9ca086e403d5c8b5b4c8f781439b45e68" + integrity sha512-K5h1RkYA6M0Sn61BV5LQs686zqBsSC0sGzL4/Gw4mNnjzrQcGSc6YXfC6CRFNaGydSdv5+M8cb0eNsOGo0OXtQ== + dependencies: + "@radix-ui/number" "1.1.1" + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-direction" "1.1.1" + "@radix-ui/react-presence" "1.1.4" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-select@^2.2.4": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-select/-/react-select-2.2.4.tgz#56eeffd9d5ee23392bba4635e7ae3f381ada793d" + integrity sha512-/OOm58Gil4Ev5zT8LyVzqfBcij4dTHYdeyuF5lMHZ2bIp0Lk9oETocYiJ5QC0dHekEQnK6L/FNJCceeb4AkZ6Q== + dependencies: + "@radix-ui/number" "1.1.1" + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-collection" "1.1.6" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-direction" "1.1.1" + "@radix-ui/react-dismissable-layer" "1.1.9" + "@radix-ui/react-focus-guards" "1.1.2" + "@radix-ui/react-focus-scope" "1.1.6" + "@radix-ui/react-id" "1.1.1" + "@radix-ui/react-popper" "1.2.6" + "@radix-ui/react-portal" "1.1.8" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-slot" "1.2.2" + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-controllable-state" "1.2.2" + "@radix-ui/react-use-layout-effect" "1.1.1" + "@radix-ui/react-use-previous" "1.1.1" + "@radix-ui/react-visually-hidden" "1.2.2" + aria-hidden "^1.2.4" + react-remove-scroll "^2.6.3" + +"@radix-ui/react-separator@^1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@radix-ui/react-separator/-/react-separator-1.1.6.tgz#e58500b0e54ba71023955175c7897542bf143271" + integrity sha512-Izof3lPpbCfTM7WDta+LRkz31jem890VjEvpVRoWQNKpDUMMVffuyq854XPGP1KYGWWmjmYvHvPFeocWhFCy1w== + dependencies: + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-slot@1.2.2", "@radix-ui/react-slot@^1.2.2": version "1.2.2" resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.2.2.tgz#18e6533e778a2051edc2ad0773da8e22f03f626a" @@ -706,6 +843,19 @@ dependencies: "@radix-ui/react-compose-refs" "1.1.2" +"@radix-ui/react-switch@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@radix-ui/react-switch/-/react-switch-1.2.4.tgz#3318007c4147df69c04141aa7a77c034baea7169" + integrity sha512-yZCky6XZFnR7pcGonJkr9VyNRu46KcYAbyg1v/gVVCZUr8UJ4x+RpncC27hHtiZ15jC+3WS8Yg/JSgyIHnYYsQ== + dependencies: + "@radix-ui/primitive" "1.1.2" + "@radix-ui/react-compose-refs" "1.1.2" + "@radix-ui/react-context" "1.1.2" + "@radix-ui/react-primitive" "2.1.2" + "@radix-ui/react-use-controllable-state" "1.2.2" + "@radix-ui/react-use-previous" "1.1.1" + "@radix-ui/react-use-size" "1.1.1" + "@radix-ui/react-tabs@^1.1.11": version "1.1.11" resolved "https://registry.yarnpkg.com/@radix-ui/react-tabs/-/react-tabs-1.1.11.tgz#9dc002ea6f8ad6830bc20f349afdc57c6039009c" @@ -740,11 +890,49 @@ dependencies: "@radix-ui/react-use-layout-effect" "1.1.1" +"@radix-ui/react-use-escape-keydown@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.1.tgz#b3fed9bbea366a118f40427ac40500aa1423cc29" + integrity sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g== + dependencies: + "@radix-ui/react-use-callback-ref" "1.1.1" + "@radix-ui/react-use-layout-effect@1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz#0c4230a9eed49d4589c967e2d9c0d9d60a23971e" integrity sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ== +"@radix-ui/react-use-previous@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-previous/-/react-use-previous-1.1.1.tgz#1a1ad5568973d24051ed0af687766f6c7cb9b5b5" + integrity sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ== + +"@radix-ui/react-use-rect@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-rect/-/react-use-rect-1.1.1.tgz#01443ca8ed071d33023c1113e5173b5ed8769152" + integrity sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w== + dependencies: + "@radix-ui/rect" "1.1.1" + +"@radix-ui/react-use-size@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-size/-/react-use-size-1.1.1.tgz#6de276ffbc389a537ffe4316f5b0f24129405b37" + integrity sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ== + dependencies: + "@radix-ui/react-use-layout-effect" "1.1.1" + +"@radix-ui/react-visually-hidden@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.2.tgz#aa6d0f95b0cd50f08b02393d25132f52ca7861dc" + integrity sha512-ORCmRUbNiZIv6uV5mhFrhsIKw4UX/N3syZtyqvry61tbGm4JlgQuSn0hk5TwCARsCjkcnuRkSdCE3xfb+ADHew== + dependencies: + "@radix-ui/react-primitive" "2.1.2" + +"@radix-ui/rect@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.1.1.tgz#78244efe12930c56fd255d7923865857c41ac8cb" + integrity sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw== + "@rtsao/scc@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" @@ -1123,6 +1311,13 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +aria-hidden@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.2.4.tgz#b78e383fdbc04d05762c78b4a25a501e736c4522" + integrity sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A== + dependencies: + tslib "^2.0.0" + aria-query@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.2.tgz#93f81a43480e33a338f19163a3d10a50c01dcd59" @@ -1525,6 +1720,11 @@ detect-libc@^2.0.4: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8" integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA== +detect-node-es@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493" + integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== + doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -2164,6 +2364,11 @@ get-intrinsic@^1.2.4, get-intrinsic@^1.2.5, get-intrinsic@^1.2.6, get-intrinsic@ hasown "^2.0.2" math-intrinsics "^1.1.0" +get-nonce@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-nonce/-/get-nonce-1.0.1.tgz#fdf3f0278073820d2ce9426c18f07481b1e0cdf3" + integrity sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q== + get-proto@^1.0.0, get-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" @@ -3141,6 +3346,33 @@ react-is@^16.13.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-remove-scroll-bar@^2.3.7: + version "2.3.8" + resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz#99c20f908ee467b385b68a3469b4a3e750012223" + integrity sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q== + dependencies: + react-style-singleton "^2.2.2" + tslib "^2.0.0" + +react-remove-scroll@^2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz#df02cde56d5f2731e058531f8ffd7f9adec91ac2" + integrity sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ== + dependencies: + react-remove-scroll-bar "^2.3.7" + react-style-singleton "^2.2.3" + tslib "^2.1.0" + use-callback-ref "^1.3.3" + use-sidecar "^1.1.3" + +react-style-singleton@^2.2.2, react-style-singleton@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-2.2.3.tgz#4265608be69a4d70cfe3047f2c6c88b2c3ace388" + integrity sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ== + dependencies: + get-nonce "^1.0.0" + tslib "^2.0.0" + react@^19.0.0: version "19.1.0" resolved "https://registry.yarnpkg.com/react/-/react-19.1.0.tgz#926864b6c48da7627f004795d6cce50e90793b75" @@ -3607,7 +3839,7 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.4.0, tslib@^2.8.0: +tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.8.0: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -3732,6 +3964,21 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +use-callback-ref@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.3.3.tgz#98d9fab067075841c5b2c6852090d5d0feabe2bf" + integrity sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg== + dependencies: + tslib "^2.0.0" + +use-sidecar@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.1.3.tgz#10e7fd897d130b896e2c546c63a5e8233d00efdb" + integrity sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ== + dependencies: + detect-node-es "^1.1.0" + tslib "^2.0.0" + vary@^1, vary@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" From bf49892003afce625720d4c942ef2ac1a3b4e5d5 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 16:35:12 +0200 Subject: [PATCH 46/48] feat: add ScrollableSettingsWrapper component for scrollable settings --- src/components/wrappers/settings-scroll.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/components/wrappers/settings-scroll.tsx diff --git a/src/components/wrappers/settings-scroll.tsx b/src/components/wrappers/settings-scroll.tsx new file mode 100644 index 0000000..e0f7251 --- /dev/null +++ b/src/components/wrappers/settings-scroll.tsx @@ -0,0 +1,16 @@ +import React from 'react'; + +interface ScrollableContentWrapperProps { + children: React.ReactNode; + className?: string; +} + +export const ScrollableSettingsWrapper: React.FC< + ScrollableContentWrapperProps +> = ({ children, className = '' }) => { + return ( +
+ {children} +
+ ); +}; From b531d4f1d73fff00e57d29b90840219208fa6e78 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 16:35:22 +0200 Subject: [PATCH 47/48] feat: added tabs to settings window and created general settings window design --- src/app/settings/page.tsx | 511 ++++++++++++++++++++++++++++++++++---- 1 file changed, 459 insertions(+), 52 deletions(-) diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index a0a1d37..d371912 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -11,6 +11,15 @@ import { import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { ScrollableSettingsWrapper } from '@/components/wrappers/settings-scroll'; // Adjust path as needed +import { Switch } from '@/components/ui/switch'; // Assuming you have this or will create/import it +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@/components/ui/select'; // Assuming you have this /*export default function Settings() { return ( @@ -21,59 +30,457 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; ); }*/ -export default function Settings() { +export default function SettingsPage() { return ( -
- - - General - Account - - - - - General - - Make changes to your account here. Click save when you are done. - - - -
- - -
-
- - -
-
- - - -
-
- - - - Account Settings - - - -
- - -
-
- - -
-
- - - -
-
-
+
+
+ + + Account + Notifications + Calendar + Privacy + Appearance + + + + + + + Account Settings + + Manage your account details and preferences. + + + +
+ + +
+
+ + +

+ Email is managed by your SSO provider. +

+
+
+ + +

+ Upload a new profile picture. +

+
+
+ + +
+ +
+ + +
+
+ +

+ Permanently delete your account and all associated data. +

+
+
+
+ + + + +
+
+ + + + + + Notification Preferences + + Choose how you want to be notified. + + + +
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + + +
+
+ + + + + + Calendar & Availability + + Manage your calendar display, default availability, and iCal + integrations. + + + +
+ + Display + +
+ + +
+
+ + +
+
+ + +
+
+ +
+ + Availability + +
+ +

+ Define your typical available hours (e.g., + Monday-Friday, 9 AM - 5 PM). +

+ +
+
+ +

+ Min time before a booking can be made. +

+
+ +
+
+
+ +

+ Max time in advance a booking can be made. +

+ +
+
+ +
+ + iCalendar Integration + +
+ + + +
+
+ + + +
+
+
+
+ + + + +
+
+ + + + + + Sharing & Privacy + + Control who can see your calendar and book time with you. + + + +
+ + +
+
+ +

+ (Override for Default Visibility) +
+ + This setting will override the default visibility for + your calendar. You can set specific friends or groups to + see your full calendar details. + +

+ +
+
+ + +
+
+ + +

+ Prevent specific users from seeing your calendar or + booking time. +

+
+
+
+ + + + +
+
+ + + + + + Appearance + + Customize the look and feel of the application. + + + +
+ + +
+
+ + +
+
+ + +
+
+
+ + + + +
+
+
+
); } From 422a9885ea90399816f791e37f691cad68927cd7 Mon Sep 17 00:00:00 2001 From: Maximilian Liebmann Date: Sun, 11 May 2025 16:48:41 +0200 Subject: [PATCH 48/48] fix: standardize quotes and formatting in Select, Separator, and Switch components --- src/components/ui/select.tsx | 92 ++++++++++++++++----------------- src/components/ui/separator.tsx | 20 +++---- src/components/ui/switch.tsx | 22 ++++---- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/components/ui/select.tsx b/src/components/ui/select.tsx index dcbbc0c..90f7ef0 100644 --- a/src/components/ui/select.tsx +++ b/src/components/ui/select.tsx @@ -1,70 +1,70 @@ -"use client" +'use client'; -import * as React from "react" -import * as SelectPrimitive from "@radix-ui/react-select" -import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react" +import * as React from 'react'; +import * as SelectPrimitive from '@radix-ui/react-select'; +import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; function Select({ ...props }: React.ComponentProps) { - return + return ; } function SelectGroup({ ...props }: React.ComponentProps) { - return + return ; } function SelectValue({ ...props }: React.ComponentProps) { - return + return ; } function SelectTrigger({ className, - size = "default", + size = 'default', children, ...props }: React.ComponentProps & { - size?: "sm" | "default" + size?: 'sm' | 'default'; }) { return ( {children} - + - ) + ); } function SelectContent({ className, children, - position = "popper", + position = 'popper', ...props }: React.ComponentProps) { return ( {children} @@ -82,7 +82,7 @@ function SelectContent({ - ) + ); } function SelectLabel({ @@ -91,11 +91,11 @@ function SelectLabel({ }: React.ComponentProps) { return ( - ) + ); } function SelectItem({ @@ -105,21 +105,21 @@ function SelectItem({ }: React.ComponentProps) { return ( - + - + {children} - ) + ); } function SelectSeparator({ @@ -128,11 +128,11 @@ function SelectSeparator({ }: React.ComponentProps) { return ( - ) + ); } function SelectScrollUpButton({ @@ -141,16 +141,16 @@ function SelectScrollUpButton({ }: React.ComponentProps) { return ( - + - ) + ); } function SelectScrollDownButton({ @@ -159,16 +159,16 @@ function SelectScrollDownButton({ }: React.ComponentProps) { return ( - + - ) + ); } export { @@ -182,4 +182,4 @@ export { SelectSeparator, SelectTrigger, SelectValue, -} +}; diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsx index 67c73e5..39eb020 100644 --- a/src/components/ui/separator.tsx +++ b/src/components/ui/separator.tsx @@ -1,28 +1,28 @@ -"use client" +'use client'; -import * as React from "react" -import * as SeparatorPrimitive from "@radix-ui/react-separator" +import * as React from 'react'; +import * as SeparatorPrimitive from '@radix-ui/react-separator'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; function Separator({ className, - orientation = "horizontal", + orientation = 'horizontal', decorative = true, ...props }: React.ComponentProps) { return ( - ) + ); } -export { Separator } +export { Separator }; diff --git a/src/components/ui/switch.tsx b/src/components/ui/switch.tsx index 6a2b524..39e25af 100644 --- a/src/components/ui/switch.tsx +++ b/src/components/ui/switch.tsx @@ -1,9 +1,9 @@ -"use client" +'use client'; -import * as React from "react" -import * as SwitchPrimitive from "@radix-ui/react-switch" +import * as React from 'react'; +import * as SwitchPrimitive from '@radix-ui/react-switch'; -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils'; function Switch({ className, @@ -11,21 +11,21 @@ function Switch({ }: React.ComponentProps) { return ( - ) + ); } -export { Switch } +export { Switch };