diff --git a/.deepsource.toml b/.deepsource.toml
index 85de1a5e8..2b40af672 100644
--- a/.deepsource.toml
+++ b/.deepsource.toml
@@ -1,5 +1,11 @@
version = 1
+exclude_patterns = [
+ "bin/**",
+ "**/node_modules/",
+ "**/*.min.js"
+]
+
[[analyzers]]
name = "shell"
diff --git a/apiserver/plane/app/serializers/user.py b/apiserver/plane/app/serializers/user.py
index 46ab3c4a4..5381995fd 100644
--- a/apiserver/plane/app/serializers/user.py
+++ b/apiserver/plane/app/serializers/user.py
@@ -159,10 +159,10 @@ class ChangePasswordSerializer(serializers.Serializer):
def validate(self, data):
if data.get("old_password") == data.get("new_password"):
- raise serializers.ValidationError("New password cannot be same as old password.")
+ raise serializers.ValidationError({"error": "New password cannot be same as old password."})
if data.get("new_password") != data.get("confirm_password"):
- raise serializers.ValidationError("confirm password should be same as the new password.")
+ raise serializers.ValidationError({"error": "Confirm password should be same as the new password."})
return data
diff --git a/apiserver/plane/app/views/auth_extended.py b/apiserver/plane/app/views/auth_extended.py
index da3130e64..37c8b3d85 100644
--- a/apiserver/plane/app/views/auth_extended.py
+++ b/apiserver/plane/app/views/auth_extended.py
@@ -133,7 +133,7 @@ class ChangePasswordEndpoint(BaseAPIView):
if serializer.is_valid():
if not user.check_password(serializer.data.get("old_password")):
return Response(
- {"old_password": ["Wrong password."]},
+ {"error": "Old password is not correct"},
status=status.HTTP_400_BAD_REQUEST,
)
# set_password also hashes the password that the user will get
diff --git a/apiserver/plane/app/views/authentication.py b/apiserver/plane/app/views/authentication.py
index 93d381117..e315ee9c6 100644
--- a/apiserver/plane/app/views/authentication.py
+++ b/apiserver/plane/app/views/authentication.py
@@ -1,4 +1,5 @@
# Python imports
+import os
import uuid
import random
import string
@@ -32,7 +33,8 @@ from plane.db.models import (
)
from plane.settings.redis import redis_instance
from plane.bgtasks.magic_link_code_task import magic_link
-
+from plane.license.models import InstanceConfiguration
+from plane.license.utils.instance_value import get_configuration_value
def get_tokens_for_user(user):
refresh = RefreshToken.for_user(user)
@@ -46,7 +48,17 @@ class SignUpEndpoint(BaseAPIView):
permission_classes = (AllowAny,)
def post(self, request):
- if not settings.ENABLE_SIGNUP:
+ instance_configuration = InstanceConfiguration.objects.values("key", "value")
+ if (
+ not get_configuration_value(
+ instance_configuration,
+ "ENABLE_SIGNUP",
+ os.environ.get("ENABLE_SIGNUP", "0"),
+ )
+ and not WorkspaceMemberInvite.objects.filter(
+ email=request.user.email
+ ).exists()
+ ):
return Response(
{
"error": "New account creation is disabled. Please contact your site administrator"
@@ -224,15 +236,9 @@ class SignInEndpoint(BaseAPIView):
},
status=status.HTTP_403_FORBIDDEN,
)
- if not user.is_active:
- return Response(
- {
- "error": "Your account has been deactivated. Please contact your site administrator."
- },
- status=status.HTTP_403_FORBIDDEN,
- )
# settings last active for the user
+ user.is_active = True
user.last_active = timezone.now()
user.last_login_time = timezone.now()
user.last_login_ip = request.META.get("REMOTE_ADDR")
@@ -360,6 +366,24 @@ class MagicSignInGenerateEndpoint(BaseAPIView):
def post(self, request):
email = request.data.get("email", False)
+ instance_configuration = InstanceConfiguration.objects.values("key", "value")
+ if (
+ not get_configuration_value(
+ instance_configuration,
+ "ENABLE_MAGIC_LINK_LOGIN",
+ os.environ.get("ENABLE_MAGIC_LINK_LOGIN"),
+ )
+ and not WorkspaceMemberInvite.objects.filter(
+ email=request.user.email
+ ).exists()
+ ):
+ return Response(
+ {
+ "error": "New account creation is disabled. Please contact your site administrator"
+ },
+ status=status.HTTP_400_BAD_REQUEST,
+ )
+
if not email:
return Response(
{"error": "Please provide a valid email address"},
@@ -443,13 +467,6 @@ class MagicSignInEndpoint(BaseAPIView):
if str(token) == str(user_token):
if User.objects.filter(email=email).exists():
user = User.objects.get(email=email)
- if not user.is_active:
- return Response(
- {
- "error": "Your account has been deactivated. Please contact your site administrator."
- },
- status=status.HTTP_403_FORBIDDEN,
- )
try:
# Send event to Jitsu for tracking
if settings.ANALYTICS_BASE_API:
@@ -506,6 +523,7 @@ class MagicSignInEndpoint(BaseAPIView):
except RequestException as e:
capture_exception(e)
+ user.is_active = True
user.last_active = timezone.now()
user.last_login_time = timezone.now()
user.last_login_ip = request.META.get("REMOTE_ADDR")
diff --git a/apiserver/plane/app/views/config.py b/apiserver/plane/app/views/config.py
index 3052b6077..a585fc82e 100644
--- a/apiserver/plane/app/views/config.py
+++ b/apiserver/plane/app/views/config.py
@@ -45,23 +45,23 @@ class ConfigurationEndpoint(BaseAPIView):
get_configuration_value(
instance_configuration,
"EMAIL_HOST_USER",
- os.environ.get("GITHUB_APP_NAME", None),
+ os.environ.get("EMAIL_HOST_USER", None),
),
)
and bool(
get_configuration_value(
instance_configuration,
"EMAIL_HOST_PASSWORD",
- os.environ.get("GITHUB_APP_NAME", None),
+ os.environ.get("EMAIL_HOST_PASSWORD", None),
)
)
) and get_configuration_value(
- instance_configuration, "ENABLE_MAGIC_LINK_LOGIN", "0"
+ instance_configuration, "ENABLE_MAGIC_LINK_LOGIN", "1"
) == "1"
data["email_password_login"] = (
get_configuration_value(
- instance_configuration, "ENABLE_EMAIL_PASSWORD", "0"
+ instance_configuration, "ENABLE_EMAIL_PASSWORD", "1"
)
== "1"
)
diff --git a/apiserver/plane/app/views/issue.py b/apiserver/plane/app/views/issue.py
index e7605bf14..722b89f66 100644
--- a/apiserver/plane/app/views/issue.py
+++ b/apiserver/plane/app/views/issue.py
@@ -371,6 +371,7 @@ class IssueListGroupedEndpoint(BaseAPIView):
issue_queryset = (
Issue.objects.filter(workspace__slug=slug, project_id=project_id)
+ .filter(~Q(state="Triage"))
.select_related("project")
.select_related("workspace")
.select_related("state")
diff --git a/apiserver/plane/app/views/oauth.py b/apiserver/plane/app/views/oauth.py
index 31b28415a..514d90050 100644
--- a/apiserver/plane/app/views/oauth.py
+++ b/apiserver/plane/app/views/oauth.py
@@ -30,6 +30,8 @@ from plane.db.models import (
ProjectMember,
)
from .base import BaseAPIView
+from plane.license.models import InstanceConfiguration
+from plane.license.utils.instance_value import get_configuration_value
def get_tokens_for_user(user):
@@ -137,6 +139,30 @@ class OauthEndpoint(BaseAPIView):
id_token = request.data.get("credential", False)
client_id = request.data.get("clientId", False)
+ instance_configuration = InstanceConfiguration.objects.values(
+ "key", "value"
+ )
+ if (
+ not get_configuration_value(
+ instance_configuration,
+ "GOOGLE_CLIENT_ID",
+ os.environ.get("GOOGLE_CLIENT_ID"),
+ )
+ or not get_configuration_value(
+ instance_configuration,
+ "GITHUB_CLIENT_ID",
+ os.environ.get("GITHUB_CLIENT_ID"),
+ )
+ ) and not WorkspaceMemberInvite.objects.filter(
+ email=request.user.email
+ ).exists():
+ return Response(
+ {
+ "error": "New account creation is disabled. Please contact your site administrator"
+ },
+ status=status.HTTP_400_BAD_REQUEST,
+ )
+
if not medium or not id_token:
return Response(
{
@@ -174,15 +200,7 @@ class OauthEndpoint(BaseAPIView):
status=status.HTTP_400_BAD_REQUEST,
)
- ## Login Case
- if not user.is_active:
- return Response(
- {
- "error": "Your account has been deactivated. Please contact your site administrator."
- },
- status=status.HTTP_403_FORBIDDEN,
- )
-
+ user.is_active = True
user.last_active = timezone.now()
user.last_login_time = timezone.now()
user.last_login_ip = request.META.get("REMOTE_ADDR")
@@ -239,7 +257,8 @@ class OauthEndpoint(BaseAPIView):
else 15,
member=user,
created_by_id=project_member_invite.created_by_id,
- ) for project_member_invite in project_member_invites
+ )
+ for project_member_invite in project_member_invites
],
ignore_conflicts=True,
)
@@ -373,7 +392,8 @@ class OauthEndpoint(BaseAPIView):
else 15,
member=user,
created_by_id=project_member_invite.created_by_id,
- ) for project_member_invite in project_member_invites
+ )
+ for project_member_invite in project_member_invites
],
ignore_conflicts=True,
)
@@ -420,4 +440,4 @@ class OauthEndpoint(BaseAPIView):
"access_token": access_token,
"refresh_token": refresh_token,
}
- return Response(data, status=status.HTTP_201_CREATED)
\ No newline at end of file
+ return Response(data, status=status.HTTP_201_CREATED)
diff --git a/packages/editor/document-editor/package.json b/packages/editor/document-editor/package.json
index 5f82a35f7..0016d5261 100644
--- a/packages/editor/document-editor/package.json
+++ b/packages/editor/document-editor/package.json
@@ -1,6 +1,6 @@
{
"name": "@plane/document-editor",
- "version": "0.0.1",
+ "version": "0.1.0",
"description": "Package that powers Plane's Pages Editor",
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
diff --git a/packages/editor/document-editor/src/ui/components/heading-component.tsx b/packages/editor/document-editor/src/ui/components/heading-component.tsx
index 629d3b427..2a71beebf 100644
--- a/packages/editor/document-editor/src/ui/components/heading-component.tsx
+++ b/packages/editor/document-editor/src/ui/components/heading-component.tsx
@@ -8,6 +8,7 @@ export const HeadingComp = ({
{heading}
@@ -23,6 +24,7 @@ export const SubheadingComp = ({
{subHeading}
diff --git a/packages/editor/document-editor/src/ui/components/page-renderer.tsx b/packages/editor/document-editor/src/ui/components/page-renderer.tsx
index 194152dd3..cff043171 100644
--- a/packages/editor/document-editor/src/ui/components/page-renderer.tsx
+++ b/packages/editor/document-editor/src/ui/components/page-renderer.tsx
@@ -18,7 +18,7 @@ export const PageRenderer = (props: IPageRenderer) => {
} = props;
return (
-
+
{documentDetails.title}
diff --git a/packages/editor/document-editor/src/ui/components/summary-popover.tsx b/packages/editor/document-editor/src/ui/components/summary-popover.tsx
index 7c85ed945..46b99d048 100644
--- a/packages/editor/document-editor/src/ui/components/summary-popover.tsx
+++ b/packages/editor/document-editor/src/ui/components/summary-popover.tsx
@@ -44,7 +44,7 @@ export const SummaryPopover: React.FC
= (props) => {
{!sidePeekVisible && (
-
-
+
+
-
-
+
+
{
{/* name */}
-
+
{issue.name}
diff --git a/space/helpers/common.helper.ts b/space/helpers/common.helper.ts
index 758d7c370..7c3d14157 100644
--- a/space/helpers/common.helper.ts
+++ b/space/helpers/common.helper.ts
@@ -1 +1,6 @@
-export const API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL ? process.env.NEXT_PUBLIC_API_BASE_URL : "";
+import { clsx, type ClassValue } from "clsx";
+import { twMerge } from "tailwind-merge";
+
+export const API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL ?? "";
+
+export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
\ No newline at end of file
diff --git a/space/package.json b/space/package.json
index 5f3f60dc9..ddab959ab 100644
--- a/space/package.json
+++ b/space/package.json
@@ -17,9 +17,10 @@
"@emotion/styled": "^11.11.0",
"@headlessui/react": "^1.7.13",
"@mui/material": "^5.14.1",
- "@plane/ui": "*",
"@plane/lite-text-editor": "*",
"@plane/rich-text-editor": "*",
+ "@plane/ui": "*",
+ "@plane/document-editor": "*",
"axios": "^1.3.4",
"clsx": "^2.0.0",
"js-cookie": "^3.0.1",
@@ -35,7 +36,7 @@
"react-dom": "^18.2.0",
"react-hook-form": "^7.38.0",
"swr": "^2.2.2",
- "tailwind-merge": "^1.14.0",
+ "tailwind-merge": "^2.0.0",
"typescript": "4.9.5",
"uuid": "^9.0.0"
},
@@ -43,7 +44,7 @@
"@types/js-cookie": "^3.0.3",
"@types/node": "18.14.1",
"@types/nprogress": "^0.2.0",
- "@types/react": "18.0.28",
+ "@types/react": "18.2.35",
"@types/react-dom": "18.0.11",
"@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^5.48.2",
diff --git a/web/components/api-token/ApiTokenForm/ApiTokenDescription.tsx b/web/components/api-token/ApiTokenForm/ApiTokenDescription.tsx
deleted file mode 100644
index d17e4662e..000000000
--- a/web/components/api-token/ApiTokenForm/ApiTokenDescription.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import { TextArea } from "@plane/ui";
-import { Control, Controller, FieldErrors } from "react-hook-form";
-import { IApiToken } from "types/api_token";
-import { IApiFormFields } from "./types";
-import { Dispatch, SetStateAction } from "react";
-
-interface IApiTokenDescription {
- generatedToken: IApiToken | null | undefined;
- control: Control;
- focusDescription: boolean;
- setFocusTitle: Dispatch>;
- setFocusDescription: Dispatch>;
-}
-
-export const ApiTokenDescription = ({
- generatedToken,
- control,
- focusDescription,
- setFocusTitle,
- setFocusDescription,
-}: IApiTokenDescription) => (
-
- focusDescription ? (
-
-
+
diff --git a/web/components/onboarding/workspace.tsx b/web/components/onboarding/workspace.tsx
index 7dc10cf30..cb126adfd 100644
--- a/web/components/onboarding/workspace.tsx
+++ b/web/components/onboarding/workspace.tsx
@@ -51,7 +51,7 @@ export const Workspace: React.FC
= (props) => {
await workspaceStore
.createWorkspace(formData)
- .then(async (res) => {
+ .then(async () => {
setToastAlert({
type: "success",
title: "Success!",
@@ -137,13 +137,12 @@ export const Workspace: React.FC = (props) => {
(
+ render={({ field: { value, ref } }) => (
{
const host = window.location.host;
diff --git a/web/components/project/empty-state.tsx b/web/components/project/empty-state.tsx
index 359cb31da..2b6401892 100644
--- a/web/components/project/empty-state.tsx
+++ b/web/components/project/empty-state.tsx
@@ -26,7 +26,7 @@ export const EmptyState: React.FC
= ({
secondaryButton,
disabled = false,
}) => (
-
+
diff --git a/web/components/project/member-list.tsx b/web/components/project/member-list.tsx
index 8be0f10a9..5a9b2f78c 100644
--- a/web/components/project/member-list.tsx
+++ b/web/components/project/member-list.tsx
@@ -52,7 +52,7 @@ export const ProjectMemberList: React.FC = observer(() => {
className="max-w-[234px] w-full border-none bg-transparent text-sm focus:outline-none"
placeholder="Search"
value={searchQuery}
- autoFocus={true}
+ autoFocus
onChange={(e) => setSearchQuery(e.target.value)}
/>
diff --git a/web/components/project/sidebar-list-item.tsx b/web/components/project/sidebar-list-item.tsx
index 48c9d0b9e..68b2787ae 100644
--- a/web/components/project/sidebar-list-item.tsx
+++ b/web/components/project/sidebar-list-item.tsx
@@ -184,7 +184,7 @@ export const ProjectSidebarListItem: React.FC
= observer((props) => {
)}
- {!isCollapsed && {project.name}
}
+ {!isCollapsed && {project.name}
}
{!isCollapsed && (
= ({ title, description, Icon, action }) => (
<>
-
+
diff --git a/web/components/web-hooks/delete-webhook-modal.tsx b/web/components/web-hooks/delete-webhook-modal.tsx
index f00a4d066..650da7c89 100644
--- a/web/components/web-hooks/delete-webhook-modal.tsx
+++ b/web/components/web-hooks/delete-webhook-modal.tsx
@@ -1,11 +1,13 @@
+import React, { FC, useState } from "react";
+import { useRouter } from "next/router";
import { Dialog, Transition } from "@headlessui/react";
+// icons
+import { AlertTriangle } from "lucide-react";
+// ui
import { Button } from "@plane/ui";
+// hooks
import useToast from "hooks/use-toast";
import { useMobxStore } from "lib/mobx/store-provider";
-import { AlertTriangle } from "lucide-react";
-import { useRouter } from "next/router";
-import React, { FC, useState } from "react";
-import { useForm } from "react-hook-form";
interface IDeleteWebhook {
isOpen: boolean;
diff --git a/web/components/web-hooks/form/index.tsx b/web/components/web-hooks/form/index.tsx
index 090f5e717..8b6e1a7dc 100644
--- a/web/components/web-hooks/form/index.tsx
+++ b/web/components/web-hooks/form/index.tsx
@@ -72,6 +72,7 @@ export const WebHookForm: FC = observer((props) => {
}
reset({ ...getValues(), ...allWebhookOptions });
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [watch && watch(WEBHOOK_EVENTS)]);
return (
diff --git a/web/components/workspace/settings/workspace-details.tsx b/web/components/workspace/settings/workspace-details.tsx
index e4a2bbac6..ee77c79ce 100644
--- a/web/components/workspace/settings/workspace-details.tsx
+++ b/web/components/workspace/settings/workspace-details.tsx
@@ -68,17 +68,13 @@ export const WorkspaceDetails: FC = observer(() => {
await updateWorkspace(currentWorkspace.slug, payload)
.then((res) => {
- trackEvent(
- 'UPDATE_WORKSPACE',
- res
- )
+ trackEvent("UPDATE_WORKSPACE", res);
setToastAlert({
title: "Success",
type: "success",
message: "Workspace updated successfully",
- })
- }
- )
+ });
+ })
.catch((err) => console.error(err));
};
@@ -89,7 +85,7 @@ export const WorkspaceDetails: FC = observer(() => {
fileService.deleteFile(currentWorkspace.id, url).then(() => {
updateWorkspace(currentWorkspace.slug, { logo: "" })
- .then((res) => {
+ .then(() => {
setToastAlert({
type: "success",
title: "Success!",
diff --git a/web/helpers/common.helper.ts b/web/helpers/common.helper.ts
index ed199fed4..9999b3274 100644
--- a/web/helpers/common.helper.ts
+++ b/web/helpers/common.helper.ts
@@ -1,3 +1,6 @@
+import { clsx, type ClassValue } from "clsx";
+import { twMerge } from "tailwind-merge";
+
export const debounce = (func: any, wait: number, immediate: boolean = false) => {
let timeout: any;
@@ -18,3 +21,5 @@ export const debounce = (func: any, wait: number, immediate: boolean = false) =>
};
export const API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL ? process.env.NEXT_PUBLIC_API_BASE_URL : "";
+
+export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
diff --git a/web/package.json b/web/package.json
index beca40f32..23ed714ea 100644
--- a/web/package.json
+++ b/web/package.json
@@ -24,12 +24,14 @@
"@nivo/scatterplot": "0.80.0",
"@plane/lite-text-editor": "*",
"@plane/rich-text-editor": "*",
+ "@plane/document-editor": "*",
"@plane/ui": "*",
"@popperjs/core": "^2.11.8",
"@sentry/nextjs": "^7.36.0",
"@types/lodash.debounce": "^4.0.7",
"@types/react-datepicker": "^4.8.0",
"axios": "^1.1.3",
+ "clsx": "^2.0.0",
"cmdk": "^0.2.0",
"date-fns": "^2.30.0",
"dotenv": "^16.0.3",
@@ -54,6 +56,7 @@
"react-popper": "^2.3.0",
"sharp": "^0.32.1",
"swr": "^2.1.3",
+ "tailwind-merge": "^2.0.0",
"uuid": "^9.0.0"
},
"devDependencies": {
diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx b/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx
index 778b0d94f..5bcc31991 100644
--- a/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx
+++ b/web/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx
@@ -15,7 +15,7 @@ import { PageDetailsHeader } from "components/headers/page-details";
import { EmptyState } from "components/common";
// ui
import { DocumentEditorWithRef, DocumentReadOnlyEditorWithRef } from "@plane/document-editor";
-import { Loader } from "@plane/ui";
+import { Spinner } from "@plane/ui";
// assets
import emptyPage from "public/empty-state/page.svg";
// helpers
@@ -179,19 +179,22 @@ const PageDetailsPage: NextPageWithLayout = () => {
handleSubmit(updatePage)().finally(() => setIsSubmitting("submitted"));
}, 1500);
+ if (error)
+ return (
+ router.push(`/${workspaceSlug}/projects/${projectId}/pages`),
+ }}
+ />
+ );
+
return (
<>
- {error ? (
- router.push(`/${workspaceSlug}/projects/${projectId}/pages`),
- }}
- />
- ) : pageDetails ? (
+ {pageDetails ? (
{pageDetails.is_locked || pageDetails.archived_at ? (
@@ -200,7 +203,7 @@ const PageDetailsPage: NextPageWithLayout = () => {
value={pageDetails.description_html}
customClassName={"tracking-tight self-center w-full max-w-full px-0"}
borderOnFocus={false}
- noBorder={true}
+ noBorder
documentDetails={{
title: pageDetails.name,
created_by: pageDetails.created_by,
@@ -267,9 +270,9 @@ const PageDetailsPage: NextPageWithLayout = () => {
) : (
-
-
-
+
+
+
)}
>
);
diff --git a/web/pages/[workspaceSlug]/settings/api-tokens/[tokenId].tsx b/web/pages/[workspaceSlug]/settings/api-tokens/[tokenId].tsx
index 094b42ed1..4ae38c443 100644
--- a/web/pages/[workspaceSlug]/settings/api-tokens/[tokenId].tsx
+++ b/web/pages/[workspaceSlug]/settings/api-tokens/[tokenId].tsx
@@ -1,20 +1,18 @@
-// react
import { useState } from "react";
-// next
import { NextPage } from "next";
import { useRouter } from "next/router";
// layouts
import { AppLayout } from "layouts/app-layout";
import { WorkspaceSettingLayout } from "layouts/settings-layout";
// components
-import DeleteTokenModal from "components/api-token/delete-token-modal";
+import { DeleteTokenModal } from "components/api-token";
import { WorkspaceSettingHeader } from "components/headers";
// ui
import { Spinner } from "@plane/ui";
// mobx
import { useMobxStore } from "lib/mobx/store-provider";
// services
-import { ApiTokenService } from "services/api_token.service";
+import { APITokenService } from "services/api_token.service";
// helpers
import { renderDateFormat } from "helpers/date-time.helper";
// constants
@@ -22,8 +20,9 @@ import { API_TOKEN_DETAILS } from "constants/fetch-keys";
// swr
import useSWR from "swr";
-const apiTokenService = new ApiTokenService();
-const ApiTokenDetail: NextPage = () => {
+const apiTokenService = new APITokenService();
+
+const APITokenDetail: NextPage = () => {
const { theme: themStore } = useMobxStore();
const [deleteTokenModal, setDeleteTokenModal] = useState(false);
const router = useRouter();
@@ -67,4 +66,4 @@ const ApiTokenDetail: NextPage = () => {
);
};
-export default ApiTokenDetail;
+export default APITokenDetail;
diff --git a/web/pages/[workspaceSlug]/settings/api-tokens/create.tsx b/web/pages/[workspaceSlug]/settings/api-tokens/create.tsx
index 9d36b20df..eeb711870 100644
--- a/web/pages/[workspaceSlug]/settings/api-tokens/create.tsx
+++ b/web/pages/[workspaceSlug]/settings/api-tokens/create.tsx
@@ -1,7 +1,4 @@
-// react
import { useState } from "react";
-// next
-
import { NextPage } from "next";
// layouts
import { AppLayout } from "layouts/app-layout/layout";
@@ -12,8 +9,7 @@ import { IApiToken } from "types/api_token";
import { observer } from "mobx-react-lite";
// components
import { WorkspaceSettingHeader } from "components/headers";
-import DeleteTokenModal from "components/api-token/delete-token-modal";
-import { ApiTokenForm } from "components/api-token/ApiTokenForm";
+import { APITokenForm, DeleteTokenModal } from "components/api-token";
const CreateApiToken: NextPage = () => {
const [generatedToken, setGeneratedToken] = useState();
@@ -27,7 +23,7 @@ const CreateApiToken: NextPage = () => {
handleClose={() => setDeleteTokenModal(false)}
tokenId={generatedToken?.id}
/>
- {
const router = useRouter();
const { workspaceSlug } = router.query;
@@ -47,13 +44,13 @@ const Api: NextPage = () => {
{tokens?.map((token) => (
-
+
))}
) : (
)
) : (
diff --git a/web/pages/[workspaceSlug]/settings/members.tsx b/web/pages/[workspaceSlug]/settings/members.tsx
index 56a9baab3..8f779c0f1 100644
--- a/web/pages/[workspaceSlug]/settings/members.tsx
+++ b/web/pages/[workspaceSlug]/settings/members.tsx
@@ -74,8 +74,8 @@ const WorkspaceMembersSettingsPage: NextPageWithLayout = observer(() => {
className="max-w-[234px] w-full border-none bg-transparent text-sm outline-none placeholder:text-custom-text-400"
placeholder="Search..."
value={searchQuery}
- onChange={(e) => setSearchQuery(e.target.value)}
autoFocus
+ onChange={(e) => setSearchQuery(e.target.value)}
/>
)}
diff --git a/web/services/api_token.service.ts b/web/services/api_token.service.ts
index 60a345d8e..ae1d62218 100644
--- a/web/services/api_token.service.ts
+++ b/web/services/api_token.service.ts
@@ -2,7 +2,7 @@ import { API_BASE_URL } from "helpers/common.helper";
import { APIService } from "./api.service";
import { IApiToken } from "types/api_token";
-export class ApiTokenService extends APIService {
+export class APITokenService extends APIService {
constructor() {
super(API_BASE_URL);
}
diff --git a/web/store/issues/project-issues/archived/issue.store.ts b/web/store/issues/project-issues/archived/issue.store.ts
index 06bd601b1..837a1e74d 100644
--- a/web/store/issues/project-issues/archived/issue.store.ts
+++ b/web/store/issues/project-issues/archived/issue.store.ts
@@ -101,7 +101,7 @@ export class ProjectArchivedIssuesStore extends IssueBaseStore implements IProje
return response;
} catch (error) {
- this.fetchIssues(workspaceSlug, projectId);
+ // this.fetchIssues(workspaceSlug, projectId);
this.loader = undefined;
throw error;
}
diff --git a/web/store/page.store.ts b/web/store/page.store.ts
index c86cd3814..5fdd04f3f 100644
--- a/web/store/page.store.ts
+++ b/web/store/page.store.ts
@@ -102,14 +102,14 @@ export class PageStore implements IPageStore {
const data: IRecentPages = { today: [], yesterday: [], this_week: [], older: [] };
- data["today"] = this.pages[projectId]?.filter((p) => isToday(new Date(p.created_at))) || [];
- data["yesterday"] = this.pages[projectId]?.filter((p) => isYesterday(new Date(p.created_at))) || [];
- data["this_week"] =
+ data.today = this.pages[projectId]?.filter((p) => isToday(new Date(p.created_at))) || [];
+ data.yesterday = this.pages[projectId]?.filter((p) => isYesterday(new Date(p.created_at))) || [];
+ data.this_week =
this.pages[projectId]?.filter(
(p) =>
isThisWeek(new Date(p.created_at)) && !isToday(new Date(p.created_at)) && !isYesterday(new Date(p.created_at))
) || [];
- data["older"] =
+ data.older =
this.pages[projectId]?.filter(
(p) => !isThisWeek(new Date(p.created_at)) && !isYesterday(new Date(p.created_at))
) || [];
diff --git a/yarn.lock b/yarn.lock
index d54b04b63..285df96a9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -926,6 +926,13 @@
dependencies:
regenerator-runtime "^0.14.0"
+"@babel/runtime@^7.23.1":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.4.tgz#36fa1d2b36db873d25ec631dcc4923fdc1cf2e2e"
+ integrity sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg==
+ dependencies:
+ regenerator-runtime "^0.14.0"
+
"@babel/template@^7.22.15", "@babel/template@^7.22.5":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
@@ -2804,7 +2811,7 @@
dependencies:
"@types/react" "*"
-"@types/react@*", "@types/react@18.0.28", "@types/react@18.2.0", "@types/react@^18.2.35", "@types/react@^18.2.37", "@types/react@^18.2.5":
+"@types/react@*", "@types/react@18.2.0", "@types/react@18.2.35", "@types/react@^18.2.35", "@types/react@^18.2.37", "@types/react@^18.2.5":
version "18.2.0"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.0.tgz#15cda145354accfc09a18d2f2305f9fc099ada21"
integrity sha512-0FLj93y5USLHdnhIhABk83rm8XEGA7kH3cr+YUlvxoUGp1xNt/DINUMvqPxLyOQMzLmZe8i4RTHbvb8MC7NmrA==
@@ -8171,6 +8178,13 @@ tailwind-merge@^1.14.0:
resolved "https://registry.yarnpkg.com/tailwind-merge/-/tailwind-merge-1.14.0.tgz#e677f55d864edc6794562c63f5001f45093cdb8b"
integrity sha512-3mFKyCo/MBcgyOTlrY8T7odzZFx+w+qKSMAmdFzRvqBfLlSigU6TZnlFHK0lkMwj9Bj8OYU+9yW9lmGuS0QEnQ==
+tailwind-merge@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/tailwind-merge/-/tailwind-merge-2.0.0.tgz#a0f3a8c874ebae5feec5595614d08245a5f88a39"
+ integrity sha512-WO8qghn9yhsldLSg80au+3/gY9E4hFxIvQ3qOmlpXnqpDKoMruKfi/56BbbMg6fHTQJ9QD3cc79PoWqlaQE4rw==
+ dependencies:
+ "@babel/runtime" "^7.23.1"
+
tailwindcss-animate@^1.0.6:
version "1.0.7"
resolved "https://registry.yarnpkg.com/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz#318b692c4c42676cc9e67b19b78775742388bef4"