From 070cfa53eced93b98d21ac0f8dd53b9b0403dfe5 Mon Sep 17 00:00:00 2001 From: Destiny Saturday Date: Sun, 28 Jul 2024 14:44:01 +0100 Subject: [PATCH 001/111] Update team-deployment.yml Signed-off-by: Destiny Saturday --- .github/workflows/team-deployment.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/team-deployment.yml b/.github/workflows/team-deployment.yml index 21f386f61..832a2c7b0 100644 --- a/.github/workflows/team-deployment.yml +++ b/.github/workflows/team-deployment.yml @@ -4,8 +4,6 @@ on: push: branches: - team-deploy - paths-ignore: - - .github/workflows/** jobs: team_deployment: From c3874009e7e83e4c188c7d02d306ed091ede9cea Mon Sep 17 00:00:00 2001 From: Destiny Saturday Date: Sun, 28 Jul 2024 14:46:21 +0100 Subject: [PATCH 002/111] Update team-deployment.yml Signed-off-by: Destiny Saturday --- .github/workflows/team-deployment.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/team-deployment.yml b/.github/workflows/team-deployment.yml index 832a2c7b0..8e4cfe1b1 100644 --- a/.github/workflows/team-deployment.yml +++ b/.github/workflows/team-deployment.yml @@ -15,14 +15,14 @@ jobs: environment: name: ${{ matrix.environment }} - url: ${{ secrets.URL }} + url: ${{ secrets["URL"] }} steps: - name: Deploy to ${{ matrix.environment }} environment uses: appleboy/ssh-action@v1.0.3 with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} + host: ${{ secrets["HOST"] }} + username: ${{ secrets["USERNAME"] }} + password: ${{ secrets["PASSWORD"] }} script: | ./deploy_${{ matrix.environment }}.sh From 7382111e6f70301ae266659c63bb35f86f29a5d2 Mon Sep 17 00:00:00 2001 From: Destiny Saturday Date: Sun, 28 Jul 2024 14:48:41 +0100 Subject: [PATCH 003/111] Update team-deployment.yml Signed-off-by: Destiny Saturday --- .github/workflows/team-deployment.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/team-deployment.yml b/.github/workflows/team-deployment.yml index 8e4cfe1b1..825e1d688 100644 --- a/.github/workflows/team-deployment.yml +++ b/.github/workflows/team-deployment.yml @@ -15,14 +15,10 @@ jobs: environment: name: ${{ matrix.environment }} - url: ${{ secrets["URL"] }} steps: - - name: Deploy to ${{ matrix.environment }} environment - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets["HOST"] }} - username: ${{ secrets["USERNAME"] }} - password: ${{ secrets["PASSWORD"] }} - script: | - ./deploy_${{ matrix.environment }}.sh + - name: Checkout code + uses: actions/checkout@v3 + + - name: Print Environment + run: echo "Current environment is ${{ matrix.environment }}" From 8dca4ccc8635880035d66a6257517b2016292471 Mon Sep 17 00:00:00 2001 From: Vxrcel Date: Sun, 28 Jul 2024 15:20:48 +0100 Subject: [PATCH 004/111] products modal --- .../_components/form-images/project-logo.tsx | 27 +- .../_components/new-product-modal.tsx | 332 ++++++++++-------- .../_components/product-body-shadcn.tsx | 2 +- .../products/_components/product-content.tsx | 18 +- .../_components/product-detail-modal.tsx | 2 +- .../_components/product-detail-view.tsx | 4 +- .../products/_components/schema/schema.ts | 13 +- 7 files changed, 222 insertions(+), 176 deletions(-) diff --git a/src/app/dashboard/(user-dashboard)/products/_components/form-images/project-logo.tsx b/src/app/dashboard/(user-dashboard)/products/_components/form-images/project-logo.tsx index 6d6202408..aa5009f02 100644 --- a/src/app/dashboard/(user-dashboard)/products/_components/form-images/project-logo.tsx +++ b/src/app/dashboard/(user-dashboard)/products/_components/form-images/project-logo.tsx @@ -1,8 +1,9 @@ -import { ImageIcon, X } from "lucide-react"; +import { X } from "lucide-react"; import React, { useState } from "react"; import { UseFormReturn } from "react-hook-form"; import BlurImage from "~/components/miscellaneous/blur-image"; +import { Button } from "~/components/ui/button"; import { cn } from "~/lib/utils"; import { NewProduct } from "../schema/schema"; @@ -39,10 +40,10 @@ const ProjectLogo = ({ form, name }: Properties) => { }; return ( -
+

@@ -94,23 +95,25 @@ const ProjectLogo = ({ form, name }: Properties) => { className="grid h-full w-full place-items-center" >

Add Image or drag it here

diff --git a/src/app/dashboard/(user-dashboard)/products/_components/new-product-modal.tsx b/src/app/dashboard/(user-dashboard)/products/_components/new-product-modal.tsx index d8ac48a4b..57132cddc 100644 --- a/src/app/dashboard/(user-dashboard)/products/_components/new-product-modal.tsx +++ b/src/app/dashboard/(user-dashboard)/products/_components/new-product-modal.tsx @@ -1,11 +1,10 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { AnimatePresence, motion } from "framer-motion"; -import { X } from "lucide-react"; +import { Loader, X } from "lucide-react"; import { useTransition } from "react"; import { useForm } from "react-hook-form"; import { z } from "zod"; -import LoadingSpinner from "~/components/miscellaneous/loading-spinner"; import WordCounter from "~/components/miscellaneous/WordCounter"; import { Button } from "~/components/ui/button"; import { @@ -34,6 +33,7 @@ import { CATEGORIES } from "../data/categories.moct"; import ProjectLogo from "./form-images/project-logo"; import { NewProductSchema } from "./schema/schema"; +const MAX_CHAR = 160; const NewProductModal = () => { const { setIsNewModal, isNewModal } = useProductModal(); const { addProduct } = useProducts(); @@ -87,7 +87,7 @@ const NewProductModal = () => {
setIsNewModal(false)} className={cn( - "fixed left-0 top-0 z-[99] min-h-screen w-full overflow-hidden bg-[rgba(10,10,10,0.40)] transition-all duration-300", + "fixed left-0 top-0 z-[9999] min-h-screen w-full overflow-hidden bg-[rgba(10,10,10,0.40)] transition-all duration-300", isNewModal ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0", @@ -110,14 +110,14 @@ const NewProductModal = () => { exit={{ ...variantProperties, opacity: 0, - scale: 2, + scale: 0.5, }} className={cn( - "fixed left-1/2 top-1/2 z-[999] grid h-[550px] w-full max-w-[95%] -translate-x-1/2 -translate-y-1/2 transform-gpu place-items-center items-center overflow-y-auto rounded-md bg-white pb-6 min-[500px]:max-w-[480px] min-[500px]:rounded-xl sm:h-[650px] lg:h-[800px] lg:max-w-[491px]", + "fixed left-1/2 top-1/2 z-[9999] grid h-fit max-h-[90%] w-full max-w-[95%] -translate-x-1/2 -translate-y-1/2 transform-gpu place-items-center items-center overflow-y-auto rounded-md bg-white pb-6 min-[500px]:max-w-[480px] min-[500px]:rounded-xl md:max-h-[850px] lg:h-fit lg:max-w-[491px]", )} >
-
+

Add a Product