diff --git a/.eslintrc.js b/.eslintrc.js index 463c86901c0..c229c095269 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,7 +4,7 @@ module.exports = { extends: ["custom"], settings: { next: { - rootDir: ["apps/*"], + rootDir: ["web/", "space/"], }, }, }; diff --git a/.github/workflows/Build_Test_Pull_Request.yml b/.github/workflows/Build_Test_Pull_Request.yml index 0dbca646a88..438bdbef39d 100644 --- a/.github/workflows/Build_Test_Pull_Request.yml +++ b/.github/workflows/Build_Test_Pull_Request.yml @@ -29,9 +29,9 @@ jobs: apiserver: - apiserver/** web: - - apps/app/** + - web/** deploy: - - apps/space/** + - space/** - name: Setup .npmrc for repository run: | @@ -40,15 +40,15 @@ jobs: - name: Build Plane's Main App if: steps.changed-files.outputs.web_any_changed == 'true' run: | - mv ./.npmrc ./apps/app - cd apps/app + mv ./.npmrc ./web + cd web yarn yarn build - name: Build Plane's Deploy App if: steps.changed-files.outputs.deploy_any_changed == 'true' run: | - cd apps/space + cd space yarn yarn build diff --git a/.github/workflows/Update_Docker_Images.yml b/.github/workflows/Update_Docker_Images.yml index 8e27e098f98..57dbb4a6717 100644 --- a/.github/workflows/Update_Docker_Images.yml +++ b/.github/workflows/Update_Docker_Images.yml @@ -62,7 +62,7 @@ jobs: uses: docker/build-push-action@v4.0.0 with: context: . - file: ./apps/app/Dockerfile.web + file: ./web/Dockerfile.web platforms: linux/amd64 tags: ${{ steps.metaFrontend.outputs.tags }} push: true @@ -88,7 +88,7 @@ jobs: uses: docker/build-push-action@v4.0.0 with: context: . - file: ./apps/space/Dockerfile.space + file: ./space/Dockerfile.space platforms: linux/amd64 push: true tags: ${{ steps.metaDeploy.outputs.tags }} diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 00000000000..0e7d3240bf4 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,23 @@ +#!/bin/sh +. "$(dirname -- "$0")/_/husky.sh" + +changed_files=$(git diff --name-only HEAD~1) + +web_changed=$(echo "$changed_files" | grep -E '^web/' || true) +space_changed=$(echo "$changed_files" | grep -E '^space/' || true) +echo $web_changed +echo $space_changed + +if [ -n "$web_changed" ] && [ -n "$space_changed" ]; then + echo "Changes detected in both web and space. Building..." + yarn run lint + yarn run build +elif [ -n "$web_changed" ]; then + echo "Changes detected in web app. Building..." + yarn run lint --filter=web + yarn run build --filter=web +elif [ -n "$space_changed" ]; then + echo "Changes detected in space app. Building..." + yarn run lint --filter=space + yarn run build --filter=space +fi diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 294dc1c0eb9..cd74b612133 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within @@ -125,4 +125,4 @@ enforcement ladder](https://github.com/mozilla/diversity). For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. \ No newline at end of file +https://www.contributor-covenant.org/translations. diff --git a/README.md b/README.md index 2bc2764f3bc..a5a7ddd87d8 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,10 @@ Meet [Plane](https://plane.so). An open-source software development tool to manage issues, sprints, and product roadmaps with peace of mind 🧘‍♀️. - > Plane is still in its early days, not everything will be perfect yet, and hiccups may happen. Please let us know of any suggestions, ideas, or bugs that you encounter on our [Discord](https://discord.com/invite/A92xrEGCge) or GitHub issues, and we will use your feedback to improve on our upcoming releases. The easiest way to get started with Plane is by creating a [Plane Cloud](https://app.plane.so) account. Plane Cloud offers a hosted solution for Plane. If you prefer to self-host Plane, please refer to our [deployment documentation](https://docs.plane.so/self-hosting). - ## ⚡️ Quick start with Docker Compose ### Docker Compose Setup @@ -56,7 +54,7 @@ chmod +x setup.sh - Run setup.sh ```bash -./setup.sh http://localhost +./setup.sh http://localhost ``` > If running in a cloud env replace localhost with public facing IP address of the VM @@ -65,31 +63,32 @@ chmod +x setup.sh Visit [Tiptap Pro](https://collab.tiptap.dev/pro-extensions) and signup (it is free). - Create a **`.npmrc`** file, copy the following and replace your registry token generated from Tiptap Pro. + Create a **`.npmrc`** file, copy the following and replace your registry token generated from Tiptap Pro. ``` @tiptap-pro:registry=https://registry.tiptap.dev/ //registry.tiptap.dev/:_authToken=YOUR_REGISTRY_TOKEN ``` + - Run Docker compose up ```bash docker compose up -d ``` -You can use the default email and password for your first login `captain@plane.so` and `password123`. +You can use the default email and password for your first login `captain@plane.so` and `password123`. ## 🚀 Features -* **Issue Planning and Tracking**: Quickly create issues and add details using a powerful rich text editor that supports file uploads. Add sub-properties and references to issues for better organization and tracking. -* **Issue Attachments**: Collaborate effectively by attaching files to issues, making it easy for your team to find and share important project-related documents. -* **Layouts**: Customize your project view with your preferred layout - choose from List, Kanban, or Calendar to visualize your project in a way that makes sense to you. -* **Cycles**: Plan sprints with Cycles to keep your team on track and productive. Gain insights into your project's progress with burn-down charts and other useful features. -* **Modules**: Break down your large projects into smaller, more manageable modules. Assign modules between teams to easily track and plan your project's progress. -* **Views**: Create custom filters to display only the issues that matter to you. Save and share your filters in just a few clicks. -* **Pages**: Plane pages function as an AI-powered notepad, allowing you to easily document issues, cycle plans, and module details, and then synchronize them with your issues. -* **Command K**: Enjoy a better user experience with the new Command + K menu. Easily manage and navigate through your projects from one convenient location. -* **GitHub Sync**: Streamline your planning process by syncing your GitHub issues with Plane. Keep all your issues in one place for better tracking and collaboration. +- **Issue Planning and Tracking**: Quickly create issues and add details using a powerful rich text editor that supports file uploads. Add sub-properties and references to issues for better organization and tracking. +- **Issue Attachments**: Collaborate effectively by attaching files to issues, making it easy for your team to find and share important project-related documents. +- **Layouts**: Customize your project view with your preferred layout - choose from List, Kanban, or Calendar to visualize your project in a way that makes sense to you. +- **Cycles**: Plan sprints with Cycles to keep your team on track and productive. Gain insights into your project's progress with burn-down charts and other useful features. +- **Modules**: Break down your large projects into smaller, more manageable modules. Assign modules between teams to easily track and plan your project's progress. +- **Views**: Create custom filters to display only the issues that matter to you. Save and share your filters in just a few clicks. +- **Pages**: Plane pages function as an AI-powered notepad, allowing you to easily document issues, cycle plans, and module details, and then synchronize them with your issues. +- **Command K**: Enjoy a better user experience with the new Command + K menu. Easily manage and navigate through your projects from one convenient location. +- **GitHub Sync**: Streamline your planning process by syncing your GitHub issues with Plane. Keep all your issues in one place for better tracking and collaboration. ## 📸 Screenshots @@ -150,7 +149,6 @@ docker compose up -d

- ## 📚Documentation For full documentation, visit [docs.plane.so](https://docs.plane.so/) diff --git a/apiserver/plane/api/views/cycle.py b/apiserver/plane/api/views/cycle.py index 3dca6c3126e..253da2c5b98 100644 --- a/apiserver/plane/api/views/cycle.py +++ b/apiserver/plane/api/views/cycle.py @@ -333,13 +333,21 @@ def partial_update(self, request, slug, project_id, pk): workspace__slug=slug, project_id=project_id, pk=pk ) + request_data = request.data + if cycle.end_date is not None and cycle.end_date < timezone.now().date(): - return Response( - { - "error": "The Cycle has already been completed so it cannot be edited" - }, - status=status.HTTP_400_BAD_REQUEST, - ) + if "sort_order" in request_data: + # Can only change sort order + request_data = { + "sort_order": request_data.get("sort_order", cycle.sort_order) + } + else: + return Response( + { + "error": "The Cycle has already been completed so it cannot be edited" + }, + status=status.HTTP_400_BAD_REQUEST, + ) serializer = CycleWriteSerializer(cycle, data=request.data, partial=True) if serializer.is_valid(): @@ -373,7 +381,9 @@ def retrieve(self, request, slug, project_id, pk): .annotate(assignee_id=F("assignees__id")) .annotate(avatar=F("assignees__avatar")) .annotate(display_name=F("assignees__display_name")) - .values("first_name", "last_name", "assignee_id", "avatar", "display_name") + .values( + "first_name", "last_name", "assignee_id", "avatar", "display_name" + ) .annotate(total_issues=Count("assignee_id")) .annotate( completed_issues=Count( @@ -709,7 +719,6 @@ def post(self, request, slug, project_id): class CycleFavoriteViewSet(BaseViewSet): - serializer_class = CycleFavoriteSerializer model = CycleFavorite diff --git a/apiserver/plane/api/views/issue.py b/apiserver/plane/api/views/issue.py index 74b5744233d..a390f7b8109 100644 --- a/apiserver/plane/api/views/issue.py +++ b/apiserver/plane/api/views/issue.py @@ -17,11 +17,12 @@ When, Exists, Max, + IntegerField, ) from django.core.serializers.json import DjangoJSONEncoder from django.utils.decorators import method_decorator from django.views.decorators.gzip import gzip_page -from django.db.models.functions import Coalesce +from django.db import IntegrityError from django.conf import settings # Third Party imports @@ -337,7 +338,11 @@ def get(self, request, slug): issue_queryset = ( Issue.issue_objects.filter( - (Q(assignees__in=[request.user]) | Q(created_by=request.user) | Q(issue_subscribers__subscriber=request.user)), + ( + Q(assignees__in=[request.user]) + | Q(created_by=request.user) + | Q(issue_subscribers__subscriber=request.user) + ), workspace__slug=slug, ) .annotate( @@ -1545,32 +1550,35 @@ def get_permissions(self): return super(IssueCommentPublicViewSet, self).get_permissions() def get_queryset(self): - project_deploy_board = ProjectDeployBoard.objects.get( - workspace__slug=self.kwargs.get("slug"), - project_id=self.kwargs.get("project_id"), - ) - if project_deploy_board.comments: - return self.filter_queryset( - super() - .get_queryset() - .filter(workspace__slug=self.kwargs.get("slug")) - .filter(issue_id=self.kwargs.get("issue_id")) - .filter(access="EXTERNAL") - .select_related("project") - .select_related("workspace") - .select_related("issue") - .annotate( - is_member=Exists( - ProjectMember.objects.filter( - workspace__slug=self.kwargs.get("slug"), - project_id=self.kwargs.get("project_id"), - member_id=self.request.user.id, + try: + project_deploy_board = ProjectDeployBoard.objects.get( + workspace__slug=self.kwargs.get("slug"), + project_id=self.kwargs.get("project_id"), + ) + if project_deploy_board.comments: + return self.filter_queryset( + super() + .get_queryset() + .filter(workspace__slug=self.kwargs.get("slug")) + .filter(issue_id=self.kwargs.get("issue_id")) + .filter(access="EXTERNAL") + .select_related("project") + .select_related("workspace") + .select_related("issue") + .annotate( + is_member=Exists( + ProjectMember.objects.filter( + workspace__slug=self.kwargs.get("slug"), + project_id=self.kwargs.get("project_id"), + member_id=self.request.user.id, + ) ) ) + .distinct() ) - .distinct() - ) - else: + else: + return IssueComment.objects.none() + except ProjectDeployBoard.DoesNotExist: return IssueComment.objects.none() def create(self, request, slug, project_id, issue_id): @@ -1703,21 +1711,24 @@ class IssueReactionPublicViewSet(BaseViewSet): model = IssueReaction def get_queryset(self): - project_deploy_board = ProjectDeployBoard.objects.get( - workspace__slug=self.kwargs.get("slug"), - project_id=self.kwargs.get("project_id"), - ) - if project_deploy_board.reactions: - return ( - super() - .get_queryset() - .filter(workspace__slug=self.kwargs.get("slug")) - .filter(project_id=self.kwargs.get("project_id")) - .filter(issue_id=self.kwargs.get("issue_id")) - .order_by("-created_at") - .distinct() - ) - else: + try: + project_deploy_board = ProjectDeployBoard.objects.get( + workspace__slug=self.kwargs.get("slug"), + project_id=self.kwargs.get("project_id"), + ) + if project_deploy_board.reactions: + return ( + super() + .get_queryset() + .filter(workspace__slug=self.kwargs.get("slug")) + .filter(project_id=self.kwargs.get("project_id")) + .filter(issue_id=self.kwargs.get("issue_id")) + .order_by("-created_at") + .distinct() + ) + else: + return IssueReaction.objects.none() + except ProjectDeployBoard.DoesNotExist: return IssueReaction.objects.none() def create(self, request, slug, project_id, issue_id): @@ -1818,21 +1829,24 @@ class CommentReactionPublicViewSet(BaseViewSet): model = CommentReaction def get_queryset(self): - project_deploy_board = ProjectDeployBoard.objects.get( - workspace__slug=self.kwargs.get("slug"), - project_id=self.kwargs.get("project_id"), - ) - if project_deploy_board.reactions: - return ( - super() - .get_queryset() - .filter(workspace__slug=self.kwargs.get("slug")) - .filter(project_id=self.kwargs.get("project_id")) - .filter(comment_id=self.kwargs.get("comment_id")) - .order_by("-created_at") - .distinct() - ) - else: + try: + project_deploy_board = ProjectDeployBoard.objects.get( + workspace__slug=self.kwargs.get("slug"), + project_id=self.kwargs.get("project_id"), + ) + if project_deploy_board.reactions: + return ( + super() + .get_queryset() + .filter(workspace__slug=self.kwargs.get("slug")) + .filter(project_id=self.kwargs.get("project_id")) + .filter(comment_id=self.kwargs.get("comment_id")) + .order_by("-created_at") + .distinct() + ) + else: + return CommentReaction.objects.none() + except ProjectDeployBoard.DoesNotExist: return CommentReaction.objects.none() def create(self, request, slug, project_id, comment_id): @@ -1939,13 +1953,23 @@ class IssueVotePublicViewSet(BaseViewSet): serializer_class = IssueVoteSerializer def get_queryset(self): - return ( - super() - .get_queryset() - .filter(issue_id=self.kwargs.get("issue_id")) - .filter(workspace__slug=self.kwargs.get("slug")) - .filter(project_id=self.kwargs.get("project_id")) - ) + try: + project_deploy_board = ProjectDeployBoard.objects.get( + workspace__slug=self.kwargs.get("slug"), + project_id=self.kwargs.get("project_id"), + ) + if project_deploy_board.votes: + return ( + super() + .get_queryset() + .filter(issue_id=self.kwargs.get("issue_id")) + .filter(workspace__slug=self.kwargs.get("slug")) + .filter(project_id=self.kwargs.get("project_id")) + ) + else: + return IssueVote.objects.none() + except ProjectDeployBoard.DoesNotExist: + return IssueVote.objects.none() def create(self, request, slug, project_id, issue_id): try: @@ -1974,6 +1998,10 @@ def create(self, request, slug, project_id, issue_id): ) serializer = IssueVoteSerializer(issue_vote) return Response(serializer.data, status=status.HTTP_201_CREATED) + except IntegrityError: + return Response( + {"error": "Reaction already exists"}, status=status.HTTP_400_BAD_REQUEST + ) except Exception as e: capture_exception(e) return Response( @@ -2151,9 +2179,32 @@ def get(self, request, slug, project_id): issues = IssuePublicSerializer(issue_queryset, many=True).data - states = State.objects.filter( - workspace__slug=slug, project_id=project_id - ).values("name", "group", "color", "id") + state_group_order = [ + "backlog", + "unstarted", + "started", + "completed", + "cancelled", + ] + + states = ( + State.objects.filter( + workspace__slug=slug, + project_id=project_id, + ) + .annotate( + custom_order=Case( + *[ + When(group=value, then=Value(index)) + for index, value in enumerate(state_group_order) + ], + default=Value(len(state_group_order)), + output_field=IntegerField(), + ), + ) + .values("name", "group", "color", "id") + .order_by("custom_order", "sequence") + ) labels = Label.objects.filter( workspace__slug=slug, project_id=project_id diff --git a/apps/app/components/icons/blocked-icon.tsx b/apps/app/components/icons/blocked-icon.tsx deleted file mode 100644 index ee0024fa093..00000000000 --- a/apps/app/components/icons/blocked-icon.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const BlockedIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - - ); diff --git a/apps/app/components/icons/blocker-icon.tsx b/apps/app/components/icons/blocker-icon.tsx deleted file mode 100644 index 093728cd8e5..00000000000 --- a/apps/app/components/icons/blocker-icon.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const BlockerIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - - ); diff --git a/apps/app/components/icons/bolt-icon.tsx b/apps/app/components/icons/bolt-icon.tsx deleted file mode 100644 index 569767aa52c..00000000000 --- a/apps/app/components/icons/bolt-icon.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const BoltIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - ); diff --git a/apps/app/components/icons/cancel-icon.tsx b/apps/app/components/icons/cancel-icon.tsx deleted file mode 100644 index c3170ca329d..00000000000 --- a/apps/app/components/icons/cancel-icon.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const CancelIcon: React.FC = ({ width, height, className }) => ( - - - - ); diff --git a/apps/app/components/icons/clipboard-icon.tsx b/apps/app/components/icons/clipboard-icon.tsx deleted file mode 100644 index c96aa3fde30..00000000000 --- a/apps/app/components/icons/clipboard-icon.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const ClipboardIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - ); diff --git a/apps/app/components/icons/comment-icon.tsx b/apps/app/components/icons/comment-icon.tsx deleted file mode 100644 index c60cca4a609..00000000000 --- a/apps/app/components/icons/comment-icon.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const CommentIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - ); diff --git a/apps/app/components/icons/completed-cycle-icon.tsx b/apps/app/components/icons/completed-cycle-icon.tsx deleted file mode 100644 index 615fbcb9a9e..00000000000 --- a/apps/app/components/icons/completed-cycle-icon.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const CompletedCycleIcon: React.FC = ({ - width = "24", - height = "24", - className, - color = "black", -}) => ( - - - - ); diff --git a/apps/app/components/icons/current-cycle-icon.tsx b/apps/app/components/icons/current-cycle-icon.tsx deleted file mode 100644 index 2b07edf2e6d..00000000000 --- a/apps/app/components/icons/current-cycle-icon.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const CurrentCycleIcon: React.FC = ({ - width = "24", - height = "24", - className, - color = "black", -}) => ( - - - - ); diff --git a/apps/app/components/icons/edit-icon.tsx b/apps/app/components/icons/edit-icon.tsx deleted file mode 100644 index c4e012e4dfe..00000000000 --- a/apps/app/components/icons/edit-icon.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const EditIcon: React.FC = ({ width, height, className }) => ( - - - - ); diff --git a/apps/app/components/icons/ellipsis-horizontal-icon.tsx b/apps/app/components/icons/ellipsis-horizontal-icon.tsx deleted file mode 100644 index cfdd66751e7..00000000000 --- a/apps/app/components/icons/ellipsis-horizontal-icon.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const EllipsisHorizontalIcon: React.FC = ({ width, height, className }) => ( - - - - ); diff --git a/apps/app/components/icons/lock-icon.tsx b/apps/app/components/icons/lock-icon.tsx deleted file mode 100644 index d0c9cffb74b..00000000000 --- a/apps/app/components/icons/lock-icon.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const LockIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - ); diff --git a/apps/app/components/icons/menu-icon.tsx b/apps/app/components/icons/menu-icon.tsx deleted file mode 100644 index 0a8816b751b..00000000000 --- a/apps/app/components/icons/menu-icon.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const MenuIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - ); diff --git a/apps/app/components/icons/plus-icon.tsx b/apps/app/components/icons/plus-icon.tsx deleted file mode 100644 index 0b958a21d67..00000000000 --- a/apps/app/components/icons/plus-icon.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const PlusIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - ); diff --git a/apps/app/components/icons/question-mark-circle-icon.tsx b/apps/app/components/icons/question-mark-circle-icon.tsx deleted file mode 100644 index 2cdf9d8e575..00000000000 --- a/apps/app/components/icons/question-mark-circle-icon.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const QuestionMarkCircleIcon: React.FC = ({ - width = "24", - height = "24", - className, -}) => ( - - - - ); diff --git a/apps/app/components/icons/signal-cellular-icon.tsx b/apps/app/components/icons/signal-cellular-icon.tsx deleted file mode 100644 index 0e785d95867..00000000000 --- a/apps/app/components/icons/signal-cellular-icon.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const SignalCellularIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - ); diff --git a/apps/app/components/icons/tag-icon.tsx b/apps/app/components/icons/tag-icon.tsx deleted file mode 100644 index a17d4c1e400..00000000000 --- a/apps/app/components/icons/tag-icon.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const TagIcon: React.FC = ({ - width = "24", - height = "24", - className, - color = "black", -}) => ( - - - - ); diff --git a/apps/app/components/icons/transfer-icon.tsx b/apps/app/components/icons/transfer-icon.tsx deleted file mode 100644 index 176c38b2908..00000000000 --- a/apps/app/components/icons/transfer-icon.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const TransferIcon: React.FC = ({ width, height, className, color }) => ( - - - - ); diff --git a/apps/app/components/icons/tune-icon.tsx b/apps/app/components/icons/tune-icon.tsx deleted file mode 100644 index 1221b297679..00000000000 --- a/apps/app/components/icons/tune-icon.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const TuneIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - ); diff --git a/apps/app/components/icons/upcoming-cycle-icon.tsx b/apps/app/components/icons/upcoming-cycle-icon.tsx deleted file mode 100644 index 52961e15ea8..00000000000 --- a/apps/app/components/icons/upcoming-cycle-icon.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const UpcomingCycleIcon: React.FC = ({ - width = "24", - height = "24", - className, - color = "black", -}) => ( - - - - ); diff --git a/apps/app/components/icons/user-icon-circle.tsx b/apps/app/components/icons/user-icon-circle.tsx deleted file mode 100644 index 8bae3413367..00000000000 --- a/apps/app/components/icons/user-icon-circle.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const UserCircleIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - ); diff --git a/apps/app/components/icons/user-icon.tsx b/apps/app/components/icons/user-icon.tsx deleted file mode 100644 index c0408dad36e..00000000000 --- a/apps/app/components/icons/user-icon.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from "react"; - -import type { Props } from "./types"; - -export const UserIcon: React.FC = ({ width = "24", height = "24", className }) => ( - - - - ); diff --git a/apps/app/components/integration/slack/index.ts b/apps/app/components/integration/slack/index.ts deleted file mode 100644 index 3bd1c965c64..00000000000 --- a/apps/app/components/integration/slack/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./select-channel"; \ No newline at end of file diff --git a/apps/space/components/icons/index.ts b/apps/space/components/icons/index.ts deleted file mode 100644 index 5f23e0f3aa0..00000000000 --- a/apps/space/components/icons/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from "./issue-group/backlog-state-icon"; -export * from "./issue-group/unstarted-state-icon"; -export * from "./issue-group/started-state-icon"; -export * from "./issue-group/completed-state-icon"; -export * from "./issue-group/cancelled-state-icon"; diff --git a/apps/space/next.config.js b/apps/space/next.config.js deleted file mode 100644 index ce021afe956..00000000000 --- a/apps/space/next.config.js +++ /dev/null @@ -1,13 +0,0 @@ -/** @type {import('next').NextConfig} */ -const path = require("path"); - -const nextConfig = { - reactStrictMode: false, - swcMinify: true, - experimental: { - outputFileTracingRoot: path.join(__dirname, "../../"), - }, - output: "standalone", -}; - -module.exports = nextConfig; diff --git a/apps/space/public/logos/github-black.png b/apps/space/public/logos/github-black.png deleted file mode 100644 index 7a7a82474ff..00000000000 Binary files a/apps/space/public/logos/github-black.png and /dev/null differ diff --git a/apps/space/public/logos/github-square.png b/apps/space/public/logos/github-square.png deleted file mode 100644 index 527ba79f258..00000000000 Binary files a/apps/space/public/logos/github-square.png and /dev/null differ diff --git a/apps/space/public/logos/github-white.png b/apps/space/public/logos/github-white.png deleted file mode 100644 index dbb2b578cb6..00000000000 Binary files a/apps/space/public/logos/github-white.png and /dev/null differ diff --git a/apps/space/public/plane-logo.webp b/apps/space/public/plane-logo.webp deleted file mode 100644 index 52e7c98da21..00000000000 Binary files a/apps/space/public/plane-logo.webp and /dev/null differ diff --git a/apps/space/public/plane-logos/blue-without-text.png b/apps/space/public/plane-logos/blue-without-text.png deleted file mode 100644 index ea94aec7920..00000000000 Binary files a/apps/space/public/plane-logos/blue-without-text.png and /dev/null differ diff --git a/apps/space/tsconfig.json b/apps/space/tsconfig.json deleted file mode 100644 index 5404bd9fbf9..00000000000 --- a/apps/space/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "baseUrl": ".", - "paths": {}, - "plugins": [{ "name": "next" }] - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "server.js", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -} diff --git a/docker-compose.yml b/docker-compose.yml index f69f5be1dde..4fe7f4ab715 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,176 +1,194 @@ version: "3.8" -x-api-and-worker-env: - &api-and-worker-env - DEBUG: ${DEBUG} - SENTRY_DSN: ${SENTRY_DSN} - DJANGO_SETTINGS_MODULE: plane.settings.production - DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE} - REDIS_URL: redis://plane-redis:6379/ - EMAIL_HOST: ${EMAIL_HOST} - EMAIL_HOST_USER: ${EMAIL_HOST_USER} - EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD} - EMAIL_PORT: ${EMAIL_PORT} - EMAIL_FROM: ${EMAIL_FROM} - EMAIL_USE_TLS: ${EMAIL_USE_TLS} - EMAIL_USE_SSL: ${EMAIL_USE_SSL} - AWS_REGION: ${AWS_REGION} - AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} - AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} - AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME} - AWS_S3_ENDPOINT_URL: ${AWS_S3_ENDPOINT_URL} - FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT} - WEB_URL: ${WEB_URL} - GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET} - DISABLE_COLLECTSTATIC: 1 - DOCKERIZED: 1 - OPENAI_API_BASE: ${OPENAI_API_BASE} - OPENAI_API_KEY: ${OPENAI_API_KEY} - GPT_ENGINE: ${GPT_ENGINE} - SECRET_KEY: ${SECRET_KEY} - DEFAULT_EMAIL: ${DEFAULT_EMAIL} - DEFAULT_PASSWORD: ${DEFAULT_PASSWORD} - USE_MINIO: ${USE_MINIO} - ENABLE_SIGNUP: ${ENABLE_SIGNUP} +x-api-and-worker-env: &api-and-worker-env + DEBUG: ${DEBUG} + SENTRY_DSN: ${SENTRY_DSN} + DJANGO_SETTINGS_MODULE: plane.settings.production + DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE} + REDIS_URL: redis://plane-redis:6379/ + EMAIL_HOST: ${EMAIL_HOST} + EMAIL_HOST_USER: ${EMAIL_HOST_USER} + EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD} + EMAIL_PORT: ${EMAIL_PORT} + EMAIL_FROM: ${EMAIL_FROM} + EMAIL_USE_TLS: ${EMAIL_USE_TLS} + EMAIL_USE_SSL: ${EMAIL_USE_SSL} + AWS_REGION: ${AWS_REGION} + AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} + AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} + AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME} + AWS_S3_ENDPOINT_URL: ${AWS_S3_ENDPOINT_URL} + FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT} + WEB_URL: ${WEB_URL} + GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET} + DISABLE_COLLECTSTATIC: 1 + DOCKERIZED: 1 + OPENAI_API_BASE: ${OPENAI_API_BASE} + OPENAI_API_KEY: ${OPENAI_API_KEY} + GPT_ENGINE: ${GPT_ENGINE} + SECRET_KEY: ${SECRET_KEY} + DEFAULT_EMAIL: ${DEFAULT_EMAIL} + DEFAULT_PASSWORD: ${DEFAULT_PASSWORD} + USE_MINIO: ${USE_MINIO} + ENABLE_SIGNUP: ${ENABLE_SIGNUP} services: - plane-web: - container_name: planefrontend - build: - context: . - dockerfile: ./apps/app/Dockerfile.web - args: - NEXT_PUBLIC_API_BASE_URL: http://localhost:8000 - NEXT_PUBLIC_DEPLOY_URL: http://localhost/spaces - restart: always - command: /usr/local/bin/start.sh apps/app/server.js app - env_file: - - .env - environment: - NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL} - NEXT_PUBLIC_DEPLOY_URL: ${NEXT_PUBLIC_DEPLOY_URL} - NEXT_PUBLIC_GOOGLE_CLIENTID: "0" - NEXT_PUBLIC_GITHUB_APP_NAME: "0" - NEXT_PUBLIC_GITHUB_ID: "0" - NEXT_PUBLIC_SENTRY_DSN: "0" - NEXT_PUBLIC_ENABLE_OAUTH: "0" - NEXT_PUBLIC_ENABLE_SENTRY: "0" - NEXT_PUBLIC_ENABLE_SESSION_RECORDER: "0" - NEXT_PUBLIC_TRACK_EVENTS: "0" - depends_on: - - plane-api - - plane-worker + plane-web: + container_name: planefrontend + build: + context: . + dockerfile: ./web/Dockerfile.web + args: + NEXT_PUBLIC_API_BASE_URL: http://localhost:8000 + NEXT_PUBLIC_DEPLOY_URL: http://localhost/spaces + restart: always + command: /usr/local/bin/start.sh web/server.js web + env_file: + - .env + environment: + NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL} + NEXT_PUBLIC_DEPLOY_URL: ${NEXT_PUBLIC_DEPLOY_URL} + NEXT_PUBLIC_GOOGLE_CLIENTID: "0" + NEXT_PUBLIC_GITHUB_APP_NAME: "0" + NEXT_PUBLIC_GITHUB_ID: "0" + NEXT_PUBLIC_SENTRY_DSN: "0" + NEXT_PUBLIC_ENABLE_OAUTH: "0" + NEXT_PUBLIC_ENABLE_SENTRY: "0" + NEXT_PUBLIC_ENABLE_SESSION_RECORDER: "0" + NEXT_PUBLIC_TRACK_EVENTS: "0" + depends_on: + - plane-api + - plane-worker - plane-api: - container_name: planebackend - build: - context: ./apiserver - dockerfile: Dockerfile.api - restart: always - command: ./bin/takeoff - env_file: - - .env - environment: - <<: *api-and-worker-env - depends_on: - - plane-db - - plane-redis + plane-deploy: + container_name: planedeploy + build: + context: . + dockerfile: ./space/Dockerfile.space + args: + DOCKER_BUILDKIT: 1 + NEXT_PUBLIC_API_BASE_URL: http://localhost:8000 + restart: always + command: /usr/local/bin/start.sh space/server.js space + env_file: + - .env + environment: + - NEXT_PUBLIC_API_BASE_URL=${NEXT_PUBLIC_API_BASE_URL} + depends_on: + - plane-api + - plane-worker + - plane-web - plane-worker: - container_name: planebgworker - build: - context: ./apiserver - dockerfile: Dockerfile.api - restart: always - command: ./bin/worker - env_file: - - .env - environment: - <<: *api-and-worker-env - depends_on: - - plane-api - - plane-db - - plane-redis + plane-api: + container_name: planebackend + build: + context: ./apiserver + dockerfile: Dockerfile.api + restart: always + command: ./bin/takeoff + env_file: + - .env + environment: + <<: *api-and-worker-env + depends_on: + - plane-db + - plane-redis - plane-beat-worker: - container_name: planebeatworker - build: - context: ./apiserver - dockerfile: Dockerfile.api - restart: always - command: ./bin/beat - env_file: - - .env - environment: - <<: *api-and-worker-env - depends_on: - - plane-api - - plane-db - - plane-redis + plane-worker: + container_name: planebgworker + build: + context: ./apiserver + dockerfile: Dockerfile.api + restart: always + command: ./bin/worker + env_file: + - .env + environment: + <<: *api-and-worker-env + depends_on: + - plane-api + - plane-db + - plane-redis - plane-db: - container_name: plane-db - image: postgres:15.2-alpine - restart: always - command: postgres -c 'max_connections=1000' - volumes: - - pgdata:/var/lib/postgresql/data - env_file: - - .env - environment: - POSTGRES_USER: ${PGUSER} - POSTGRES_DB: ${PGDATABASE} - POSTGRES_PASSWORD: ${PGPASSWORD} - PGDATA: /var/lib/postgresql/data + plane-beat-worker: + container_name: planebeatworker + build: + context: ./apiserver + dockerfile: Dockerfile.api + restart: always + command: ./bin/beat + env_file: + - .env + environment: + <<: *api-and-worker-env + depends_on: + - plane-api + - plane-db + - plane-redis - plane-redis: - container_name: plane-redis - image: redis:6.2.7-alpine - restart: always - volumes: - - redisdata:/data + plane-db: + container_name: plane-db + image: postgres:15.2-alpine + restart: always + command: postgres -c 'max_connections=1000' + volumes: + - pgdata:/var/lib/postgresql/data + env_file: + - .env + environment: + POSTGRES_USER: ${PGUSER} + POSTGRES_DB: ${PGDATABASE} + POSTGRES_PASSWORD: ${PGPASSWORD} + PGDATA: /var/lib/postgresql/data - plane-minio: - container_name: plane-minio - image: minio/minio - restart: always - command: server /export --console-address ":9090" - volumes: - - uploads:/export - env_file: - - .env - environment: - MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID} - MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY} + plane-redis: + container_name: plane-redis + image: redis:6.2.7-alpine + restart: always + volumes: + - redisdata:/data - createbuckets: - image: minio/mc - entrypoint: > - /bin/sh -c " /usr/bin/mc config host add plane-minio http://plane-minio:9000 \$AWS_ACCESS_KEY_ID \$AWS_SECRET_ACCESS_KEY; /usr/bin/mc mb plane-minio/\$AWS_S3_BUCKET_NAME; /usr/bin/mc anonymous set download plane-minio/\$AWS_S3_BUCKET_NAME; exit 0; " - env_file: - - .env - depends_on: - - plane-minio + plane-minio: + container_name: plane-minio + image: minio/minio + restart: always + command: server /export --console-address ":9090" + volumes: + - uploads:/export + env_file: + - .env + environment: + MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID} + MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY} - # Comment this if you already have a reverse proxy running - plane-proxy: - container_name: planeproxy - build: - context: ./nginx - dockerfile: Dockerfile - restart: always - ports: - - ${NGINX_PORT}:80 - env_file: - - .env - environment: - FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880} - BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads} - depends_on: - - plane-web - - plane-api + createbuckets: + image: minio/mc + entrypoint: > + /bin/sh -c " /usr/bin/mc config host add plane-minio http://plane-minio:9000 \$AWS_ACCESS_KEY_ID \$AWS_SECRET_ACCESS_KEY; /usr/bin/mc mb plane-minio/\$AWS_S3_BUCKET_NAME; /usr/bin/mc anonymous set download plane-minio/\$AWS_S3_BUCKET_NAME; exit 0; " + env_file: + - .env + depends_on: + - plane-minio + + # Comment this if you already have a reverse proxy running + plane-proxy: + container_name: planeproxy + build: + context: ./nginx + dockerfile: Dockerfile + restart: always + ports: + - ${NGINX_PORT}:80 + env_file: + - .env + environment: + FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880} + BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads} + depends_on: + - plane-web + - plane-api volumes: - pgdata: - redisdata: - uploads: + pgdata: + redisdata: + uploads: diff --git a/nginx/nginx.conf.template b/nginx/nginx.conf.template index 206c94b51c3..974f4907d6c 100644 --- a/nginx/nginx.conf.template +++ b/nginx/nginx.conf.template @@ -19,6 +19,10 @@ server { proxy_pass http://planebackend:8000/api/; } + location /spaces/ { + proxy_pass http://planedeploy:3000/spaces/; + } + location /${BUCKET_NAME}/ { proxy_pass http://plane-minio:9000/uploads/; } diff --git a/package.json b/package.json index 804fb7b649b..397952b3b12 100644 --- a/package.json +++ b/package.json @@ -3,20 +3,24 @@ "license": "AGPL-3.0", "private": true, "workspaces": [ - "apps/*", + "web", + "space", "packages/*" ], "scripts": { + "prepare": "husky install", "build": "turbo run build", "dev": "turbo run dev", "start": "turbo run start", "lint": "turbo run lint", - "clean": "turbo run clean" + "clean": "turbo run clean", + "format": "prettier --write \"**/*.{ts,tsx,md}\"" }, "devDependencies": { "eslint-config-custom": "*", "prettier": "latest", - "turbo": "latest" + "turbo": "latest", + "husky": "^8.0.3" }, "packageManager": "yarn@1.22.19" } diff --git a/packages/eslint-config-custom/index.js b/packages/eslint-config-custom/index.js index 4d829512596..d31a7640602 100644 --- a/packages/eslint-config-custom/index.js +++ b/packages/eslint-config-custom/index.js @@ -4,7 +4,7 @@ module.exports = { plugins: ["react", "@typescript-eslint"], settings: { next: { - rootDir: ["app/", "docs/", "packages/*/"], + rootDir: ["web/", "space/", "packages/*/"], }, }, rules: { diff --git a/apps/space/.env.example b/space/.env.example similarity index 100% rename from apps/space/.env.example rename to space/.env.example diff --git a/apps/app/.eslintrc.js b/space/.eslintrc.js similarity index 100% rename from apps/app/.eslintrc.js rename to space/.eslintrc.js diff --git a/apps/space/.gitignore b/space/.gitignore similarity index 100% rename from apps/space/.gitignore rename to space/.gitignore diff --git a/apps/space/.prettierignore b/space/.prettierignore similarity index 100% rename from apps/space/.prettierignore rename to space/.prettierignore diff --git a/apps/space/.prettierrc.json b/space/.prettierrc.json similarity index 100% rename from apps/space/.prettierrc.json rename to space/.prettierrc.json diff --git a/apps/space/Dockerfile.space b/space/Dockerfile.space similarity index 81% rename from apps/space/Dockerfile.space rename to space/Dockerfile.space index 0240ddbf767..34fe42a13f0 100644 --- a/apps/space/Dockerfile.space +++ b/space/Dockerfile.space @@ -44,14 +44,15 @@ RUN addgroup --system --gid 1001 plane RUN adduser --system --uid 1001 captain USER captain -COPY --from=installer /app/apps/space/next.config.js . -COPY --from=installer /app/apps/space/package.json . +COPY --from=installer /app/space/next.config.js . +COPY --from=installer /app/space/package.json . -# Automatically leverage output traces to reduce image size +# Automatically leverage output traces to reduce image sizß # https://nextjs.org/docs/advanced-features/output-file-tracing -COPY --from=installer --chown=captain:plane /app/apps/space/.next/standalone ./ +COPY --from=installer --chown=captain:plane /app/space/.next/standalone ./ -COPY --from=installer --chown=captain:plane /app/apps/space/.next ./apps/space/.next +COPY --from=installer --chown=captain:plane /app/space/.next ./space/.next +COPY --from=installer --chown=captain:plane /app/space/public ./space/public ARG NEXT_PUBLIC_API_BASE_URL=http://localhost:8000 ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL \ diff --git a/apps/space/README.md b/space/README.md similarity index 100% rename from apps/space/README.md rename to space/README.md diff --git a/apps/space/components/accounts/email-code-form.tsx b/space/components/accounts/email-code-form.tsx similarity index 100% rename from apps/space/components/accounts/email-code-form.tsx rename to space/components/accounts/email-code-form.tsx diff --git a/apps/space/components/accounts/email-password-form.tsx b/space/components/accounts/email-password-form.tsx similarity index 100% rename from apps/space/components/accounts/email-password-form.tsx rename to space/components/accounts/email-password-form.tsx diff --git a/apps/space/components/accounts/email-reset-password-form.tsx b/space/components/accounts/email-reset-password-form.tsx similarity index 100% rename from apps/space/components/accounts/email-reset-password-form.tsx rename to space/components/accounts/email-reset-password-form.tsx diff --git a/apps/space/components/accounts/github-login-button.tsx b/space/components/accounts/github-login-button.tsx similarity index 93% rename from apps/space/components/accounts/github-login-button.tsx rename to space/components/accounts/github-login-button.tsx index 4ba47b421b2..e9b30ab73ed 100644 --- a/apps/space/components/accounts/github-login-button.tsx +++ b/space/components/accounts/github-login-button.tsx @@ -5,8 +5,8 @@ import { useRouter } from "next/router"; // next-themes import { useTheme } from "next-themes"; // images -import githubBlackImage from "/public/logos/github-black.png"; -import githubWhiteImage from "/public/logos/github-white.png"; +import githubBlackImage from "public/logos/github-black.svg"; +import githubWhiteImage from "public/logos/github-white.svg"; export interface GithubLoginButtonProps { handleSignIn: React.Dispatch; diff --git a/apps/space/components/accounts/google-login.tsx b/space/components/accounts/google-login.tsx similarity index 100% rename from apps/space/components/accounts/google-login.tsx rename to space/components/accounts/google-login.tsx diff --git a/apps/space/components/accounts/index.ts b/space/components/accounts/index.ts similarity index 100% rename from apps/space/components/accounts/index.ts rename to space/components/accounts/index.ts diff --git a/apps/space/components/accounts/onboarding-form.tsx b/space/components/accounts/onboarding-form.tsx similarity index 100% rename from apps/space/components/accounts/onboarding-form.tsx rename to space/components/accounts/onboarding-form.tsx diff --git a/space/components/icons/index.ts b/space/components/icons/index.ts new file mode 100644 index 00000000000..28162f59155 --- /dev/null +++ b/space/components/icons/index.ts @@ -0,0 +1 @@ +export * from "./state-group"; diff --git a/apps/space/components/icons/issue-group/backlog-state-icon.tsx b/space/components/icons/state-group/backlog-state-icon.tsx similarity index 100% rename from apps/space/components/icons/issue-group/backlog-state-icon.tsx rename to space/components/icons/state-group/backlog-state-icon.tsx diff --git a/apps/space/components/icons/issue-group/cancelled-state-icon.tsx b/space/components/icons/state-group/cancelled-state-icon.tsx similarity index 100% rename from apps/space/components/icons/issue-group/cancelled-state-icon.tsx rename to space/components/icons/state-group/cancelled-state-icon.tsx diff --git a/apps/space/components/icons/issue-group/completed-state-icon.tsx b/space/components/icons/state-group/completed-state-icon.tsx similarity index 100% rename from apps/space/components/icons/issue-group/completed-state-icon.tsx rename to space/components/icons/state-group/completed-state-icon.tsx diff --git a/space/components/icons/state-group/index.ts b/space/components/icons/state-group/index.ts new file mode 100644 index 00000000000..6ede38df6ff --- /dev/null +++ b/space/components/icons/state-group/index.ts @@ -0,0 +1,6 @@ +export * from "./backlog-state-icon"; +export * from "./cancelled-state-icon"; +export * from "./completed-state-icon"; +export * from "./started-state-icon"; +export * from "./state-group-icon"; +export * from "./unstarted-state-icon"; diff --git a/apps/space/components/icons/issue-group/started-state-icon.tsx b/space/components/icons/state-group/started-state-icon.tsx similarity index 100% rename from apps/space/components/icons/issue-group/started-state-icon.tsx rename to space/components/icons/state-group/started-state-icon.tsx diff --git a/space/components/icons/state-group/state-group-icon.tsx b/space/components/icons/state-group/state-group-icon.tsx new file mode 100644 index 00000000000..1af52340036 --- /dev/null +++ b/space/components/icons/state-group/state-group-icon.tsx @@ -0,0 +1,29 @@ +// icons +import { + BacklogStateIcon, + CancelledStateIcon, + CompletedStateIcon, + StartedStateIcon, + UnstartedStateIcon, +} from "components/icons"; +import { TIssueGroupKey } from "types/issue"; + +type Props = { + stateGroup: TIssueGroupKey; + color: string; + className?: string; + height?: string; + width?: string; +}; + +export const StateGroupIcon: React.FC = ({ stateGroup, className, color, height = "12px", width = "12px" }) => { + if (stateGroup === "backlog") + return ; + else if (stateGroup === "cancelled") + return ; + else if (stateGroup === "completed") + return ; + else if (stateGroup === "started") + return ; + else return ; +}; diff --git a/apps/space/components/icons/issue-group/unstarted-state-icon.tsx b/space/components/icons/state-group/unstarted-state-icon.tsx similarity index 100% rename from apps/space/components/icons/issue-group/unstarted-state-icon.tsx rename to space/components/icons/state-group/unstarted-state-icon.tsx diff --git a/apps/space/components/icons/types.d.ts b/space/components/icons/types.d.ts similarity index 100% rename from apps/space/components/icons/types.d.ts rename to space/components/icons/types.d.ts diff --git a/apps/space/components/issues/board-views/block-downvotes.tsx b/space/components/issues/board-views/block-downvotes.tsx similarity index 100% rename from apps/space/components/issues/board-views/block-downvotes.tsx rename to space/components/issues/board-views/block-downvotes.tsx diff --git a/apps/space/components/issues/board-views/block-due-date.tsx b/space/components/issues/board-views/block-due-date.tsx similarity index 100% rename from apps/space/components/issues/board-views/block-due-date.tsx rename to space/components/issues/board-views/block-due-date.tsx diff --git a/apps/space/components/issues/board-views/block-labels.tsx b/space/components/issues/board-views/block-labels.tsx similarity index 100% rename from apps/space/components/issues/board-views/block-labels.tsx rename to space/components/issues/board-views/block-labels.tsx diff --git a/apps/space/components/issues/board-views/block-priority.tsx b/space/components/issues/board-views/block-priority.tsx similarity index 100% rename from apps/space/components/issues/board-views/block-priority.tsx rename to space/components/issues/board-views/block-priority.tsx diff --git a/apps/space/components/issues/board-views/block-state.tsx b/space/components/issues/board-views/block-state.tsx similarity index 100% rename from apps/space/components/issues/board-views/block-state.tsx rename to space/components/issues/board-views/block-state.tsx diff --git a/apps/space/components/issues/board-views/block-upvotes.tsx b/space/components/issues/board-views/block-upvotes.tsx similarity index 100% rename from apps/space/components/issues/board-views/block-upvotes.tsx rename to space/components/issues/board-views/block-upvotes.tsx diff --git a/apps/space/components/issues/board-views/calendar/index.tsx b/space/components/issues/board-views/calendar/index.tsx similarity index 100% rename from apps/space/components/issues/board-views/calendar/index.tsx rename to space/components/issues/board-views/calendar/index.tsx diff --git a/apps/space/components/issues/board-views/gantt/index.tsx b/space/components/issues/board-views/gantt/index.tsx similarity index 100% rename from apps/space/components/issues/board-views/gantt/index.tsx rename to space/components/issues/board-views/gantt/index.tsx diff --git a/apps/space/components/issues/board-views/kanban/block.tsx b/space/components/issues/board-views/kanban/block.tsx similarity index 94% rename from apps/space/components/issues/board-views/kanban/block.tsx rename to space/components/issues/board-views/kanban/block.tsx index 07375fe366b..b4de76f2b67 100644 --- a/apps/space/components/issues/board-views/kanban/block.tsx +++ b/space/components/issues/board-views/kanban/block.tsx @@ -23,7 +23,7 @@ export const IssueListBlock = observer(({ issue }: { issue: IIssue }) => { const handleBlockClick = () => { issueDetailStore.setPeekId(issue.id); - router.replace( + router.push( { pathname: `/${workspace_slug?.toString()}/${project_slug}`, query: { @@ -34,7 +34,6 @@ export const IssueListBlock = observer(({ issue }: { issue: IIssue }) => { undefined, { shallow: true } ); - // router.push(`/${workspace_slug?.toString()}/${project_slug}?board=${board?.toString()}&peekId=${issue.id}`); }; return ( diff --git a/apps/space/components/issues/board-views/kanban/header.tsx b/space/components/issues/board-views/kanban/header.tsx similarity index 87% rename from apps/space/components/issues/board-views/kanban/header.tsx rename to space/components/issues/board-views/kanban/header.tsx index 69c252593b0..5645e2b3bd6 100644 --- a/apps/space/components/issues/board-views/kanban/header.tsx +++ b/space/components/issues/board-views/kanban/header.tsx @@ -1,11 +1,11 @@ -"use client"; - // mobx react lite import { observer } from "mobx-react-lite"; // interfaces import { IIssueState } from "types/issue"; // constants import { issueGroupFilter } from "constants/data"; +// icons +import { StateGroupIcon } from "components/icons"; // mobx hook import { useMobxStore } from "lib/mobx/store-provider"; import { RootStore } from "store/root"; @@ -20,7 +20,7 @@ export const IssueListHeader = observer(({ state }: { state: IIssueState }) => { return (
- +
{state?.name}
diff --git a/apps/space/components/issues/board-views/kanban/index.tsx b/space/components/issues/board-views/kanban/index.tsx similarity index 100% rename from apps/space/components/issues/board-views/kanban/index.tsx rename to space/components/issues/board-views/kanban/index.tsx diff --git a/apps/space/components/issues/board-views/list/block.tsx b/space/components/issues/board-views/list/block.tsx similarity index 88% rename from apps/space/components/issues/board-views/list/block.tsx rename to space/components/issues/board-views/list/block.tsx index 7e6175ebbe0..bdf39b84fce 100644 --- a/apps/space/components/issues/board-views/list/block.tsx +++ b/space/components/issues/board-views/list/block.tsx @@ -6,15 +6,12 @@ import { IssueBlockPriority } from "components/issues/board-views/block-priority import { IssueBlockState } from "components/issues/board-views/block-state"; import { IssueBlockLabels } from "components/issues/board-views/block-labels"; import { IssueBlockDueDate } from "components/issues/board-views/block-due-date"; -import { IssueBlockUpVotes } from "components/issues/board-views/block-upvotes"; -import { IssueBlockDownVotes } from "components/issues/board-views/block-downvotes"; // mobx hook import { useMobxStore } from "lib/mobx/store-provider"; // interfaces import { IIssue } from "types/issue"; // store import { RootStore } from "store/root"; -import { IssueVotes } from "components/issues/peek-overview"; export const IssueListBlock: FC<{ issue: IIssue }> = observer((props) => { const { issue } = props; @@ -26,7 +23,7 @@ export const IssueListBlock: FC<{ issue: IIssue }> = observer((props) => { const handleBlockClick = () => { issueDetailStore.setPeekId(issue.id); - router.replace( + router.push( { pathname: `/${workspace_slug?.toString()}/${project_slug}`, query: { @@ -40,9 +37,6 @@ export const IssueListBlock: FC<{ issue: IIssue }> = observer((props) => { // router.push(`/${workspace_slug?.toString()}/${project_slug}?board=${board?.toString()}&peekId=${issue.id}`); }; - const totalUpVotes = issue.votes.filter((v) => v.vote === 1); - const totalDownVotes = issue.votes.filter((v) => v.vote === -1); - return (
diff --git a/apps/space/components/issues/board-views/list/header.tsx b/space/components/issues/board-views/list/header.tsx similarity index 86% rename from apps/space/components/issues/board-views/list/header.tsx rename to space/components/issues/board-views/list/header.tsx index 546c20bf688..83312e7b9aa 100644 --- a/apps/space/components/issues/board-views/list/header.tsx +++ b/space/components/issues/board-views/list/header.tsx @@ -1,9 +1,9 @@ -"use client"; - // mobx react lite import { observer } from "mobx-react-lite"; // interfaces import { IIssueState } from "types/issue"; +// icons +import { StateGroupIcon } from "components/icons"; // constants import { issueGroupFilter } from "constants/data"; // mobx hook @@ -20,7 +20,7 @@ export const IssueListHeader = observer(({ state }: { state: IIssueState }) => { return (
- +
{state?.name}
{store.issue.getCountOfIssuesByState(state.id)}
diff --git a/apps/space/components/issues/board-views/list/index.tsx b/space/components/issues/board-views/list/index.tsx similarity index 94% rename from apps/space/components/issues/board-views/list/index.tsx rename to space/components/issues/board-views/list/index.tsx index 4d470184070..1c6900dd964 100644 --- a/apps/space/components/issues/board-views/list/index.tsx +++ b/space/components/issues/board-views/list/index.tsx @@ -1,4 +1,3 @@ -import { useEffect } from "react"; import { observer } from "mobx-react-lite"; // components import { IssueListHeader } from "components/issues/board-views/list/header"; @@ -9,7 +8,6 @@ import { IIssueState, IIssue } from "types/issue"; import { useMobxStore } from "lib/mobx/store-provider"; // store import { RootStore } from "store/root"; -import { useRouter } from "next/router"; export const IssueListView = observer(() => { const { issue: issueStore }: RootStore = useMobxStore(); diff --git a/apps/space/components/issues/board-views/spreadsheet/index.tsx b/space/components/issues/board-views/spreadsheet/index.tsx similarity index 100% rename from apps/space/components/issues/board-views/spreadsheet/index.tsx rename to space/components/issues/board-views/spreadsheet/index.tsx diff --git a/apps/space/components/issues/filters-render/index.tsx b/space/components/issues/filters-render/index.tsx similarity index 100% rename from apps/space/components/issues/filters-render/index.tsx rename to space/components/issues/filters-render/index.tsx diff --git a/apps/space/components/issues/filters-render/label/filter-label-block.tsx b/space/components/issues/filters-render/label/filter-label-block.tsx similarity index 100% rename from apps/space/components/issues/filters-render/label/filter-label-block.tsx rename to space/components/issues/filters-render/label/filter-label-block.tsx diff --git a/apps/space/components/issues/filters-render/label/index.tsx b/space/components/issues/filters-render/label/index.tsx similarity index 100% rename from apps/space/components/issues/filters-render/label/index.tsx rename to space/components/issues/filters-render/label/index.tsx diff --git a/apps/space/components/issues/filters-render/priority/filter-priority-block.tsx b/space/components/issues/filters-render/priority/filter-priority-block.tsx similarity index 100% rename from apps/space/components/issues/filters-render/priority/filter-priority-block.tsx rename to space/components/issues/filters-render/priority/filter-priority-block.tsx diff --git a/apps/space/components/issues/filters-render/priority/index.tsx b/space/components/issues/filters-render/priority/index.tsx similarity index 100% rename from apps/space/components/issues/filters-render/priority/index.tsx rename to space/components/issues/filters-render/priority/index.tsx diff --git a/apps/space/components/issues/filters-render/state/filter-state-block.tsx b/space/components/issues/filters-render/state/filter-state-block.tsx similarity index 100% rename from apps/space/components/issues/filters-render/state/filter-state-block.tsx rename to space/components/issues/filters-render/state/filter-state-block.tsx diff --git a/apps/space/components/issues/filters-render/state/index.tsx b/space/components/issues/filters-render/state/index.tsx similarity index 100% rename from apps/space/components/issues/filters-render/state/index.tsx rename to space/components/issues/filters-render/state/index.tsx diff --git a/apps/space/components/issues/navbar/index.tsx b/space/components/issues/navbar/index.tsx similarity index 90% rename from apps/space/components/issues/navbar/index.tsx rename to space/components/issues/navbar/index.tsx index c9d0f52d144..509d676b7bb 100644 --- a/apps/space/components/issues/navbar/index.tsx +++ b/space/components/issues/navbar/index.tsx @@ -44,15 +44,19 @@ const IssueNavbar = observer(() => { }, [projectStore, workspace_slug, project_slug]); useEffect(() => { - if (workspace_slug && projectStore) { - if (board) { - projectStore.setActiveBoard(board.toString()); - } else { - router.push(`/${workspace_slug}/${project_slug}?board=list`); - projectStore.setActiveBoard("list"); + if (workspace_slug && project_slug) { + if (!board) { + router.push({ + pathname: `/${workspace_slug}/${project_slug}`, + query: { + board: "list", + }, + }); + return projectStore.setActiveBoard("list"); } + projectStore.setActiveBoard(board.toString()); } - }, [board, router, projectStore, workspace_slug, project_slug]); + }, [board, workspace_slug, project_slug]); return (
diff --git a/apps/space/components/issues/navbar/issue-board-view.tsx b/space/components/issues/navbar/issue-board-view.tsx similarity index 74% rename from apps/space/components/issues/navbar/issue-board-view.tsx rename to space/components/issues/navbar/issue-board-view.tsx index 62f4d17023d..0ae71e8ee99 100644 --- a/apps/space/components/issues/navbar/issue-board-view.tsx +++ b/space/components/issues/navbar/issue-board-view.tsx @@ -14,21 +14,7 @@ export const NavbarIssueBoardView = observer(() => { const handleCurrentBoardView = (boardView: string) => { projectStore.setActiveBoard(boardView); - router.push( - `/${workspace_slug}/${project_slug}?board=${boardView}${ - issueStore?.filteredLabels && issueStore?.filteredLabels.length > 0 - ? `&labels=${issueStore?.filteredLabels.join(",")}` - : "" - }${ - issueStore?.filteredPriorities && issueStore?.filteredPriorities.length > 0 - ? `&priorities=${issueStore?.filteredPriorities.join(",")}` - : "" - }${ - issueStore?.filteredStates && issueStore?.filteredStates.length > 0 - ? `&states=${issueStore?.filteredStates.join(",")}` - : "" - }` - ); + router.push(`/${workspace_slug}/${project_slug}?board=${boardView}`); }; return ( diff --git a/apps/space/components/issues/navbar/issue-filter.tsx b/space/components/issues/navbar/issue-filter.tsx similarity index 100% rename from apps/space/components/issues/navbar/issue-filter.tsx rename to space/components/issues/navbar/issue-filter.tsx diff --git a/apps/space/components/issues/navbar/issue-view.tsx b/space/components/issues/navbar/issue-view.tsx similarity index 100% rename from apps/space/components/issues/navbar/issue-view.tsx rename to space/components/issues/navbar/issue-view.tsx diff --git a/apps/space/components/issues/navbar/search.tsx b/space/components/issues/navbar/search.tsx similarity index 100% rename from apps/space/components/issues/navbar/search.tsx rename to space/components/issues/navbar/search.tsx diff --git a/apps/space/components/issues/navbar/theme.tsx b/space/components/issues/navbar/theme.tsx similarity index 100% rename from apps/space/components/issues/navbar/theme.tsx rename to space/components/issues/navbar/theme.tsx diff --git a/apps/space/components/issues/peek-overview/add-comment.tsx b/space/components/issues/peek-overview/add-comment.tsx similarity index 100% rename from apps/space/components/issues/peek-overview/add-comment.tsx rename to space/components/issues/peek-overview/add-comment.tsx diff --git a/apps/space/components/issues/peek-overview/comment-detail-card.tsx b/space/components/issues/peek-overview/comment-detail-card.tsx similarity index 100% rename from apps/space/components/issues/peek-overview/comment-detail-card.tsx rename to space/components/issues/peek-overview/comment-detail-card.tsx diff --git a/apps/space/components/issues/peek-overview/full-screen-peek-view.tsx b/space/components/issues/peek-overview/full-screen-peek-view.tsx similarity index 100% rename from apps/space/components/issues/peek-overview/full-screen-peek-view.tsx rename to space/components/issues/peek-overview/full-screen-peek-view.tsx diff --git a/apps/space/components/issues/peek-overview/header.tsx b/space/components/issues/peek-overview/header.tsx similarity index 93% rename from apps/space/components/issues/peek-overview/header.tsx rename to space/components/issues/peek-overview/header.tsx index 79de3978b0a..2aa43ff47b8 100644 --- a/apps/space/components/issues/peek-overview/header.tsx +++ b/space/components/issues/peek-overview/header.tsx @@ -1,7 +1,5 @@ import React from "react"; -import { useRouter } from "next/router"; - // headless ui import { Listbox, Transition } from "@headlessui/react"; // hooks @@ -48,15 +46,12 @@ export const PeekOverviewHeader: React.FC = (props) => { const { issueDetails: issueDetailStore }: RootStore = useMobxStore(); - const router = useRouter(); - const { workspace_slug } = router.query; - const { setToastAlert } = useToast(); const handleCopyLink = () => { - const originURL = typeof window !== "undefined" && window.location.origin ? window.location.origin : ""; + const urlToCopy = window.location.href; - copyTextToClipboard(`${originURL}/${workspace_slug}/projects/${issueDetails?.project}/`).then(() => { + copyTextToClipboard(urlToCopy).then(() => { setToastAlert({ type: "success", title: "Link copied!", diff --git a/apps/space/components/issues/peek-overview/index.ts b/space/components/issues/peek-overview/index.ts similarity index 100% rename from apps/space/components/issues/peek-overview/index.ts rename to space/components/issues/peek-overview/index.ts diff --git a/apps/space/components/issues/peek-overview/issue-activity.tsx b/space/components/issues/peek-overview/issue-activity.tsx similarity index 100% rename from apps/space/components/issues/peek-overview/issue-activity.tsx rename to space/components/issues/peek-overview/issue-activity.tsx diff --git a/apps/space/components/issues/peek-overview/issue-details.tsx b/space/components/issues/peek-overview/issue-details.tsx similarity index 100% rename from apps/space/components/issues/peek-overview/issue-details.tsx rename to space/components/issues/peek-overview/issue-details.tsx diff --git a/apps/space/components/issues/peek-overview/issue-emoji-reactions.tsx b/space/components/issues/peek-overview/issue-emoji-reactions.tsx similarity index 100% rename from apps/space/components/issues/peek-overview/issue-emoji-reactions.tsx rename to space/components/issues/peek-overview/issue-emoji-reactions.tsx diff --git a/apps/space/components/issues/peek-overview/issue-properties.tsx b/space/components/issues/peek-overview/issue-properties.tsx similarity index 88% rename from apps/space/components/issues/peek-overview/issue-properties.tsx rename to space/components/issues/peek-overview/issue-properties.tsx index 2d454852a9d..6b3394b5669 100644 --- a/apps/space/components/issues/peek-overview/issue-properties.tsx +++ b/space/components/issues/peek-overview/issue-properties.tsx @@ -1,21 +1,15 @@ -// headless ui -import { Disclosure } from "@headlessui/react"; -// import { getStateGroupIcon } from "components/icons"; // hooks import useToast from "hooks/use-toast"; // icons import { Icon } from "components/ui"; import { copyTextToClipboard, addSpaceIfCamelCase } from "helpers/string.helper"; +// helpers +import { renderDateFormat } from "constants/helpers"; // types import { IIssue } from "types/issue"; +import { IPeekMode } from "store/issue_details"; // constants import { issueGroupFilter, issuePriorityFilter } from "constants/data"; -import { useEffect } from "react"; -import { renderDateFormat } from "constants/helpers"; -import { IPeekMode } from "store/issue_details"; -import { useRouter } from "next/router"; -import { RootStore } from "store/root"; -import { useMobxStore } from "lib/mobx/store-provider"; type Props = { issueDetails: IIssue; @@ -37,11 +31,6 @@ const validDate = (date: any, state: string): string => { export const PeekOverviewIssueProperties: React.FC = ({ issueDetails, mode }) => { const { setToastAlert } = useToast(); - const { issueDetails: issueDetailStore }: RootStore = useMobxStore(); - - const router = useRouter(); - const { workspaceSlug } = router.query; - const startDate = issueDetails.start_date; const targetDate = issueDetails.target_date; @@ -57,11 +46,9 @@ export const PeekOverviewIssueProperties: React.FC = ({ issueDetails, mod const priority = issueDetails.priority ? issuePriorityFilter(issueDetails.priority) : null; const handleCopyLink = () => { - const originURL = typeof window !== "undefined" && window.location.origin ? window.location.origin : ""; + const urlToCopy = window.location.href; - copyTextToClipboard( - `${originURL}/${workspaceSlug}/projects/${issueDetails.project}/issues/${issueDetails.id}` - ).then(() => { + copyTextToClipboard(urlToCopy).then(() => { setToastAlert({ type: "success", title: "Link copied!", diff --git a/apps/space/components/issues/peek-overview/issue-reaction.tsx b/space/components/issues/peek-overview/issue-reaction.tsx similarity index 100% rename from apps/space/components/issues/peek-overview/issue-reaction.tsx rename to space/components/issues/peek-overview/issue-reaction.tsx diff --git a/apps/space/components/issues/peek-overview/issue-vote-reactions.tsx b/space/components/issues/peek-overview/issue-vote-reactions.tsx similarity index 100% rename from apps/space/components/issues/peek-overview/issue-vote-reactions.tsx rename to space/components/issues/peek-overview/issue-vote-reactions.tsx diff --git a/apps/space/components/issues/peek-overview/layout.tsx b/space/components/issues/peek-overview/layout.tsx similarity index 70% rename from apps/space/components/issues/peek-overview/layout.tsx rename to space/components/issues/peek-overview/layout.tsx index abb76db481c..a3d7386eb00 100644 --- a/apps/space/components/issues/peek-overview/layout.tsx +++ b/space/components/issues/peek-overview/layout.tsx @@ -65,26 +65,24 @@ export const IssuePeekOverview: React.FC = observer((props) => { return ( <> - -
- - - - - -
+ + + + + +
- + = observer((props) => { >
-
- - + +
= observer((props) => { {issueDetailStore.peekMode === "full" && ( )} - - -
+
+ +
diff --git a/apps/space/components/issues/peek-overview/side-peek-view.tsx b/space/components/issues/peek-overview/side-peek-view.tsx similarity index 100% rename from apps/space/components/issues/peek-overview/side-peek-view.tsx rename to space/components/issues/peek-overview/side-peek-view.tsx diff --git a/apps/space/components/tiptap/bubble-menu/index.tsx b/space/components/tiptap/bubble-menu/index.tsx similarity index 100% rename from apps/space/components/tiptap/bubble-menu/index.tsx rename to space/components/tiptap/bubble-menu/index.tsx diff --git a/apps/app/components/tiptap/bubble-menu/link-selector.tsx b/space/components/tiptap/bubble-menu/link-selector.tsx similarity index 92% rename from apps/app/components/tiptap/bubble-menu/link-selector.tsx rename to space/components/tiptap/bubble-menu/link-selector.tsx index 16072f4be27..559521db66f 100644 --- a/apps/app/components/tiptap/bubble-menu/link-selector.tsx +++ b/space/components/tiptap/bubble-menu/link-selector.tsx @@ -6,10 +6,9 @@ import isValidHttpUrl from "./utils/link-validator"; interface LinkSelectorProps { editor: Editor; isOpen: boolean; - setIsOpen: Dispatch> + setIsOpen: Dispatch>; } - export const LinkSelector: FC = ({ editor, isOpen, setIsOpen }) => { const inputRef = useRef(null); @@ -76,7 +75,9 @@ export const LinkSelector: FC = ({ editor, isOpen, setIsOpen ) : ( -
)} {projectStore?.activeBoard === "kanban" && ( -
+
)} diff --git a/apps/space/constants/data.ts b/space/constants/data.ts similarity index 100% rename from apps/space/constants/data.ts rename to space/constants/data.ts diff --git a/apps/space/constants/helpers.ts b/space/constants/helpers.ts similarity index 100% rename from apps/space/constants/helpers.ts rename to space/constants/helpers.ts diff --git a/apps/space/constants/seo.ts b/space/constants/seo.ts similarity index 100% rename from apps/space/constants/seo.ts rename to space/constants/seo.ts diff --git a/apps/space/constants/workspace.ts b/space/constants/workspace.ts similarity index 100% rename from apps/space/constants/workspace.ts rename to space/constants/workspace.ts diff --git a/apps/space/contexts/toast.context.tsx b/space/contexts/toast.context.tsx similarity index 100% rename from apps/space/contexts/toast.context.tsx rename to space/contexts/toast.context.tsx diff --git a/apps/space/helpers/date-time.helper.ts b/space/helpers/date-time.helper.ts similarity index 100% rename from apps/space/helpers/date-time.helper.ts rename to space/helpers/date-time.helper.ts diff --git a/apps/space/helpers/emoji.helper.tsx b/space/helpers/emoji.helper.tsx similarity index 100% rename from apps/space/helpers/emoji.helper.tsx rename to space/helpers/emoji.helper.tsx diff --git a/apps/space/helpers/string.helper.ts b/space/helpers/string.helper.ts similarity index 100% rename from apps/space/helpers/string.helper.ts rename to space/helpers/string.helper.ts diff --git a/apps/space/hooks/use-outside-click.tsx b/space/hooks/use-outside-click.tsx similarity index 100% rename from apps/space/hooks/use-outside-click.tsx rename to space/hooks/use-outside-click.tsx diff --git a/apps/app/hooks/use-timer.tsx b/space/hooks/use-timer.tsx similarity index 100% rename from apps/app/hooks/use-timer.tsx rename to space/hooks/use-timer.tsx diff --git a/apps/app/hooks/use-toast.tsx b/space/hooks/use-toast.tsx similarity index 100% rename from apps/app/hooks/use-toast.tsx rename to space/hooks/use-toast.tsx diff --git a/apps/space/layouts/project-layout.tsx b/space/layouts/project-layout.tsx similarity index 52% rename from apps/space/layouts/project-layout.tsx rename to space/layouts/project-layout.tsx index 2147e845e7e..1a0b7899e77 100644 --- a/apps/space/layouts/project-layout.tsx +++ b/space/layouts/project-layout.tsx @@ -3,6 +3,7 @@ import Image from "next/image"; // mobx import { observer } from "mobx-react-lite"; +import planeLogo from "public/plane-logo.svg"; // components import IssueNavbar from "components/issues/navbar"; @@ -12,18 +13,20 @@ const ProjectLayout = ({ children }: { children: React.ReactNode }) => (
{children}
- + + +
+ Plane logo +
+
+ Powered by Plane Deploy +
+
); diff --git a/apps/space/lib/index.ts b/space/lib/index.ts similarity index 100% rename from apps/space/lib/index.ts rename to space/lib/index.ts diff --git a/apps/space/lib/mobx/store-init.tsx b/space/lib/mobx/store-init.tsx similarity index 100% rename from apps/space/lib/mobx/store-init.tsx rename to space/lib/mobx/store-init.tsx diff --git a/apps/app/lib/mobx/store-provider.tsx b/space/lib/mobx/store-provider.tsx similarity index 100% rename from apps/app/lib/mobx/store-provider.tsx rename to space/lib/mobx/store-provider.tsx diff --git a/space/next.config.js b/space/next.config.js new file mode 100644 index 00000000000..712c1c472e8 --- /dev/null +++ b/space/next.config.js @@ -0,0 +1,18 @@ +/** @type {import('next').NextConfig} */ +const path = require("path"); +const withImages = require("next-images"); + +const nextConfig = { + reactStrictMode: false, + swcMinify: true, + experimental: { + outputFileTracingRoot: path.join(__dirname, "../"), + }, + output: "standalone", +}; + +if (parseInt(process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX || "0")) { + const nextConfigWithNginx = withImages({ basePath: "/spaces", ...nextConfig }); +} else { + module.exports = nextConfig; +} diff --git a/apps/space/package.json b/space/package.json similarity index 95% rename from apps/space/package.json rename to space/package.json index bf30bc28d53..1c91535678f 100644 --- a/apps/space/package.json +++ b/space/package.json @@ -37,6 +37,7 @@ "mobx": "^6.10.0", "mobx-react-lite": "^4.0.3", "next": "12.3.2", + "next-images": "^1.8.5", "next-theme": "^0.1.5", "nprogress": "^0.2.0", "react": "^18.2.0", @@ -55,8 +56,10 @@ "@types/uuid": "^9.0.1", "autoprefixer": "^10.4.13", "eslint": "8.34.0", + "eslint-config-custom": "*", "eslint-config-next": "13.2.1", "postcss": "^8.4.21", + "tsconfig": "*", "tailwindcss": "^3.2.7" } } diff --git a/apps/space/pages/404.tsx b/space/pages/404.tsx similarity index 90% rename from apps/space/pages/404.tsx rename to space/pages/404.tsx index d10d95fb9bd..be40bd50115 100644 --- a/apps/space/pages/404.tsx +++ b/space/pages/404.tsx @@ -1,12 +1,13 @@ // next imports import Image from "next/image"; +import notFoundImage from "public/404.svg"; const Custom404Error = () => (
- 404- Page not found + 404- Page not found
Oops! Something went wrong.
diff --git a/apps/space/pages/[workspace_slug]/[project_slug]/index.tsx b/space/pages/[workspace_slug]/[project_slug]/index.tsx similarity index 100% rename from apps/space/pages/[workspace_slug]/[project_slug]/index.tsx rename to space/pages/[workspace_slug]/[project_slug]/index.tsx diff --git a/apps/space/pages/[workspace_slug]/index.tsx b/space/pages/[workspace_slug]/index.tsx similarity index 92% rename from apps/space/pages/[workspace_slug]/index.tsx rename to space/pages/[workspace_slug]/index.tsx index c35662f5a62..a844c0763b5 100644 --- a/apps/space/pages/[workspace_slug]/index.tsx +++ b/space/pages/[workspace_slug]/index.tsx @@ -1,5 +1,3 @@ -"use client"; - const WorkspaceProjectPage = () => (
Plane Workspace Space
); diff --git a/apps/space/pages/_app.tsx b/space/pages/_app.tsx similarity index 75% rename from apps/space/pages/_app.tsx rename to space/pages/_app.tsx index 900b39f61f9..2995edbbf15 100644 --- a/apps/space/pages/_app.tsx +++ b/space/pages/_app.tsx @@ -25,11 +25,11 @@ function MyApp({ Component, pageProps }: AppProps) { - - - - - + + + + + diff --git a/apps/space/pages/_document.tsx b/space/pages/_document.tsx similarity index 100% rename from apps/space/pages/_document.tsx rename to space/pages/_document.tsx diff --git a/apps/space/pages/index.tsx b/space/pages/index.tsx similarity index 99% rename from apps/space/pages/index.tsx rename to space/pages/index.tsx index 8f766cde233..87a291441cc 100644 --- a/apps/space/pages/index.tsx +++ b/space/pages/index.tsx @@ -2,7 +2,7 @@ import React, { useEffect } from "react"; import Image from "next/image"; import { useRouter } from "next/router"; // assets -import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png"; +import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.svg"; // mobx import { observer } from "mobx-react-lite"; import { useMobxStore } from "lib/mobx/store-provider"; diff --git a/apps/space/pages/onboarding/index.tsx b/space/pages/onboarding/index.tsx similarity index 95% rename from apps/space/pages/onboarding/index.tsx rename to space/pages/onboarding/index.tsx index 10adb1d1833..1d2f1951902 100644 --- a/apps/space/pages/onboarding/index.tsx +++ b/space/pages/onboarding/index.tsx @@ -1,8 +1,7 @@ import React, { useEffect } from "react"; import Image from "next/image"; // assets -import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png"; -import BlackHorizontalLogo from "public/plane-logos/black-horizontal-with-blue-logo.svg"; +import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.svg"; // mobx import { observer } from "mobx-react-lite"; import { useMobxStore } from "lib/mobx/store-provider"; diff --git a/apps/space/pages/project-not-published/index.tsx b/space/pages/project-not-published/index.tsx similarity index 87% rename from apps/space/pages/project-not-published/index.tsx rename to space/pages/project-not-published/index.tsx index 82a2ff5da42..985b7bc414a 100644 --- a/apps/space/pages/project-not-published/index.tsx +++ b/space/pages/project-not-published/index.tsx @@ -1,12 +1,13 @@ // next imports import Image from "next/image"; +import projectNotPublishedImage from "public/project-not-published.svg"; const CustomProjectNotPublishedError = () => (
- 404- Page not found + 404- Page not found
Oops! The page you{`'`}re looking for isn{`'`}t live at the moment. diff --git a/apps/app/postcss.config.js b/space/postcss.config.js similarity index 100% rename from apps/app/postcss.config.js rename to space/postcss.config.js diff --git a/apps/app/public/404.svg b/space/public/404.svg similarity index 100% rename from apps/app/public/404.svg rename to space/public/404.svg diff --git a/apps/app/public/favicon/android-chrome-192x192.png b/space/public/favicon/android-chrome-192x192.png similarity index 100% rename from apps/app/public/favicon/android-chrome-192x192.png rename to space/public/favicon/android-chrome-192x192.png diff --git a/apps/app/public/favicon/android-chrome-512x512.png b/space/public/favicon/android-chrome-512x512.png similarity index 100% rename from apps/app/public/favicon/android-chrome-512x512.png rename to space/public/favicon/android-chrome-512x512.png diff --git a/apps/app/public/favicon/apple-touch-icon.png b/space/public/favicon/apple-touch-icon.png similarity index 100% rename from apps/app/public/favicon/apple-touch-icon.png rename to space/public/favicon/apple-touch-icon.png diff --git a/apps/app/public/favicon/favicon-16x16.png b/space/public/favicon/favicon-16x16.png similarity index 100% rename from apps/app/public/favicon/favicon-16x16.png rename to space/public/favicon/favicon-16x16.png diff --git a/apps/app/public/favicon/favicon-32x32.png b/space/public/favicon/favicon-32x32.png similarity index 100% rename from apps/app/public/favicon/favicon-32x32.png rename to space/public/favicon/favicon-32x32.png diff --git a/apps/app/public/favicon/favicon.ico b/space/public/favicon/favicon.ico similarity index 100% rename from apps/app/public/favicon/favicon.ico rename to space/public/favicon/favicon.ico diff --git a/apps/app/public/favicon/site.webmanifest b/space/public/favicon/site.webmanifest similarity index 100% rename from apps/app/public/favicon/site.webmanifest rename to space/public/favicon/site.webmanifest diff --git a/space/public/logos/github-black.svg b/space/public/logos/github-black.svg new file mode 100644 index 00000000000..ad04a798e60 --- /dev/null +++ b/space/public/logos/github-black.svg @@ -0,0 +1,29 @@ + + + + + + + + diff --git a/space/public/logos/github-square.svg b/space/public/logos/github-square.svg new file mode 100644 index 00000000000..a7836db8f48 --- /dev/null +++ b/space/public/logos/github-square.svg @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/space/public/logos/github-white.svg b/space/public/logos/github-white.svg new file mode 100644 index 00000000000..90fe34d8be4 --- /dev/null +++ b/space/public/logos/github-white.svg @@ -0,0 +1,11 @@ + + + + + + + diff --git a/space/public/plane-logo.svg b/space/public/plane-logo.svg new file mode 100644 index 00000000000..11179417cf8 --- /dev/null +++ b/space/public/plane-logo.svg @@ -0,0 +1,94 @@ + + + + diff --git a/apps/app/public/plane-logos/black-horizontal-with-blue-logo.svg b/space/public/plane-logos/black-horizontal-with-blue-logo.svg similarity index 100% rename from apps/app/public/plane-logos/black-horizontal-with-blue-logo.svg rename to space/public/plane-logos/black-horizontal-with-blue-logo.svg diff --git a/space/public/plane-logos/blue-without-text.svg b/space/public/plane-logos/blue-without-text.svg new file mode 100644 index 00000000000..715aee5032d --- /dev/null +++ b/space/public/plane-logos/blue-without-text.svg @@ -0,0 +1,15 @@ + + + + + + + + + + diff --git a/apps/app/public/plane-logos/white-horizontal-with-blue-logo.svg b/space/public/plane-logos/white-horizontal-with-blue-logo.svg similarity index 100% rename from apps/app/public/plane-logos/white-horizontal-with-blue-logo.svg rename to space/public/plane-logos/white-horizontal-with-blue-logo.svg diff --git a/apps/app/public/plane-logos/white-horizontal.svg b/space/public/plane-logos/white-horizontal.svg similarity index 100% rename from apps/app/public/plane-logos/white-horizontal.svg rename to space/public/plane-logos/white-horizontal.svg diff --git a/apps/space/public/project-not-published.svg b/space/public/project-not-published.svg similarity index 100% rename from apps/space/public/project-not-published.svg rename to space/public/project-not-published.svg diff --git a/apps/space/services/api.service.ts b/space/services/api.service.ts similarity index 100% rename from apps/space/services/api.service.ts rename to space/services/api.service.ts diff --git a/apps/space/services/authentication.service.ts b/space/services/authentication.service.ts similarity index 100% rename from apps/space/services/authentication.service.ts rename to space/services/authentication.service.ts diff --git a/apps/space/services/file.service.ts b/space/services/file.service.ts similarity index 100% rename from apps/space/services/file.service.ts rename to space/services/file.service.ts diff --git a/apps/space/services/issue.service.ts b/space/services/issue.service.ts similarity index 100% rename from apps/space/services/issue.service.ts rename to space/services/issue.service.ts diff --git a/apps/space/services/project.service.ts b/space/services/project.service.ts similarity index 100% rename from apps/space/services/project.service.ts rename to space/services/project.service.ts diff --git a/apps/space/services/user.service.ts b/space/services/user.service.ts similarity index 100% rename from apps/space/services/user.service.ts rename to space/services/user.service.ts diff --git a/apps/space/store/issue.ts b/space/store/issue.ts similarity index 100% rename from apps/space/store/issue.ts rename to space/store/issue.ts diff --git a/apps/space/store/issue_details.ts b/space/store/issue_details.ts similarity index 100% rename from apps/space/store/issue_details.ts rename to space/store/issue_details.ts diff --git a/apps/space/store/project.ts b/space/store/project.ts similarity index 100% rename from apps/space/store/project.ts rename to space/store/project.ts diff --git a/apps/space/store/root.ts b/space/store/root.ts similarity index 100% rename from apps/space/store/root.ts rename to space/store/root.ts diff --git a/apps/space/store/user.ts b/space/store/user.ts similarity index 100% rename from apps/space/store/user.ts rename to space/store/user.ts diff --git a/apps/app/styles/editor.css b/space/styles/editor.css similarity index 100% rename from apps/app/styles/editor.css rename to space/styles/editor.css diff --git a/apps/space/styles/globals.css b/space/styles/globals.css similarity index 100% rename from apps/space/styles/globals.css rename to space/styles/globals.css diff --git a/apps/space/tailwind.config.js b/space/tailwind.config.js similarity index 100% rename from apps/space/tailwind.config.js rename to space/tailwind.config.js diff --git a/apps/app/tsconfig.json b/space/tsconfig.json similarity index 100% rename from apps/app/tsconfig.json rename to space/tsconfig.json diff --git a/apps/space/types/issue.ts b/space/types/issue.ts similarity index 100% rename from apps/space/types/issue.ts rename to space/types/issue.ts diff --git a/apps/space/types/project.ts b/space/types/project.ts similarity index 100% rename from apps/space/types/project.ts rename to space/types/project.ts diff --git a/apps/space/types/theme.ts b/space/types/theme.ts similarity index 100% rename from apps/space/types/theme.ts rename to space/types/theme.ts diff --git a/apps/space/types/user.ts b/space/types/user.ts similarity index 100% rename from apps/space/types/user.ts rename to space/types/user.ts diff --git a/turbo.json b/turbo.json index 69da3c552fd..47b92f0dbce 100644 --- a/turbo.json +++ b/turbo.json @@ -24,7 +24,8 @@ "NEXT_PUBLIC_SLACK_CLIENT_SECRET", "NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_ANON_KEY", - "NEXT_PUBLIC_PLAUSIBLE_DOMAIN" + "NEXT_PUBLIC_PLAUSIBLE_DOMAIN", + "NEXT_PUBLIC_DEPLOY_WITH_NGINX" ], "pipeline": { "build": { diff --git a/web/.eslintrc.js b/web/.eslintrc.js new file mode 100644 index 00000000000..38e6a5f4c82 --- /dev/null +++ b/web/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + root: true, + extends: ["custom"], + rules: { + "@next/next/no-img-element": "off", + }, +}; diff --git a/apps/app/.prettierrc b/web/.prettierrc similarity index 100% rename from apps/app/.prettierrc rename to web/.prettierrc diff --git a/apps/app/Dockerfile.dev b/web/Dockerfile.dev similarity index 100% rename from apps/app/Dockerfile.dev rename to web/Dockerfile.dev diff --git a/apps/app/Dockerfile.web b/web/Dockerfile.web similarity index 81% rename from apps/app/Dockerfile.web rename to web/Dockerfile.web index 2b28e1fd138..6fac46c2d8d 100644 --- a/apps/app/Dockerfile.web +++ b/web/Dockerfile.web @@ -7,7 +7,7 @@ ENV NEXT_PUBLIC_API_BASE_URL=http://NEXT_PUBLIC_API_BASE_URL_PLACEHOLDER RUN yarn global add turbo COPY . . -RUN turbo prune --scope=app --docker +RUN turbo prune --scope=web --docker # Add lockfile and package.json's of isolated subworkspace FROM node:18-alpine AS installer @@ -29,12 +29,12 @@ COPY replace-env-vars.sh /usr/local/bin/ USER root RUN chmod +x /usr/local/bin/replace-env-vars.sh -RUN yarn turbo run build --filter=app +RUN yarn turbo run build --filter=web ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL \ BUILT_NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL ENV NEXT_PUBLIC_DEPLOY_URL=${NEXT_PUBLIC_DEPLOY_URL} -RUN /usr/local/bin/replace-env-vars.sh http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER ${NEXT_PUBLIC_API_BASE_URL} app +RUN /usr/local/bin/replace-env-vars.sh http://NEXT_PUBLIC_WEBAPP_URL_PLACEHOLDER ${NEXT_PUBLIC_API_BASE_URL} web FROM node:18-alpine AS runner WORKDIR /app @@ -44,14 +44,14 @@ RUN addgroup --system --gid 1001 plane RUN adduser --system --uid 1001 captain USER captain -COPY --from=installer /app/apps/app/next.config.js . -COPY --from=installer /app/apps/app/package.json . +COPY --from=installer /app/web/next.config.js . +COPY --from=installer /app/web/package.json . # Automatically leverage output traces to reduce image size # https://nextjs.org/docs/advanced-features/output-file-tracing -COPY --from=installer --chown=captain:plane /app/apps/app/.next/standalone ./ +COPY --from=installer --chown=captain:plane /app/web/.next/standalone ./ -COPY --from=installer --chown=captain:plane /app/apps/app/.next ./apps/app/.next +COPY --from=installer --chown=captain:plane /app/web/.next ./web/.next ARG NEXT_PUBLIC_API_BASE_URL=http://localhost:8000 ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL \ diff --git a/apps/app/components/account/email-code-form.tsx b/web/components/account/email-code-form.tsx similarity index 100% rename from apps/app/components/account/email-code-form.tsx rename to web/components/account/email-code-form.tsx diff --git a/apps/app/components/account/email-password-form.tsx b/web/components/account/email-password-form.tsx similarity index 100% rename from apps/app/components/account/email-password-form.tsx rename to web/components/account/email-password-form.tsx diff --git a/apps/app/components/account/email-reset-password-form.tsx b/web/components/account/email-reset-password-form.tsx similarity index 100% rename from apps/app/components/account/email-reset-password-form.tsx rename to web/components/account/email-reset-password-form.tsx diff --git a/apps/app/components/account/github-login-button.tsx b/web/components/account/github-login-button.tsx similarity index 100% rename from apps/app/components/account/github-login-button.tsx rename to web/components/account/github-login-button.tsx diff --git a/apps/app/components/account/google-login.tsx b/web/components/account/google-login.tsx similarity index 100% rename from apps/app/components/account/google-login.tsx rename to web/components/account/google-login.tsx diff --git a/apps/app/components/account/index.ts b/web/components/account/index.ts similarity index 100% rename from apps/app/components/account/index.ts rename to web/components/account/index.ts diff --git a/apps/app/components/analytics/custom-analytics/create-update-analytics-modal.tsx b/web/components/analytics/custom-analytics/create-update-analytics-modal.tsx similarity index 100% rename from apps/app/components/analytics/custom-analytics/create-update-analytics-modal.tsx rename to web/components/analytics/custom-analytics/create-update-analytics-modal.tsx diff --git a/apps/app/components/analytics/custom-analytics/custom-analytics.tsx b/web/components/analytics/custom-analytics/custom-analytics.tsx similarity index 100% rename from apps/app/components/analytics/custom-analytics/custom-analytics.tsx rename to web/components/analytics/custom-analytics/custom-analytics.tsx diff --git a/apps/app/components/analytics/custom-analytics/graph/custom-tooltip.tsx b/web/components/analytics/custom-analytics/graph/custom-tooltip.tsx similarity index 100% rename from apps/app/components/analytics/custom-analytics/graph/custom-tooltip.tsx rename to web/components/analytics/custom-analytics/graph/custom-tooltip.tsx diff --git a/apps/app/components/analytics/custom-analytics/graph/index.tsx b/web/components/analytics/custom-analytics/graph/index.tsx similarity index 100% rename from apps/app/components/analytics/custom-analytics/graph/index.tsx rename to web/components/analytics/custom-analytics/graph/index.tsx diff --git a/apps/app/components/analytics/custom-analytics/index.ts b/web/components/analytics/custom-analytics/index.ts similarity index 100% rename from apps/app/components/analytics/custom-analytics/index.ts rename to web/components/analytics/custom-analytics/index.ts diff --git a/apps/app/components/analytics/custom-analytics/select-bar.tsx b/web/components/analytics/custom-analytics/select-bar.tsx similarity index 100% rename from apps/app/components/analytics/custom-analytics/select-bar.tsx rename to web/components/analytics/custom-analytics/select-bar.tsx diff --git a/apps/app/components/analytics/custom-analytics/sidebar.tsx b/web/components/analytics/custom-analytics/sidebar.tsx similarity index 100% rename from apps/app/components/analytics/custom-analytics/sidebar.tsx rename to web/components/analytics/custom-analytics/sidebar.tsx diff --git a/apps/app/components/analytics/custom-analytics/table.tsx b/web/components/analytics/custom-analytics/table.tsx similarity index 100% rename from apps/app/components/analytics/custom-analytics/table.tsx rename to web/components/analytics/custom-analytics/table.tsx diff --git a/apps/app/components/analytics/index.ts b/web/components/analytics/index.ts similarity index 100% rename from apps/app/components/analytics/index.ts rename to web/components/analytics/index.ts diff --git a/apps/app/components/analytics/project-modal.tsx b/web/components/analytics/project-modal.tsx similarity index 100% rename from apps/app/components/analytics/project-modal.tsx rename to web/components/analytics/project-modal.tsx diff --git a/apps/app/components/analytics/scope-and-demand/demand.tsx b/web/components/analytics/scope-and-demand/demand.tsx similarity index 100% rename from apps/app/components/analytics/scope-and-demand/demand.tsx rename to web/components/analytics/scope-and-demand/demand.tsx diff --git a/apps/app/components/analytics/scope-and-demand/index.ts b/web/components/analytics/scope-and-demand/index.ts similarity index 100% rename from apps/app/components/analytics/scope-and-demand/index.ts rename to web/components/analytics/scope-and-demand/index.ts diff --git a/apps/app/components/analytics/scope-and-demand/leaderboard.tsx b/web/components/analytics/scope-and-demand/leaderboard.tsx similarity index 100% rename from apps/app/components/analytics/scope-and-demand/leaderboard.tsx rename to web/components/analytics/scope-and-demand/leaderboard.tsx diff --git a/apps/app/components/analytics/scope-and-demand/scope-and-demand.tsx b/web/components/analytics/scope-and-demand/scope-and-demand.tsx similarity index 100% rename from apps/app/components/analytics/scope-and-demand/scope-and-demand.tsx rename to web/components/analytics/scope-and-demand/scope-and-demand.tsx diff --git a/apps/app/components/analytics/scope-and-demand/scope.tsx b/web/components/analytics/scope-and-demand/scope.tsx similarity index 100% rename from apps/app/components/analytics/scope-and-demand/scope.tsx rename to web/components/analytics/scope-and-demand/scope.tsx diff --git a/apps/app/components/analytics/scope-and-demand/year-wise-issues.tsx b/web/components/analytics/scope-and-demand/year-wise-issues.tsx similarity index 100% rename from apps/app/components/analytics/scope-and-demand/year-wise-issues.tsx rename to web/components/analytics/scope-and-demand/year-wise-issues.tsx diff --git a/apps/app/components/analytics/select/index.ts b/web/components/analytics/select/index.ts similarity index 100% rename from apps/app/components/analytics/select/index.ts rename to web/components/analytics/select/index.ts diff --git a/apps/app/components/analytics/select/project.tsx b/web/components/analytics/select/project.tsx similarity index 100% rename from apps/app/components/analytics/select/project.tsx rename to web/components/analytics/select/project.tsx diff --git a/apps/app/components/analytics/select/segment.tsx b/web/components/analytics/select/segment.tsx similarity index 100% rename from apps/app/components/analytics/select/segment.tsx rename to web/components/analytics/select/segment.tsx diff --git a/apps/app/components/analytics/select/x-axis.tsx b/web/components/analytics/select/x-axis.tsx similarity index 100% rename from apps/app/components/analytics/select/x-axis.tsx rename to web/components/analytics/select/x-axis.tsx diff --git a/apps/app/components/analytics/select/y-axis.tsx b/web/components/analytics/select/y-axis.tsx similarity index 100% rename from apps/app/components/analytics/select/y-axis.tsx rename to web/components/analytics/select/y-axis.tsx diff --git a/apps/app/components/auth-screens/index.ts b/web/components/auth-screens/index.ts similarity index 100% rename from apps/app/components/auth-screens/index.ts rename to web/components/auth-screens/index.ts diff --git a/apps/app/components/auth-screens/not-authorized-view.tsx b/web/components/auth-screens/not-authorized-view.tsx similarity index 100% rename from apps/app/components/auth-screens/not-authorized-view.tsx rename to web/components/auth-screens/not-authorized-view.tsx diff --git a/apps/app/components/auth-screens/project/index.ts b/web/components/auth-screens/project/index.ts similarity index 100% rename from apps/app/components/auth-screens/project/index.ts rename to web/components/auth-screens/project/index.ts diff --git a/apps/app/components/auth-screens/project/join-project.tsx b/web/components/auth-screens/project/join-project.tsx similarity index 100% rename from apps/app/components/auth-screens/project/join-project.tsx rename to web/components/auth-screens/project/join-project.tsx diff --git a/apps/app/components/auth-screens/workspace/index.ts b/web/components/auth-screens/workspace/index.ts similarity index 100% rename from apps/app/components/auth-screens/workspace/index.ts rename to web/components/auth-screens/workspace/index.ts diff --git a/apps/app/components/auth-screens/workspace/not-a-member.tsx b/web/components/auth-screens/workspace/not-a-member.tsx similarity index 100% rename from apps/app/components/auth-screens/workspace/not-a-member.tsx rename to web/components/auth-screens/workspace/not-a-member.tsx diff --git a/apps/app/components/automation/auto-archive-automation.tsx b/web/components/automation/auto-archive-automation.tsx similarity index 100% rename from apps/app/components/automation/auto-archive-automation.tsx rename to web/components/automation/auto-archive-automation.tsx diff --git a/apps/app/components/automation/auto-close-automation.tsx b/web/components/automation/auto-close-automation.tsx similarity index 100% rename from apps/app/components/automation/auto-close-automation.tsx rename to web/components/automation/auto-close-automation.tsx diff --git a/apps/app/components/automation/index.ts b/web/components/automation/index.ts similarity index 100% rename from apps/app/components/automation/index.ts rename to web/components/automation/index.ts diff --git a/apps/app/components/automation/select-month-modal.tsx b/web/components/automation/select-month-modal.tsx similarity index 100% rename from apps/app/components/automation/select-month-modal.tsx rename to web/components/automation/select-month-modal.tsx diff --git a/apps/app/components/breadcrumbs/index.tsx b/web/components/breadcrumbs/index.tsx similarity index 100% rename from apps/app/components/breadcrumbs/index.tsx rename to web/components/breadcrumbs/index.tsx diff --git a/apps/app/components/command-palette/change-interface-theme.tsx b/web/components/command-palette/change-interface-theme.tsx similarity index 100% rename from apps/app/components/command-palette/change-interface-theme.tsx rename to web/components/command-palette/change-interface-theme.tsx diff --git a/apps/app/components/command-palette/command-k.tsx b/web/components/command-palette/command-k.tsx similarity index 100% rename from apps/app/components/command-palette/command-k.tsx rename to web/components/command-palette/command-k.tsx diff --git a/apps/app/components/command-palette/command-pallette.tsx b/web/components/command-palette/command-pallette.tsx similarity index 80% rename from apps/app/components/command-palette/command-pallette.tsx rename to web/components/command-palette/command-pallette.tsx index 4dc29afecf9..507d8a49cab 100644 --- a/apps/app/components/command-palette/command-pallette.tsx +++ b/web/components/command-palette/command-pallette.tsx @@ -51,7 +51,7 @@ export const CommandPalette: React.FC = observer(() => { workspaceSlug && projectId && issueId ? ISSUE_DETAILS(issueId as string) : null, workspaceSlug && projectId && issueId ? () => - issuesService.retrieve(workspaceSlug as string, projectId as string, issueId as string) + issuesService.retrieve(workspaceSlug as string, projectId as string, issueId as string) : null ); @@ -89,37 +89,37 @@ export const CommandPalette: React.FC = observer(() => { ) return; - if (cmdClicked) { - if (keyPressed === "k") { - e.preventDefault(); - setIsPaletteOpen(true); - } else if (keyPressed === "c" && altKey) { - e.preventDefault(); - copyIssueUrlToClipboard(); - } else if (keyPressed === "b") { - e.preventDefault(); - store.theme.setSidebarCollapsed(!store?.theme?.sidebarCollapsed); - } - } else { - if (keyPressed === "c") { - setIsIssueModalOpen(true); - } else if (keyPressed === "p") { - setIsProjectModalOpen(true); - } else if (keyPressed === "v") { - setIsCreateViewModalOpen(true); - } else if (keyPressed === "d") { - setIsCreateUpdatePageModalOpen(true); - } else if (keyPressed === "h") { - setIsShortcutsModalOpen(true); - } else if (keyPressed === "q") { - setIsCreateCycleModalOpen(true); - } else if (keyPressed === "m") { - setIsCreateModuleModalOpen(true); - } else if (keyPressed === "backspace" || keyPressed === "delete") { - e.preventDefault(); - setIsBulkDeleteIssuesModalOpen(true); - } + if (cmdClicked) { + if (keyPressed === "k") { + e.preventDefault(); + setIsPaletteOpen(true); + } else if (keyPressed === "c" && altKey) { + e.preventDefault(); + copyIssueUrlToClipboard(); + } else if (keyPressed === "b") { + e.preventDefault(); + store.theme.setSidebarCollapsed(!store?.theme?.sidebarCollapsed); } + } else { + if (keyPressed === "c") { + setIsIssueModalOpen(true); + } else if (keyPressed === "p") { + setIsProjectModalOpen(true); + } else if (keyPressed === "v") { + setIsCreateViewModalOpen(true); + } else if (keyPressed === "d") { + setIsCreateUpdatePageModalOpen(true); + } else if (keyPressed === "h") { + setIsShortcutsModalOpen(true); + } else if (keyPressed === "q") { + setIsCreateCycleModalOpen(true); + } else if (keyPressed === "m") { + setIsCreateModuleModalOpen(true); + } else if (keyPressed === "backspace" || keyPressed === "delete") { + e.preventDefault(); + setIsBulkDeleteIssuesModalOpen(true); + } + } }, [copyIssueUrlToClipboard] ); @@ -196,4 +196,4 @@ export const CommandPalette: React.FC = observer(() => { /> ); -}) \ No newline at end of file +}); diff --git a/apps/app/components/command-palette/helpers.tsx b/web/components/command-palette/helpers.tsx similarity index 100% rename from apps/app/components/command-palette/helpers.tsx rename to web/components/command-palette/helpers.tsx diff --git a/apps/app/components/command-palette/index.ts b/web/components/command-palette/index.ts similarity index 100% rename from apps/app/components/command-palette/index.ts rename to web/components/command-palette/index.ts diff --git a/apps/app/components/command-palette/issue/change-issue-assignee.tsx b/web/components/command-palette/issue/change-issue-assignee.tsx similarity index 100% rename from apps/app/components/command-palette/issue/change-issue-assignee.tsx rename to web/components/command-palette/issue/change-issue-assignee.tsx diff --git a/apps/app/components/command-palette/issue/change-issue-priority.tsx b/web/components/command-palette/issue/change-issue-priority.tsx similarity index 100% rename from apps/app/components/command-palette/issue/change-issue-priority.tsx rename to web/components/command-palette/issue/change-issue-priority.tsx diff --git a/apps/app/components/command-palette/issue/change-issue-state.tsx b/web/components/command-palette/issue/change-issue-state.tsx similarity index 100% rename from apps/app/components/command-palette/issue/change-issue-state.tsx rename to web/components/command-palette/issue/change-issue-state.tsx diff --git a/apps/app/components/command-palette/issue/index.ts b/web/components/command-palette/issue/index.ts similarity index 100% rename from apps/app/components/command-palette/issue/index.ts rename to web/components/command-palette/issue/index.ts diff --git a/apps/app/components/command-palette/shortcuts-modal.tsx b/web/components/command-palette/shortcuts-modal.tsx similarity index 100% rename from apps/app/components/command-palette/shortcuts-modal.tsx rename to web/components/command-palette/shortcuts-modal.tsx diff --git a/apps/app/components/core/activity.tsx b/web/components/core/activity.tsx similarity index 100% rename from apps/app/components/core/activity.tsx rename to web/components/core/activity.tsx diff --git a/apps/app/components/core/filters/date-filter-modal.tsx b/web/components/core/filters/date-filter-modal.tsx similarity index 100% rename from apps/app/components/core/filters/date-filter-modal.tsx rename to web/components/core/filters/date-filter-modal.tsx diff --git a/apps/app/components/core/filters/date-filter-select.tsx b/web/components/core/filters/date-filter-select.tsx similarity index 100% rename from apps/app/components/core/filters/date-filter-select.tsx rename to web/components/core/filters/date-filter-select.tsx diff --git a/apps/app/components/core/filters/filters-list.tsx b/web/components/core/filters/filters-list.tsx similarity index 100% rename from apps/app/components/core/filters/filters-list.tsx rename to web/components/core/filters/filters-list.tsx diff --git a/apps/app/components/core/filters/index.ts b/web/components/core/filters/index.ts similarity index 100% rename from apps/app/components/core/filters/index.ts rename to web/components/core/filters/index.ts diff --git a/apps/app/components/core/filters/issues-view-filter.tsx b/web/components/core/filters/issues-view-filter.tsx similarity index 100% rename from apps/app/components/core/filters/issues-view-filter.tsx rename to web/components/core/filters/issues-view-filter.tsx diff --git a/apps/app/components/core/image-picker-popover.tsx b/web/components/core/image-picker-popover.tsx similarity index 100% rename from apps/app/components/core/image-picker-popover.tsx rename to web/components/core/image-picker-popover.tsx diff --git a/apps/app/components/core/index.ts b/web/components/core/index.ts similarity index 100% rename from apps/app/components/core/index.ts rename to web/components/core/index.ts diff --git a/apps/app/components/core/modals/bulk-delete-issues-modal.tsx b/web/components/core/modals/bulk-delete-issues-modal.tsx similarity index 100% rename from apps/app/components/core/modals/bulk-delete-issues-modal.tsx rename to web/components/core/modals/bulk-delete-issues-modal.tsx diff --git a/apps/app/components/core/modals/existing-issues-list-modal.tsx b/web/components/core/modals/existing-issues-list-modal.tsx similarity index 100% rename from apps/app/components/core/modals/existing-issues-list-modal.tsx rename to web/components/core/modals/existing-issues-list-modal.tsx diff --git a/apps/app/components/core/modals/gpt-assistant-modal.tsx b/web/components/core/modals/gpt-assistant-modal.tsx similarity index 100% rename from apps/app/components/core/modals/gpt-assistant-modal.tsx rename to web/components/core/modals/gpt-assistant-modal.tsx diff --git a/apps/app/components/core/modals/image-upload-modal.tsx b/web/components/core/modals/image-upload-modal.tsx similarity index 100% rename from apps/app/components/core/modals/image-upload-modal.tsx rename to web/components/core/modals/image-upload-modal.tsx diff --git a/apps/app/components/core/modals/index.ts b/web/components/core/modals/index.ts similarity index 100% rename from apps/app/components/core/modals/index.ts rename to web/components/core/modals/index.ts diff --git a/apps/app/components/core/modals/link-modal.tsx b/web/components/core/modals/link-modal.tsx similarity index 100% rename from apps/app/components/core/modals/link-modal.tsx rename to web/components/core/modals/link-modal.tsx diff --git a/apps/app/components/core/reaction-selector.tsx b/web/components/core/reaction-selector.tsx similarity index 100% rename from apps/app/components/core/reaction-selector.tsx rename to web/components/core/reaction-selector.tsx diff --git a/apps/app/components/core/sidebar/index.ts b/web/components/core/sidebar/index.ts similarity index 100% rename from apps/app/components/core/sidebar/index.ts rename to web/components/core/sidebar/index.ts diff --git a/apps/app/components/core/sidebar/links-list.tsx b/web/components/core/sidebar/links-list.tsx similarity index 100% rename from apps/app/components/core/sidebar/links-list.tsx rename to web/components/core/sidebar/links-list.tsx diff --git a/apps/app/components/core/sidebar/progress-chart.tsx b/web/components/core/sidebar/progress-chart.tsx similarity index 100% rename from apps/app/components/core/sidebar/progress-chart.tsx rename to web/components/core/sidebar/progress-chart.tsx diff --git a/apps/app/components/core/sidebar/sidebar-progress-stats.tsx b/web/components/core/sidebar/sidebar-progress-stats.tsx similarity index 100% rename from apps/app/components/core/sidebar/sidebar-progress-stats.tsx rename to web/components/core/sidebar/sidebar-progress-stats.tsx diff --git a/apps/app/components/core/sidebar/single-progress-stats.tsx b/web/components/core/sidebar/single-progress-stats.tsx similarity index 100% rename from apps/app/components/core/sidebar/single-progress-stats.tsx rename to web/components/core/sidebar/single-progress-stats.tsx diff --git a/apps/app/components/core/theme/color-picker-input.tsx b/web/components/core/theme/color-picker-input.tsx similarity index 100% rename from apps/app/components/core/theme/color-picker-input.tsx rename to web/components/core/theme/color-picker-input.tsx diff --git a/apps/app/components/core/theme/custom-theme-selector.tsx b/web/components/core/theme/custom-theme-selector.tsx similarity index 100% rename from apps/app/components/core/theme/custom-theme-selector.tsx rename to web/components/core/theme/custom-theme-selector.tsx diff --git a/apps/app/components/core/theme/index.ts b/web/components/core/theme/index.ts similarity index 100% rename from apps/app/components/core/theme/index.ts rename to web/components/core/theme/index.ts diff --git a/apps/app/components/core/theme/theme-switch.tsx b/web/components/core/theme/theme-switch.tsx similarity index 100% rename from apps/app/components/core/theme/theme-switch.tsx rename to web/components/core/theme/theme-switch.tsx diff --git a/apps/app/components/core/views/all-views.tsx b/web/components/core/views/all-views.tsx similarity index 100% rename from apps/app/components/core/views/all-views.tsx rename to web/components/core/views/all-views.tsx diff --git a/apps/app/components/core/views/board-view/all-boards.tsx b/web/components/core/views/board-view/all-boards.tsx similarity index 100% rename from apps/app/components/core/views/board-view/all-boards.tsx rename to web/components/core/views/board-view/all-boards.tsx diff --git a/apps/app/components/core/views/board-view/board-header.tsx b/web/components/core/views/board-view/board-header.tsx similarity index 100% rename from apps/app/components/core/views/board-view/board-header.tsx rename to web/components/core/views/board-view/board-header.tsx diff --git a/apps/app/components/core/views/board-view/index.ts b/web/components/core/views/board-view/index.ts similarity index 100% rename from apps/app/components/core/views/board-view/index.ts rename to web/components/core/views/board-view/index.ts diff --git a/apps/app/components/core/views/board-view/single-board.tsx b/web/components/core/views/board-view/single-board.tsx similarity index 100% rename from apps/app/components/core/views/board-view/single-board.tsx rename to web/components/core/views/board-view/single-board.tsx diff --git a/apps/app/components/core/views/board-view/single-issue.tsx b/web/components/core/views/board-view/single-issue.tsx similarity index 100% rename from apps/app/components/core/views/board-view/single-issue.tsx rename to web/components/core/views/board-view/single-issue.tsx diff --git a/apps/app/components/core/views/calendar-view/calendar-header.tsx b/web/components/core/views/calendar-view/calendar-header.tsx similarity index 100% rename from apps/app/components/core/views/calendar-view/calendar-header.tsx rename to web/components/core/views/calendar-view/calendar-header.tsx diff --git a/apps/app/components/core/views/calendar-view/calendar.tsx b/web/components/core/views/calendar-view/calendar.tsx similarity index 100% rename from apps/app/components/core/views/calendar-view/calendar.tsx rename to web/components/core/views/calendar-view/calendar.tsx diff --git a/apps/app/components/core/views/calendar-view/index.ts b/web/components/core/views/calendar-view/index.ts similarity index 100% rename from apps/app/components/core/views/calendar-view/index.ts rename to web/components/core/views/calendar-view/index.ts diff --git a/apps/app/components/core/views/calendar-view/single-date.tsx b/web/components/core/views/calendar-view/single-date.tsx similarity index 100% rename from apps/app/components/core/views/calendar-view/single-date.tsx rename to web/components/core/views/calendar-view/single-date.tsx diff --git a/apps/app/components/core/views/calendar-view/single-issue.tsx b/web/components/core/views/calendar-view/single-issue.tsx similarity index 100% rename from apps/app/components/core/views/calendar-view/single-issue.tsx rename to web/components/core/views/calendar-view/single-issue.tsx diff --git a/apps/app/components/core/views/gantt-chart-view/index.tsx b/web/components/core/views/gantt-chart-view/index.tsx similarity index 100% rename from apps/app/components/core/views/gantt-chart-view/index.tsx rename to web/components/core/views/gantt-chart-view/index.tsx diff --git a/apps/app/components/core/views/index.ts b/web/components/core/views/index.ts similarity index 100% rename from apps/app/components/core/views/index.ts rename to web/components/core/views/index.ts diff --git a/apps/app/components/core/views/issues-view.tsx b/web/components/core/views/issues-view.tsx similarity index 100% rename from apps/app/components/core/views/issues-view.tsx rename to web/components/core/views/issues-view.tsx diff --git a/apps/app/components/core/views/list-view/all-lists.tsx b/web/components/core/views/list-view/all-lists.tsx similarity index 100% rename from apps/app/components/core/views/list-view/all-lists.tsx rename to web/components/core/views/list-view/all-lists.tsx diff --git a/apps/app/components/core/views/list-view/index.ts b/web/components/core/views/list-view/index.ts similarity index 100% rename from apps/app/components/core/views/list-view/index.ts rename to web/components/core/views/list-view/index.ts diff --git a/apps/app/components/core/views/list-view/single-issue.tsx b/web/components/core/views/list-view/single-issue.tsx similarity index 100% rename from apps/app/components/core/views/list-view/single-issue.tsx rename to web/components/core/views/list-view/single-issue.tsx diff --git a/apps/app/components/core/views/list-view/single-list.tsx b/web/components/core/views/list-view/single-list.tsx similarity index 100% rename from apps/app/components/core/views/list-view/single-list.tsx rename to web/components/core/views/list-view/single-list.tsx diff --git a/apps/app/components/core/views/spreadsheet-view/index.ts b/web/components/core/views/spreadsheet-view/index.ts similarity index 100% rename from apps/app/components/core/views/spreadsheet-view/index.ts rename to web/components/core/views/spreadsheet-view/index.ts diff --git a/apps/app/components/core/views/spreadsheet-view/single-issue.tsx b/web/components/core/views/spreadsheet-view/single-issue.tsx similarity index 100% rename from apps/app/components/core/views/spreadsheet-view/single-issue.tsx rename to web/components/core/views/spreadsheet-view/single-issue.tsx diff --git a/apps/app/components/core/views/spreadsheet-view/spreadsheet-columns.tsx b/web/components/core/views/spreadsheet-view/spreadsheet-columns.tsx similarity index 100% rename from apps/app/components/core/views/spreadsheet-view/spreadsheet-columns.tsx rename to web/components/core/views/spreadsheet-view/spreadsheet-columns.tsx diff --git a/apps/app/components/core/views/spreadsheet-view/spreadsheet-issues.tsx b/web/components/core/views/spreadsheet-view/spreadsheet-issues.tsx similarity index 100% rename from apps/app/components/core/views/spreadsheet-view/spreadsheet-issues.tsx rename to web/components/core/views/spreadsheet-view/spreadsheet-issues.tsx diff --git a/apps/app/components/core/views/spreadsheet-view/spreadsheet-view.tsx b/web/components/core/views/spreadsheet-view/spreadsheet-view.tsx similarity index 100% rename from apps/app/components/core/views/spreadsheet-view/spreadsheet-view.tsx rename to web/components/core/views/spreadsheet-view/spreadsheet-view.tsx diff --git a/apps/app/components/cycles/active-cycle-details.tsx b/web/components/cycles/active-cycle-details.tsx similarity index 100% rename from apps/app/components/cycles/active-cycle-details.tsx rename to web/components/cycles/active-cycle-details.tsx diff --git a/apps/app/components/cycles/active-cycle-stats.tsx b/web/components/cycles/active-cycle-stats.tsx similarity index 100% rename from apps/app/components/cycles/active-cycle-stats.tsx rename to web/components/cycles/active-cycle-stats.tsx diff --git a/apps/app/components/cycles/cycles-list/all-cycles-list.tsx b/web/components/cycles/cycles-list/all-cycles-list.tsx similarity index 100% rename from apps/app/components/cycles/cycles-list/all-cycles-list.tsx rename to web/components/cycles/cycles-list/all-cycles-list.tsx diff --git a/apps/app/components/cycles/cycles-list/completed-cycles-list.tsx b/web/components/cycles/cycles-list/completed-cycles-list.tsx similarity index 100% rename from apps/app/components/cycles/cycles-list/completed-cycles-list.tsx rename to web/components/cycles/cycles-list/completed-cycles-list.tsx diff --git a/apps/app/components/cycles/cycles-list/draft-cycles-list.tsx b/web/components/cycles/cycles-list/draft-cycles-list.tsx similarity index 100% rename from apps/app/components/cycles/cycles-list/draft-cycles-list.tsx rename to web/components/cycles/cycles-list/draft-cycles-list.tsx diff --git a/apps/app/components/cycles/cycles-list/index.ts b/web/components/cycles/cycles-list/index.ts similarity index 100% rename from apps/app/components/cycles/cycles-list/index.ts rename to web/components/cycles/cycles-list/index.ts diff --git a/apps/app/components/cycles/cycles-list/upcoming-cycles-list.tsx b/web/components/cycles/cycles-list/upcoming-cycles-list.tsx similarity index 100% rename from apps/app/components/cycles/cycles-list/upcoming-cycles-list.tsx rename to web/components/cycles/cycles-list/upcoming-cycles-list.tsx diff --git a/apps/app/components/cycles/cycles-view.tsx b/web/components/cycles/cycles-view.tsx similarity index 100% rename from apps/app/components/cycles/cycles-view.tsx rename to web/components/cycles/cycles-view.tsx diff --git a/apps/app/components/cycles/delete-cycle-modal.tsx b/web/components/cycles/delete-cycle-modal.tsx similarity index 100% rename from apps/app/components/cycles/delete-cycle-modal.tsx rename to web/components/cycles/delete-cycle-modal.tsx diff --git a/apps/app/components/cycles/form.tsx b/web/components/cycles/form.tsx similarity index 100% rename from apps/app/components/cycles/form.tsx rename to web/components/cycles/form.tsx diff --git a/apps/app/components/cycles/gantt-chart/blocks.tsx b/web/components/cycles/gantt-chart/blocks.tsx similarity index 100% rename from apps/app/components/cycles/gantt-chart/blocks.tsx rename to web/components/cycles/gantt-chart/blocks.tsx diff --git a/apps/app/components/cycles/gantt-chart/cycle-issues-layout.tsx b/web/components/cycles/gantt-chart/cycle-issues-layout.tsx similarity index 78% rename from apps/app/components/cycles/gantt-chart/cycle-issues-layout.tsx rename to web/components/cycles/gantt-chart/cycle-issues-layout.tsx index 7741432ceb6..c18bc9346e6 100644 --- a/apps/app/components/cycles/gantt-chart/cycle-issues-layout.tsx +++ b/web/components/cycles/gantt-chart/cycle-issues-layout.tsx @@ -5,6 +5,7 @@ import useIssuesView from "hooks/use-issues-view"; import useUser from "hooks/use-user"; import useGanttChartCycleIssues from "hooks/gantt-chart/cycle-issues-view"; import { updateGanttIssue } from "components/gantt-chart/hooks/block-update"; +import useProjectDetails from "hooks/use-project-details"; // components import { GanttChartRoot, renderIssueBlocksStructure } from "components/gantt-chart"; import { IssueGanttBlock, IssueGanttSidebarBlock } from "components/issues"; @@ -18,6 +19,7 @@ export const CycleIssuesGanttChartView = () => { const { orderBy } = useIssuesView(); const { user } = useUser(); + const { projectDetails } = useProjectDetails(); const { ganttIssues, mutateGanttIssues } = useGanttChartCycleIssues( workspaceSlug as string, @@ -25,6 +27,8 @@ export const CycleIssuesGanttChartView = () => { cycleId as string ); + const isAllowed = projectDetails?.member_role === 20 || projectDetails?.member_role === 15; + return (
{ } SidebarBlockRender={IssueGanttSidebarBlock} BlockRender={IssueGanttBlock} - enableReorder={orderBy === "sort_order"} + enableBlockLeftResize={isAllowed} + enableBlockRightResize={isAllowed} + enableBlockMove={isAllowed} + enableReorder={orderBy === "sort_order" && isAllowed} bottomSpacing />
diff --git a/apps/app/components/cycles/gantt-chart/cycles-list-layout.tsx b/web/components/cycles/gantt-chart/cycles-list-layout.tsx similarity index 91% rename from apps/app/components/cycles/gantt-chart/cycles-list-layout.tsx rename to web/components/cycles/gantt-chart/cycles-list-layout.tsx index a5b576bca70..9614ea44744 100644 --- a/apps/app/components/cycles/gantt-chart/cycles-list-layout.tsx +++ b/web/components/cycles/gantt-chart/cycles-list-layout.tsx @@ -8,6 +8,7 @@ import { KeyedMutator } from "swr"; import cyclesService from "services/cycles.service"; // hooks import useUser from "hooks/use-user"; +import useProjectDetails from "hooks/use-project-details"; // components import { GanttChartRoot, IBlockUpdateData } from "components/gantt-chart"; import { CycleGanttBlock, CycleGanttSidebarBlock } from "components/cycles"; @@ -24,6 +25,7 @@ export const CyclesListGanttChartView: FC = ({ cycles, mutateCycles }) => const { workspaceSlug } = router.query; const { user } = useUser(); + const { projectDetails } = useProjectDetails(); const handleCycleUpdate = (cycle: ICycle, payload: IBlockUpdateData) => { if (!workspaceSlug || !user) return; @@ -71,6 +73,8 @@ export const CyclesListGanttChartView: FC = ({ cycles, mutateCycles }) => })) : []; + const isAllowed = projectDetails?.member_role === 20 || projectDetails?.member_role === 15; + return (
= ({ cycles, mutateCycles }) => enableBlockLeftResize={false} enableBlockRightResize={false} enableBlockMove={false} + enableReorder={isAllowed} />
); diff --git a/apps/app/components/cycles/gantt-chart/index.ts b/web/components/cycles/gantt-chart/index.ts similarity index 100% rename from apps/app/components/cycles/gantt-chart/index.ts rename to web/components/cycles/gantt-chart/index.ts diff --git a/apps/app/components/cycles/index.ts b/web/components/cycles/index.ts similarity index 100% rename from apps/app/components/cycles/index.ts rename to web/components/cycles/index.ts diff --git a/apps/app/components/cycles/modal.tsx b/web/components/cycles/modal.tsx similarity index 100% rename from apps/app/components/cycles/modal.tsx rename to web/components/cycles/modal.tsx diff --git a/apps/app/components/cycles/select.tsx b/web/components/cycles/select.tsx similarity index 100% rename from apps/app/components/cycles/select.tsx rename to web/components/cycles/select.tsx diff --git a/apps/app/components/cycles/sidebar.tsx b/web/components/cycles/sidebar.tsx similarity index 100% rename from apps/app/components/cycles/sidebar.tsx rename to web/components/cycles/sidebar.tsx diff --git a/apps/app/components/cycles/single-cycle-card.tsx b/web/components/cycles/single-cycle-card.tsx similarity index 100% rename from apps/app/components/cycles/single-cycle-card.tsx rename to web/components/cycles/single-cycle-card.tsx diff --git a/apps/app/components/cycles/single-cycle-list.tsx b/web/components/cycles/single-cycle-list.tsx similarity index 100% rename from apps/app/components/cycles/single-cycle-list.tsx rename to web/components/cycles/single-cycle-list.tsx diff --git a/apps/app/components/cycles/transfer-issues-modal.tsx b/web/components/cycles/transfer-issues-modal.tsx similarity index 100% rename from apps/app/components/cycles/transfer-issues-modal.tsx rename to web/components/cycles/transfer-issues-modal.tsx diff --git a/apps/app/components/cycles/transfer-issues.tsx b/web/components/cycles/transfer-issues.tsx similarity index 100% rename from apps/app/components/cycles/transfer-issues.tsx rename to web/components/cycles/transfer-issues.tsx diff --git a/apps/app/components/dnd/StrictModeDroppable.tsx b/web/components/dnd/StrictModeDroppable.tsx similarity index 100% rename from apps/app/components/dnd/StrictModeDroppable.tsx rename to web/components/dnd/StrictModeDroppable.tsx diff --git a/apps/app/components/emoji-icon-picker/emojis.json b/web/components/emoji-icon-picker/emojis.json similarity index 100% rename from apps/app/components/emoji-icon-picker/emojis.json rename to web/components/emoji-icon-picker/emojis.json diff --git a/apps/app/components/emoji-icon-picker/helpers.ts b/web/components/emoji-icon-picker/helpers.ts similarity index 100% rename from apps/app/components/emoji-icon-picker/helpers.ts rename to web/components/emoji-icon-picker/helpers.ts diff --git a/apps/app/components/emoji-icon-picker/icons.json b/web/components/emoji-icon-picker/icons.json similarity index 100% rename from apps/app/components/emoji-icon-picker/icons.json rename to web/components/emoji-icon-picker/icons.json diff --git a/apps/app/components/emoji-icon-picker/index.tsx b/web/components/emoji-icon-picker/index.tsx similarity index 100% rename from apps/app/components/emoji-icon-picker/index.tsx rename to web/components/emoji-icon-picker/index.tsx diff --git a/apps/app/components/emoji-icon-picker/types.d.ts b/web/components/emoji-icon-picker/types.d.ts similarity index 100% rename from apps/app/components/emoji-icon-picker/types.d.ts rename to web/components/emoji-icon-picker/types.d.ts diff --git a/apps/app/components/estimates/create-update-estimate-modal.tsx b/web/components/estimates/create-update-estimate-modal.tsx similarity index 100% rename from apps/app/components/estimates/create-update-estimate-modal.tsx rename to web/components/estimates/create-update-estimate-modal.tsx diff --git a/apps/app/components/estimates/delete-estimate-modal.tsx b/web/components/estimates/delete-estimate-modal.tsx similarity index 100% rename from apps/app/components/estimates/delete-estimate-modal.tsx rename to web/components/estimates/delete-estimate-modal.tsx diff --git a/apps/app/components/estimates/index.tsx b/web/components/estimates/index.tsx similarity index 100% rename from apps/app/components/estimates/index.tsx rename to web/components/estimates/index.tsx diff --git a/apps/app/components/estimates/single-estimate.tsx b/web/components/estimates/single-estimate.tsx similarity index 100% rename from apps/app/components/estimates/single-estimate.tsx rename to web/components/estimates/single-estimate.tsx diff --git a/apps/app/components/exporter/export-modal.tsx b/web/components/exporter/export-modal.tsx similarity index 100% rename from apps/app/components/exporter/export-modal.tsx rename to web/components/exporter/export-modal.tsx diff --git a/apps/app/components/exporter/guide.tsx b/web/components/exporter/guide.tsx similarity index 100% rename from apps/app/components/exporter/guide.tsx rename to web/components/exporter/guide.tsx diff --git a/apps/app/components/exporter/index.tsx b/web/components/exporter/index.tsx similarity index 100% rename from apps/app/components/exporter/index.tsx rename to web/components/exporter/index.tsx diff --git a/apps/app/components/exporter/single-export.tsx b/web/components/exporter/single-export.tsx similarity index 100% rename from apps/app/components/exporter/single-export.tsx rename to web/components/exporter/single-export.tsx diff --git a/apps/app/components/gantt-chart/blocks/blocks-display.tsx b/web/components/gantt-chart/blocks/blocks-display.tsx similarity index 100% rename from apps/app/components/gantt-chart/blocks/blocks-display.tsx rename to web/components/gantt-chart/blocks/blocks-display.tsx diff --git a/apps/app/components/gantt-chart/blocks/index.ts b/web/components/gantt-chart/blocks/index.ts similarity index 100% rename from apps/app/components/gantt-chart/blocks/index.ts rename to web/components/gantt-chart/blocks/index.ts diff --git a/apps/app/components/gantt-chart/chart/bi-week.tsx b/web/components/gantt-chart/chart/bi-week.tsx similarity index 100% rename from apps/app/components/gantt-chart/chart/bi-week.tsx rename to web/components/gantt-chart/chart/bi-week.tsx diff --git a/apps/app/components/gantt-chart/chart/day.tsx b/web/components/gantt-chart/chart/day.tsx similarity index 100% rename from apps/app/components/gantt-chart/chart/day.tsx rename to web/components/gantt-chart/chart/day.tsx diff --git a/apps/app/components/gantt-chart/chart/hours.tsx b/web/components/gantt-chart/chart/hours.tsx similarity index 100% rename from apps/app/components/gantt-chart/chart/hours.tsx rename to web/components/gantt-chart/chart/hours.tsx diff --git a/apps/app/components/gantt-chart/chart/index.tsx b/web/components/gantt-chart/chart/index.tsx similarity index 100% rename from apps/app/components/gantt-chart/chart/index.tsx rename to web/components/gantt-chart/chart/index.tsx diff --git a/apps/app/components/gantt-chart/chart/month.tsx b/web/components/gantt-chart/chart/month.tsx similarity index 100% rename from apps/app/components/gantt-chart/chart/month.tsx rename to web/components/gantt-chart/chart/month.tsx diff --git a/apps/app/components/gantt-chart/chart/quarter.tsx b/web/components/gantt-chart/chart/quarter.tsx similarity index 100% rename from apps/app/components/gantt-chart/chart/quarter.tsx rename to web/components/gantt-chart/chart/quarter.tsx diff --git a/apps/app/components/gantt-chart/chart/week.tsx b/web/components/gantt-chart/chart/week.tsx similarity index 100% rename from apps/app/components/gantt-chart/chart/week.tsx rename to web/components/gantt-chart/chart/week.tsx diff --git a/apps/app/components/gantt-chart/chart/year.tsx b/web/components/gantt-chart/chart/year.tsx similarity index 100% rename from apps/app/components/gantt-chart/chart/year.tsx rename to web/components/gantt-chart/chart/year.tsx diff --git a/apps/app/components/gantt-chart/contexts/index.tsx b/web/components/gantt-chart/contexts/index.tsx similarity index 100% rename from apps/app/components/gantt-chart/contexts/index.tsx rename to web/components/gantt-chart/contexts/index.tsx diff --git a/apps/app/components/gantt-chart/data/index.ts b/web/components/gantt-chart/data/index.ts similarity index 100% rename from apps/app/components/gantt-chart/data/index.ts rename to web/components/gantt-chart/data/index.ts diff --git a/apps/app/components/gantt-chart/helpers/block-structure.tsx b/web/components/gantt-chart/helpers/block-structure.tsx similarity index 100% rename from apps/app/components/gantt-chart/helpers/block-structure.tsx rename to web/components/gantt-chart/helpers/block-structure.tsx diff --git a/apps/app/components/gantt-chart/helpers/draggable.tsx b/web/components/gantt-chart/helpers/draggable.tsx similarity index 100% rename from apps/app/components/gantt-chart/helpers/draggable.tsx rename to web/components/gantt-chart/helpers/draggable.tsx diff --git a/apps/app/components/gantt-chart/helpers/index.ts b/web/components/gantt-chart/helpers/index.ts similarity index 100% rename from apps/app/components/gantt-chart/helpers/index.ts rename to web/components/gantt-chart/helpers/index.ts diff --git a/apps/app/components/gantt-chart/hooks/block-update.tsx b/web/components/gantt-chart/hooks/block-update.tsx similarity index 100% rename from apps/app/components/gantt-chart/hooks/block-update.tsx rename to web/components/gantt-chart/hooks/block-update.tsx diff --git a/apps/app/components/gantt-chart/hooks/index.tsx b/web/components/gantt-chart/hooks/index.tsx similarity index 100% rename from apps/app/components/gantt-chart/hooks/index.tsx rename to web/components/gantt-chart/hooks/index.tsx diff --git a/apps/app/components/gantt-chart/index.ts b/web/components/gantt-chart/index.ts similarity index 100% rename from apps/app/components/gantt-chart/index.ts rename to web/components/gantt-chart/index.ts diff --git a/apps/app/components/gantt-chart/root.tsx b/web/components/gantt-chart/root.tsx similarity index 100% rename from apps/app/components/gantt-chart/root.tsx rename to web/components/gantt-chart/root.tsx diff --git a/apps/app/components/gantt-chart/sidebar.tsx b/web/components/gantt-chart/sidebar.tsx similarity index 100% rename from apps/app/components/gantt-chart/sidebar.tsx rename to web/components/gantt-chart/sidebar.tsx diff --git a/apps/app/components/gantt-chart/types/index.ts b/web/components/gantt-chart/types/index.ts similarity index 100% rename from apps/app/components/gantt-chart/types/index.ts rename to web/components/gantt-chart/types/index.ts diff --git a/apps/app/components/gantt-chart/views/bi-week-view.ts b/web/components/gantt-chart/views/bi-week-view.ts similarity index 100% rename from apps/app/components/gantt-chart/views/bi-week-view.ts rename to web/components/gantt-chart/views/bi-week-view.ts diff --git a/apps/app/components/gantt-chart/views/day-view.ts b/web/components/gantt-chart/views/day-view.ts similarity index 93% rename from apps/app/components/gantt-chart/views/day-view.ts rename to web/components/gantt-chart/views/day-view.ts index 67f36936146..246ecd8b8bd 100644 --- a/apps/app/components/gantt-chart/views/day-view.ts +++ b/web/components/gantt-chart/views/day-view.ts @@ -72,7 +72,12 @@ export const getAllDaysInMonth = (month: number, year: number) => { dayData: weeks[date.getDay()], weekNumber: getWeekNumberByDate(date), title: `${weeks[date.getDay()].shortTitle} ${_day + 1}`, - today: currentDate.getFullYear() === year && currentDate.getMonth() === month && currentDate.getDate() === (_day + 1) ? true : false, + today: + currentDate.getFullYear() === year && + currentDate.getMonth() === month && + currentDate.getDate() === _day + 1 + ? true + : false, }); }); @@ -180,7 +185,10 @@ export const generateMonthDataByYear = ( renderPayload.push(generateMonthDataByMonth(currentMonth, currentYear)); } - const scrollWidth = ((renderPayload.map((monthData: any) => monthData.children.length)).reduce((partialSum: number, a: number) => partialSum + a, 0)) * monthPayload.data.width; + const scrollWidth = + renderPayload + .map((monthData: any) => monthData.children.length) + .reduce((partialSum: number, a: number) => partialSum + a, 0) * monthPayload.data.width; return { state: renderState, payload: renderPayload, scrollWidth: scrollWidth }; -}; \ No newline at end of file +}; diff --git a/apps/app/components/gantt-chart/views/helpers.ts b/web/components/gantt-chart/views/helpers.ts similarity index 100% rename from apps/app/components/gantt-chart/views/helpers.ts rename to web/components/gantt-chart/views/helpers.ts diff --git a/apps/app/components/gantt-chart/views/hours-view.ts b/web/components/gantt-chart/views/hours-view.ts similarity index 93% rename from apps/app/components/gantt-chart/views/hours-view.ts rename to web/components/gantt-chart/views/hours-view.ts index 67f36936146..246ecd8b8bd 100644 --- a/apps/app/components/gantt-chart/views/hours-view.ts +++ b/web/components/gantt-chart/views/hours-view.ts @@ -72,7 +72,12 @@ export const getAllDaysInMonth = (month: number, year: number) => { dayData: weeks[date.getDay()], weekNumber: getWeekNumberByDate(date), title: `${weeks[date.getDay()].shortTitle} ${_day + 1}`, - today: currentDate.getFullYear() === year && currentDate.getMonth() === month && currentDate.getDate() === (_day + 1) ? true : false, + today: + currentDate.getFullYear() === year && + currentDate.getMonth() === month && + currentDate.getDate() === _day + 1 + ? true + : false, }); }); @@ -180,7 +185,10 @@ export const generateMonthDataByYear = ( renderPayload.push(generateMonthDataByMonth(currentMonth, currentYear)); } - const scrollWidth = ((renderPayload.map((monthData: any) => monthData.children.length)).reduce((partialSum: number, a: number) => partialSum + a, 0)) * monthPayload.data.width; + const scrollWidth = + renderPayload + .map((monthData: any) => monthData.children.length) + .reduce((partialSum: number, a: number) => partialSum + a, 0) * monthPayload.data.width; return { state: renderState, payload: renderPayload, scrollWidth: scrollWidth }; -}; \ No newline at end of file +}; diff --git a/apps/app/components/gantt-chart/views/index.ts b/web/components/gantt-chart/views/index.ts similarity index 100% rename from apps/app/components/gantt-chart/views/index.ts rename to web/components/gantt-chart/views/index.ts diff --git a/apps/app/components/gantt-chart/views/month-view.ts b/web/components/gantt-chart/views/month-view.ts similarity index 100% rename from apps/app/components/gantt-chart/views/month-view.ts rename to web/components/gantt-chart/views/month-view.ts diff --git a/apps/app/components/gantt-chart/views/quater-view.ts b/web/components/gantt-chart/views/quater-view.ts similarity index 100% rename from apps/app/components/gantt-chart/views/quater-view.ts rename to web/components/gantt-chart/views/quater-view.ts diff --git a/apps/app/components/gantt-chart/views/week-view.ts b/web/components/gantt-chart/views/week-view.ts similarity index 100% rename from apps/app/components/gantt-chart/views/week-view.ts rename to web/components/gantt-chart/views/week-view.ts diff --git a/apps/app/components/gantt-chart/views/year-view.ts b/web/components/gantt-chart/views/year-view.ts similarity index 100% rename from apps/app/components/gantt-chart/views/year-view.ts rename to web/components/gantt-chart/views/year-view.ts diff --git a/apps/app/components/icons/alarm-clock-icon.tsx b/web/components/icons/alarm-clock-icon.tsx similarity index 100% rename from apps/app/components/icons/alarm-clock-icon.tsx rename to web/components/icons/alarm-clock-icon.tsx diff --git a/apps/app/components/icons/archive-icon.tsx b/web/components/icons/archive-icon.tsx similarity index 100% rename from apps/app/components/icons/archive-icon.tsx rename to web/components/icons/archive-icon.tsx diff --git a/apps/app/components/icons/arrow-right.tsx b/web/components/icons/arrow-right.tsx similarity index 100% rename from apps/app/components/icons/arrow-right.tsx rename to web/components/icons/arrow-right.tsx diff --git a/apps/app/components/icons/assignment-clipboard-icon.tsx b/web/components/icons/assignment-clipboard-icon.tsx similarity index 100% rename from apps/app/components/icons/assignment-clipboard-icon.tsx rename to web/components/icons/assignment-clipboard-icon.tsx diff --git a/apps/app/components/icons/attachment-icon.tsx b/web/components/icons/attachment-icon.tsx similarity index 100% rename from apps/app/components/icons/attachment-icon.tsx rename to web/components/icons/attachment-icon.tsx diff --git a/apps/app/components/icons/audio-file-icon.tsx b/web/components/icons/audio-file-icon.tsx similarity index 78% rename from apps/app/components/icons/audio-file-icon.tsx rename to web/components/icons/audio-file-icon.tsx index 6aff5d7a487..24ea55a23c9 100644 --- a/apps/app/components/icons/audio-file-icon.tsx +++ b/web/components/icons/audio-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import AudioFileIcon from "public/attachment/audio-icon.png"; -export const AudioIcon: React.FC = ({ width, height }) => ( +export const AudioIcon: React.FC = ({ width, height }) => ( AudioFileIcon ); diff --git a/apps/app/components/icons/backlog-state-icon.tsx b/web/components/icons/backlog-state-icon.tsx similarity index 100% rename from apps/app/components/icons/backlog-state-icon.tsx rename to web/components/icons/backlog-state-icon.tsx diff --git a/apps/app/components/icons/bell-icon.tsx b/web/components/icons/bell-icon.tsx similarity index 100% rename from apps/app/components/icons/bell-icon.tsx rename to web/components/icons/bell-icon.tsx diff --git a/web/components/icons/blocked-icon.tsx b/web/components/icons/blocked-icon.tsx new file mode 100644 index 00000000000..b712f7698d2 --- /dev/null +++ b/web/components/icons/blocked-icon.tsx @@ -0,0 +1,25 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const BlockedIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + + +); diff --git a/web/components/icons/blocker-icon.tsx b/web/components/icons/blocker-icon.tsx new file mode 100644 index 00000000000..b92fadaeac4 --- /dev/null +++ b/web/components/icons/blocker-icon.tsx @@ -0,0 +1,25 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const BlockerIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + + +); diff --git a/web/components/icons/bolt-icon.tsx b/web/components/icons/bolt-icon.tsx new file mode 100644 index 00000000000..477d4e04e5e --- /dev/null +++ b/web/components/icons/bolt-icon.tsx @@ -0,0 +1,16 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const BoltIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + +); diff --git a/apps/app/components/icons/calendar-after-icon.tsx b/web/components/icons/calendar-after-icon.tsx similarity index 100% rename from apps/app/components/icons/calendar-after-icon.tsx rename to web/components/icons/calendar-after-icon.tsx diff --git a/apps/app/components/icons/calendar-before-icon.tsx b/web/components/icons/calendar-before-icon.tsx similarity index 100% rename from apps/app/components/icons/calendar-before-icon.tsx rename to web/components/icons/calendar-before-icon.tsx diff --git a/apps/app/components/icons/calendar-month-icon.tsx b/web/components/icons/calendar-month-icon.tsx similarity index 100% rename from apps/app/components/icons/calendar-month-icon.tsx rename to web/components/icons/calendar-month-icon.tsx diff --git a/web/components/icons/cancel-icon.tsx b/web/components/icons/cancel-icon.tsx new file mode 100644 index 00000000000..a57425de187 --- /dev/null +++ b/web/components/icons/cancel-icon.tsx @@ -0,0 +1,16 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const CancelIcon: React.FC = ({ width, height, className }) => ( + + + +); diff --git a/apps/app/components/icons/cancelled-state-icon.tsx b/web/components/icons/cancelled-state-icon.tsx similarity index 100% rename from apps/app/components/icons/cancelled-state-icon.tsx rename to web/components/icons/cancelled-state-icon.tsx diff --git a/apps/app/components/icons/check.tsx b/web/components/icons/check.tsx similarity index 100% rename from apps/app/components/icons/check.tsx rename to web/components/icons/check.tsx diff --git a/web/components/icons/clipboard-icon.tsx b/web/components/icons/clipboard-icon.tsx new file mode 100644 index 00000000000..a3feaf7afc3 --- /dev/null +++ b/web/components/icons/clipboard-icon.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const ClipboardIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + +); diff --git a/apps/app/components/icons/clock-icon.tsx b/web/components/icons/clock-icon.tsx similarity index 100% rename from apps/app/components/icons/clock-icon.tsx rename to web/components/icons/clock-icon.tsx diff --git a/apps/app/components/icons/cloud-upload.tsx b/web/components/icons/cloud-upload.tsx similarity index 100% rename from apps/app/components/icons/cloud-upload.tsx rename to web/components/icons/cloud-upload.tsx diff --git a/apps/app/components/icons/cmd-icon.tsx b/web/components/icons/cmd-icon.tsx similarity index 100% rename from apps/app/components/icons/cmd-icon.tsx rename to web/components/icons/cmd-icon.tsx diff --git a/apps/app/components/icons/cog.tsx b/web/components/icons/cog.tsx similarity index 100% rename from apps/app/components/icons/cog.tsx rename to web/components/icons/cog.tsx diff --git a/apps/app/components/icons/color-pallette-icon.tsx b/web/components/icons/color-pallette-icon.tsx similarity index 100% rename from apps/app/components/icons/color-pallette-icon.tsx rename to web/components/icons/color-pallette-icon.tsx diff --git a/apps/app/components/icons/color-picker-icon.tsx b/web/components/icons/color-picker-icon.tsx similarity index 100% rename from apps/app/components/icons/color-picker-icon.tsx rename to web/components/icons/color-picker-icon.tsx diff --git a/apps/app/components/icons/command-icon.tsx b/web/components/icons/command-icon.tsx similarity index 100% rename from apps/app/components/icons/command-icon.tsx rename to web/components/icons/command-icon.tsx diff --git a/web/components/icons/comment-icon.tsx b/web/components/icons/comment-icon.tsx new file mode 100644 index 00000000000..8619abd3403 --- /dev/null +++ b/web/components/icons/comment-icon.tsx @@ -0,0 +1,16 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const CommentIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + +); diff --git a/web/components/icons/completed-cycle-icon.tsx b/web/components/icons/completed-cycle-icon.tsx new file mode 100644 index 00000000000..77d30b24ba2 --- /dev/null +++ b/web/components/icons/completed-cycle-icon.tsx @@ -0,0 +1,17 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const CompletedCycleIcon: React.FC = ({ + width = "24", + height = "24", + className, + color = "black", +}) => ( + + + +); diff --git a/apps/app/components/icons/completed-state-icon.tsx b/web/components/icons/completed-state-icon.tsx similarity index 100% rename from apps/app/components/icons/completed-state-icon.tsx rename to web/components/icons/completed-state-icon.tsx diff --git a/apps/app/components/icons/contrast-icon.tsx b/web/components/icons/contrast-icon.tsx similarity index 100% rename from apps/app/components/icons/contrast-icon.tsx rename to web/components/icons/contrast-icon.tsx diff --git a/apps/app/components/icons/css-file-icon.tsx b/web/components/icons/css-file-icon.tsx similarity index 78% rename from apps/app/components/icons/css-file-icon.tsx rename to web/components/icons/css-file-icon.tsx index 54b563d373c..a753ead73e9 100644 --- a/apps/app/components/icons/css-file-icon.tsx +++ b/web/components/icons/css-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import CssFileIcon from "public/attachment/css-icon.png"; -export const CssIcon: React.FC = ({ width, height }) => ( +export const CssIcon: React.FC = ({ width, height }) => ( CssFileIcon ); diff --git a/apps/app/components/icons/csv-file-icon.tsx b/web/components/icons/csv-file-icon.tsx similarity index 78% rename from apps/app/components/icons/csv-file-icon.tsx rename to web/components/icons/csv-file-icon.tsx index 63f01205e80..d25aca262ee 100644 --- a/apps/app/components/icons/csv-file-icon.tsx +++ b/web/components/icons/csv-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import CSVFileIcon from "public/attachment/csv-icon.png"; -export const CsvIcon: React.FC = ({ width , height }) => ( +export const CsvIcon: React.FC = ({ width, height }) => ( CSVFileIcon ); diff --git a/web/components/icons/current-cycle-icon.tsx b/web/components/icons/current-cycle-icon.tsx new file mode 100644 index 00000000000..57b37678060 --- /dev/null +++ b/web/components/icons/current-cycle-icon.tsx @@ -0,0 +1,17 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const CurrentCycleIcon: React.FC = ({ + width = "24", + height = "24", + className, + color = "black", +}) => ( + + + +); diff --git a/apps/app/components/icons/cycle-icon.tsx b/web/components/icons/cycle-icon.tsx similarity index 100% rename from apps/app/components/icons/cycle-icon.tsx rename to web/components/icons/cycle-icon.tsx diff --git a/apps/app/components/icons/default-file-icon.tsx b/web/components/icons/default-file-icon.tsx similarity index 78% rename from apps/app/components/icons/default-file-icon.tsx rename to web/components/icons/default-file-icon.tsx index 5323d8e07bb..3bc1948e3e8 100644 --- a/apps/app/components/icons/default-file-icon.tsx +++ b/web/components/icons/default-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import DefaultFileIcon from "public/attachment/default-icon.png"; -export const DefaultIcon: React.FC = ({ width, height }) => ( +export const DefaultIcon: React.FC = ({ width, height }) => ( DefaultFileIcon ); diff --git a/apps/app/components/icons/discord-icon.tsx b/web/components/icons/discord-icon.tsx similarity index 100% rename from apps/app/components/icons/discord-icon.tsx rename to web/components/icons/discord-icon.tsx diff --git a/apps/app/components/icons/doc-file-icon.tsx b/web/components/icons/doc-file-icon.tsx similarity index 78% rename from apps/app/components/icons/doc-file-icon.tsx rename to web/components/icons/doc-file-icon.tsx index 173d40df167..a4367ef7c94 100644 --- a/apps/app/components/icons/doc-file-icon.tsx +++ b/web/components/icons/doc-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import DocFileIcon from "public/attachment/doc-icon.png"; -export const DocIcon: React.FC = ({ width , height }) => ( +export const DocIcon: React.FC = ({ width, height }) => ( DocFileIcon ); diff --git a/apps/app/components/icons/document-icon.tsx b/web/components/icons/document-icon.tsx similarity index 82% rename from apps/app/components/icons/document-icon.tsx rename to web/components/icons/document-icon.tsx index a9c599578e7..b84dd4c3916 100644 --- a/apps/app/components/icons/document-icon.tsx +++ b/web/components/icons/document-icon.tsx @@ -2,17 +2,23 @@ import React from "react"; import type { Props } from "./types"; -export const DocumentIcon: React.FC = ({ width = "24", height = "24", className, color }) => ( - +export const DocumentIcon: React.FC = ({ + width = "24", + height = "24", + className, + color, +}) => ( + - - ); + d="M7.27051 14.792H12.7288C12.9094 14.792 13.0587 14.733 13.1768 14.6149C13.2948 14.4969 13.3538 14.3475 13.3538 14.167C13.3538 13.9864 13.2948 13.8371 13.1768 13.7191C13.0587 13.601 12.9094 13.542 12.7288 13.542H7.27051C7.08995 13.542 6.94065 13.601 6.82259 13.7191C6.70454 13.8371 6.64551 13.9864 6.64551 14.167C6.64551 14.3475 6.70454 14.4969 6.82259 14.6149C6.94065 14.733 7.08995 14.792 7.27051 14.792ZM7.27051 11.2503H12.7288C12.9094 11.2503 13.0587 11.1913 13.1768 11.0732C13.2948 10.9552 13.3538 10.8059 13.3538 10.6253C13.3538 10.4448 13.2948 10.2955 13.1768 10.1774C13.0587 10.0594 12.9094 10.0003 12.7288 10.0003H7.27051C7.08995 10.0003 6.94065 10.0594 6.82259 10.1774C6.70454 10.2955 6.64551 10.4448 6.64551 10.6253C6.64551 10.8059 6.70454 10.9552 6.82259 11.0732C6.94065 11.1913 7.08995 11.2503 7.27051 11.2503ZM4.58301 18.3337C4.24967 18.3337 3.95801 18.2087 3.70801 17.9587C3.45801 17.7087 3.33301 17.417 3.33301 17.0837V2.91699C3.33301 2.58366 3.45801 2.29199 3.70801 2.04199C3.95801 1.79199 4.24967 1.66699 4.58301 1.66699H11.583C11.7497 1.66699 11.9129 1.70171 12.0726 1.77116C12.2323 1.8406 12.3677 1.93088 12.4788 2.04199L16.2913 5.85449C16.4025 5.9656 16.4927 6.10102 16.5622 6.26074C16.6316 6.42046 16.6663 6.58366 16.6663 6.75033V17.0837C16.6663 17.417 16.5413 17.7087 16.2913 17.9587C16.0413 18.2087 15.7497 18.3337 15.4163 18.3337H4.58301ZM11.4788 6.16699V2.91699H4.58301V17.0837H15.4163V6.79199H12.1038C11.9233 6.79199 11.774 6.73296 11.6559 6.61491C11.5379 6.49685 11.4788 6.34755 11.4788 6.16699ZM4.58301 2.91699V6.79199V2.91699V17.0837V2.91699Z" + /> + +); diff --git a/web/components/icons/edit-icon.tsx b/web/components/icons/edit-icon.tsx new file mode 100644 index 00000000000..6b1ea278580 --- /dev/null +++ b/web/components/icons/edit-icon.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const EditIcon: React.FC = ({ width, height, className }) => ( + + + +); diff --git a/web/components/icons/ellipsis-horizontal-icon.tsx b/web/components/icons/ellipsis-horizontal-icon.tsx new file mode 100644 index 00000000000..26979f9a566 --- /dev/null +++ b/web/components/icons/ellipsis-horizontal-icon.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const EllipsisHorizontalIcon: React.FC = ({ width, height, className }) => ( + + + +); diff --git a/apps/app/components/icons/exclamation-icon.tsx b/web/components/icons/exclamation-icon.tsx similarity index 100% rename from apps/app/components/icons/exclamation-icon.tsx rename to web/components/icons/exclamation-icon.tsx diff --git a/apps/app/components/icons/external-link-icon.tsx b/web/components/icons/external-link-icon.tsx similarity index 100% rename from apps/app/components/icons/external-link-icon.tsx rename to web/components/icons/external-link-icon.tsx diff --git a/apps/app/components/icons/figma-file-icon.tsx b/web/components/icons/figma-file-icon.tsx similarity index 78% rename from apps/app/components/icons/figma-file-icon.tsx rename to web/components/icons/figma-file-icon.tsx index 7ff9f6ac071..fc7b74f7336 100644 --- a/apps/app/components/icons/figma-file-icon.tsx +++ b/web/components/icons/figma-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import FigmaFileIcon from "public/attachment/figma-icon.png"; -export const FigmaIcon: React.FC = ({ width , height }) => ( +export const FigmaIcon: React.FC = ({ width, height }) => ( FigmaFileIcon ); diff --git a/apps/app/components/icons/github-icon.tsx b/web/components/icons/github-icon.tsx similarity index 100% rename from apps/app/components/icons/github-icon.tsx rename to web/components/icons/github-icon.tsx diff --git a/apps/app/components/icons/grid-view-icons.tsx b/web/components/icons/grid-view-icons.tsx similarity index 100% rename from apps/app/components/icons/grid-view-icons.tsx rename to web/components/icons/grid-view-icons.tsx diff --git a/apps/app/components/icons/heartbeat-icon.tsx b/web/components/icons/heartbeat-icon.tsx similarity index 100% rename from apps/app/components/icons/heartbeat-icon.tsx rename to web/components/icons/heartbeat-icon.tsx diff --git a/apps/app/components/icons/html-file-icon.tsx b/web/components/icons/html-file-icon.tsx similarity index 78% rename from apps/app/components/icons/html-file-icon.tsx rename to web/components/icons/html-file-icon.tsx index 9de4080b088..4eddb323b3c 100644 --- a/apps/app/components/icons/html-file-icon.tsx +++ b/web/components/icons/html-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import HtmlFileIcon from "public/attachment/html-icon.png"; -export const HtmlIcon: React.FC = ({ width, height }) => ( +export const HtmlIcon: React.FC = ({ width, height }) => ( HtmlFileIcon ); diff --git a/apps/app/components/icons/img-file-icon.tsx b/web/components/icons/img-file-icon.tsx similarity index 78% rename from apps/app/components/icons/img-file-icon.tsx rename to web/components/icons/img-file-icon.tsx index 1333957c133..0c58fa101b0 100644 --- a/apps/app/components/icons/img-file-icon.tsx +++ b/web/components/icons/img-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import ImgFileIcon from "public/attachment/img-icon.png"; -export const ImgIcon: React.FC = ({ width , height }) => ( +export const ImgIcon: React.FC = ({ width, height }) => ( ImgFileIcon ); diff --git a/apps/app/components/icons/import-layers.tsx b/web/components/icons/import-layers.tsx similarity index 100% rename from apps/app/components/icons/import-layers.tsx rename to web/components/icons/import-layers.tsx diff --git a/apps/app/components/icons/inbox-icon.tsx b/web/components/icons/inbox-icon.tsx similarity index 100% rename from apps/app/components/icons/inbox-icon.tsx rename to web/components/icons/inbox-icon.tsx diff --git a/apps/app/components/icons/index.ts b/web/components/icons/index.ts similarity index 100% rename from apps/app/components/icons/index.ts rename to web/components/icons/index.ts diff --git a/apps/app/components/icons/jpg-file-icon.tsx b/web/components/icons/jpg-file-icon.tsx similarity index 78% rename from apps/app/components/icons/jpg-file-icon.tsx rename to web/components/icons/jpg-file-icon.tsx index e88f0e47f8b..26d3af37300 100644 --- a/apps/app/components/icons/jpg-file-icon.tsx +++ b/web/components/icons/jpg-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import JpgFileIcon from "public/attachment/jpg-icon.png"; -export const JpgIcon: React.FC = ({ width, height }) => ( +export const JpgIcon: React.FC = ({ width, height }) => ( JpgFileIcon ); diff --git a/apps/app/components/icons/js-file-icon.tsx b/web/components/icons/js-file-icon.tsx similarity index 97% rename from apps/app/components/icons/js-file-icon.tsx rename to web/components/icons/js-file-icon.tsx index 9f879ba6b34..67cfa05d455 100644 --- a/apps/app/components/icons/js-file-icon.tsx +++ b/web/components/icons/js-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import JsFileIcon from "public/attachment/js-icon.png"; -export const JavaScriptIcon: React.FC = ({ width, height }) => ( +export const JavaScriptIcon: React.FC = ({ width, height }) => ( JsFileIcon ); diff --git a/apps/app/components/icons/layer-diagonal-icon.tsx b/web/components/icons/layer-diagonal-icon.tsx similarity index 100% rename from apps/app/components/icons/layer-diagonal-icon.tsx rename to web/components/icons/layer-diagonal-icon.tsx diff --git a/web/components/icons/lock-icon.tsx b/web/components/icons/lock-icon.tsx new file mode 100644 index 00000000000..2892011df4f --- /dev/null +++ b/web/components/icons/lock-icon.tsx @@ -0,0 +1,16 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const LockIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + +); diff --git a/web/components/icons/menu-icon.tsx b/web/components/icons/menu-icon.tsx new file mode 100644 index 00000000000..3b5e033d880 --- /dev/null +++ b/web/components/icons/menu-icon.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const MenuIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + +); diff --git a/apps/app/components/icons/module/backlog.tsx b/web/components/icons/module/backlog.tsx similarity index 100% rename from apps/app/components/icons/module/backlog.tsx rename to web/components/icons/module/backlog.tsx diff --git a/apps/app/components/icons/module/cancelled.tsx b/web/components/icons/module/cancelled.tsx similarity index 100% rename from apps/app/components/icons/module/cancelled.tsx rename to web/components/icons/module/cancelled.tsx diff --git a/apps/app/components/icons/module/completed.tsx b/web/components/icons/module/completed.tsx similarity index 100% rename from apps/app/components/icons/module/completed.tsx rename to web/components/icons/module/completed.tsx diff --git a/apps/app/components/icons/module/in-progress.tsx b/web/components/icons/module/in-progress.tsx similarity index 100% rename from apps/app/components/icons/module/in-progress.tsx rename to web/components/icons/module/in-progress.tsx diff --git a/apps/app/components/icons/module/index.ts b/web/components/icons/module/index.ts similarity index 100% rename from apps/app/components/icons/module/index.ts rename to web/components/icons/module/index.ts diff --git a/apps/app/components/icons/module/module-status-icon.tsx b/web/components/icons/module/module-status-icon.tsx similarity index 100% rename from apps/app/components/icons/module/module-status-icon.tsx rename to web/components/icons/module/module-status-icon.tsx diff --git a/apps/app/components/icons/module/paused.tsx b/web/components/icons/module/paused.tsx similarity index 100% rename from apps/app/components/icons/module/paused.tsx rename to web/components/icons/module/paused.tsx diff --git a/apps/app/components/icons/module/planned.tsx b/web/components/icons/module/planned.tsx similarity index 100% rename from apps/app/components/icons/module/planned.tsx rename to web/components/icons/module/planned.tsx diff --git a/apps/app/components/icons/pdf-file-icon.tsx b/web/components/icons/pdf-file-icon.tsx similarity index 78% rename from apps/app/components/icons/pdf-file-icon.tsx rename to web/components/icons/pdf-file-icon.tsx index 5467f08120b..cb2014ee0b3 100644 --- a/apps/app/components/icons/pdf-file-icon.tsx +++ b/web/components/icons/pdf-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import PDFFileIcon from "public/attachment/pdf-icon.png"; -export const PdfIcon: React.FC = ({ width , height }) => ( +export const PdfIcon: React.FC = ({ width, height }) => ( PDFFileIcon ); diff --git a/apps/app/components/icons/pencil-scribble-icon.tsx b/web/components/icons/pencil-scribble-icon.tsx similarity index 100% rename from apps/app/components/icons/pencil-scribble-icon.tsx rename to web/components/icons/pencil-scribble-icon.tsx diff --git a/apps/app/components/icons/people-group-icon.tsx b/web/components/icons/people-group-icon.tsx similarity index 100% rename from apps/app/components/icons/people-group-icon.tsx rename to web/components/icons/people-group-icon.tsx diff --git a/apps/app/components/icons/person-running-icon.tsx b/web/components/icons/person-running-icon.tsx similarity index 100% rename from apps/app/components/icons/person-running-icon.tsx rename to web/components/icons/person-running-icon.tsx diff --git a/web/components/icons/plus-icon.tsx b/web/components/icons/plus-icon.tsx new file mode 100644 index 00000000000..25489a4fdae --- /dev/null +++ b/web/components/icons/plus-icon.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const PlusIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + +); diff --git a/apps/app/components/icons/png-file-icon.tsx b/web/components/icons/png-file-icon.tsx similarity index 78% rename from apps/app/components/icons/png-file-icon.tsx rename to web/components/icons/png-file-icon.tsx index 21b5dc11686..fb64ed8246f 100644 --- a/apps/app/components/icons/png-file-icon.tsx +++ b/web/components/icons/png-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import PngFileIcon from "public/attachment/png-icon.png"; -export const PngIcon: React.FC = ({ width, height }) => ( +export const PngIcon: React.FC = ({ width, height }) => ( PngFileIcon ); diff --git a/apps/app/components/icons/priority-icon.tsx b/web/components/icons/priority-icon.tsx similarity index 100% rename from apps/app/components/icons/priority-icon.tsx rename to web/components/icons/priority-icon.tsx diff --git a/web/components/icons/question-mark-circle-icon.tsx b/web/components/icons/question-mark-circle-icon.tsx new file mode 100644 index 00000000000..f4abd903ff2 --- /dev/null +++ b/web/components/icons/question-mark-circle-icon.tsx @@ -0,0 +1,20 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const QuestionMarkCircleIcon: React.FC = ({ + width = "24", + height = "24", + className, +}) => ( + + + +); diff --git a/apps/app/components/icons/setting-icon.tsx b/web/components/icons/setting-icon.tsx similarity index 100% rename from apps/app/components/icons/setting-icon.tsx rename to web/components/icons/setting-icon.tsx diff --git a/apps/app/components/icons/sheet-file-icon.tsx b/web/components/icons/sheet-file-icon.tsx similarity index 78% rename from apps/app/components/icons/sheet-file-icon.tsx rename to web/components/icons/sheet-file-icon.tsx index 9e57ce71c74..dd4eee8ec0f 100644 --- a/apps/app/components/icons/sheet-file-icon.tsx +++ b/web/components/icons/sheet-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import SheetFileIcon from "public/attachment/excel-icon.png"; -export const SheetIcon: React.FC = ({ width, height }) => ( +export const SheetIcon: React.FC = ({ width, height }) => ( SheetFileIcon ); diff --git a/web/components/icons/signal-cellular-icon.tsx b/web/components/icons/signal-cellular-icon.tsx new file mode 100644 index 00000000000..bb7d108fe5c --- /dev/null +++ b/web/components/icons/signal-cellular-icon.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const SignalCellularIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + +); diff --git a/apps/app/components/icons/single-comment-icon.tsx b/web/components/icons/single-comment-icon.tsx similarity index 100% rename from apps/app/components/icons/single-comment-icon.tsx rename to web/components/icons/single-comment-icon.tsx diff --git a/apps/app/components/icons/sort-icon.tsx b/web/components/icons/sort-icon.tsx similarity index 100% rename from apps/app/components/icons/sort-icon.tsx rename to web/components/icons/sort-icon.tsx diff --git a/apps/app/components/icons/stacked-layers-horizontal-icon.tsx b/web/components/icons/stacked-layers-horizontal-icon.tsx similarity index 100% rename from apps/app/components/icons/stacked-layers-horizontal-icon.tsx rename to web/components/icons/stacked-layers-horizontal-icon.tsx diff --git a/apps/app/components/icons/stacked-layers-icon.tsx b/web/components/icons/stacked-layers-icon.tsx similarity index 100% rename from apps/app/components/icons/stacked-layers-icon.tsx rename to web/components/icons/stacked-layers-icon.tsx diff --git a/apps/app/components/icons/started-state-icon.tsx b/web/components/icons/started-state-icon.tsx similarity index 100% rename from apps/app/components/icons/started-state-icon.tsx rename to web/components/icons/started-state-icon.tsx diff --git a/apps/app/components/icons/state-group-icon.tsx b/web/components/icons/state-group-icon.tsx similarity index 100% rename from apps/app/components/icons/state-group-icon.tsx rename to web/components/icons/state-group-icon.tsx diff --git a/apps/app/components/icons/svg-file-icon.tsx b/web/components/icons/svg-file-icon.tsx similarity index 78% rename from apps/app/components/icons/svg-file-icon.tsx rename to web/components/icons/svg-file-icon.tsx index d04ae3167f1..043f41aeb85 100644 --- a/apps/app/components/icons/svg-file-icon.tsx +++ b/web/components/icons/svg-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import SvgFileIcon from "public/attachment/svg-icon.png"; -export const SvgIcon: React.FC = ({ width, height }) => ( +export const SvgIcon: React.FC = ({ width, height }) => ( SvgFileIcon ); diff --git a/web/components/icons/tag-icon.tsx b/web/components/icons/tag-icon.tsx new file mode 100644 index 00000000000..d907aabce4d --- /dev/null +++ b/web/components/icons/tag-icon.tsx @@ -0,0 +1,24 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const TagIcon: React.FC = ({ + width = "24", + height = "24", + className, + color = "black", +}) => ( + + + +); diff --git a/apps/app/components/icons/target-icon.tsx b/web/components/icons/target-icon.tsx similarity index 100% rename from apps/app/components/icons/target-icon.tsx rename to web/components/icons/target-icon.tsx diff --git a/apps/app/components/icons/tick-mark-icon.tsx b/web/components/icons/tick-mark-icon.tsx similarity index 100% rename from apps/app/components/icons/tick-mark-icon.tsx rename to web/components/icons/tick-mark-icon.tsx diff --git a/web/components/icons/transfer-icon.tsx b/web/components/icons/transfer-icon.tsx new file mode 100644 index 00000000000..dfb3f8c05d7 --- /dev/null +++ b/web/components/icons/transfer-icon.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const TransferIcon: React.FC = ({ width, height, className, color }) => ( + + + +); diff --git a/apps/app/components/icons/triangle-exclamation-icon.tsx b/web/components/icons/triangle-exclamation-icon.tsx similarity index 100% rename from apps/app/components/icons/triangle-exclamation-icon.tsx rename to web/components/icons/triangle-exclamation-icon.tsx diff --git a/web/components/icons/tune-icon.tsx b/web/components/icons/tune-icon.tsx new file mode 100644 index 00000000000..baa2dcd7250 --- /dev/null +++ b/web/components/icons/tune-icon.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const TuneIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + +); diff --git a/apps/app/components/icons/txt-file-icon.tsx b/web/components/icons/txt-file-icon.tsx similarity index 78% rename from apps/app/components/icons/txt-file-icon.tsx rename to web/components/icons/txt-file-icon.tsx index f0150a4cda6..2fbfaee3290 100644 --- a/apps/app/components/icons/txt-file-icon.tsx +++ b/web/components/icons/txt-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import TxtFileIcon from "public/attachment/txt-icon.png"; -export const TxtIcon: React.FC = ({ width, height }) => ( +export const TxtIcon: React.FC = ({ width, height }) => ( TxtFileIcon ); diff --git a/apps/app/components/icons/types.d.ts b/web/components/icons/types.d.ts similarity index 100% rename from apps/app/components/icons/types.d.ts rename to web/components/icons/types.d.ts diff --git a/apps/app/components/icons/unstarted-state-icon.tsx b/web/components/icons/unstarted-state-icon.tsx similarity index 100% rename from apps/app/components/icons/unstarted-state-icon.tsx rename to web/components/icons/unstarted-state-icon.tsx diff --git a/web/components/icons/upcoming-cycle-icon.tsx b/web/components/icons/upcoming-cycle-icon.tsx new file mode 100644 index 00000000000..e9bad7a4203 --- /dev/null +++ b/web/components/icons/upcoming-cycle-icon.tsx @@ -0,0 +1,17 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const UpcomingCycleIcon: React.FC = ({ + width = "24", + height = "24", + className, + color = "black", +}) => ( + + + +); diff --git a/apps/app/components/icons/user-group-icon.tsx b/web/components/icons/user-group-icon.tsx similarity index 100% rename from apps/app/components/icons/user-group-icon.tsx rename to web/components/icons/user-group-icon.tsx diff --git a/web/components/icons/user-icon-circle.tsx b/web/components/icons/user-icon-circle.tsx new file mode 100644 index 00000000000..ffc88be3b9f --- /dev/null +++ b/web/components/icons/user-icon-circle.tsx @@ -0,0 +1,16 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const UserCircleIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + +); diff --git a/web/components/icons/user-icon.tsx b/web/components/icons/user-icon.tsx new file mode 100644 index 00000000000..dedea1bae25 --- /dev/null +++ b/web/components/icons/user-icon.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const UserIcon: React.FC = ({ width = "24", height = "24", className }) => ( + + + +); diff --git a/apps/app/components/icons/users.tsx b/web/components/icons/users.tsx similarity index 100% rename from apps/app/components/icons/users.tsx rename to web/components/icons/users.tsx diff --git a/apps/app/components/icons/video-file-icon.tsx b/web/components/icons/video-file-icon.tsx similarity index 78% rename from apps/app/components/icons/video-file-icon.tsx rename to web/components/icons/video-file-icon.tsx index 8deb7a80b7c..961aba1e649 100644 --- a/apps/app/components/icons/video-file-icon.tsx +++ b/web/components/icons/video-file-icon.tsx @@ -4,6 +4,6 @@ import Image from "next/image"; import type { Props } from "./types"; import VideoFileIcon from "public/attachment/video-icon.png"; -export const VideoIcon: React.FC = ({ width, height }) => ( +export const VideoIcon: React.FC = ({ width, height }) => ( VideoFileIcon ); diff --git a/apps/app/components/icons/view-list-icon.tsx b/web/components/icons/view-list-icon.tsx similarity index 100% rename from apps/app/components/icons/view-list-icon.tsx rename to web/components/icons/view-list-icon.tsx diff --git a/apps/app/components/icons/water-drop-icon.tsx b/web/components/icons/water-drop-icon.tsx similarity index 100% rename from apps/app/components/icons/water-drop-icon.tsx rename to web/components/icons/water-drop-icon.tsx diff --git a/apps/app/components/icons/x-mark-icon.tsx b/web/components/icons/x-mark-icon.tsx similarity index 100% rename from apps/app/components/icons/x-mark-icon.tsx rename to web/components/icons/x-mark-icon.tsx diff --git a/apps/app/components/inbox/accept-issue-modal.tsx b/web/components/inbox/accept-issue-modal.tsx similarity index 100% rename from apps/app/components/inbox/accept-issue-modal.tsx rename to web/components/inbox/accept-issue-modal.tsx diff --git a/apps/app/components/inbox/decline-issue-modal.tsx b/web/components/inbox/decline-issue-modal.tsx similarity index 100% rename from apps/app/components/inbox/decline-issue-modal.tsx rename to web/components/inbox/decline-issue-modal.tsx diff --git a/apps/app/components/inbox/delete-issue-modal.tsx b/web/components/inbox/delete-issue-modal.tsx similarity index 100% rename from apps/app/components/inbox/delete-issue-modal.tsx rename to web/components/inbox/delete-issue-modal.tsx diff --git a/apps/app/components/inbox/filters-dropdown.tsx b/web/components/inbox/filters-dropdown.tsx similarity index 100% rename from apps/app/components/inbox/filters-dropdown.tsx rename to web/components/inbox/filters-dropdown.tsx diff --git a/apps/app/components/inbox/filters-list.tsx b/web/components/inbox/filters-list.tsx similarity index 100% rename from apps/app/components/inbox/filters-list.tsx rename to web/components/inbox/filters-list.tsx diff --git a/apps/app/components/inbox/inbox-action-headers.tsx b/web/components/inbox/inbox-action-headers.tsx similarity index 100% rename from apps/app/components/inbox/inbox-action-headers.tsx rename to web/components/inbox/inbox-action-headers.tsx diff --git a/apps/app/components/inbox/inbox-issue-activity.tsx b/web/components/inbox/inbox-issue-activity.tsx similarity index 100% rename from apps/app/components/inbox/inbox-issue-activity.tsx rename to web/components/inbox/inbox-issue-activity.tsx diff --git a/apps/app/components/inbox/inbox-issue-card.tsx b/web/components/inbox/inbox-issue-card.tsx similarity index 100% rename from apps/app/components/inbox/inbox-issue-card.tsx rename to web/components/inbox/inbox-issue-card.tsx diff --git a/apps/app/components/inbox/inbox-main-content.tsx b/web/components/inbox/inbox-main-content.tsx similarity index 100% rename from apps/app/components/inbox/inbox-main-content.tsx rename to web/components/inbox/inbox-main-content.tsx diff --git a/apps/app/components/inbox/index.ts b/web/components/inbox/index.ts similarity index 100% rename from apps/app/components/inbox/index.ts rename to web/components/inbox/index.ts diff --git a/apps/app/components/inbox/issues-list-sidebar.tsx b/web/components/inbox/issues-list-sidebar.tsx similarity index 100% rename from apps/app/components/inbox/issues-list-sidebar.tsx rename to web/components/inbox/issues-list-sidebar.tsx diff --git a/apps/app/components/inbox/select-duplicate.tsx b/web/components/inbox/select-duplicate.tsx similarity index 100% rename from apps/app/components/inbox/select-duplicate.tsx rename to web/components/inbox/select-duplicate.tsx diff --git a/apps/app/components/integration/delete-import-modal.tsx b/web/components/integration/delete-import-modal.tsx similarity index 100% rename from apps/app/components/integration/delete-import-modal.tsx rename to web/components/integration/delete-import-modal.tsx diff --git a/apps/app/components/integration/github/auth.tsx b/web/components/integration/github/auth.tsx similarity index 100% rename from apps/app/components/integration/github/auth.tsx rename to web/components/integration/github/auth.tsx diff --git a/apps/app/components/integration/github/import-configure.tsx b/web/components/integration/github/import-configure.tsx similarity index 100% rename from apps/app/components/integration/github/import-configure.tsx rename to web/components/integration/github/import-configure.tsx diff --git a/apps/app/components/integration/github/import-confirm.tsx b/web/components/integration/github/import-confirm.tsx similarity index 100% rename from apps/app/components/integration/github/import-confirm.tsx rename to web/components/integration/github/import-confirm.tsx diff --git a/apps/app/components/integration/github/import-data.tsx b/web/components/integration/github/import-data.tsx similarity index 100% rename from apps/app/components/integration/github/import-data.tsx rename to web/components/integration/github/import-data.tsx diff --git a/apps/app/components/integration/github/import-users.tsx b/web/components/integration/github/import-users.tsx similarity index 100% rename from apps/app/components/integration/github/import-users.tsx rename to web/components/integration/github/import-users.tsx diff --git a/apps/app/components/integration/github/index.ts b/web/components/integration/github/index.ts similarity index 100% rename from apps/app/components/integration/github/index.ts rename to web/components/integration/github/index.ts diff --git a/apps/app/components/integration/github/repo-details.tsx b/web/components/integration/github/repo-details.tsx similarity index 100% rename from apps/app/components/integration/github/repo-details.tsx rename to web/components/integration/github/repo-details.tsx diff --git a/apps/app/components/integration/github/root.tsx b/web/components/integration/github/root.tsx similarity index 100% rename from apps/app/components/integration/github/root.tsx rename to web/components/integration/github/root.tsx diff --git a/apps/app/components/integration/github/select-repository.tsx b/web/components/integration/github/select-repository.tsx similarity index 100% rename from apps/app/components/integration/github/select-repository.tsx rename to web/components/integration/github/select-repository.tsx diff --git a/apps/app/components/integration/github/single-user-select.tsx b/web/components/integration/github/single-user-select.tsx similarity index 100% rename from apps/app/components/integration/github/single-user-select.tsx rename to web/components/integration/github/single-user-select.tsx diff --git a/apps/app/components/integration/guide.tsx b/web/components/integration/guide.tsx similarity index 100% rename from apps/app/components/integration/guide.tsx rename to web/components/integration/guide.tsx diff --git a/apps/app/components/integration/index.ts b/web/components/integration/index.ts similarity index 100% rename from apps/app/components/integration/index.ts rename to web/components/integration/index.ts diff --git a/apps/app/components/integration/jira/confirm-import.tsx b/web/components/integration/jira/confirm-import.tsx similarity index 100% rename from apps/app/components/integration/jira/confirm-import.tsx rename to web/components/integration/jira/confirm-import.tsx diff --git a/apps/app/components/integration/jira/give-details.tsx b/web/components/integration/jira/give-details.tsx similarity index 100% rename from apps/app/components/integration/jira/give-details.tsx rename to web/components/integration/jira/give-details.tsx diff --git a/apps/app/components/integration/jira/import-users.tsx b/web/components/integration/jira/import-users.tsx similarity index 100% rename from apps/app/components/integration/jira/import-users.tsx rename to web/components/integration/jira/import-users.tsx diff --git a/apps/app/components/integration/jira/index.ts b/web/components/integration/jira/index.ts similarity index 100% rename from apps/app/components/integration/jira/index.ts rename to web/components/integration/jira/index.ts diff --git a/apps/app/components/integration/jira/jira-project-detail.tsx b/web/components/integration/jira/jira-project-detail.tsx similarity index 99% rename from apps/app/components/integration/jira/jira-project-detail.tsx rename to web/components/integration/jira/jira-project-detail.tsx index 88803727cf4..f651ad89cfe 100644 --- a/apps/app/components/integration/jira/jira-project-detail.tsx +++ b/web/components/integration/jira/jira-project-detail.tsx @@ -20,7 +20,7 @@ import { IJiraImporterForm, IJiraMetadata } from "types"; // components import { Spinner, ToggleSwitch } from "components/ui"; -import type { IJiraIntegrationData, TJiraIntegrationSteps } from "./"; +import type { IJiraIntegrationData, TJiraIntegrationSteps } from "."; type Props = { setCurrentStep: React.Dispatch>; diff --git a/apps/app/components/integration/jira/root.tsx b/web/components/integration/jira/root.tsx similarity index 99% rename from apps/app/components/integration/jira/root.tsx rename to web/components/integration/jira/root.tsx index b5c086431af..451c2370959 100644 --- a/apps/app/components/integration/jira/root.tsx +++ b/web/components/integration/jira/root.tsx @@ -31,7 +31,7 @@ import { jiraFormDefaultValues, TJiraIntegrationSteps, IJiraIntegrationData, -} from "./"; +} from "."; import JiraLogo from "public/services/jira.png"; diff --git a/apps/app/components/integration/single-import.tsx b/web/components/integration/single-import.tsx similarity index 100% rename from apps/app/components/integration/single-import.tsx rename to web/components/integration/single-import.tsx diff --git a/apps/app/components/integration/single-integration-card.tsx b/web/components/integration/single-integration-card.tsx similarity index 100% rename from apps/app/components/integration/single-integration-card.tsx rename to web/components/integration/single-integration-card.tsx diff --git a/web/components/integration/slack/index.ts b/web/components/integration/slack/index.ts new file mode 100644 index 00000000000..4ea6cd1e4b5 --- /dev/null +++ b/web/components/integration/slack/index.ts @@ -0,0 +1 @@ +export * from "./select-channel"; diff --git a/apps/app/components/integration/slack/select-channel.tsx b/web/components/integration/slack/select-channel.tsx similarity index 100% rename from apps/app/components/integration/slack/select-channel.tsx rename to web/components/integration/slack/select-channel.tsx diff --git a/apps/app/components/issues/activity.tsx b/web/components/issues/activity.tsx similarity index 100% rename from apps/app/components/issues/activity.tsx rename to web/components/issues/activity.tsx diff --git a/apps/app/components/issues/attachment/attachment-upload.tsx b/web/components/issues/attachment/attachment-upload.tsx similarity index 100% rename from apps/app/components/issues/attachment/attachment-upload.tsx rename to web/components/issues/attachment/attachment-upload.tsx diff --git a/apps/app/components/issues/attachment/attachments.tsx b/web/components/issues/attachment/attachments.tsx similarity index 100% rename from apps/app/components/issues/attachment/attachments.tsx rename to web/components/issues/attachment/attachments.tsx diff --git a/apps/app/components/issues/attachment/delete-attachment-modal.tsx b/web/components/issues/attachment/delete-attachment-modal.tsx similarity index 100% rename from apps/app/components/issues/attachment/delete-attachment-modal.tsx rename to web/components/issues/attachment/delete-attachment-modal.tsx diff --git a/apps/app/components/issues/attachment/index.ts b/web/components/issues/attachment/index.ts similarity index 100% rename from apps/app/components/issues/attachment/index.ts rename to web/components/issues/attachment/index.ts diff --git a/apps/app/components/issues/comment/add-comment.tsx b/web/components/issues/comment/add-comment.tsx similarity index 100% rename from apps/app/components/issues/comment/add-comment.tsx rename to web/components/issues/comment/add-comment.tsx diff --git a/apps/app/components/issues/comment/comment-card.tsx b/web/components/issues/comment/comment-card.tsx similarity index 100% rename from apps/app/components/issues/comment/comment-card.tsx rename to web/components/issues/comment/comment-card.tsx diff --git a/apps/app/components/issues/comment/comment-reaction.tsx b/web/components/issues/comment/comment-reaction.tsx similarity index 100% rename from apps/app/components/issues/comment/comment-reaction.tsx rename to web/components/issues/comment/comment-reaction.tsx diff --git a/apps/app/components/issues/comment/index.ts b/web/components/issues/comment/index.ts similarity index 100% rename from apps/app/components/issues/comment/index.ts rename to web/components/issues/comment/index.ts diff --git a/apps/app/components/issues/delete-issue-modal.tsx b/web/components/issues/delete-issue-modal.tsx similarity index 100% rename from apps/app/components/issues/delete-issue-modal.tsx rename to web/components/issues/delete-issue-modal.tsx diff --git a/apps/app/components/issues/description-form.tsx b/web/components/issues/description-form.tsx similarity index 100% rename from apps/app/components/issues/description-form.tsx rename to web/components/issues/description-form.tsx diff --git a/apps/app/components/issues/form.tsx b/web/components/issues/form.tsx similarity index 100% rename from apps/app/components/issues/form.tsx rename to web/components/issues/form.tsx diff --git a/apps/app/components/issues/gantt-chart/blocks.tsx b/web/components/issues/gantt-chart/blocks.tsx similarity index 100% rename from apps/app/components/issues/gantt-chart/blocks.tsx rename to web/components/issues/gantt-chart/blocks.tsx diff --git a/apps/app/components/issues/gantt-chart/index.ts b/web/components/issues/gantt-chart/index.ts similarity index 100% rename from apps/app/components/issues/gantt-chart/index.ts rename to web/components/issues/gantt-chart/index.ts diff --git a/apps/app/components/issues/gantt-chart/layout.tsx b/web/components/issues/gantt-chart/layout.tsx similarity index 77% rename from apps/app/components/issues/gantt-chart/layout.tsx rename to web/components/issues/gantt-chart/layout.tsx index a42d764d820..39e169a60d3 100644 --- a/apps/app/components/issues/gantt-chart/layout.tsx +++ b/web/components/issues/gantt-chart/layout.tsx @@ -5,6 +5,7 @@ import useIssuesView from "hooks/use-issues-view"; import useUser from "hooks/use-user"; import useGanttChartIssues from "hooks/gantt-chart/issue-view"; import { updateGanttIssue } from "components/gantt-chart/hooks/block-update"; +import useProjectDetails from "hooks/use-project-details"; // components import { GanttChartRoot, renderIssueBlocksStructure } from "components/gantt-chart"; import { IssueGanttBlock, IssueGanttSidebarBlock } from "components/issues"; @@ -18,12 +19,15 @@ export const IssueGanttChartView = () => { const { orderBy } = useIssuesView(); const { user } = useUser(); + const { projectDetails } = useProjectDetails(); const { ganttIssues, mutateGanttIssues } = useGanttChartIssues( workspaceSlug as string, projectId as string ); + const isAllowed = projectDetails?.member_role === 20 || projectDetails?.member_role === 15; + return (
{ } BlockRender={IssueGanttBlock} SidebarBlockRender={IssueGanttSidebarBlock} - enableReorder={orderBy === "sort_order"} + enableBlockLeftResize={isAllowed} + enableBlockRightResize={isAllowed} + enableBlockMove={isAllowed} + enableReorder={orderBy === "sort_order" && isAllowed} bottomSpacing />
diff --git a/apps/app/components/issues/index.ts b/web/components/issues/index.ts similarity index 100% rename from apps/app/components/issues/index.ts rename to web/components/issues/index.ts diff --git a/apps/app/components/issues/issue-reaction.tsx b/web/components/issues/issue-reaction.tsx similarity index 100% rename from apps/app/components/issues/issue-reaction.tsx rename to web/components/issues/issue-reaction.tsx diff --git a/apps/app/components/issues/label.tsx b/web/components/issues/label.tsx similarity index 100% rename from apps/app/components/issues/label.tsx rename to web/components/issues/label.tsx diff --git a/apps/app/components/issues/main-content.tsx b/web/components/issues/main-content.tsx similarity index 100% rename from apps/app/components/issues/main-content.tsx rename to web/components/issues/main-content.tsx diff --git a/apps/app/components/issues/modal.tsx b/web/components/issues/modal.tsx similarity index 100% rename from apps/app/components/issues/modal.tsx rename to web/components/issues/modal.tsx diff --git a/apps/app/components/issues/my-issues/index.ts b/web/components/issues/my-issues/index.ts similarity index 100% rename from apps/app/components/issues/my-issues/index.ts rename to web/components/issues/my-issues/index.ts diff --git a/apps/app/components/issues/my-issues/my-issues-select-filters.tsx b/web/components/issues/my-issues/my-issues-select-filters.tsx similarity index 100% rename from apps/app/components/issues/my-issues/my-issues-select-filters.tsx rename to web/components/issues/my-issues/my-issues-select-filters.tsx diff --git a/apps/app/components/issues/my-issues/my-issues-view-options.tsx b/web/components/issues/my-issues/my-issues-view-options.tsx similarity index 100% rename from apps/app/components/issues/my-issues/my-issues-view-options.tsx rename to web/components/issues/my-issues/my-issues-view-options.tsx diff --git a/apps/app/components/issues/my-issues/my-issues-view.tsx b/web/components/issues/my-issues/my-issues-view.tsx similarity index 100% rename from apps/app/components/issues/my-issues/my-issues-view.tsx rename to web/components/issues/my-issues/my-issues-view.tsx diff --git a/apps/app/components/issues/parent-issues-list-modal.tsx b/web/components/issues/parent-issues-list-modal.tsx similarity index 100% rename from apps/app/components/issues/parent-issues-list-modal.tsx rename to web/components/issues/parent-issues-list-modal.tsx diff --git a/apps/app/components/issues/peek-overview/full-screen-peek-view.tsx b/web/components/issues/peek-overview/full-screen-peek-view.tsx similarity index 100% rename from apps/app/components/issues/peek-overview/full-screen-peek-view.tsx rename to web/components/issues/peek-overview/full-screen-peek-view.tsx diff --git a/apps/app/components/issues/peek-overview/header.tsx b/web/components/issues/peek-overview/header.tsx similarity index 100% rename from apps/app/components/issues/peek-overview/header.tsx rename to web/components/issues/peek-overview/header.tsx diff --git a/apps/app/components/issues/peek-overview/index.ts b/web/components/issues/peek-overview/index.ts similarity index 100% rename from apps/app/components/issues/peek-overview/index.ts rename to web/components/issues/peek-overview/index.ts diff --git a/apps/app/components/issues/peek-overview/issue-activity.tsx b/web/components/issues/peek-overview/issue-activity.tsx similarity index 100% rename from apps/app/components/issues/peek-overview/issue-activity.tsx rename to web/components/issues/peek-overview/issue-activity.tsx diff --git a/apps/app/components/issues/peek-overview/issue-details.tsx b/web/components/issues/peek-overview/issue-details.tsx similarity index 100% rename from apps/app/components/issues/peek-overview/issue-details.tsx rename to web/components/issues/peek-overview/issue-details.tsx diff --git a/apps/app/components/issues/peek-overview/issue-properties.tsx b/web/components/issues/peek-overview/issue-properties.tsx similarity index 96% rename from apps/app/components/issues/peek-overview/issue-properties.tsx rename to web/components/issues/peek-overview/issue-properties.tsx index 1f2d618ac58..16728b148be 100644 --- a/apps/app/components/issues/peek-overview/issue-properties.tsx +++ b/web/components/issues/peek-overview/issue-properties.tsx @@ -50,12 +50,9 @@ export const PeekOverviewIssueProperties: React.FC = ({ maxDate?.setDate(maxDate.getDate()); const handleCopyLink = () => { - const originURL = - typeof window !== "undefined" && window.location.origin ? window.location.origin : ""; + const urlToCopy = window.location.href; - copyTextToClipboard( - `${originURL}/${workspaceSlug}/projects/${issue.project}/issues/${issue.id}` - ).then(() => { + copyTextToClipboard(urlToCopy).then(() => { setToastAlert({ type: "success", title: "Link copied!", diff --git a/apps/app/components/issues/peek-overview/layout.tsx b/web/components/issues/peek-overview/layout.tsx similarity index 77% rename from apps/app/components/issues/peek-overview/layout.tsx rename to web/components/issues/peek-overview/layout.tsx index 40737b6e878..57bcb904c6d 100644 --- a/apps/app/components/issues/peek-overview/layout.tsx +++ b/web/components/issues/peek-overview/layout.tsx @@ -151,35 +151,37 @@ export const IssuePeekOverview: React.FC = observer( leaveFrom="opacity-100" leaveTo="opacity-0" > - - {peekOverviewMode === "modal" && ( - setDeleteIssueModal(true)} - handleUpdateIssue={handleUpdateIssue} - issue={issue} - mode={peekOverviewMode} - readOnly={readOnly} - setMode={(mode) => setPeekOverviewMode(mode)} - workspaceSlug={workspaceSlug} - /> - )} - {peekOverviewMode === "full" && ( - setDeleteIssueModal(true)} - handleUpdateIssue={handleUpdateIssue} - issue={issue} - mode={peekOverviewMode} - readOnly={readOnly} - setMode={(mode) => setPeekOverviewMode(mode)} - workspaceSlug={workspaceSlug} - /> - )} + +
+ {peekOverviewMode === "modal" && ( + setDeleteIssueModal(true)} + handleUpdateIssue={handleUpdateIssue} + issue={issue} + mode={peekOverviewMode} + readOnly={readOnly} + setMode={(mode) => setPeekOverviewMode(mode)} + workspaceSlug={workspaceSlug} + /> + )} + {peekOverviewMode === "full" && ( + setDeleteIssueModal(true)} + handleUpdateIssue={handleUpdateIssue} + issue={issue} + mode={peekOverviewMode} + readOnly={readOnly} + setMode={(mode) => setPeekOverviewMode(mode)} + workspaceSlug={workspaceSlug} + /> + )} +
diff --git a/apps/app/components/issues/peek-overview/side-peek-view.tsx b/web/components/issues/peek-overview/side-peek-view.tsx similarity index 100% rename from apps/app/components/issues/peek-overview/side-peek-view.tsx rename to web/components/issues/peek-overview/side-peek-view.tsx diff --git a/apps/app/components/issues/select/assignee.tsx b/web/components/issues/select/assignee.tsx similarity index 100% rename from apps/app/components/issues/select/assignee.tsx rename to web/components/issues/select/assignee.tsx diff --git a/apps/app/components/issues/select/date.tsx b/web/components/issues/select/date.tsx similarity index 100% rename from apps/app/components/issues/select/date.tsx rename to web/components/issues/select/date.tsx diff --git a/apps/app/components/issues/select/estimate.tsx b/web/components/issues/select/estimate.tsx similarity index 100% rename from apps/app/components/issues/select/estimate.tsx rename to web/components/issues/select/estimate.tsx diff --git a/apps/app/components/issues/select/index.ts b/web/components/issues/select/index.ts similarity index 100% rename from apps/app/components/issues/select/index.ts rename to web/components/issues/select/index.ts diff --git a/apps/app/components/issues/select/label.tsx b/web/components/issues/select/label.tsx similarity index 100% rename from apps/app/components/issues/select/label.tsx rename to web/components/issues/select/label.tsx diff --git a/apps/app/components/issues/select/priority.tsx b/web/components/issues/select/priority.tsx similarity index 100% rename from apps/app/components/issues/select/priority.tsx rename to web/components/issues/select/priority.tsx diff --git a/apps/app/components/issues/select/project.tsx b/web/components/issues/select/project.tsx similarity index 100% rename from apps/app/components/issues/select/project.tsx rename to web/components/issues/select/project.tsx diff --git a/apps/app/components/issues/select/state.tsx b/web/components/issues/select/state.tsx similarity index 100% rename from apps/app/components/issues/select/state.tsx rename to web/components/issues/select/state.tsx diff --git a/apps/app/components/issues/sidebar-select/assignee.tsx b/web/components/issues/sidebar-select/assignee.tsx similarity index 100% rename from apps/app/components/issues/sidebar-select/assignee.tsx rename to web/components/issues/sidebar-select/assignee.tsx diff --git a/apps/app/components/issues/sidebar-select/blocked.tsx b/web/components/issues/sidebar-select/blocked.tsx similarity index 100% rename from apps/app/components/issues/sidebar-select/blocked.tsx rename to web/components/issues/sidebar-select/blocked.tsx diff --git a/apps/app/components/issues/sidebar-select/blocker.tsx b/web/components/issues/sidebar-select/blocker.tsx similarity index 100% rename from apps/app/components/issues/sidebar-select/blocker.tsx rename to web/components/issues/sidebar-select/blocker.tsx diff --git a/apps/app/components/issues/sidebar-select/cycle.tsx b/web/components/issues/sidebar-select/cycle.tsx similarity index 100% rename from apps/app/components/issues/sidebar-select/cycle.tsx rename to web/components/issues/sidebar-select/cycle.tsx diff --git a/apps/app/components/issues/sidebar-select/estimate.tsx b/web/components/issues/sidebar-select/estimate.tsx similarity index 100% rename from apps/app/components/issues/sidebar-select/estimate.tsx rename to web/components/issues/sidebar-select/estimate.tsx diff --git a/apps/app/components/issues/sidebar-select/index.ts b/web/components/issues/sidebar-select/index.ts similarity index 100% rename from apps/app/components/issues/sidebar-select/index.ts rename to web/components/issues/sidebar-select/index.ts diff --git a/apps/app/components/issues/sidebar-select/label.tsx b/web/components/issues/sidebar-select/label.tsx similarity index 100% rename from apps/app/components/issues/sidebar-select/label.tsx rename to web/components/issues/sidebar-select/label.tsx diff --git a/apps/app/components/issues/sidebar-select/module.tsx b/web/components/issues/sidebar-select/module.tsx similarity index 100% rename from apps/app/components/issues/sidebar-select/module.tsx rename to web/components/issues/sidebar-select/module.tsx diff --git a/apps/app/components/issues/sidebar-select/parent.tsx b/web/components/issues/sidebar-select/parent.tsx similarity index 100% rename from apps/app/components/issues/sidebar-select/parent.tsx rename to web/components/issues/sidebar-select/parent.tsx diff --git a/apps/app/components/issues/sidebar-select/priority.tsx b/web/components/issues/sidebar-select/priority.tsx similarity index 100% rename from apps/app/components/issues/sidebar-select/priority.tsx rename to web/components/issues/sidebar-select/priority.tsx diff --git a/apps/app/components/issues/sidebar-select/state.tsx b/web/components/issues/sidebar-select/state.tsx similarity index 100% rename from apps/app/components/issues/sidebar-select/state.tsx rename to web/components/issues/sidebar-select/state.tsx diff --git a/apps/app/components/issues/sidebar.tsx b/web/components/issues/sidebar.tsx similarity index 100% rename from apps/app/components/issues/sidebar.tsx rename to web/components/issues/sidebar.tsx diff --git a/apps/app/components/issues/sub-issues-list.tsx b/web/components/issues/sub-issues-list.tsx similarity index 100% rename from apps/app/components/issues/sub-issues-list.tsx rename to web/components/issues/sub-issues-list.tsx diff --git a/apps/app/components/issues/view-select/assignee.tsx b/web/components/issues/view-select/assignee.tsx similarity index 100% rename from apps/app/components/issues/view-select/assignee.tsx rename to web/components/issues/view-select/assignee.tsx diff --git a/apps/app/components/issues/view-select/due-date.tsx b/web/components/issues/view-select/due-date.tsx similarity index 100% rename from apps/app/components/issues/view-select/due-date.tsx rename to web/components/issues/view-select/due-date.tsx diff --git a/apps/app/components/issues/view-select/estimate.tsx b/web/components/issues/view-select/estimate.tsx similarity index 100% rename from apps/app/components/issues/view-select/estimate.tsx rename to web/components/issues/view-select/estimate.tsx diff --git a/apps/app/components/issues/view-select/index.ts b/web/components/issues/view-select/index.ts similarity index 100% rename from apps/app/components/issues/view-select/index.ts rename to web/components/issues/view-select/index.ts diff --git a/apps/app/components/issues/view-select/label.tsx b/web/components/issues/view-select/label.tsx similarity index 100% rename from apps/app/components/issues/view-select/label.tsx rename to web/components/issues/view-select/label.tsx diff --git a/apps/app/components/issues/view-select/priority.tsx b/web/components/issues/view-select/priority.tsx similarity index 100% rename from apps/app/components/issues/view-select/priority.tsx rename to web/components/issues/view-select/priority.tsx diff --git a/apps/app/components/issues/view-select/start-date.tsx b/web/components/issues/view-select/start-date.tsx similarity index 100% rename from apps/app/components/issues/view-select/start-date.tsx rename to web/components/issues/view-select/start-date.tsx diff --git a/apps/app/components/issues/view-select/state.tsx b/web/components/issues/view-select/state.tsx similarity index 100% rename from apps/app/components/issues/view-select/state.tsx rename to web/components/issues/view-select/state.tsx diff --git a/apps/app/components/labels/create-label-modal.tsx b/web/components/labels/create-label-modal.tsx similarity index 100% rename from apps/app/components/labels/create-label-modal.tsx rename to web/components/labels/create-label-modal.tsx diff --git a/apps/app/components/labels/create-update-label-inline.tsx b/web/components/labels/create-update-label-inline.tsx similarity index 100% rename from apps/app/components/labels/create-update-label-inline.tsx rename to web/components/labels/create-update-label-inline.tsx diff --git a/apps/app/components/labels/delete-label-modal.tsx b/web/components/labels/delete-label-modal.tsx similarity index 100% rename from apps/app/components/labels/delete-label-modal.tsx rename to web/components/labels/delete-label-modal.tsx diff --git a/apps/app/components/labels/index.ts b/web/components/labels/index.ts similarity index 100% rename from apps/app/components/labels/index.ts rename to web/components/labels/index.ts diff --git a/apps/app/components/labels/labels-list-modal.tsx b/web/components/labels/labels-list-modal.tsx similarity index 100% rename from apps/app/components/labels/labels-list-modal.tsx rename to web/components/labels/labels-list-modal.tsx diff --git a/apps/app/components/labels/single-label-group.tsx b/web/components/labels/single-label-group.tsx similarity index 100% rename from apps/app/components/labels/single-label-group.tsx rename to web/components/labels/single-label-group.tsx diff --git a/apps/app/components/labels/single-label.tsx b/web/components/labels/single-label.tsx similarity index 100% rename from apps/app/components/labels/single-label.tsx rename to web/components/labels/single-label.tsx diff --git a/apps/app/components/modules/delete-module-modal.tsx b/web/components/modules/delete-module-modal.tsx similarity index 100% rename from apps/app/components/modules/delete-module-modal.tsx rename to web/components/modules/delete-module-modal.tsx diff --git a/apps/app/components/modules/form.tsx b/web/components/modules/form.tsx similarity index 100% rename from apps/app/components/modules/form.tsx rename to web/components/modules/form.tsx diff --git a/apps/app/components/modules/gantt-chart/blocks.tsx b/web/components/modules/gantt-chart/blocks.tsx similarity index 100% rename from apps/app/components/modules/gantt-chart/blocks.tsx rename to web/components/modules/gantt-chart/blocks.tsx diff --git a/apps/app/components/modules/gantt-chart/index.ts b/web/components/modules/gantt-chart/index.ts similarity index 100% rename from apps/app/components/modules/gantt-chart/index.ts rename to web/components/modules/gantt-chart/index.ts diff --git a/apps/app/components/modules/gantt-chart/module-issues-layout.tsx b/web/components/modules/gantt-chart/module-issues-layout.tsx similarity index 79% rename from apps/app/components/modules/gantt-chart/module-issues-layout.tsx rename to web/components/modules/gantt-chart/module-issues-layout.tsx index 9c0b05078c9..c350232e91b 100644 --- a/apps/app/components/modules/gantt-chart/module-issues-layout.tsx +++ b/web/components/modules/gantt-chart/module-issues-layout.tsx @@ -7,6 +7,7 @@ import useIssuesView from "hooks/use-issues-view"; import useUser from "hooks/use-user"; import useGanttChartModuleIssues from "hooks/gantt-chart/module-issues-view"; import { updateGanttIssue } from "components/gantt-chart/hooks/block-update"; +import useProjectDetails from "hooks/use-project-details"; // components import { GanttChartRoot, renderIssueBlocksStructure } from "components/gantt-chart"; import { IssueGanttBlock, IssueGanttSidebarBlock } from "components/issues"; @@ -22,6 +23,7 @@ export const ModuleIssuesGanttChartView: FC = ({}) => { const { orderBy } = useIssuesView(); const { user } = useUser(); + const { projectDetails } = useProjectDetails(); const { ganttIssues, mutateGanttIssues } = useGanttChartModuleIssues( workspaceSlug as string, @@ -29,6 +31,8 @@ export const ModuleIssuesGanttChartView: FC = ({}) => { moduleId as string ); + const isAllowed = projectDetails?.member_role === 20 || projectDetails?.member_role === 15; + return (
= ({}) => { } SidebarBlockRender={IssueGanttSidebarBlock} BlockRender={IssueGanttBlock} - enableReorder={orderBy === "sort_order"} + enableBlockLeftResize={isAllowed} + enableBlockRightResize={isAllowed} + enableBlockMove={isAllowed} + enableReorder={orderBy === "sort_order" && isAllowed} bottomSpacing />
diff --git a/apps/app/components/modules/gantt-chart/modules-list-layout.tsx b/web/components/modules/gantt-chart/modules-list-layout.tsx similarity index 88% rename from apps/app/components/modules/gantt-chart/modules-list-layout.tsx rename to web/components/modules/gantt-chart/modules-list-layout.tsx index 70f493dde17..08465ffa919 100644 --- a/apps/app/components/modules/gantt-chart/modules-list-layout.tsx +++ b/web/components/modules/gantt-chart/modules-list-layout.tsx @@ -1,7 +1,6 @@ import { FC } from "react"; import { useRouter } from "next/router"; -import Link from "next/link"; import { KeyedMutator } from "swr"; @@ -9,6 +8,7 @@ import { KeyedMutator } from "swr"; import modulesService from "services/modules.service"; // hooks import useUser from "hooks/use-user"; +import useProjectDetails from "hooks/use-project-details"; // components import { GanttChartRoot, IBlockUpdateData } from "components/gantt-chart"; import { ModuleGanttBlock, ModuleGanttSidebarBlock } from "components/modules"; @@ -25,6 +25,7 @@ export const ModulesListGanttChartView: FC = ({ modules, mutateModules }) const { workspaceSlug } = router.query; const { user } = useUser(); + const { projectDetails } = useProjectDetails(); const handleModuleUpdate = (module: IModule, payload: IBlockUpdateData) => { if (!workspaceSlug || !user) return; @@ -78,6 +79,8 @@ export const ModulesListGanttChartView: FC = ({ modules, mutateModules }) })) : []; + const isAllowed = projectDetails?.member_role === 20 || projectDetails?.member_role === 15; + return (
= ({ modules, mutateModules }) blockUpdateHandler={(block, payload) => handleModuleUpdate(block, payload)} SidebarBlockRender={ModuleGanttSidebarBlock} BlockRender={ModuleGanttBlock} + enableBlockLeftResize={isAllowed} + enableBlockRightResize={isAllowed} + enableBlockMove={isAllowed} + enableReorder={isAllowed} />
); diff --git a/apps/app/components/modules/index.ts b/web/components/modules/index.ts similarity index 100% rename from apps/app/components/modules/index.ts rename to web/components/modules/index.ts diff --git a/apps/app/components/modules/modal.tsx b/web/components/modules/modal.tsx similarity index 100% rename from apps/app/components/modules/modal.tsx rename to web/components/modules/modal.tsx diff --git a/apps/app/components/modules/select/index.ts b/web/components/modules/select/index.ts similarity index 100% rename from apps/app/components/modules/select/index.ts rename to web/components/modules/select/index.ts diff --git a/apps/app/components/modules/select/lead.tsx b/web/components/modules/select/lead.tsx similarity index 100% rename from apps/app/components/modules/select/lead.tsx rename to web/components/modules/select/lead.tsx diff --git a/apps/app/components/modules/select/members.tsx b/web/components/modules/select/members.tsx similarity index 100% rename from apps/app/components/modules/select/members.tsx rename to web/components/modules/select/members.tsx diff --git a/apps/app/components/modules/select/status.tsx b/web/components/modules/select/status.tsx similarity index 100% rename from apps/app/components/modules/select/status.tsx rename to web/components/modules/select/status.tsx diff --git a/apps/app/components/modules/sidebar-select/index.ts b/web/components/modules/sidebar-select/index.ts similarity index 100% rename from apps/app/components/modules/sidebar-select/index.ts rename to web/components/modules/sidebar-select/index.ts diff --git a/apps/app/components/modules/sidebar-select/select-lead.tsx b/web/components/modules/sidebar-select/select-lead.tsx similarity index 100% rename from apps/app/components/modules/sidebar-select/select-lead.tsx rename to web/components/modules/sidebar-select/select-lead.tsx diff --git a/apps/app/components/modules/sidebar-select/select-members.tsx b/web/components/modules/sidebar-select/select-members.tsx similarity index 100% rename from apps/app/components/modules/sidebar-select/select-members.tsx rename to web/components/modules/sidebar-select/select-members.tsx diff --git a/apps/app/components/modules/sidebar-select/select-status.tsx b/web/components/modules/sidebar-select/select-status.tsx similarity index 100% rename from apps/app/components/modules/sidebar-select/select-status.tsx rename to web/components/modules/sidebar-select/select-status.tsx diff --git a/apps/app/components/modules/sidebar.tsx b/web/components/modules/sidebar.tsx similarity index 100% rename from apps/app/components/modules/sidebar.tsx rename to web/components/modules/sidebar.tsx diff --git a/apps/app/components/modules/single-module-card.tsx b/web/components/modules/single-module-card.tsx similarity index 100% rename from apps/app/components/modules/single-module-card.tsx rename to web/components/modules/single-module-card.tsx diff --git a/apps/app/components/notifications/index.ts b/web/components/notifications/index.ts similarity index 100% rename from apps/app/components/notifications/index.ts rename to web/components/notifications/index.ts diff --git a/apps/app/components/notifications/notification-card.tsx b/web/components/notifications/notification-card.tsx similarity index 99% rename from apps/app/components/notifications/notification-card.tsx rename to web/components/notifications/notification-card.tsx index 9bb0715a854..29fe579a88e 100644 --- a/apps/app/components/notifications/notification-card.tsx +++ b/web/components/notifications/notification-card.tsx @@ -210,7 +210,7 @@ export const NotificationCard: React.FC = (props) => {
{ + menuButtonOnClick={(e: { stopPropagation: () => void }) => { e.stopPropagation(); }} customButton={ diff --git a/apps/app/components/notifications/notification-header.tsx b/web/components/notifications/notification-header.tsx similarity index 100% rename from apps/app/components/notifications/notification-header.tsx rename to web/components/notifications/notification-header.tsx diff --git a/apps/app/components/notifications/notification-popover.tsx b/web/components/notifications/notification-popover.tsx similarity index 100% rename from apps/app/components/notifications/notification-popover.tsx rename to web/components/notifications/notification-popover.tsx diff --git a/apps/app/components/notifications/select-snooze-till-modal.tsx b/web/components/notifications/select-snooze-till-modal.tsx similarity index 100% rename from apps/app/components/notifications/select-snooze-till-modal.tsx rename to web/components/notifications/select-snooze-till-modal.tsx diff --git a/apps/app/components/onboarding/index.ts b/web/components/onboarding/index.ts similarity index 100% rename from apps/app/components/onboarding/index.ts rename to web/components/onboarding/index.ts diff --git a/apps/app/components/onboarding/invite-members.tsx b/web/components/onboarding/invite-members.tsx similarity index 100% rename from apps/app/components/onboarding/invite-members.tsx rename to web/components/onboarding/invite-members.tsx diff --git a/apps/app/components/onboarding/join-workspaces.tsx b/web/components/onboarding/join-workspaces.tsx similarity index 100% rename from apps/app/components/onboarding/join-workspaces.tsx rename to web/components/onboarding/join-workspaces.tsx diff --git a/apps/app/components/onboarding/tour/index.ts b/web/components/onboarding/tour/index.ts similarity index 100% rename from apps/app/components/onboarding/tour/index.ts rename to web/components/onboarding/tour/index.ts diff --git a/apps/app/components/onboarding/tour/root.tsx b/web/components/onboarding/tour/root.tsx similarity index 100% rename from apps/app/components/onboarding/tour/root.tsx rename to web/components/onboarding/tour/root.tsx diff --git a/apps/app/components/onboarding/tour/sidebar.tsx b/web/components/onboarding/tour/sidebar.tsx similarity index 100% rename from apps/app/components/onboarding/tour/sidebar.tsx rename to web/components/onboarding/tour/sidebar.tsx diff --git a/apps/app/components/onboarding/user-details.tsx b/web/components/onboarding/user-details.tsx similarity index 100% rename from apps/app/components/onboarding/user-details.tsx rename to web/components/onboarding/user-details.tsx diff --git a/apps/app/components/onboarding/workspace.tsx b/web/components/onboarding/workspace.tsx similarity index 100% rename from apps/app/components/onboarding/workspace.tsx rename to web/components/onboarding/workspace.tsx diff --git a/apps/app/components/pages/create-block.tsx b/web/components/pages/create-block.tsx similarity index 100% rename from apps/app/components/pages/create-block.tsx rename to web/components/pages/create-block.tsx diff --git a/apps/app/components/pages/create-update-block-inline.tsx b/web/components/pages/create-update-block-inline.tsx similarity index 100% rename from apps/app/components/pages/create-update-block-inline.tsx rename to web/components/pages/create-update-block-inline.tsx diff --git a/apps/app/components/pages/create-update-page-modal.tsx b/web/components/pages/create-update-page-modal.tsx similarity index 100% rename from apps/app/components/pages/create-update-page-modal.tsx rename to web/components/pages/create-update-page-modal.tsx diff --git a/apps/app/components/pages/delete-page-modal.tsx b/web/components/pages/delete-page-modal.tsx similarity index 100% rename from apps/app/components/pages/delete-page-modal.tsx rename to web/components/pages/delete-page-modal.tsx diff --git a/apps/app/components/pages/index.ts b/web/components/pages/index.ts similarity index 100% rename from apps/app/components/pages/index.ts rename to web/components/pages/index.ts diff --git a/apps/app/components/pages/page-form.tsx b/web/components/pages/page-form.tsx similarity index 100% rename from apps/app/components/pages/page-form.tsx rename to web/components/pages/page-form.tsx diff --git a/apps/app/components/pages/pages-list/all-pages-list.tsx b/web/components/pages/pages-list/all-pages-list.tsx similarity index 100% rename from apps/app/components/pages/pages-list/all-pages-list.tsx rename to web/components/pages/pages-list/all-pages-list.tsx diff --git a/apps/app/components/pages/pages-list/favorite-pages-list.tsx b/web/components/pages/pages-list/favorite-pages-list.tsx similarity index 100% rename from apps/app/components/pages/pages-list/favorite-pages-list.tsx rename to web/components/pages/pages-list/favorite-pages-list.tsx diff --git a/apps/app/components/pages/pages-list/index.ts b/web/components/pages/pages-list/index.ts similarity index 100% rename from apps/app/components/pages/pages-list/index.ts rename to web/components/pages/pages-list/index.ts diff --git a/apps/app/components/pages/pages-list/my-pages-list.tsx b/web/components/pages/pages-list/my-pages-list.tsx similarity index 100% rename from apps/app/components/pages/pages-list/my-pages-list.tsx rename to web/components/pages/pages-list/my-pages-list.tsx diff --git a/apps/app/components/pages/pages-list/other-pages-list.tsx b/web/components/pages/pages-list/other-pages-list.tsx similarity index 100% rename from apps/app/components/pages/pages-list/other-pages-list.tsx rename to web/components/pages/pages-list/other-pages-list.tsx diff --git a/apps/app/components/pages/pages-list/recent-pages-list.tsx b/web/components/pages/pages-list/recent-pages-list.tsx similarity index 100% rename from apps/app/components/pages/pages-list/recent-pages-list.tsx rename to web/components/pages/pages-list/recent-pages-list.tsx diff --git a/apps/app/components/pages/pages-list/types.ts b/web/components/pages/pages-list/types.ts similarity index 100% rename from apps/app/components/pages/pages-list/types.ts rename to web/components/pages/pages-list/types.ts diff --git a/apps/app/components/pages/pages-view.tsx b/web/components/pages/pages-view.tsx similarity index 100% rename from apps/app/components/pages/pages-view.tsx rename to web/components/pages/pages-view.tsx diff --git a/apps/app/components/pages/single-page-block.tsx b/web/components/pages/single-page-block.tsx similarity index 100% rename from apps/app/components/pages/single-page-block.tsx rename to web/components/pages/single-page-block.tsx diff --git a/apps/app/components/pages/single-page-detailed-item.tsx b/web/components/pages/single-page-detailed-item.tsx similarity index 100% rename from apps/app/components/pages/single-page-detailed-item.tsx rename to web/components/pages/single-page-detailed-item.tsx diff --git a/apps/app/components/pages/single-page-list-item.tsx b/web/components/pages/single-page-list-item.tsx similarity index 100% rename from apps/app/components/pages/single-page-list-item.tsx rename to web/components/pages/single-page-list-item.tsx diff --git a/apps/app/components/profile/index.ts b/web/components/profile/index.ts similarity index 100% rename from apps/app/components/profile/index.ts rename to web/components/profile/index.ts diff --git a/apps/app/components/profile/navbar.tsx b/web/components/profile/navbar.tsx similarity index 100% rename from apps/app/components/profile/navbar.tsx rename to web/components/profile/navbar.tsx diff --git a/apps/app/components/profile/overview/activity.tsx b/web/components/profile/overview/activity.tsx similarity index 100% rename from apps/app/components/profile/overview/activity.tsx rename to web/components/profile/overview/activity.tsx diff --git a/apps/app/components/profile/overview/index.ts b/web/components/profile/overview/index.ts similarity index 100% rename from apps/app/components/profile/overview/index.ts rename to web/components/profile/overview/index.ts diff --git a/apps/app/components/profile/overview/priority-distribution.tsx b/web/components/profile/overview/priority-distribution.tsx similarity index 100% rename from apps/app/components/profile/overview/priority-distribution.tsx rename to web/components/profile/overview/priority-distribution.tsx diff --git a/apps/app/components/profile/overview/state-distribution.tsx b/web/components/profile/overview/state-distribution.tsx similarity index 100% rename from apps/app/components/profile/overview/state-distribution.tsx rename to web/components/profile/overview/state-distribution.tsx diff --git a/apps/app/components/profile/overview/stats.tsx b/web/components/profile/overview/stats.tsx similarity index 100% rename from apps/app/components/profile/overview/stats.tsx rename to web/components/profile/overview/stats.tsx diff --git a/apps/app/components/profile/overview/workload.tsx b/web/components/profile/overview/workload.tsx similarity index 100% rename from apps/app/components/profile/overview/workload.tsx rename to web/components/profile/overview/workload.tsx diff --git a/apps/app/components/profile/profile-issues-view-options.tsx b/web/components/profile/profile-issues-view-options.tsx similarity index 100% rename from apps/app/components/profile/profile-issues-view-options.tsx rename to web/components/profile/profile-issues-view-options.tsx diff --git a/apps/app/components/profile/profile-issues-view.tsx b/web/components/profile/profile-issues-view.tsx similarity index 100% rename from apps/app/components/profile/profile-issues-view.tsx rename to web/components/profile/profile-issues-view.tsx diff --git a/apps/app/components/profile/sidebar.tsx b/web/components/profile/sidebar.tsx similarity index 100% rename from apps/app/components/profile/sidebar.tsx rename to web/components/profile/sidebar.tsx diff --git a/apps/app/components/project/confirm-project-member-remove.tsx b/web/components/project/confirm-project-member-remove.tsx similarity index 100% rename from apps/app/components/project/confirm-project-member-remove.tsx rename to web/components/project/confirm-project-member-remove.tsx diff --git a/apps/app/components/project/create-project-modal.tsx b/web/components/project/create-project-modal.tsx similarity index 100% rename from apps/app/components/project/create-project-modal.tsx rename to web/components/project/create-project-modal.tsx diff --git a/apps/app/components/project/delete-project-modal.tsx b/web/components/project/delete-project-modal.tsx similarity index 100% rename from apps/app/components/project/delete-project-modal.tsx rename to web/components/project/delete-project-modal.tsx diff --git a/apps/app/components/project/index.ts b/web/components/project/index.ts similarity index 87% rename from apps/app/components/project/index.ts rename to web/components/project/index.ts index e5ece39559a..a2fed74b845 100644 --- a/apps/app/components/project/index.ts +++ b/web/components/project/index.ts @@ -1,7 +1,7 @@ export * from "./create-project-modal"; export * from "./delete-project-modal"; export * from "./sidebar-list"; -export * from "./settings-header" +export * from "./settings-header"; export * from "./single-integration-card"; export * from "./single-project-card"; export * from "./single-sidebar-project"; diff --git a/apps/app/components/project/join-project-modal.tsx b/web/components/project/join-project-modal.tsx similarity index 100% rename from apps/app/components/project/join-project-modal.tsx rename to web/components/project/join-project-modal.tsx diff --git a/apps/app/components/project/publish-project/modal.tsx b/web/components/project/publish-project/modal.tsx similarity index 57% rename from apps/app/components/project/publish-project/modal.tsx rename to web/components/project/publish-project/modal.tsx index b22a496f5d9..173a5242c32 100644 --- a/apps/app/components/project/publish-project/modal.tsx +++ b/web/components/project/publish-project/modal.tsx @@ -6,7 +6,14 @@ import { Controller, useForm } from "react-hook-form"; // headless ui import { Dialog, Transition } from "@headlessui/react"; // ui components -import { ToggleSwitch, PrimaryButton, SecondaryButton, Icon, DangerButton } from "components/ui"; +import { + ToggleSwitch, + PrimaryButton, + SecondaryButton, + Icon, + DangerButton, + Loader, +} from "components/ui"; import { CustomPopover } from "./popover"; // mobx react lite import { observer } from "mobx-react-lite"; @@ -146,22 +153,14 @@ export const PublishProjectModal: React.FC = observer(() => { const projectId = projectPublish.project_id; return projectPublish - .createProjectSettingsAsync( - workspaceSlug.toString(), - projectId?.toString() ?? "", - payload, - user - ) - .then((response) => { + .publishProject(workspaceSlug.toString(), projectId?.toString() ?? "", payload, user) + .then((res) => { mutateProjectDetails(); handleClose(); if (projectId) window.open(`${plane_deploy_url}/${workspaceSlug}/${projectId}`, "_blank"); - return response; + return res; }) - .catch((error) => { - console.error("error", error); - return error; - }); + .catch((err) => err); }; const handleUpdatePublishSettings = async (payload: IProjectPublishSettings) => { @@ -199,7 +198,7 @@ export const PublishProjectModal: React.FC = observer(() => { setIsUnpublishing(true); projectPublish - .deleteProjectSettingsAsync( + .unPublishProject( workspaceSlug.toString(), projectPublish.project_id as string, publishId, @@ -329,7 +328,7 @@ export const PublishProjectModal: React.FC = observer(() => { {/* heading */}
Publish
- {watch("id") && ( + {projectPublish.projectPublishSettings !== "not-initialized" && ( handleUnpublishProject(watch("id") ?? "")} className="!px-2 !py-1.5" @@ -341,137 +340,145 @@ export const PublishProjectModal: React.FC = observer(() => {
{/* content */} -
-
-
- {`${plane_deploy_url}/${workspaceSlug}/${projectPublish.project_id}`} -
-
- -
-
- - {watch("id") && ( -
-
- -
-
This project is live on web
-
- )} + {projectPublish.fetchSettingsLoader ? ( + + + + + + + ) : ( +
+ {watch("id") && ( + <> +
+
+ {`${plane_deploy_url}/${workspaceSlug}/${projectPublish.project_id}`} +
+
+ +
+
+
+
+ +
+
This project is live on web
+
+ + )} -
-
-
Views
- ( - 0 - ? viewOptions - .filter((v) => value.includes(v.key)) - .map((v) => v.label) - .join(", ") - : `` - } - placeholder="Select views" - > - <> - {viewOptions.map((option) => ( -
{ - const _views = - value.length > 0 - ? value.includes(option.key) - ? value.filter((_o: string) => _o !== option.key) - : [...value, option.key] - : [option.key]; - - if (_views.length === 0) return; - - onChange(_views); - checkIfUpdateIsRequired(); - }} - > -
{option.label}
+
+
+
Views
+ ( + 0 + ? viewOptions + .filter((v) => value.includes(v.key)) + .map((v) => v.label) + .join(", ") + : `` + } + placeholder="Select views" + > + <> + {viewOptions.map((option) => (
{ + const _views = + value.length > 0 + ? value.includes(option.key) + ? value.filter((_o: string) => _o !== option.key) + : [...value, option.key] + : [option.key]; + + if (_views.length === 0) return; + + onChange(_views); + checkIfUpdateIsRequired(); + }} > - {value.length > 0 && value.includes(option.key) && ( - - )} +
{option.label}
+
+ {value.length > 0 && value.includes(option.key) && ( + + )} +
-
- ))} - - - )} - /> -
- -
-
Allow comments
- ( - { - onChange(val); - checkIfUpdateIsRequired(); - }} - size="sm" - /> - )} - /> -
-
-
Allow reactions
- ( - { - onChange(val); - checkIfUpdateIsRequired(); - }} - size="sm" - /> - )} - /> -
-
-
Allow voting
- ( - { - onChange(val); - checkIfUpdateIsRequired(); - }} - size="sm" - /> - )} - /> -
+ ))} + + + )} + /> +
+
+
Allow comments
+ ( + { + onChange(val); + checkIfUpdateIsRequired(); + }} + size="sm" + /> + )} + /> +
+
+
Allow reactions
+ ( + { + onChange(val); + checkIfUpdateIsRequired(); + }} + size="sm" + /> + )} + /> +
+
+
Allow voting
+ ( + { + onChange(val); + checkIfUpdateIsRequired(); + }} + size="sm" + /> + )} + /> +
- {/*
+ {/*
Allow issue proposals
= observer(() => { )} />
*/} +
-
+ )} {/* modal handlers */}
@@ -490,22 +498,24 @@ export const PublishProjectModal: React.FC = observer(() => {
Anyone with the link can access
-
- Cancel - {watch("id") ? ( - <> - {isUpdateRequired && ( - - {isSubmitting ? "Updating..." : "Update settings"} - - )} - - ) : ( - - {isSubmitting ? "Publishing..." : "Publish"} - - )} -
+ {!projectPublish.fetchSettingsLoader && ( +
+ Cancel + {watch("id") ? ( + <> + {isUpdateRequired && ( + + {isSubmitting ? "Updating..." : "Update settings"} + + )} + + ) : ( + + {isSubmitting ? "Publishing..." : "Publish"} + + )} +
+ )}
diff --git a/apps/app/components/project/publish-project/popover.tsx b/web/components/project/publish-project/popover.tsx similarity index 100% rename from apps/app/components/project/publish-project/popover.tsx rename to web/components/project/publish-project/popover.tsx diff --git a/apps/app/components/project/send-project-invitation-modal.tsx b/web/components/project/send-project-invitation-modal.tsx similarity index 100% rename from apps/app/components/project/send-project-invitation-modal.tsx rename to web/components/project/send-project-invitation-modal.tsx diff --git a/apps/app/components/project/settings-header.tsx b/web/components/project/settings-header.tsx similarity index 100% rename from apps/app/components/project/settings-header.tsx rename to web/components/project/settings-header.tsx diff --git a/apps/app/components/project/settings/single-label.tsx b/web/components/project/settings/single-label.tsx similarity index 100% rename from apps/app/components/project/settings/single-label.tsx rename to web/components/project/settings/single-label.tsx diff --git a/apps/app/components/project/sidebar-list.tsx b/web/components/project/sidebar-list.tsx similarity index 100% rename from apps/app/components/project/sidebar-list.tsx rename to web/components/project/sidebar-list.tsx diff --git a/apps/app/components/project/single-integration-card.tsx b/web/components/project/single-integration-card.tsx similarity index 100% rename from apps/app/components/project/single-integration-card.tsx rename to web/components/project/single-integration-card.tsx diff --git a/apps/app/components/project/single-project-card.tsx b/web/components/project/single-project-card.tsx similarity index 100% rename from apps/app/components/project/single-project-card.tsx rename to web/components/project/single-project-card.tsx diff --git a/apps/app/components/project/single-sidebar-project.tsx b/web/components/project/single-sidebar-project.tsx similarity index 100% rename from apps/app/components/project/single-sidebar-project.tsx rename to web/components/project/single-sidebar-project.tsx diff --git a/apps/app/components/search-listbox/index.tsx b/web/components/search-listbox/index.tsx similarity index 100% rename from apps/app/components/search-listbox/index.tsx rename to web/components/search-listbox/index.tsx diff --git a/apps/app/components/search-listbox/types.d.ts b/web/components/search-listbox/types.d.ts similarity index 100% rename from apps/app/components/search-listbox/types.d.ts rename to web/components/search-listbox/types.d.ts diff --git a/apps/app/components/states/create-state-modal.tsx b/web/components/states/create-state-modal.tsx similarity index 100% rename from apps/app/components/states/create-state-modal.tsx rename to web/components/states/create-state-modal.tsx diff --git a/apps/app/components/states/create-update-state-inline.tsx b/web/components/states/create-update-state-inline.tsx similarity index 100% rename from apps/app/components/states/create-update-state-inline.tsx rename to web/components/states/create-update-state-inline.tsx diff --git a/apps/app/components/states/delete-state-modal.tsx b/web/components/states/delete-state-modal.tsx similarity index 100% rename from apps/app/components/states/delete-state-modal.tsx rename to web/components/states/delete-state-modal.tsx diff --git a/apps/app/components/states/index.ts b/web/components/states/index.ts similarity index 100% rename from apps/app/components/states/index.ts rename to web/components/states/index.ts diff --git a/apps/app/components/states/single-state.tsx b/web/components/states/single-state.tsx similarity index 100% rename from apps/app/components/states/single-state.tsx rename to web/components/states/single-state.tsx diff --git a/apps/app/components/tiptap/bubble-menu/index.tsx b/web/components/tiptap/bubble-menu/index.tsx similarity index 91% rename from apps/app/components/tiptap/bubble-menu/index.tsx rename to web/components/tiptap/bubble-menu/index.tsx index 7e72963b671..217317ea105 100644 --- a/apps/app/components/tiptap/bubble-menu/index.tsx +++ b/web/components/tiptap/bubble-menu/index.tsx @@ -77,14 +77,16 @@ export const EditorBubbleMenu: FC = (props: any) => { {...bubbleMenuProps} className="flex w-fit divide-x divide-custom-border-300 rounded border border-custom-border-300 bg-custom-background-100 shadow-xl" > - {!props.editor.isActive("table") && { - setIsNodeSelectorOpen(!isNodeSelectorOpen); - setIsLinkSelectorOpen(false); - }} - />} + {!props.editor.isActive("table") && ( + { + setIsNodeSelectorOpen(!isNodeSelectorOpen); + setIsLinkSelectorOpen(false); + }} + /> + )} >; } - export const LinkSelector: FC = ({ editor, isOpen, setIsOpen }) => { const inputRef = useRef(null); @@ -52,7 +51,8 @@ export const LinkSelector: FC = ({ editor, isOpen, setIsOpen className="fixed top-full z-[99999] mt-1 flex w-60 overflow-hidden rounded border border-custom-border-300 bg-custom-background-100 dow-xl animate-in fade-in slide-in-from-top-1" onKeyDown={(e) => { if (e.key === "Enter") { - e.preventDefault(); onLinkSubmit(); + e.preventDefault(); + onLinkSubmit(); } }} > @@ -75,7 +75,9 @@ export const LinkSelector: FC = ({ editor, isOpen, setIsOpen ) : ( -