diff --git a/.github/workflows/copyright-check.yml b/.github/workflows/copyright-check.yml new file mode 100644 index 0000000000..1e20ed2eeb --- /dev/null +++ b/.github/workflows/copyright-check.yml @@ -0,0 +1,45 @@ +name: Copy Right Check + +on: + workflow_dispatch: + pull_request: + branches: + - "preview" + types: + - "opened" + - "synchronize" + - "ready_for_review" + - "review_requested" + - "reopened" + +jobs: + license-check: + name: Copy Right Check + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.22" + + - name: Install addlicense + run: | + go install github.com/google/addlicense@latest + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + + - name: Check Copyright For Python Files + run: | + set -e + echo "Running copyright check..." + addlicense -check -f COPYRIGHT.txt -ignore "**/migrations/**" $(git ls-files '*.py') + echo "Copyright check passed." + + - name: Check Copyright For TypeScript Files + run: | + set -e + echo "Running copyright check..." + addlicense -check -f COPYRIGHT.txt -ignore "**/*.config.ts" -ignore "**/*.d.ts" $(git ls-files '*.ts' '*.tsx') + echo "Copyright check passed." diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt new file mode 100644 index 0000000000..2a6fd91ff3 --- /dev/null +++ b/COPYRIGHT.txt @@ -0,0 +1,3 @@ +Copyright (c) 2023-present Plane Software, Inc. and contributors +SPDX-License-Identifier: AGPL-3.0-only +See the LICENSE file for details. \ No newline at end of file diff --git a/COPYRIGHT_CHECK.md b/COPYRIGHT_CHECK.md new file mode 100644 index 0000000000..a72b11a240 --- /dev/null +++ b/COPYRIGHT_CHECK.md @@ -0,0 +1,34 @@ +## Copyright check + +To verify that all tracked Python files contain the correct copyright header for **Plane Software Inc.** for the year **2023**, run this command from the repository root: + +```bash +addlicense --check -f COPYRIGHT.txt -ignore "**/migrations/**" $(git ls-files '*.py') +``` + +#### To Apply Changes + +python files + +```bash +addlicense -v -f COPYRIGHT.txt -ignore "**/migrations/**" $(git ls-files '*.py') +``` + +ts and tsx files in a specific app + +```bash +addlicense -v -f COPYRIGHT.txt \ + -ignore "**/*.config.ts" \ + -ignore "**/*.d.ts" \ + $(git ls-files 'packages/*.ts') +``` + +Note: Please make sure ts command is running on specific folder, running it for the whole mono repo is crashing os processes. + +#### Other Options + +- **`addlicense -check`**: runs in check-only mode and fails if any file is missing or has an incorrect header. +- **`-c "Plane Software Inc."`**: sets the copyright holder. +- **`-f LICENSE.txt`**: uses the contents and format defined in `LICENSE.txt` as the header template. +- **`-y 2023`**: sets the year in the header. +- **`$(git ls-files '*.py')`**: restricts the check to Python files tracked in git. diff --git a/apps/admin/app/(all)/(dashboard)/ai/form.tsx b/apps/admin/app/(all)/(dashboard)/ai/form.tsx index 69456d8b61..f1fb49261e 100644 --- a/apps/admin/app/(all)/(dashboard)/ai/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/ai/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useForm } from "react-hook-form"; import { Lightbulb } from "lucide-react"; import { Button } from "@plane/propel/button"; diff --git a/apps/admin/app/(all)/(dashboard)/ai/page.tsx b/apps/admin/app/(all)/(dashboard)/ai/page.tsx index bf290ef361..c0281300ca 100644 --- a/apps/admin/app/(all)/(dashboard)/ai/page.tsx +++ b/apps/admin/app/(all)/(dashboard)/ai/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import useSWR from "swr"; import { Loader } from "@plane/ui"; diff --git a/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx index c2e637e279..5e137ee457 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/gitea/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { isEmpty } from "lodash-es"; import Link from "next/link"; diff --git a/apps/admin/app/(all)/(dashboard)/authentication/gitea/page.tsx b/apps/admin/app/(all)/(dashboard)/authentication/gitea/page.tsx index f0f7e23338..fe8eae4c65 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/gitea/page.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/gitea/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; diff --git a/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx index c1aef0f6cc..166fc44d23 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/github/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { isEmpty } from "lodash-es"; import Link from "next/link"; diff --git a/apps/admin/app/(all)/(dashboard)/authentication/github/page.tsx b/apps/admin/app/(all)/(dashboard)/authentication/github/page.tsx index 1186332d37..a7a29cf9d8 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/github/page.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/github/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useTheme } from "next-themes"; diff --git a/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx index 4511a70c91..6f0a4f460b 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/gitlab/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { isEmpty } from "lodash-es"; import Link from "next/link"; diff --git a/apps/admin/app/(all)/(dashboard)/authentication/gitlab/page.tsx b/apps/admin/app/(all)/(dashboard)/authentication/gitlab/page.tsx index 0f3fd76a65..5bcaef7268 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/gitlab/page.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/gitlab/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; diff --git a/apps/admin/app/(all)/(dashboard)/authentication/google/form.tsx b/apps/admin/app/(all)/(dashboard)/authentication/google/form.tsx index e068a1d07b..f1310ae4fa 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/google/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/google/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { isEmpty } from "lodash-es"; import Link from "next/link"; diff --git a/apps/admin/app/(all)/(dashboard)/authentication/google/page.tsx b/apps/admin/app/(all)/(dashboard)/authentication/google/page.tsx index bf2a18d5a8..93a61497d2 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/google/page.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/google/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; diff --git a/apps/admin/app/(all)/(dashboard)/authentication/page.tsx b/apps/admin/app/(all)/(dashboard)/authentication/page.tsx index 10adc31297..65d1f0b79e 100644 --- a/apps/admin/app/(all)/(dashboard)/authentication/page.tsx +++ b/apps/admin/app/(all)/(dashboard)/authentication/page.tsx @@ -1,16 +1,24 @@ -import { useState } from "react"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { useCallback, useRef, useState } from "react"; import { observer } from "mobx-react"; import { useTheme } from "next-themes"; import useSWR from "swr"; // plane internal packages -import { setPromiseToast } from "@plane/propel/toast"; -import type { TInstanceConfigurationKeys } from "@plane/types"; +import { setPromiseToast, setToast, TOAST_TYPE } from "@plane/propel/toast"; +import type { TInstanceConfigurationKeys, TInstanceAuthenticationModes } from "@plane/types"; import { Loader, ToggleSwitch } from "@plane/ui"; import { cn, resolveGeneralTheme } from "@plane/utils"; // components import { PageWrapper } from "@/components/common/page-wrapper"; -// hooks import { AuthenticationMethodCard } from "@/components/authentication/authentication-method-card"; +// helpers +import { canDisableAuthMethod } from "@/helpers/authentication"; +// hooks import { useAuthenticationModes } from "@/hooks/oauth"; import { useInstance } from "@/hooks/store"; // types @@ -19,48 +27,87 @@ import type { Route } from "./+types/page"; const InstanceAuthenticationPage = observer(function InstanceAuthenticationPage(_props: Route.ComponentProps) { // theme const { resolvedTheme: resolvedThemeAdmin } = useTheme(); - // store - const { fetchInstanceConfigurations, formattedConfig, updateInstanceConfigurations } = useInstance(); + const resolvedTheme = resolveGeneralTheme(resolvedThemeAdmin); + // Ref to store authentication modes for validation (avoids circular dependency) + const authenticationModesRef = useRef([]); // state const [isSubmitting, setIsSubmitting] = useState(false); + // store hooks + const { fetchInstanceConfigurations, formattedConfig, updateInstanceConfigurations } = useInstance(); // derived values const enableSignUpConfig = formattedConfig?.ENABLE_SIGNUP ?? ""; - const resolvedTheme = resolveGeneralTheme(resolvedThemeAdmin); useSWR("INSTANCE_CONFIGURATIONS", () => fetchInstanceConfigurations()); - const updateConfig = async (key: TInstanceConfigurationKeys, value: string) => { - setIsSubmitting(true); + // Create updateConfig with validation - uses authenticationModesRef for current modes + const updateConfig = useCallback( + (key: TInstanceConfigurationKeys, value: string): void => { + // Check if trying to disable (value === "0") + if (value === "0") { + // Check if this key is an authentication method key + const currentAuthModes = authenticationModesRef.current; + const isAuthMethodKey = currentAuthModes.some((method) => method.enabledConfigKey === key); - const payload = { - [key]: value, - }; + // Only validate if this is an authentication method key + if (isAuthMethodKey) { + const canDisable = canDisableAuthMethod(key, currentAuthModes, formattedConfig); - const updateConfigPromise = updateInstanceConfigurations(payload); + if (!canDisable) { + setToast({ + type: TOAST_TYPE.ERROR, + title: "Cannot disable authentication", + message: + "At least one authentication method must remain enabled. Please enable another method before disabling this one.", + }); + return; + } + } + } - setPromiseToast(updateConfigPromise, { - loading: "Saving configuration", - success: { - title: "Success", - message: () => "Configuration saved successfully", - }, - error: { - title: "Error", - message: () => "Failed to save configuration", - }, - }); + // Proceed with the update + setIsSubmitting(true); - await updateConfigPromise - .then(() => { - setIsSubmitting(false); - }) - .catch((err) => { - console.error(err); - setIsSubmitting(false); + const payload = { + [key]: value, + }; + + const updateConfigPromise = updateInstanceConfigurations(payload); + + setPromiseToast(updateConfigPromise, { + loading: "Saving configuration", + success: { + title: "Success", + message: () => "Configuration saved successfully", + }, + error: { + title: "Error", + message: () => "Failed to save configuration", + }, }); - }; - const authenticationModes = useAuthenticationModes({ disabled: isSubmitting, updateConfig, resolvedTheme }); + void updateConfigPromise + .then(() => { + setIsSubmitting(false); + return undefined; + }) + .catch((err) => { + console.error(err); + setIsSubmitting(false); + }); + }, + [formattedConfig, updateInstanceConfigurations] + ); + + // Get authentication modes - this will use updateConfig which includes validation + const authenticationModes = useAuthenticationModes({ + disabled: isSubmitting, + updateConfig, + resolvedTheme, + }); + + // Update ref with latest authentication modes + authenticationModesRef.current = authenticationModes; + return ( - /^[\w\s-]*$/.test(value) || - `Workspaces names can contain only (" "), ( - ), ( _ ) and alphanumeric characters.`, - maxLength: { - value: 80, - message: "Limit your name to 80 characters.", - }, + validate: (value) => validateWorkspaceName(value, true), }} render={({ field: { value, ref, onChange } }) => ( validateSlug(value), }} render={({ field: { onChange, value, ref } }) => ( TInstanceAuthenticationModes[] = ({ - disabled, - updateConfig, - resolvedTheme, -}) => [ - { - key: "unique-codes", - name: "Unique codes", - description: - "Log in or sign up for Plane using codes sent via email. You need to have set up SMTP to use this method.", - icon: , - config: , - }, - { - key: "passwords-login", - name: "Passwords", - description: "Allow members to create accounts with passwords and use it with their email addresses to sign in.", - icon: , - config: , - }, - { - key: "google", - name: "Google", - description: "Allow members to log in or sign up for Plane with their Google accounts.", - icon: Google Logo, - config: , - }, - { - key: "github", - name: "GitHub", - description: "Allow members to log in or sign up for Plane with their GitHub accounts.", - icon: ( - GitHub Logo - ), - config: , - }, - { - key: "gitlab", - name: "GitLab", - description: "Allow members to log in or sign up to plane with their GitLab accounts.", - icon: GitLab Logo, - config: , - }, -]; diff --git a/apps/admin/app/(all)/(home)/layout.tsx b/apps/admin/app/(all)/(home)/layout.tsx index 26c0e2b26e..47eeca42dc 100644 --- a/apps/admin/app/(all)/(home)/layout.tsx +++ b/apps/admin/app/(all)/(home)/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { observer } from "mobx-react"; import { useRouter } from "next/navigation"; diff --git a/apps/admin/app/(all)/(home)/page.tsx b/apps/admin/app/(all)/(home)/page.tsx index 12f701c462..014e880952 100644 --- a/apps/admin/app/(all)/(home)/page.tsx +++ b/apps/admin/app/(all)/(home)/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components import { LogoSpinner } from "@/components/common/logo-spinner"; diff --git a/apps/admin/app/(all)/(home)/sign-in-form.tsx b/apps/admin/app/(all)/(home)/sign-in-form.tsx index cd40a4c77e..e850d190e0 100644 --- a/apps/admin/app/(all)/(home)/sign-in-form.tsx +++ b/apps/admin/app/(all)/(home)/sign-in-form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useMemo, useState } from "react"; import { useSearchParams } from "next/navigation"; import { Eye, EyeOff } from "lucide-react"; @@ -10,7 +16,7 @@ import { Input, Spinner } from "@plane/ui"; // components import { Banner } from "@/components/common/banner"; // local components -import { FormHeader } from "../../../core/components/instance/form-header"; +import { FormHeader } from "@/components/instance/form-header"; import { AuthBanner } from "./auth-banner"; import { AuthHeader } from "./auth-header"; import { authErrorHandler } from "./auth-helpers"; @@ -140,7 +146,7 @@ export function InstanceSignInForm() { placeholder="name@company.com" value={formData.email} onChange={(e) => handleFormChange("email", e.target.value)} - autoComplete="on" + autoComplete="off" autoFocus /> @@ -159,7 +165,7 @@ export function InstanceSignInForm() { placeholder="Enter your password" value={formData.password} onChange={(e) => handleFormChange("password", e.target.value)} - autoComplete="on" + autoComplete="off" /> {showPassword ? ( + } /> {Object.keys(webhooks).length > 0 ? ( -
+
) : ( diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/layout.tsx deleted file mode 100644 index 25d737300b..0000000000 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/layout.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { observer } from "mobx-react"; -import { usePathname } from "next/navigation"; -import { Outlet } from "react-router"; -// components -import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; -import { getProfileActivePath } from "@/components/settings/helper"; -import { SettingsMobileNav } from "@/components/settings/mobile"; -// local imports -import { ProfileSidebar } from "./sidebar"; - -function ProfileSettingsLayout() { - // router - const pathname = usePathname(); - - return ( - <> - -
-
- -
-
- - - -
-
- - ); -} - -export default observer(ProfileSettingsLayout); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/preferences/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/preferences/page.tsx deleted file mode 100644 index f3098f675a..0000000000 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/preferences/page.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { observer } from "mobx-react"; -// plane imports -import { useTranslation } from "@plane/i18n"; -// components -import { PageHead } from "@/components/core/page-title"; -import { PreferencesList } from "@/components/preferences/list"; -import { LanguageTimezone } from "@/components/profile/preferences/language-timezone"; -import { ProfileSettingContentHeader } from "@/components/profile/profile-setting-content-header"; -import { SettingsHeading } from "@/components/settings/heading"; -// hooks -import { useUserProfile } from "@/hooks/store/user"; - -const ProfileAppearancePage = observer(() => { - const { t } = useTranslation(); - // hooks - const { data: userProfile } = useUserProfile(); - - if (!userProfile) return <>; - return ( - <> - -
-
- - -
-
- - -
-
- - ); -}); - -export default ProfileAppearancePage; diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/security/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/security/page.tsx deleted file mode 100644 index cd03a7ca01..0000000000 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/security/page.tsx +++ /dev/null @@ -1,262 +0,0 @@ -import { useState } from "react"; -import { observer } from "mobx-react"; -import { Controller, useForm } from "react-hook-form"; -import { Eye, EyeOff } from "lucide-react"; -// plane imports -import { E_PASSWORD_STRENGTH } from "@plane/constants"; -import { useTranslation } from "@plane/i18n"; -import { Button } from "@plane/propel/button"; -import { TOAST_TYPE, setToast } from "@plane/propel/toast"; -import { Input, PasswordStrengthIndicator } from "@plane/ui"; -import { getPasswordStrength } from "@plane/utils"; -// components -import { PageHead } from "@/components/core/page-title"; -import { ProfileSettingContentHeader } from "@/components/profile/profile-setting-content-header"; -// helpers -import { authErrorHandler } from "@/helpers/authentication.helper"; -import type { EAuthenticationErrorCodes } from "@/helpers/authentication.helper"; -// hooks -import { useUser } from "@/hooks/store/user"; -// services -import { AuthService } from "@/services/auth.service"; - -export interface FormValues { - old_password: string; - new_password: string; - confirm_password: string; -} - -const defaultValues: FormValues = { - old_password: "", - new_password: "", - confirm_password: "", -}; - -const authService = new AuthService(); - -const defaultShowPassword = { - oldPassword: false, - password: false, - confirmPassword: false, -}; - -function SecurityPage() { - // store - const { data: currentUser, changePassword } = useUser(); - // states - const [showPassword, setShowPassword] = useState(defaultShowPassword); - const [isPasswordInputFocused, setIsPasswordInputFocused] = useState(false); - const [isRetryPasswordInputFocused, setIsRetryPasswordInputFocused] = useState(false); - - // use form - const { - control, - handleSubmit, - watch, - formState: { errors, isSubmitting }, - reset, - } = useForm({ defaultValues }); - // derived values - const oldPassword = watch("old_password"); - const password = watch("new_password"); - const confirmPassword = watch("confirm_password"); - const oldPasswordRequired = !currentUser?.is_password_autoset; - // i18n - const { t } = useTranslation(); - - const isNewPasswordSameAsOldPassword = oldPassword !== "" && password !== "" && password === oldPassword; - - const handleShowPassword = (key: keyof typeof showPassword) => - setShowPassword((prev) => ({ ...prev, [key]: !prev[key] })); - - const handleChangePassword = async (formData: FormValues) => { - const { old_password, new_password } = formData; - try { - const csrfToken = await authService.requestCSRFToken().then((data) => data?.csrf_token); - if (!csrfToken) throw new Error("csrf token not found"); - - await changePassword(csrfToken, { - ...(oldPasswordRequired && { old_password }), - new_password, - }); - - reset(defaultValues); - setShowPassword(defaultShowPassword); - setToast({ - type: TOAST_TYPE.SUCCESS, - title: t("auth.common.password.toast.change_password.success.title"), - message: t("auth.common.password.toast.change_password.success.message"), - }); - } catch (error: unknown) { - let errorInfo = undefined; - if (error instanceof Error) { - const err = error as Error & { error_code?: string }; - const code = err.error_code?.toString(); - errorInfo = code ? authErrorHandler(code as EAuthenticationErrorCodes) : undefined; - } - - setToast({ - type: TOAST_TYPE.ERROR, - title: errorInfo?.title ?? t("auth.common.password.toast.error.title"), - message: - typeof errorInfo?.message === "string" ? errorInfo.message : t("auth.common.password.toast.error.message"), - }); - } - }; - - const isButtonDisabled = - getPasswordStrength(password) != E_PASSWORD_STRENGTH.STRENGTH_VALID || - (oldPasswordRequired && oldPassword.trim() === "") || - password.trim() === "" || - confirmPassword.trim() === "" || - password !== confirmPassword || - password === oldPassword; - - const passwordSupport = password.length > 0 && - getPasswordStrength(password) != E_PASSWORD_STRENGTH.STRENGTH_VALID && ( - - ); - - const renderPasswordMatchError = !isRetryPasswordInputFocused || confirmPassword.length >= password.length; - - return ( - <> - - -
-
- {oldPasswordRequired && ( -
-

{t("auth.common.password.current_password.label")}

-
- ( - - )} - /> - {showPassword?.oldPassword ? ( - handleShowPassword("oldPassword")} - /> - ) : ( - handleShowPassword("oldPassword")} - /> - )} -
- {errors.old_password && ( - {errors.old_password.message} - )} -
- )} -
-

{t("auth.common.password.new_password.label")}

-
- ( - setIsPasswordInputFocused(true)} - onBlur={() => setIsPasswordInputFocused(false)} - /> - )} - /> - {showPassword?.password ? ( - handleShowPassword("password")} - /> - ) : ( - handleShowPassword("password")} - /> - )} -
- {passwordSupport} - {isNewPasswordSameAsOldPassword && !isPasswordInputFocused && ( - - {t("new_password_must_be_different_from_old_password")} - - )} -
-
-

{t("auth.common.password.confirm_password.label")}

-
- ( - setIsRetryPasswordInputFocused(true)} - onBlur={() => setIsRetryPasswordInputFocused(false)} - /> - )} - /> - {showPassword?.confirmPassword ? ( - handleShowPassword("confirmPassword")} - /> - ) : ( - handleShowPassword("confirmPassword")} - /> - )} -
- {!!confirmPassword && password !== confirmPassword && renderPasswordMatchError && ( - {t("auth.common.password.errors.match")} - )} -
-
- -
- -
-
- - ); -} - -export default observer(SecurityPage); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/sidebar.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/sidebar.tsx deleted file mode 100644 index 4088ec4ab3..0000000000 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/sidebar.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { observer } from "mobx-react"; -import { useParams, usePathname } from "next/navigation"; -import { CircleUser, Activity, Bell, CircleUserRound, KeyRound, Settings2, Blocks } from "lucide-react"; -// plane imports -import { GROUPED_PROFILE_SETTINGS, PROFILE_SETTINGS_CATEGORIES } from "@plane/constants"; -import { LockIcon } from "@plane/propel/icons"; -import { getFileURL } from "@plane/utils"; -// components -import { SettingsSidebar } from "@/components/settings/sidebar"; -// hooks -import { useUser } from "@/hooks/store/user"; - -const ICONS = { - profile: CircleUser, - security: LockIcon, - activity: Activity, - preferences: Settings2, - notifications: Bell, - "api-tokens": KeyRound, - connections: Blocks, -}; - -export function ProjectActionIcons({ type, size, className }: { type: string; size?: number; className?: string }) { - if (type === undefined) return null; - const Icon = ICONS[type as keyof typeof ICONS]; - if (!Icon) return null; - return ; -} - -type TProfileSidebarProps = { - isMobile?: boolean; -}; - -export const ProfileSidebar = observer(function ProfileSidebar(props: TProfileSidebarProps) { - const { isMobile = false } = props; - // router - const pathname = usePathname(); - const { workspaceSlug } = useParams(); - // store hooks - const { data: currentUser } = useUser(); - - return ( - pathname === `/${workspaceSlug}${data.href}/`} - customHeader={ -
-
- {!currentUser?.avatar_url || currentUser?.avatar_url === "" ? ( -
- -
- ) : ( -
- {currentUser?.display_name} -
- )} -
-
-
{currentUser?.display_name}
-
{currentUser?.email}
-
-
- } - actionIcons={ProjectActionIcons} - shouldRender - /> - ); -}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/header.tsx new file mode 100644 index 0000000000..df9ae6e9e2 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const AutomationsProjectSettingsHeader = observer(function AutomationsProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.automations; + const Icon = PROJECT_SETTINGS_ICONS.automations; + + return ( + + + } + /> + } + /> + +
+ } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/layout.tsx index cd84d7c2f3..a4d766c539 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/layout.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Outlet } from "react-router"; // plane web imports diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/page.tsx index 3607757553..b591e91b1a 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/automations/page.tsx @@ -1,21 +1,28 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; +// plane imports import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { IProject } from "@plane/types"; -// ui -// components import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; import { AutoArchiveAutomation, AutoCloseAutomation } from "@/components/automation"; import { PageHead } from "@/components/core/page-title"; -// hooks import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; import { SettingsHeading } from "@/components/settings/heading"; +// hooks import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; // plane web imports import { CustomAutomationsRoot } from "@/plane-web/components/automations/root"; +// local imports import type { Route } from "./+types/page"; +import { AutomationsProjectSettingsHeader } from "./header"; function AutomationSettingsPage({ params }: Route.ComponentProps) { // router @@ -51,15 +58,17 @@ function AutomationSettingsPage({ params }: Route.ComponentProps) { } return ( - + } hugging>
- - +
+ + +
diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/estimates/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/estimates/header.tsx new file mode 100644 index 0000000000..447f925a02 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/estimates/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const EstimatesProjectSettingsHeader = observer(function EstimatesProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.estimates; + const Icon = PROJECT_SETTINGS_ICONS.estimates; + + return ( + + + } + /> + } + /> + + + } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/estimates/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/estimates/page.tsx index 2d446ae7ca..cfa1e94237 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/estimates/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/estimates/page.tsx @@ -1,14 +1,22 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; import { PageHead } from "@/components/core/page-title"; import { EstimateRoot } from "@/components/estimates"; -// hooks import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; +// hooks import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; +// local imports import type { Route } from "./+types/page"; +import { EstimatesProjectSettingsHeader } from "./header"; function EstimatesSettingsPage({ params }: Route.ComponentProps) { const { workspaceSlug, projectId } = params; @@ -25,7 +33,7 @@ function EstimatesSettingsPage({ params }: Route.ComponentProps) { } return ( - + }>
diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/cycles/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/cycles/header.tsx new file mode 100644 index 0000000000..c2fa9dee50 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/cycles/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const FeaturesCyclesProjectSettingsHeader = observer(function FeaturesCyclesProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.features_cycles; + const Icon = PROJECT_SETTINGS_ICONS.features_cycles; + + return ( + + + } + /> + } + /> + +
+ } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/cycles/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/cycles/page.tsx new file mode 100644 index 0000000000..b86a1b2948 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/cycles/page.tsx @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { useTranslation } from "@plane/i18n"; +// components +import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; +import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; +import { PageHead } from "@/components/core/page-title"; +import { ProjectSettingsFeatureControlItem } from "@/components/settings/project/content/feature-control-item"; +import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; +// hooks +import { useProject } from "@/hooks/store/use-project"; +import { useUserPermissions } from "@/hooks/store/user"; +// local imports +import type { Route } from "./+types/page"; +import { FeaturesCyclesProjectSettingsHeader } from "./header"; +import { SettingsHeading } from "@/components/settings/heading"; + +function FeaturesCyclesSettingsPage({ params }: Route.ComponentProps) { + const { workspaceSlug, projectId } = params; + // store hooks + const { workspaceUserInfo, allowPermissions } = useUserPermissions(); + const { currentProjectDetails } = useProject(); + // translation + const { t } = useTranslation(); + // derived values + const pageTitle = currentProjectDetails?.name + ? `${currentProjectDetails?.name} settings - ${t("project_settings.features.cycles.short_title")}` + : undefined; + const canPerformProjectAdminActions = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.PROJECT); + + if (workspaceUserInfo && !canPerformProjectAdminActions) { + return ; + } + + return ( + }> + +
+ +
+ +
+
+
+ ); +} + +export default observer(FeaturesCyclesSettingsPage); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/intake/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/intake/header.tsx new file mode 100644 index 0000000000..5f81d40afc --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/intake/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const FeaturesIntakeProjectSettingsHeader = observer(function FeaturesIntakeProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.features_intake; + const Icon = PROJECT_SETTINGS_ICONS.features_intake; + + return ( + + + } + /> + } + /> + + + } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/intake/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/intake/page.tsx new file mode 100644 index 0000000000..3349a79d35 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/intake/page.tsx @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { useTranslation } from "@plane/i18n"; +// components +import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; +import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; +import { PageHead } from "@/components/core/page-title"; +import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; +import { SettingsHeading } from "@/components/settings/heading"; +import { ProjectSettingsFeatureControlItem } from "@/components/settings/project/content/feature-control-item"; +// hooks +import { useProject } from "@/hooks/store/use-project"; +import { useUserPermissions } from "@/hooks/store/user"; +// local imports +import type { Route } from "./+types/page"; +import { FeaturesIntakeProjectSettingsHeader } from "./header"; + +function FeaturesIntakeSettingsPage({ params }: Route.ComponentProps) { + const { workspaceSlug, projectId } = params; + // store hooks + const { workspaceUserInfo, allowPermissions } = useUserPermissions(); + const { currentProjectDetails } = useProject(); + // translation + const { t } = useTranslation(); + // derived values + const pageTitle = currentProjectDetails?.name + ? `${currentProjectDetails?.name} settings - ${t("project_settings.features.intake.short_title")}` + : undefined; + const canPerformProjectAdminActions = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.PROJECT); + + if (workspaceUserInfo && !canPerformProjectAdminActions) { + return ; + } + + return ( + }> + +
+ +
+ +
+
+
+ ); +} + +export default observer(FeaturesIntakeSettingsPage); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/modules/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/modules/header.tsx new file mode 100644 index 0000000000..baf32b2b90 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/modules/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const FeaturesModulesProjectSettingsHeader = observer(function FeaturesModulesProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.features_modules; + const Icon = PROJECT_SETTINGS_ICONS.features_modules; + + return ( + + + } + /> + } + /> + + + } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/modules/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/modules/page.tsx new file mode 100644 index 0000000000..1253f0d654 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/modules/page.tsx @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { useTranslation } from "@plane/i18n"; +// components +import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; +import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; +import { PageHead } from "@/components/core/page-title"; +import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; +import { SettingsHeading } from "@/components/settings/heading"; +import { ProjectSettingsFeatureControlItem } from "@/components/settings/project/content/feature-control-item"; +// hooks +import { useProject } from "@/hooks/store/use-project"; +import { useUserPermissions } from "@/hooks/store/user"; +// local imports +import type { Route } from "./+types/page"; +import { FeaturesModulesProjectSettingsHeader } from "./header"; + +function FeaturesModulesSettingsPage({ params }: Route.ComponentProps) { + const { workspaceSlug, projectId } = params; + // store hooks + const { workspaceUserInfo, allowPermissions } = useUserPermissions(); + const { currentProjectDetails } = useProject(); + // translation + const { t } = useTranslation(); + // derived values + const pageTitle = currentProjectDetails?.name + ? `${currentProjectDetails?.name} settings - ${t("project_settings.features.modules.short_title")}` + : undefined; + const canPerformProjectAdminActions = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.PROJECT); + + if (workspaceUserInfo && !canPerformProjectAdminActions) { + return ; + } + + return ( + }> + +
+ +
+ +
+
+
+ ); +} + +export default observer(FeaturesModulesSettingsPage); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/page.tsx deleted file mode 100644 index 6db9c4bd09..0000000000 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/page.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { observer } from "mobx-react"; -// components -import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; -import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; -import { PageHead } from "@/components/core/page-title"; -import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; -// hooks -import { useProject } from "@/hooks/store/use-project"; -import { useUserPermissions } from "@/hooks/store/user"; -import { ProjectFeaturesList } from "@/plane-web/components/projects/settings/features-list"; -import type { Route } from "./+types/page"; - -function FeaturesSettingsPage({ params }: Route.ComponentProps) { - const { workspaceSlug, projectId } = params; - // store - const { workspaceUserInfo, allowPermissions } = useUserPermissions(); - - const { currentProjectDetails } = useProject(); - // derived values - const pageTitle = currentProjectDetails?.name ? `${currentProjectDetails?.name} - Features` : undefined; - const canPerformProjectAdminActions = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.PROJECT); - - if (workspaceUserInfo && !canPerformProjectAdminActions) { - return ; - } - - return ( - - -
- -
-
- ); -} - -export default observer(FeaturesSettingsPage); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/pages/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/pages/header.tsx new file mode 100644 index 0000000000..fa7a40e286 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/pages/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const FeaturesPagesProjectSettingsHeader = observer(function FeaturesPagesProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.features_pages; + const Icon = PROJECT_SETTINGS_ICONS.features_pages; + + return ( + + + } + /> + } + /> + + + } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/pages/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/pages/page.tsx new file mode 100644 index 0000000000..2b018e56de --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/pages/page.tsx @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { useTranslation } from "@plane/i18n"; +// components +import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; +import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; +import { PageHead } from "@/components/core/page-title"; +import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; +import { SettingsHeading } from "@/components/settings/heading"; +import { ProjectSettingsFeatureControlItem } from "@/components/settings/project/content/feature-control-item"; +// hooks +import { useProject } from "@/hooks/store/use-project"; +import { useUserPermissions } from "@/hooks/store/user"; +// local imports +import type { Route } from "./+types/page"; +import { FeaturesPagesProjectSettingsHeader } from "./header"; + +function FeaturesPagesSettingsPage({ params }: Route.ComponentProps) { + const { workspaceSlug, projectId } = params; + // store hooks + const { workspaceUserInfo, allowPermissions } = useUserPermissions(); + const { currentProjectDetails } = useProject(); + // translation + const { t } = useTranslation(); + // derived values + const pageTitle = currentProjectDetails?.name + ? `${currentProjectDetails?.name} settings - ${t("project_settings.features.pages.short_title")}` + : undefined; + const canPerformProjectAdminActions = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.PROJECT); + + if (workspaceUserInfo && !canPerformProjectAdminActions) { + return ; + } + + return ( + }> + +
+ +
+ +
+
+
+ ); +} + +export default observer(FeaturesPagesSettingsPage); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/views/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/views/header.tsx new file mode 100644 index 0000000000..c8429d90c9 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/views/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const FeaturesViewsProjectSettingsHeader = observer(function FeaturesViewsProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.features_views; + const Icon = PROJECT_SETTINGS_ICONS.features_views; + + return ( + + + } + /> + } + /> + + + } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/views/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/views/page.tsx new file mode 100644 index 0000000000..594028f8f8 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/views/page.tsx @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { useTranslation } from "@plane/i18n"; +// components +import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; +import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; +import { PageHead } from "@/components/core/page-title"; +import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; +import { SettingsHeading } from "@/components/settings/heading"; +import { ProjectSettingsFeatureControlItem } from "@/components/settings/project/content/feature-control-item"; +// hooks +import { useProject } from "@/hooks/store/use-project"; +import { useUserPermissions } from "@/hooks/store/user"; +// local imports +import type { Route } from "./+types/page"; +import { FeaturesViewsProjectSettingsHeader } from "./header"; + +function FeaturesViewsSettingsPage({ params }: Route.ComponentProps) { + const { workspaceSlug, projectId } = params; + // store hooks + const { workspaceUserInfo, allowPermissions } = useUserPermissions(); + const { currentProjectDetails } = useProject(); + // translation + const { t } = useTranslation(); + // derived values + const pageTitle = currentProjectDetails?.name + ? `${currentProjectDetails?.name} settings - ${t("project_settings.features.views.short_title")}` + : undefined; + const canPerformProjectAdminActions = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.PROJECT); + + if (workspaceUserInfo && !canPerformProjectAdminActions) { + return ; + } + + return ( + }> + +
+ +
+ +
+
+
+ ); +} + +export default observer(FeaturesViewsSettingsPage); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/header.tsx new file mode 100644 index 0000000000..95d4720511 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const GeneralProjectSettingsHeader = observer(function GeneralProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.general; + const Icon = PROJECT_SETTINGS_ICONS.general; + + return ( + + + } + /> + } + /> + + + } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/labels/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/labels/header.tsx new file mode 100644 index 0000000000..b9daaae1e5 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/labels/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const LabelsProjectSettingsHeader = observer(function LabelsProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.labels; + const Icon = PROJECT_SETTINGS_ICONS.labels; + + return ( + + + } + /> + } + /> + + + } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/labels/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/labels/page.tsx index 812b583023..870c05fa75 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/labels/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/labels/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element"; @@ -7,10 +13,12 @@ import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; import { PageHead } from "@/components/core/page-title"; import { ProjectSettingsLabelList } from "@/components/labels"; -// hooks import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; +// hooks import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; +// local imports +import { LabelsProjectSettingsHeader } from "./header"; function LabelsSettingsPage() { // store hooks @@ -45,9 +53,9 @@ function LabelsSettingsPage() { } return ( - + }> -
+
diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/layout.tsx index 8e8c09064d..c3a6a29e67 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/layout.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/layout.tsx @@ -1,14 +1,20 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { usePathname } from "next/navigation"; import { Outlet } from "react-router"; // components import { getProjectActivePath } from "@/components/settings/helper"; -import { SettingsMobileNav } from "@/components/settings/mobile"; -import { ProjectSettingsSidebar } from "@/components/settings/project/sidebar"; -// plane web imports -import { ProjectAuthWrapper } from "@/plane-web/layouts/project-wrapper"; +import { SettingsMobileNav } from "@/components/settings/mobile/nav"; +// layouts +import { ProjectAuthWrapper } from "@/layouts/auth-layout/project-wrapper"; // types import type { Route } from "./+types/layout"; +import { ProjectSettingsSidebarRoot } from "@/components/settings/project/sidebar"; function ProjectDetailSettingsLayout({ params }: Route.ComponentProps) { const { workspaceSlug, projectId } = params; @@ -17,14 +23,19 @@ function ProjectDetailSettingsLayout({ params }: Route.ComponentProps) { return ( <> - -
-
{projectId && }
- -
- + } + activePath={getProjectActivePath(pathname) || ""} + /> +
+
+
+
- + + + +
); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/header.tsx new file mode 100644 index 0000000000..e8e3c4fe40 --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const MembersProjectSettingsHeader = observer(function MembersProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.members; + const Icon = PROJECT_SETTINGS_ICONS.members; + + return ( + + + } + /> + } + /> + +
+ } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/page.tsx index 3bdf8e9991..61abee5ff2 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/members/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; @@ -5,17 +11,18 @@ import { useTranslation } from "@plane/i18n"; // components import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; import { PageHead } from "@/components/core/page-title"; -// hooks import { ProjectMemberList } from "@/components/project/member-list"; import { ProjectSettingsMemberDefaults } from "@/components/project/project-settings-member-defaults"; import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; import { SettingsHeading } from "@/components/settings/heading"; +// hooks import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; // plane web imports import { ProjectTeamspaceList } from "@/plane-web/components/projects/teamspaces/teamspace-list"; -import { getProjectSettingsPageLabelI18nKey } from "@/plane-web/helpers/project-settings"; +// local imports import type { Route } from "./+types/page"; +import { MembersProjectSettingsHeader } from "./header"; function MembersSettingsPage({ params }: Route.ComponentProps) { // router @@ -39,9 +46,9 @@ function MembersSettingsPage({ params }: Route.ComponentProps) { } return ( - + } hugging> - + diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/page.tsx index ea0486fa37..39a804660d 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/page.tsx @@ -1,25 +1,26 @@ -import { useState } from "react"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; // components import { PageHead } from "@/components/core/page-title"; -import { DeleteProjectModal } from "@/components/project/delete-project-modal"; import { ProjectDetailsForm } from "@/components/project/form"; import { ProjectDetailsFormLoader } from "@/components/project/form-loader"; -import { ArchiveRestoreProjectModal } from "@/components/project/settings/archive-project/archive-restore-modal"; -import { ArchiveProjectSelection } from "@/components/project/settings/archive-project/selection"; -import { DeleteProjectSection } from "@/components/project/settings/delete-project-section"; import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; // hooks import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; +// local imports import type { Route } from "./+types/page"; +import { GeneralProjectSettingsHeader } from "./header"; +import { GeneralProjectSettingsControlSection } from "@/components/project/settings/control-section"; function ProjectSettingsPage({ params }: Route.ComponentProps) { - // states - const [selectProject, setSelectedProject] = useState(null); - const [archiveProject, setArchiveProject] = useState(false); // router const { workspaceSlug, projectId } = params; // store hooks @@ -31,25 +32,8 @@ function ProjectSettingsPage({ params }: Route.ComponentProps) { const pageTitle = currentProjectDetails?.name ? `${currentProjectDetails?.name} - General Settings` : undefined; return ( - + }> - {currentProjectDetails && ( - <> - setArchiveProject(false)} - archive - /> - setSelectedProject(null)} - /> - - )} -
{currentProjectDetails ? ( )} - - {isAdmin && currentProjectDetails && ( - <> - setArchiveProject(true)} - /> - setSelectedProject(currentProjectDetails.id ?? null)} - /> - - )} + {isAdmin && }
); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/states/header.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/states/header.tsx new file mode 100644 index 0000000000..957632b25c --- /dev/null +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/states/header.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROJECT_SETTINGS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Breadcrumbs } from "@plane/ui"; +// components +import { BreadcrumbLink } from "@/components/common/breadcrumb-link"; +import { SettingsPageHeader } from "@/components/settings/page-header"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; + +export const StatesProjectSettingsHeader = observer(function StatesProjectSettingsHeader() { + // translation + const { t } = useTranslation(); + // derived values + const settingsDetails = PROJECT_SETTINGS.states; + const Icon = PROJECT_SETTINGS_ICONS.states; + + return ( + + + } + /> + } + /> + +
+ } + /> + ); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/states/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/states/page.tsx index 31d8ccbc1a..9913d521c3 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/states/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/states/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; @@ -5,12 +11,14 @@ import { useTranslation } from "@plane/i18n"; import { NotAuthorizedView } from "@/components/auth-screens/not-authorized-view"; import { PageHead } from "@/components/core/page-title"; import { ProjectStateRoot } from "@/components/project-states"; -// hook import { SettingsContentWrapper } from "@/components/settings/content-wrapper"; import { SettingsHeading } from "@/components/settings/heading"; +// hook import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; +// local imports import type { Route } from "./+types/page"; +import { StatesProjectSettingsHeader } from "./header"; function StatesSettingsPage({ params }: Route.ComponentProps) { const { workspaceSlug, projectId } = params; @@ -33,14 +41,16 @@ function StatesSettingsPage({ params }: Route.ComponentProps) { } return ( - + }>
- +
+ +
); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/layout.tsx index 977d9ebc9a..86229fe9c0 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/layout.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { observer } from "mobx-react"; import { Outlet } from "react-router"; diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/page.tsx index 522e2ff5fb..c783250f5c 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/projects/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import Link from "next/link"; import { useTheme } from "next-themes"; diff --git a/apps/web/app/(all)/[workspaceSlug]/layout.tsx b/apps/web/app/(all)/[workspaceSlug]/layout.tsx index 0e489644d4..293688673a 100644 --- a/apps/web/app/(all)/[workspaceSlug]/layout.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/layout.tsx @@ -1,15 +1,26 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper"; import { WorkspaceContentWrapper } from "@/plane-web/components/workspace/content-wrapper"; import { AppRailVisibilityProvider } from "@/plane-web/hooks/app-rail"; -import { WorkspaceAuthWrapper } from "@/plane-web/layouts/workspace-wrapper"; +import { GlobalModals } from "@/plane-web/components/common/modal/global"; +import { WorkspaceAuthWrapper } from "@/layouts/auth-layout/workspace-wrapper"; +import type { Route } from "./+types/layout"; + +export default function WorkspaceLayout(props: Route.ComponentProps) { + const { workspaceSlug } = props.params; -export default function WorkspaceLayout() { return ( + diff --git a/apps/web/app/(all)/accounts/forgot-password/layout.tsx b/apps/web/app/(all)/accounts/forgot-password/layout.tsx index 0e4b9b4beb..f503c81e28 100644 --- a/apps/web/app/(all)/accounts/forgot-password/layout.tsx +++ b/apps/web/app/(all)/accounts/forgot-password/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; import type { Route } from "./+types/layout"; diff --git a/apps/web/app/(all)/accounts/forgot-password/page.tsx b/apps/web/app/(all)/accounts/forgot-password/page.tsx index 299897364e..35d684c6d2 100644 --- a/apps/web/app/(all)/accounts/forgot-password/page.tsx +++ b/apps/web/app/(all)/accounts/forgot-password/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components import { ForgotPasswordForm } from "@/components/account/auth-forms/forgot-password"; diff --git a/apps/web/app/(all)/accounts/reset-password/layout.tsx b/apps/web/app/(all)/accounts/reset-password/layout.tsx index 30e798d44c..d3955daa82 100644 --- a/apps/web/app/(all)/accounts/reset-password/layout.tsx +++ b/apps/web/app/(all)/accounts/reset-password/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; import type { Route } from "./+types/layout"; diff --git a/apps/web/app/(all)/accounts/reset-password/page.tsx b/apps/web/app/(all)/accounts/reset-password/page.tsx index b37fb9aed6..68fc71e934 100644 --- a/apps/web/app/(all)/accounts/reset-password/page.tsx +++ b/apps/web/app/(all)/accounts/reset-password/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { EAuthModes } from "@plane/constants"; // components diff --git a/apps/web/app/(all)/accounts/set-password/layout.tsx b/apps/web/app/(all)/accounts/set-password/layout.tsx index 290d153a95..4455b84fcc 100644 --- a/apps/web/app/(all)/accounts/set-password/layout.tsx +++ b/apps/web/app/(all)/accounts/set-password/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; import type { Route } from "./+types/layout"; diff --git a/apps/web/app/(all)/accounts/set-password/page.tsx b/apps/web/app/(all)/accounts/set-password/page.tsx index 4e3a3bfa01..886f888729 100644 --- a/apps/web/app/(all)/accounts/set-password/page.tsx +++ b/apps/web/app/(all)/accounts/set-password/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { EAuthModes } from "@plane/constants"; // components diff --git a/apps/web/app/(all)/create-workspace/layout.tsx b/apps/web/app/(all)/create-workspace/layout.tsx index 880b1f3947..95b73bf8d2 100644 --- a/apps/web/app/(all)/create-workspace/layout.tsx +++ b/apps/web/app/(all)/create-workspace/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; import type { Route } from "./+types/layout"; diff --git a/apps/web/app/(all)/create-workspace/page.tsx b/apps/web/app/(all)/create-workspace/page.tsx index 0228efa2dc..cee5209c11 100644 --- a/apps/web/app/(all)/create-workspace/page.tsx +++ b/apps/web/app/(all)/create-workspace/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; @@ -12,17 +18,17 @@ import WorkspaceCreationDisabled from "@/app/assets/workspace/workspace-creation import { CreateWorkspaceForm } from "@/components/workspace/create-workspace-form"; // hooks import { useUser, useUserProfile } from "@/hooks/store/user"; +import { useInstance } from "@/hooks/store/use-instance"; import { useAppRouter } from "@/hooks/use-app-router"; // wrappers import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper"; -// plane web helpers -import { getIsWorkspaceCreationDisabled } from "@/plane-web/helpers/instance.helper"; const CreateWorkspacePage = observer(function CreateWorkspacePage() { const { t } = useTranslation(); // router const router = useAppRouter(); // store hooks + const { config } = useInstance(); const { data: currentUser } = useUser(); const { updateUserProfile } = useUserProfile(); // states @@ -32,7 +38,7 @@ const CreateWorkspacePage = observer(function CreateWorkspacePage() { organization_size: "", }); // derived values - const isWorkspaceCreationDisabled = getIsWorkspaceCreationDisabled(); + const isWorkspaceCreationDisabled = config?.is_workspace_creation_disabled ?? false; // methods const getMailtoHref = () => { diff --git a/apps/web/app/(all)/invitations/layout.tsx b/apps/web/app/(all)/invitations/layout.tsx index cbda5f4c04..68f4fe7a48 100644 --- a/apps/web/app/(all)/invitations/layout.tsx +++ b/apps/web/app/(all)/invitations/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; import type { Route } from "./+types/layout"; diff --git a/apps/web/app/(all)/invitations/page.tsx b/apps/web/app/(all)/invitations/page.tsx index ca926bc502..3f7751ce6c 100644 --- a/apps/web/app/(all)/invitations/page.tsx +++ b/apps/web/app/(all)/invitations/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; @@ -26,7 +32,7 @@ import { useAppRouter } from "@/hooks/use-app-router"; // services import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper"; // plane web services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; const workspaceService = new WorkspaceService(); diff --git a/apps/web/app/(all)/layout.preload.tsx b/apps/web/app/(all)/layout.preload.tsx index af2368fa8c..e070eaa667 100644 --- a/apps/web/app/(all)/layout.preload.tsx +++ b/apps/web/app/(all)/layout.preload.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // TODO: Check if we need this // https://nextjs.org/docs/app/api-reference/functions/generate-metadata#link-relpreload // export const usePreloadResources = () => { diff --git a/apps/web/app/(all)/layout.tsx b/apps/web/app/(all)/layout.tsx index 986e93e4a5..ab06034b0b 100644 --- a/apps/web/app/(all)/layout.tsx +++ b/apps/web/app/(all)/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; import type { Route } from "./+types/layout"; import { PreloadResources } from "./layout.preload"; diff --git a/apps/web/app/(all)/onboarding/layout.tsx b/apps/web/app/(all)/onboarding/layout.tsx index ac20091f29..fee10f7a09 100644 --- a/apps/web/app/(all)/onboarding/layout.tsx +++ b/apps/web/app/(all)/onboarding/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; import type { Route } from "./+types/layout"; diff --git a/apps/web/app/(all)/onboarding/page.tsx b/apps/web/app/(all)/onboarding/page.tsx index 9dc169495c..e2479d7d52 100644 --- a/apps/web/app/(all)/onboarding/page.tsx +++ b/apps/web/app/(all)/onboarding/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import useSWR from "swr"; @@ -14,7 +20,7 @@ import { useUser } from "@/hooks/store/user"; // wrappers import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper"; // services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; const workspaceService = new WorkspaceService(); diff --git a/apps/web/app/(all)/profile/activity/page.tsx b/apps/web/app/(all)/profile/activity/page.tsx deleted file mode 100644 index e3956258ff..0000000000 --- a/apps/web/app/(all)/profile/activity/page.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import { useState } from "react"; -import { observer } from "mobx-react"; -import { useTheme } from "next-themes"; -// plane imports -import { useTranslation } from "@plane/i18n"; -import { Button } from "@plane/propel/button"; -// assets -import darkActivityAsset from "@/app/assets/empty-state/profile/activity-dark.webp?url"; -import lightActivityAsset from "@/app/assets/empty-state/profile/activity-light.webp?url"; -// components -import { PageHead } from "@/components/core/page-title"; -import { DetailedEmptyState } from "@/components/empty-state/detailed-empty-state-root"; -import { ProfileActivityListPage } from "@/components/profile/activity/profile-activity-list"; -import { ProfileSettingContentHeader } from "@/components/profile/profile-setting-content-header"; -import { ProfileSettingContentWrapper } from "@/components/profile/profile-setting-content-wrapper"; - -const PER_PAGE = 100; - -function ProfileActivityPage() { - // states - const [pageCount, setPageCount] = useState(1); - const [totalPages, setTotalPages] = useState(0); - const [resultsCount, setResultsCount] = useState(0); - const [isEmpty, setIsEmpty] = useState(false); - // theme hook - const { resolvedTheme } = useTheme(); - // plane hooks - const { t } = useTranslation(); - // derived values - const resolvedPath = resolvedTheme === "light" ? lightActivityAsset : darkActivityAsset; - - const updateTotalPages = (count: number) => setTotalPages(count); - - const updateResultsCount = (count: number) => setResultsCount(count); - - const updateEmptyState = (isEmpty: boolean) => setIsEmpty(isEmpty); - - const handleLoadMore = () => setPageCount((prev) => prev + 1); - - const activityPages: React.ReactNode[] = []; - for (let i = 0; i < pageCount; i++) - activityPages.push( - - ); - - const isLoadMoreVisible = pageCount < totalPages && resultsCount !== 0; - - if (isEmpty) { - return ( - - ); - } - - return ( - <> - - - - {activityPages} - {isLoadMoreVisible && ( -
- -
- )} -
- - ); -} - -export default observer(ProfileActivityPage); diff --git a/apps/web/app/(all)/profile/appearance/page.tsx b/apps/web/app/(all)/profile/appearance/page.tsx deleted file mode 100644 index d0d05588d8..0000000000 --- a/apps/web/app/(all)/profile/appearance/page.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import { useCallback, useMemo } from "react"; -import { observer } from "mobx-react"; -import { useTheme } from "next-themes"; -// plane imports -import type { I_THEME_OPTION } from "@plane/constants"; -import { THEME_OPTIONS } from "@plane/constants"; -import { useTranslation } from "@plane/i18n"; -import { setPromiseToast } from "@plane/propel/toast"; -import { applyCustomTheme } from "@plane/utils"; -// components -import { LogoSpinner } from "@/components/common/logo-spinner"; -import { PageHead } from "@/components/core/page-title"; -import { CustomThemeSelector } from "@/components/core/theme/custom-theme-selector"; -import { ThemeSwitch } from "@/components/core/theme/theme-switch"; -import { ProfileSettingContentHeader } from "@/components/profile/profile-setting-content-header"; -import { ProfileSettingContentWrapper } from "@/components/profile/profile-setting-content-wrapper"; -// hooks -import { useUserProfile } from "@/hooks/store/user"; - -function ProfileAppearancePage() { - // store hooks - const { data: userProfile, updateUserTheme } = useUserProfile(); - // theme - const { setTheme } = useTheme(); - // translation - const { t } = useTranslation(); - // derived values - const currentTheme = useMemo(() => { - const userThemeOption = THEME_OPTIONS.find((t) => t.value === userProfile?.theme?.theme); - return userThemeOption || null; - }, [userProfile?.theme?.theme]); - - const handleThemeChange = useCallback( - async (themeOption: I_THEME_OPTION) => { - setTheme(themeOption.value); - - // If switching to custom theme and user has saved custom colors, apply them immediately - if ( - themeOption.value === "custom" && - userProfile?.theme?.primary && - userProfile?.theme?.background && - userProfile?.theme?.darkPalette !== undefined - ) { - applyCustomTheme( - userProfile.theme.primary, - userProfile.theme.background, - userProfile.theme.darkPalette ? "dark" : "light" - ); - } - - const updateCurrentUserThemePromise = updateUserTheme({ theme: themeOption.value }); - setPromiseToast(updateCurrentUserThemePromise, { - loading: "Updating theme...", - success: { - title: "Theme updated", - message: () => "Reloading to apply changes...", - }, - error: { - title: "Error!", - message: () => "Failed to update theme. Please try again.", - }, - }); - // Wait for the promise to resolve, then reload after showing toast - try { - await updateCurrentUserThemePromise; - window.location.reload(); - } catch (error) { - // Error toast already shown by setPromiseToast - console.error("Error updating theme:", error); - } - }, - [setTheme, updateUserTheme, userProfile] - ); - - return ( - <> - - {userProfile ? ( - - -
-
-

{t("theme")}

-

{t("select_or_customize_your_interface_color_scheme")}

-
-
- -
-
- {userProfile?.theme?.theme === "custom" && } -
- ) : ( -
- -
- )} - - ); -} - -export default observer(ProfileAppearancePage); diff --git a/apps/web/app/(all)/profile/notifications/page.tsx b/apps/web/app/(all)/profile/notifications/page.tsx deleted file mode 100644 index 725117e5c2..0000000000 --- a/apps/web/app/(all)/profile/notifications/page.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import useSWR from "swr"; -// components -import { useTranslation } from "@plane/i18n"; -import { PageHead } from "@/components/core/page-title"; -import { EmailNotificationForm } from "@/components/profile/notification/email-notification-form"; -import { ProfileSettingContentHeader } from "@/components/profile/profile-setting-content-header"; -import { ProfileSettingContentWrapper } from "@/components/profile/profile-setting-content-wrapper"; -import { EmailSettingsLoader } from "@/components/ui/loader/settings/email"; -// services -import { UserService } from "@/services/user.service"; - -const userService = new UserService(); - -export default function ProfileNotificationPage() { - const { t } = useTranslation(); - // fetching user email notification settings - const { data, isLoading } = useSWR("CURRENT_USER_EMAIL_NOTIFICATION_SETTINGS", () => - userService.currentUserEmailNotificationSettings() - ); - - if (!data || isLoading) { - return ; - } - - return ( - <> - - - - - - - ); -} diff --git a/apps/web/app/(all)/profile/page.tsx b/apps/web/app/(all)/profile/page.tsx deleted file mode 100644 index 9b6f8f083c..0000000000 --- a/apps/web/app/(all)/profile/page.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { observer } from "mobx-react"; -// plane imports -import { useTranslation } from "@plane/i18n"; -// components -import { LogoSpinner } from "@/components/common/logo-spinner"; -import { PageHead } from "@/components/core/page-title"; -import { ProfileForm } from "@/components/profile/form"; -import { ProfileSettingContentWrapper } from "@/components/profile/profile-setting-content-wrapper"; -// hooks -import { useUser } from "@/hooks/store/user"; - -function ProfileSettingsPage() { - const { t } = useTranslation(); - // store hooks - const { data: currentUser, userProfile } = useUser(); - - if (!currentUser) - return ( -
- -
- ); - - return ( - <> - - - - - - ); -} - -export default observer(ProfileSettingsPage); diff --git a/apps/web/app/(all)/profile/sidebar.tsx b/apps/web/app/(all)/profile/sidebar.tsx deleted file mode 100644 index c4ded1df24..0000000000 --- a/apps/web/app/(all)/profile/sidebar.tsx +++ /dev/null @@ -1,279 +0,0 @@ -import { useEffect, useRef, useState } from "react"; -import { observer } from "mobx-react"; -import Link from "next/link"; -import { usePathname } from "next/navigation"; -// icons -import { LogOut, MoveLeft, Activity, Bell, CircleUser, KeyRound, Settings2, CirclePlus, Mails } from "lucide-react"; -// plane imports -import { PROFILE_ACTION_LINKS } from "@plane/constants"; -import { useOutsideClickDetector } from "@plane/hooks"; -import { useTranslation } from "@plane/i18n"; -import { ChevronLeftIcon } from "@plane/propel/icons"; -import { TOAST_TYPE, setToast } from "@plane/propel/toast"; -import { Tooltip } from "@plane/propel/tooltip"; -import { cn, getFileURL } from "@plane/utils"; -// components -import { SidebarNavItem } from "@/components/sidebar/sidebar-navigation"; -// hooks -import { useAppTheme } from "@/hooks/store/use-app-theme"; -import { useWorkspace } from "@/hooks/store/use-workspace"; -import { useUser, useUserSettings } from "@/hooks/store/user"; -import { usePlatformOS } from "@/hooks/use-platform-os"; - -const WORKSPACE_ACTION_LINKS = [ - { - key: "create_workspace", - Icon: CirclePlus, - i18n_label: "create_workspace", - href: "/create-workspace", - }, - { - key: "invitations", - Icon: Mails, - i18n_label: "workspace_invites", - href: "/invitations", - }, -]; - -function ProjectActionIcons({ type, size, className = "" }: { type: string; size?: number; className?: string }) { - const icons = { - profile: CircleUser, - security: KeyRound, - activity: Activity, - preferences: Settings2, - notifications: Bell, - "api-tokens": KeyRound, - }; - - if (type === undefined) return null; - const Icon = icons[type as keyof typeof icons]; - if (!Icon) return null; - return ; -} - -export const ProfileLayoutSidebar = observer(function ProfileLayoutSidebar() { - // states - const [isSigningOut, setIsSigningOut] = useState(false); - // router - const pathname = usePathname(); - // store hooks - const { sidebarCollapsed, toggleSidebar } = useAppTheme(); - const { data: currentUser, signOut } = useUser(); - const { data: currentUserSettings } = useUserSettings(); - const { workspaces } = useWorkspace(); - const { isMobile } = usePlatformOS(); - const { t } = useTranslation(); - - const workspacesList = Object.values(workspaces ?? {}); - - // redirect url for normal mode - const redirectWorkspaceSlug = - currentUserSettings?.workspace?.last_workspace_slug || - currentUserSettings?.workspace?.fallback_workspace_slug || - ""; - - const ref = useRef(null); - - useOutsideClickDetector(ref, () => { - if (sidebarCollapsed === false) { - if (window.innerWidth < 768) { - toggleSidebar(); - } - } - }); - - useEffect(() => { - const handleResize = () => { - if (window.innerWidth <= 768) { - toggleSidebar(true); - } - }; - handleResize(); - window.addEventListener("resize", handleResize); - return () => { - window.removeEventListener("resize", handleResize); - }; - }, [toggleSidebar]); - - const handleItemClick = () => { - if (window.innerWidth < 768) { - toggleSidebar(); - } - }; - - const handleSignOut = async () => { - setIsSigningOut(true); - await signOut() - .catch(() => - setToast({ - type: TOAST_TYPE.ERROR, - title: t("sign_out.toast.error.title"), - message: t("sign_out.toast.error.message"), - }) - ) - .finally(() => setIsSigningOut(false)); - }; - - return ( -
-
- -
- - - - {!sidebarCollapsed && ( -

{t("profile_settings")}

- )} -
- -
- {!sidebarCollapsed && ( -
{t("your_account")}
- )} -
- {PROFILE_ACTION_LINKS.map((link) => { - if (link.key === "change-password" && currentUser?.is_password_autoset) return null; - - return ( - - - -
- - - {!sidebarCollapsed &&

{t(link.i18n_label)}

} -
-
-
- - ); - })} -
-
-
- {!sidebarCollapsed && ( -
{t("workspaces")}
- )} - {workspacesList && workspacesList.length > 0 && ( -
- {workspacesList.map((workspace) => ( - - - - {workspace?.logo_url && workspace.logo_url !== "" ? ( - Workspace Logo - ) : ( - (workspace?.name?.charAt(0) ?? "...") - )} - - {!sidebarCollapsed &&

{workspace.name}

} -
- - ))} -
- )} -
- {WORKSPACE_ACTION_LINKS.map((link) => ( - - -
- {} - {!sidebarCollapsed && t(link.i18n_label)} -
-
- - ))} -
-
-
-
- - - -
-
-
-
- ); -}); diff --git a/apps/web/app/(all)/settings/profile/[profileTabId]/page.tsx b/apps/web/app/(all)/settings/profile/[profileTabId]/page.tsx new file mode 100644 index 0000000000..0a2ba9c9ac --- /dev/null +++ b/apps/web/app/(all)/settings/profile/[profileTabId]/page.tsx @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { PROFILE_SETTINGS_TABS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import type { TProfileSettingsTabs } from "@plane/types"; +// components +import { LogoSpinner } from "@/components/common/logo-spinner"; +import { PageHead } from "@/components/core/page-title"; +import { ProfileSettingsContent } from "@/components/settings/profile/content"; +import { ProfileSettingsSidebarRoot } from "@/components/settings/profile/sidebar"; +// hooks +import { useUser } from "@/hooks/store/user"; +import { useAppRouter } from "@/hooks/use-app-router"; +// local imports +import type { Route } from "../+types/layout"; + +function ProfileSettingsPage(props: Route.ComponentProps) { + const { profileTabId } = props.params; + // router + const router = useAppRouter(); + // store hooks + const { data: currentUser } = useUser(); + // translation + const { t } = useTranslation(); + // derived values + const isAValidTab = PROFILE_SETTINGS_TABS.includes(profileTabId as TProfileSettingsTabs); + + if (!currentUser || !isAValidTab) + return ( +
+ +
+ ); + + return ( + <> + +
+
+ router.push(`/settings/profile/${tab}`)} + /> + +
+
+ + ); +} + +export default observer(ProfileSettingsPage); diff --git a/apps/web/app/(all)/profile/layout.tsx b/apps/web/app/(all)/settings/profile/layout.tsx similarity index 53% rename from apps/web/app/(all)/profile/layout.tsx rename to apps/web/app/(all)/settings/profile/layout.tsx index f5aebbfbbb..5b34677671 100644 --- a/apps/web/app/(all)/profile/layout.tsx +++ b/apps/web/app/(all)/settings/profile/layout.tsx @@ -1,20 +1,23 @@ -// components +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; -// wrappers +// components import { ProjectsAppPowerKProvider } from "@/components/power-k/projects-app-provider"; +// lib import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper"; -// layout -import { ProfileLayoutSidebar } from "./sidebar"; export default function ProfileSettingsLayout() { return ( <> -
- -
-
+
+
+
diff --git a/apps/web/app/(all)/sign-up/layout.tsx b/apps/web/app/(all)/sign-up/layout.tsx index daf5a0307b..97a8147e45 100644 --- a/apps/web/app/(all)/sign-up/layout.tsx +++ b/apps/web/app/(all)/sign-up/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; import type { Route } from "./+types/layout"; diff --git a/apps/web/app/(all)/sign-up/page.tsx b/apps/web/app/(all)/sign-up/page.tsx index b3563ae7d7..639d765cc5 100644 --- a/apps/web/app/(all)/sign-up/page.tsx +++ b/apps/web/app/(all)/sign-up/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import { AuthBase } from "@/components/auth-screens/auth-base"; // helpers diff --git a/apps/web/app/(all)/workspace-invitations/layout.tsx b/apps/web/app/(all)/workspace-invitations/layout.tsx index cab6733a62..b9a7337461 100644 --- a/apps/web/app/(all)/workspace-invitations/layout.tsx +++ b/apps/web/app/(all)/workspace-invitations/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; import type { Route } from "./+types/layout"; diff --git a/apps/web/app/(all)/workspace-invitations/page.tsx b/apps/web/app/(all)/workspace-invitations/page.tsx index 315d825f86..6d68136097 100644 --- a/apps/web/app/(all)/workspace-invitations/page.tsx +++ b/apps/web/app/(all)/workspace-invitations/page.tsx @@ -1,4 +1,9 @@ -import React from "react"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useSearchParams } from "next/navigation"; import useSWR from "swr"; @@ -16,7 +21,7 @@ import { useUser } from "@/hooks/store/user"; import { useAppRouter } from "@/hooks/use-app-router"; // wrappers import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper"; -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; // services // service initialization @@ -28,8 +33,8 @@ function WorkspaceInvitationPage() { // query params const searchParams = useSearchParams(); const invitation_id = searchParams.get("invitation_id"); - const email = searchParams.get("email"); const slug = searchParams.get("slug"); + const token = searchParams.get("token"); // store hooks const { data: currentUser } = useUser(); @@ -45,29 +50,29 @@ function WorkspaceInvitationPage() { workspaceService .joinWorkspace(invitationDetail.workspace.slug, invitationDetail.id, { accepted: true, - email: invitationDetail.email, + token: token, }) .then(() => { - if (email === currentUser?.email) { + if (invitationDetail.email === currentUser?.email) { router.push(`/${invitationDetail.workspace.slug}`); } else { - router.push(`/?${searchParams.toString()}`); + router.push("/"); } }) - .catch((err) => console.error(err)); + .catch((err: unknown) => console.error(err)); }; const handleReject = () => { - if (!invitationDetail) return; - workspaceService + if (!invitationDetail || !token) return; + void workspaceService .joinWorkspace(invitationDetail.workspace.slug, invitationDetail.id, { accepted: false, - email: invitationDetail.email, + token: token, }) .then(() => { router.push("/"); }) - .catch((err) => console.error(err)); + .catch((err: unknown) => console.error(err)); }; return ( diff --git a/apps/web/app/(home)/layout.tsx b/apps/web/app/(home)/layout.tsx index a972f662ac..c723b076cf 100644 --- a/apps/web/app/(home)/layout.tsx +++ b/apps/web/app/(home)/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Outlet } from "react-router"; // types import type { Route } from "./+types/layout"; diff --git a/apps/web/app/(home)/page.tsx b/apps/web/app/(home)/page.tsx index 657ee50179..4717705f16 100644 --- a/apps/web/app/(home)/page.tsx +++ b/apps/web/app/(home)/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // components import { AuthBase } from "@/components/auth-screens/auth-base"; diff --git a/apps/web/app/compat/next/helper.ts b/apps/web/app/compat/next/helper.ts index c046998702..c4edf3d545 100644 --- a/apps/web/app/compat/next/helper.ts +++ b/apps/web/app/compat/next/helper.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + /** * Ensures that a URL has a trailing slash while preserving query parameters and fragments * @param url - The URL to process diff --git a/apps/web/app/compat/next/image.tsx b/apps/web/app/compat/next/image.tsx index 58e8765eb5..f229d0d5ff 100644 --- a/apps/web/app/compat/next/image.tsx +++ b/apps/web/app/compat/next/image.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // Minimal shim so code using next/image compiles under React Router + Vite diff --git a/apps/web/app/compat/next/link.tsx b/apps/web/app/compat/next/link.tsx index b0bca4faf5..85177560fc 100644 --- a/apps/web/app/compat/next/link.tsx +++ b/apps/web/app/compat/next/link.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Link as RRLink } from "react-router"; import { ensureTrailingSlash } from "./helper"; diff --git a/apps/web/app/compat/next/navigation.ts b/apps/web/app/compat/next/navigation.ts index 7a5f099842..3803ffe1fb 100644 --- a/apps/web/app/compat/next/navigation.ts +++ b/apps/web/app/compat/next/navigation.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { useLocation, useNavigate, useParams as useParamsRR, useSearchParams as useSearchParamsRR } from "react-router"; import { ensureTrailingSlash } from "./helper"; diff --git a/apps/web/app/compat/next/script.tsx b/apps/web/app/compat/next/script.tsx index af1063dbf1..c2b470b790 100644 --- a/apps/web/app/compat/next/script.tsx +++ b/apps/web/app/compat/next/script.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; type ScriptProps = { diff --git a/apps/web/app/entry.client.tsx b/apps/web/app/entry.client.tsx index 9cf1c32deb..0a87135953 100644 --- a/apps/web/app/entry.client.tsx +++ b/apps/web/app/entry.client.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import * as Sentry from "@sentry/react-router"; import { startTransition, StrictMode } from "react"; import { hydrateRoot } from "react-dom/client"; diff --git a/apps/web/app/error/dev.tsx b/apps/web/app/error/dev.tsx index 8dd696f0bf..787f4baf90 100644 --- a/apps/web/app/error/dev.tsx +++ b/apps/web/app/error/dev.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { isRouteErrorResponse } from "react-router"; import { Banner } from "@plane/propel/banner"; diff --git a/apps/web/app/error/index.tsx b/apps/web/app/error/index.tsx index d7da7a8dbc..9c3712b6da 100644 --- a/apps/web/app/error/index.tsx +++ b/apps/web/app/error/index.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // hooks import { useAppRouter } from "@/hooks/use-app-router"; // layouts diff --git a/apps/web/app/error/prod.tsx b/apps/web/app/error/prod.tsx index 75148e7838..fdbfcd5f1d 100644 --- a/apps/web/app/error/prod.tsx +++ b/apps/web/app/error/prod.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTheme } from "next-themes"; // plane imports import { Button } from "@plane/propel/button"; diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 04a46a2058..ab41f06d4e 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import Script from "next/script"; // styles diff --git a/apps/web/app/not-found.tsx b/apps/web/app/not-found.tsx index 44290d63cd..13763951ce 100644 --- a/apps/web/app/not-found.tsx +++ b/apps/web/app/not-found.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import Link from "next/link"; // ui import { Button } from "@plane/propel/button"; diff --git a/apps/web/app/provider.tsx b/apps/web/app/provider.tsx index ef696647b2..a8a5d27188 100644 --- a/apps/web/app/provider.tsx +++ b/apps/web/app/provider.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { lazy, Suspense } from "react"; import { useTheme } from "next-themes"; import { SWRConfig } from "swr"; diff --git a/apps/web/app/root.tsx b/apps/web/app/root.tsx index 2fbfd46c64..1125cab392 100644 --- a/apps/web/app/root.tsx +++ b/apps/web/app/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import * as Sentry from "@sentry/react-router"; import Script from "next/script"; diff --git a/apps/web/app/routes.ts b/apps/web/app/routes.ts index e862bd15f4..cdfea2ea16 100644 --- a/apps/web/app/routes.ts +++ b/apps/web/app/routes.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { route } from "@react-router/dev/routes"; import type { RouteConfigEntry } from "@react-router/dev/routes"; import { coreRoutes } from "./routes/core"; diff --git a/apps/web/app/routes/core.ts b/apps/web/app/routes/core.ts index 0d21862142..30f4913ee8 100644 --- a/apps/web/app/routes/core.ts +++ b/apps/web/app/routes/core.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { index, layout, route } from "@react-router/dev/routes"; import type { RouteConfig, RouteConfigEntry } from "@react-router/dev/routes"; @@ -282,34 +288,6 @@ export const coreRoutes: RouteConfigEntry[] = [ ), ]), - // -------------------------------------------------------------------- - // ACCOUNT SETTINGS - // -------------------------------------------------------------------- - - layout("./(all)/[workspaceSlug]/(settings)/settings/account/layout.tsx", [ - route(":workspaceSlug/settings/account", "./(all)/[workspaceSlug]/(settings)/settings/account/page.tsx"), - route( - ":workspaceSlug/settings/account/activity", - "./(all)/[workspaceSlug]/(settings)/settings/account/activity/page.tsx" - ), - route( - ":workspaceSlug/settings/account/preferences", - "./(all)/[workspaceSlug]/(settings)/settings/account/preferences/page.tsx" - ), - route( - ":workspaceSlug/settings/account/notifications", - "./(all)/[workspaceSlug]/(settings)/settings/account/notifications/page.tsx" - ), - route( - ":workspaceSlug/settings/account/security", - "./(all)/[workspaceSlug]/(settings)/settings/account/security/page.tsx" - ), - route( - ":workspaceSlug/settings/account/api-tokens", - "./(all)/[workspaceSlug]/(settings)/settings/account/api-tokens/page.tsx" - ), - ]), - // -------------------------------------------------------------------- // PROJECT SETTINGS // -------------------------------------------------------------------- @@ -330,8 +308,24 @@ export const coreRoutes: RouteConfigEntry[] = [ ), // Project Features route( - ":workspaceSlug/settings/projects/:projectId/features", - "./(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/page.tsx" + ":workspaceSlug/settings/projects/:projectId/features/cycles", + "./(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/cycles/page.tsx" + ), + route( + ":workspaceSlug/settings/projects/:projectId/features/modules", + "./(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/modules/page.tsx" + ), + route( + ":workspaceSlug/settings/projects/:projectId/features/views", + "./(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/views/page.tsx" + ), + route( + ":workspaceSlug/settings/projects/:projectId/features/pages", + "./(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/pages/page.tsx" + ), + route( + ":workspaceSlug/settings/projects/:projectId/features/intake", + "./(all)/[workspaceSlug]/(settings)/settings/projects/[projectId]/features/intake/page.tsx" ), // Project States route( @@ -367,12 +361,8 @@ export const coreRoutes: RouteConfigEntry[] = [ // PROFILE SETTINGS // -------------------------------------------------------------------- - layout("./(all)/profile/layout.tsx", [ - route("profile", "./(all)/profile/page.tsx"), - route("profile/activity", "./(all)/profile/activity/page.tsx"), - route("profile/appearance", "./(all)/profile/appearance/page.tsx"), - route("profile/notifications", "./(all)/profile/notifications/page.tsx"), - route("profile/security", "./(all)/profile/security/page.tsx"), + layout("./(all)/settings/profile/layout.tsx", [ + route("settings/profile/:profileTabId", "./(all)/settings/profile/[profileTabId]/page.tsx"), ]), ]), @@ -393,7 +383,7 @@ export const coreRoutes: RouteConfigEntry[] = [ route(":workspaceSlug/analytics", "routes/redirects/core/analytics.tsx"), // API tokens redirect: /:workspaceSlug/settings/api-tokens - // → /:workspaceSlug/settings/account/api-tokens + // → /settings/profile/api-tokens route(":workspaceSlug/settings/api-tokens", "routes/redirects/core/api-tokens.tsx"), // Inbox redirect: /:workspaceSlug/projects/:projectId/inbox @@ -410,4 +400,10 @@ export const coreRoutes: RouteConfigEntry[] = [ // Register redirect route("register", "routes/redirects/core/register.tsx"), + + // Profile settings redirects + route("profile/*", "routes/redirects/core/profile-settings.tsx"), + + // Account settings redirects + route(":workspaceSlug/settings/account/*", "routes/redirects/core/workspace-account-settings.tsx"), ] satisfies RouteConfig; diff --git a/apps/web/app/routes/extended.ts b/apps/web/app/routes/extended.ts index bbc5aa4cc0..452d214ad9 100644 --- a/apps/web/app/routes/extended.ts +++ b/apps/web/app/routes/extended.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RouteConfigEntry } from "@react-router/dev/routes"; export const extendedRoutes: RouteConfigEntry[] = []; diff --git a/apps/web/app/routes/helper.ts b/apps/web/app/routes/helper.ts index 5db1c8855a..74dcab50ce 100644 --- a/apps/web/app/routes/helper.ts +++ b/apps/web/app/routes/helper.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RouteConfigEntry } from "@react-router/dev/routes"; /** diff --git a/apps/web/app/routes/redirects/core/accounts-signup.tsx b/apps/web/app/routes/redirects/core/accounts-signup.tsx index 5343e27bea..be1ca73ab2 100644 --- a/apps/web/app/routes/redirects/core/accounts-signup.tsx +++ b/apps/web/app/routes/redirects/core/accounts-signup.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { redirect } from "react-router"; export const clientLoader = () => { diff --git a/apps/web/app/routes/redirects/core/analytics.tsx b/apps/web/app/routes/redirects/core/analytics.tsx index 21bacf5097..3cc7c81efa 100644 --- a/apps/web/app/routes/redirects/core/analytics.tsx +++ b/apps/web/app/routes/redirects/core/analytics.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { redirect } from "react-router"; import type { Route } from "./+types/analytics"; diff --git a/apps/web/app/routes/redirects/core/api-tokens.tsx b/apps/web/app/routes/redirects/core/api-tokens.tsx index 68007aa416..9d070a1675 100644 --- a/apps/web/app/routes/redirects/core/api-tokens.tsx +++ b/apps/web/app/routes/redirects/core/api-tokens.tsx @@ -1,9 +1,13 @@ -import { redirect } from "react-router"; -import type { Route } from "./+types/api-tokens"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ -export const clientLoader = ({ params }: Route.ClientLoaderArgs) => { - const { workspaceSlug } = params; - throw redirect(`/${workspaceSlug}/settings/account/api-tokens/`); +import { redirect } from "react-router"; + +export const clientLoader = () => { + throw redirect(`/settings/profile/api-tokens/`); }; export default function ApiTokens() { diff --git a/apps/web/app/routes/redirects/core/inbox.tsx b/apps/web/app/routes/redirects/core/inbox.tsx index bf2bd9a503..2d71229a91 100644 --- a/apps/web/app/routes/redirects/core/inbox.tsx +++ b/apps/web/app/routes/redirects/core/inbox.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { redirect } from "react-router"; import type { Route } from "./+types/inbox"; diff --git a/apps/web/app/routes/redirects/core/index.ts b/apps/web/app/routes/redirects/core/index.ts index efd3ae40f8..e1eaeca46e 100644 --- a/apps/web/app/routes/redirects/core/index.ts +++ b/apps/web/app/routes/redirects/core/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { route } from "@react-router/dev/routes"; import type { RouteConfigEntry } from "@react-router/dev/routes"; @@ -14,7 +20,7 @@ export const coreRedirectRoutes: RouteConfigEntry[] = [ route(":workspaceSlug/analytics", "routes/redirects/core/analytics.tsx"), // API tokens redirect: /:workspaceSlug/settings/api-tokens - // → /:workspaceSlug/settings/account/api-tokens + // → /settings/profile/api-tokens route(":workspaceSlug/settings/api-tokens", "routes/redirects/core/api-tokens.tsx"), // Inbox redirect: /:workspaceSlug/projects/:projectId/inbox diff --git a/apps/web/app/routes/redirects/core/login.tsx b/apps/web/app/routes/redirects/core/login.tsx index ed49c8ca3e..d591a33fd7 100644 --- a/apps/web/app/routes/redirects/core/login.tsx +++ b/apps/web/app/routes/redirects/core/login.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { redirect } from "react-router"; export const clientLoader = () => { diff --git a/apps/web/app/routes/redirects/core/profile-settings.tsx b/apps/web/app/routes/redirects/core/profile-settings.tsx new file mode 100644 index 0000000000..82362df47e --- /dev/null +++ b/apps/web/app/routes/redirects/core/profile-settings.tsx @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { redirect } from "react-router"; +import type { Route } from "./+types/profile-settings"; + +export const clientLoader = ({ params, request }: Route.ClientLoaderArgs) => { + const searchParams = new URL(request.url).searchParams; + const splat = params["*"] || ""; + throw redirect(`/settings/profile/${splat || "general"}?${searchParams.toString()}`); +}; + +export default function ProfileSettings() { + return null; +} diff --git a/apps/web/app/routes/redirects/core/project-settings.tsx b/apps/web/app/routes/redirects/core/project-settings.tsx index da14c515a9..db74d57cc7 100644 --- a/apps/web/app/routes/redirects/core/project-settings.tsx +++ b/apps/web/app/routes/redirects/core/project-settings.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { redirect } from "react-router"; import type { Route } from "./+types/project-settings"; diff --git a/apps/web/app/routes/redirects/core/register.tsx b/apps/web/app/routes/redirects/core/register.tsx index 7910404957..bdcb453f97 100644 --- a/apps/web/app/routes/redirects/core/register.tsx +++ b/apps/web/app/routes/redirects/core/register.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { redirect } from "react-router"; export const clientLoader = () => { diff --git a/apps/web/app/routes/redirects/core/sign-in.tsx b/apps/web/app/routes/redirects/core/sign-in.tsx index 83a91a3eb4..5016e254ec 100644 --- a/apps/web/app/routes/redirects/core/sign-in.tsx +++ b/apps/web/app/routes/redirects/core/sign-in.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { redirect } from "react-router"; export const clientLoader = () => { diff --git a/apps/web/app/routes/redirects/core/signin.tsx b/apps/web/app/routes/redirects/core/signin.tsx index e440e83996..f557230de2 100644 --- a/apps/web/app/routes/redirects/core/signin.tsx +++ b/apps/web/app/routes/redirects/core/signin.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { redirect } from "react-router"; export const clientLoader = () => { diff --git a/apps/web/app/routes/redirects/core/workspace-account-settings.tsx b/apps/web/app/routes/redirects/core/workspace-account-settings.tsx new file mode 100644 index 0000000000..2e44a5bdad --- /dev/null +++ b/apps/web/app/routes/redirects/core/workspace-account-settings.tsx @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { redirect } from "react-router"; +import type { Route } from "./+types/workspace-account-settings"; + +export const clientLoader = ({ params, request }: Route.ClientLoaderArgs) => { + const searchParams = new URL(request.url).searchParams; + const splat = params["*"] || ""; + throw redirect(`/settings/profile/${splat || "general"}?${searchParams.toString()}`); +}; + +export default function WorkspaceAccountSettings() { + return null; +} diff --git a/apps/web/app/routes/redirects/extended/index.ts b/apps/web/app/routes/redirects/extended/index.ts index 7f2c496e15..7b4da929db 100644 --- a/apps/web/app/routes/redirects/extended/index.ts +++ b/apps/web/app/routes/redirects/extended/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RouteConfigEntry } from "@react-router/dev/routes"; export const extendedRedirectRoutes: RouteConfigEntry[] = []; diff --git a/apps/web/app/routes/redirects/index.ts b/apps/web/app/routes/redirects/index.ts index 4c78ea3545..b736b22f4b 100644 --- a/apps/web/app/routes/redirects/index.ts +++ b/apps/web/app/routes/redirects/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RouteConfigEntry } from "@react-router/dev/routes"; import { coreRedirectRoutes } from "./core"; import { extendedRedirectRoutes } from "./extended"; diff --git a/apps/web/ce/components/active-cycles/index.ts b/apps/web/ce/components/active-cycles/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/active-cycles/index.ts +++ b/apps/web/ce/components/active-cycles/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/active-cycles/root.tsx b/apps/web/ce/components/active-cycles/root.tsx index ae0aa9b1f7..81805656b3 100644 --- a/apps/web/ce/components/active-cycles/root.tsx +++ b/apps/web/ce/components/active-cycles/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // local imports import { WorkspaceActiveCyclesUpgrade } from "./workspace-active-cycles-upgrade"; diff --git a/apps/web/ce/components/active-cycles/workspace-active-cycles-upgrade.tsx b/apps/web/ce/components/active-cycles/workspace-active-cycles-upgrade.tsx index 512ef97093..d1702b94ce 100644 --- a/apps/web/ce/components/active-cycles/workspace-active-cycles-upgrade.tsx +++ b/apps/web/ce/components/active-cycles/workspace-active-cycles-upgrade.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { AlertOctagon, BarChart4, CircleDashed, Folder, Microscope } from "lucide-react"; // plane imports diff --git a/apps/web/ce/components/analytics/tabs.tsx b/apps/web/ce/components/analytics/tabs.tsx index 3cca973990..1fdbc0cbcf 100644 --- a/apps/web/ce/components/analytics/tabs.tsx +++ b/apps/web/ce/components/analytics/tabs.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { AnalyticsTab } from "@plane/types"; import { Overview } from "@/components/analytics/overview"; import { WorkItems } from "@/components/analytics/work-items"; diff --git a/apps/web/ce/components/analytics/use-analytics-tabs.tsx b/apps/web/ce/components/analytics/use-analytics-tabs.tsx index 71f1ab15fd..0387797512 100644 --- a/apps/web/ce/components/analytics/use-analytics-tabs.tsx +++ b/apps/web/ce/components/analytics/use-analytics-tabs.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { useTranslation } from "@plane/i18n"; import { getAnalyticsTabs } from "./tabs"; diff --git a/apps/web/ce/components/app-rail/app-rail-hoc.tsx b/apps/web/ce/components/app-rail/app-rail-hoc.tsx index 63d13e5c2e..82f25e1f68 100644 --- a/apps/web/ce/components/app-rail/app-rail-hoc.tsx +++ b/apps/web/ce/components/app-rail/app-rail-hoc.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // hoc/withDockItems.tsx import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/ce/components/app-rail/index.ts b/apps/web/ce/components/app-rail/index.ts index c29a9bf13a..8b6ba42a4c 100644 --- a/apps/web/ce/components/app-rail/index.ts +++ b/apps/web/ce/components/app-rail/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./app-rail-hoc"; diff --git a/apps/web/ce/components/automations/list/wrapper.tsx b/apps/web/ce/components/automations/list/wrapper.tsx index 80b819aa09..f884b403fd 100644 --- a/apps/web/ce/components/automations/list/wrapper.tsx +++ b/apps/web/ce/components/automations/list/wrapper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + type Props = { projectId: string; workspaceSlug: string; diff --git a/apps/web/ce/components/automations/root.tsx b/apps/web/ce/components/automations/root.tsx index 9dbb44942f..f36f36d3ce 100644 --- a/apps/web/ce/components/automations/root.tsx +++ b/apps/web/ce/components/automations/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; diff --git a/apps/web/ce/components/breadcrumbs/common.tsx b/apps/web/ce/components/breadcrumbs/common.tsx index 1aaeaaa78f..9040cb21b5 100644 --- a/apps/web/ce/components/breadcrumbs/common.tsx +++ b/apps/web/ce/components/breadcrumbs/common.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // local components import { useProjectNavigationPreferences } from "@/hooks/use-navigation-preferences"; import { ProjectBreadcrumb } from "./project"; diff --git a/apps/web/ce/components/breadcrumbs/project-feature.tsx b/apps/web/ce/components/breadcrumbs/project-feature.tsx index 51d26d8ea6..4b076a7abd 100644 --- a/apps/web/ce/components/breadcrumbs/project-feature.tsx +++ b/apps/web/ce/components/breadcrumbs/project-feature.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/ce/components/breadcrumbs/project.tsx b/apps/web/ce/components/breadcrumbs/project.tsx index fc17a5eb1f..b83ecf0470 100644 --- a/apps/web/ce/components/breadcrumbs/project.tsx +++ b/apps/web/ce/components/breadcrumbs/project.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Logo } from "@plane/propel/emoji-icon-picker"; import { ProjectIcon } from "@plane/propel/icons"; diff --git a/apps/web/ce/components/browse/workItem-detail.tsx b/apps/web/ce/components/browse/workItem-detail.tsx index 64c466fbdf..b56a9d940a 100644 --- a/apps/web/ce/components/browse/workItem-detail.tsx +++ b/apps/web/ce/components/browse/workItem-detail.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import type { TIssue } from "@plane/types"; import { IssueDetailRoot } from "@/components/issues/issue-detail/root"; diff --git a/apps/web/ce/components/command-palette/actions/index.ts b/apps/web/ce/components/command-palette/actions/index.ts index c7f1e122d1..a6961e2387 100644 --- a/apps/web/ce/components/command-palette/actions/index.ts +++ b/apps/web/ce/components/command-palette/actions/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./work-item-actions"; diff --git a/apps/web/ce/components/command-palette/actions/work-item-actions/change-state-list.tsx b/apps/web/ce/components/command-palette/actions/work-item-actions/change-state-list.tsx index 91ccd7444c..69e4aed88e 100644 --- a/apps/web/ce/components/command-palette/actions/work-item-actions/change-state-list.tsx +++ b/apps/web/ce/components/command-palette/actions/work-item-actions/change-state-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Command } from "cmdk"; import { observer } from "mobx-react"; import { EIconSize } from "@plane/constants"; diff --git a/apps/web/ce/components/command-palette/actions/work-item-actions/index.ts b/apps/web/ce/components/command-palette/actions/work-item-actions/index.ts index ac7f8aa866..3f2f8c0718 100644 --- a/apps/web/ce/components/command-palette/actions/work-item-actions/index.ts +++ b/apps/web/ce/components/command-palette/actions/work-item-actions/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./change-state-list"; diff --git a/apps/web/ce/components/command-palette/helpers.tsx b/apps/web/ce/components/command-palette/helpers.tsx index 714f9a7e59..d691579226 100644 --- a/apps/web/ce/components/command-palette/helpers.tsx +++ b/apps/web/ce/components/command-palette/helpers.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { LayoutGrid } from "lucide-react"; // plane imports import { CycleIcon, ModuleIcon, PageIcon, ProjectIcon, ViewsIcon } from "@plane/propel/icons"; diff --git a/apps/web/ce/components/command-palette/index.ts b/apps/web/ce/components/command-palette/index.ts index cb220b2bd9..128f77fb15 100644 --- a/apps/web/ce/components/command-palette/index.ts +++ b/apps/web/ce/components/command-palette/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./actions"; export * from "./helpers"; diff --git a/apps/web/ce/components/command-palette/modals/project-level.tsx b/apps/web/ce/components/command-palette/modals/project-level.tsx index baf430f55e..e01b002efd 100644 --- a/apps/web/ce/components/command-palette/modals/project-level.tsx +++ b/apps/web/ce/components/command-palette/modals/project-level.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components import { CycleCreateUpdateModal } from "@/components/cycles/modal"; diff --git a/apps/web/ce/components/command-palette/modals/work-item-level.tsx b/apps/web/ce/components/command-palette/modals/work-item-level.tsx index 8f71596c7f..cb9d8dc228 100644 --- a/apps/web/ce/components/command-palette/modals/work-item-level.tsx +++ b/apps/web/ce/components/command-palette/modals/work-item-level.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/ce/components/command-palette/modals/workspace-level.tsx b/apps/web/ce/components/command-palette/modals/workspace-level.tsx index 6a82d54e91..e07f5d1a38 100644 --- a/apps/web/ce/components/command-palette/modals/workspace-level.tsx +++ b/apps/web/ce/components/command-palette/modals/workspace-level.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components import { CreateProjectModal } from "@/components/project/create-project-modal"; diff --git a/apps/web/ce/components/command-palette/power-k/constants.ts b/apps/web/ce/components/command-palette/power-k/constants.ts index 3b2a051c20..870a4f46ba 100644 --- a/apps/web/ce/components/command-palette/power-k/constants.ts +++ b/apps/web/ce/components/command-palette/power-k/constants.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // core import type { TPowerKModalPageDetails } from "@/components/power-k/ui/modal/constants"; // local imports diff --git a/apps/web/ce/components/command-palette/power-k/context-detector.ts b/apps/web/ce/components/command-palette/power-k/context-detector.ts index e84ca20b89..42dcc201a4 100644 --- a/apps/web/ce/components/command-palette/power-k/context-detector.ts +++ b/apps/web/ce/components/command-palette/power-k/context-detector.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Params } from "react-router"; // local imports import type { TPowerKContextTypeExtended } from "./types"; diff --git a/apps/web/ce/components/command-palette/power-k/hooks/use-extended-context-indicator.ts b/apps/web/ce/components/command-palette/power-k/hooks/use-extended-context-indicator.ts index e92e54e2e6..e24bc08aa1 100644 --- a/apps/web/ce/components/command-palette/power-k/hooks/use-extended-context-indicator.ts +++ b/apps/web/ce/components/command-palette/power-k/hooks/use-extended-context-indicator.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // local imports import type { TPowerKContextType } from "@/components/power-k/core/types"; diff --git a/apps/web/ce/components/command-palette/power-k/pages/context-based/index.ts b/apps/web/ce/components/command-palette/power-k/pages/context-based/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/command-palette/power-k/pages/context-based/index.ts +++ b/apps/web/ce/components/command-palette/power-k/pages/context-based/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/command-palette/power-k/pages/context-based/root.tsx b/apps/web/ce/components/command-palette/power-k/pages/context-based/root.tsx index 12833d9df3..1cac3d3f0c 100644 --- a/apps/web/ce/components/command-palette/power-k/pages/context-based/root.tsx +++ b/apps/web/ce/components/command-palette/power-k/pages/context-based/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import type { TPowerKCommandConfig } from "@/components/power-k/core/types"; import type { ContextBasedActionsProps, TContextEntityMap } from "@/components/power-k/ui/pages/context-based"; diff --git a/apps/web/ce/components/command-palette/power-k/pages/context-based/work-item/state-menu-item.tsx b/apps/web/ce/components/command-palette/power-k/pages/context-based/work-item/state-menu-item.tsx index 2478fdf4f0..f9e2497b00 100644 --- a/apps/web/ce/components/command-palette/power-k/pages/context-based/work-item/state-menu-item.tsx +++ b/apps/web/ce/components/command-palette/power-k/pages/context-based/work-item/state-menu-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import { StateGroupIcon } from "@plane/propel/icons"; diff --git a/apps/web/ce/components/command-palette/power-k/search/no-results-command.tsx b/apps/web/ce/components/command-palette/power-k/search/no-results-command.tsx index 8639b52be8..af4debf751 100644 --- a/apps/web/ce/components/command-palette/power-k/search/no-results-command.tsx +++ b/apps/web/ce/components/command-palette/power-k/search/no-results-command.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Command } from "cmdk"; import { useTranslation } from "@plane/i18n"; import { SearchIcon } from "@plane/propel/icons"; diff --git a/apps/web/ce/components/command-palette/power-k/search/search-results-map.tsx b/apps/web/ce/components/command-palette/power-k/search/search-results-map.tsx index 90d5b5f20a..c137f6f779 100644 --- a/apps/web/ce/components/command-palette/power-k/search/search-results-map.tsx +++ b/apps/web/ce/components/command-palette/power-k/search/search-results-map.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import type { TPowerKSearchResultGroupDetails } from "@/components/power-k/ui/modal/search-results-map"; // local imports diff --git a/apps/web/ce/components/command-palette/power-k/types.ts b/apps/web/ce/components/command-palette/power-k/types.ts index 4e497f8b87..9d0086f70f 100644 --- a/apps/web/ce/components/command-palette/power-k/types.ts +++ b/apps/web/ce/components/command-palette/power-k/types.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export type TPowerKContextTypeExtended = never; export type TPowerKPageTypeExtended = never; diff --git a/apps/web/ce/components/comments/comment-block.tsx b/apps/web/ce/components/comments/comment-block.tsx index 47590e53ff..84feaa6ee3 100644 --- a/apps/web/ce/components/comments/comment-block.tsx +++ b/apps/web/ce/components/comments/comment-block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { useRef } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/ce/components/comments/index.ts b/apps/web/ce/components/comments/index.ts index 6144f52360..3bbc477fb9 100644 --- a/apps/web/ce/components/comments/index.ts +++ b/apps/web/ce/components/comments/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./comment-block"; export { CommentCardDisplay } from "@/components/comments/card/display"; diff --git a/apps/web/ce/components/common/extended-app-header.tsx b/apps/web/ce/components/common/extended-app-header.tsx index 10c782d32b..8149e25c69 100644 --- a/apps/web/ce/components/common/extended-app-header.tsx +++ b/apps/web/ce/components/common/extended-app-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { observer } from "mobx-react"; import { useParams } from "react-router"; diff --git a/apps/web/ce/components/common/modal/global.tsx b/apps/web/ce/components/common/modal/global.tsx new file mode 100644 index 0000000000..98292c6bd8 --- /dev/null +++ b/apps/web/ce/components/common/modal/global.tsx @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { lazy, Suspense } from "react"; +import { observer } from "mobx-react"; + +const ProfileSettingsModal = lazy(() => + import("@/components/settings/profile/modal").then((module) => ({ + default: module.ProfileSettingsModal, + })) +); + +type TGlobalModalsProps = { + workspaceSlug: string; +}; + +/** + * GlobalModals component manages all workspace-level modals across Plane applications. + * + * This includes: + * - Profile settings modal + */ +export const GlobalModals = observer(function GlobalModals(_props: TGlobalModalsProps) { + return ( + + + + ); +}); diff --git a/apps/web/ce/components/common/quick-actions-factory.tsx b/apps/web/ce/components/common/quick-actions-factory.tsx index a59a61e533..9f94c8ddf1 100644 --- a/apps/web/ce/components/common/quick-actions-factory.tsx +++ b/apps/web/ce/components/common/quick-actions-factory.tsx @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export { useQuickActionsFactory } from "@/components/common/quick-actions-factory"; diff --git a/apps/web/ce/components/common/subscription/subscription-pill.tsx b/apps/web/ce/components/common/subscription/subscription-pill.tsx index e03ecf8d75..f286b870a3 100644 --- a/apps/web/ce/components/common/subscription/subscription-pill.tsx +++ b/apps/web/ce/components/common/subscription/subscription-pill.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IWorkspace } from "@plane/types"; type TProps = { diff --git a/apps/web/ce/components/cycles/active-cycle/index.ts b/apps/web/ce/components/cycles/active-cycle/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/cycles/active-cycle/index.ts +++ b/apps/web/ce/components/cycles/active-cycle/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/cycles/active-cycle/root.tsx b/apps/web/ce/components/cycles/active-cycle/root.tsx index 465dfaa602..99ffdae74f 100644 --- a/apps/web/ce/components/cycles/active-cycle/root.tsx +++ b/apps/web/ce/components/cycles/active-cycle/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useTheme } from "next-themes"; import { Disclosure } from "@headlessui/react"; diff --git a/apps/web/ce/components/cycles/additional-actions.tsx b/apps/web/ce/components/cycles/additional-actions.tsx index 96a4a004d1..843e9e51e9 100644 --- a/apps/web/ce/components/cycles/additional-actions.tsx +++ b/apps/web/ce/components/cycles/additional-actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; type Props = { diff --git a/apps/web/ce/components/cycles/analytics-sidebar/base.tsx b/apps/web/ce/components/cycles/analytics-sidebar/base.tsx index 3bcf283217..5dd97c32dd 100644 --- a/apps/web/ce/components/cycles/analytics-sidebar/base.tsx +++ b/apps/web/ce/components/cycles/analytics-sidebar/base.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Fragment } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/ce/components/cycles/analytics-sidebar/index.ts b/apps/web/ce/components/cycles/analytics-sidebar/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/cycles/analytics-sidebar/index.ts +++ b/apps/web/ce/components/cycles/analytics-sidebar/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/cycles/analytics-sidebar/root.tsx b/apps/web/ce/components/cycles/analytics-sidebar/root.tsx index 947a8844cb..ce0865c4d4 100644 --- a/apps/web/ce/components/cycles/analytics-sidebar/root.tsx +++ b/apps/web/ce/components/cycles/analytics-sidebar/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; // components diff --git a/apps/web/ce/components/cycles/end-cycle/index.ts b/apps/web/ce/components/cycles/end-cycle/index.ts index 031608e25f..dd65a9ec34 100644 --- a/apps/web/ce/components/cycles/end-cycle/index.ts +++ b/apps/web/ce/components/cycles/end-cycle/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./modal"; diff --git a/apps/web/ce/components/cycles/end-cycle/modal.tsx b/apps/web/ce/components/cycles/end-cycle/modal.tsx index 87b4ded455..98c906942b 100644 --- a/apps/web/ce/components/cycles/end-cycle/modal.tsx +++ b/apps/web/ce/components/cycles/end-cycle/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; interface Props { diff --git a/apps/web/ce/components/cycles/index.ts b/apps/web/ce/components/cycles/index.ts index 1da1150255..defcd502a9 100644 --- a/apps/web/ce/components/cycles/index.ts +++ b/apps/web/ce/components/cycles/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./active-cycle"; export * from "./analytics-sidebar"; export * from "./additional-actions"; diff --git a/apps/web/ce/components/de-dupe/de-dupe-button.tsx b/apps/web/ce/components/de-dupe/de-dupe-button.tsx index 1575abac83..2060f15566 100644 --- a/apps/web/ce/components/de-dupe/de-dupe-button.tsx +++ b/apps/web/ce/components/de-dupe/de-dupe-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; // local components diff --git a/apps/web/ce/components/de-dupe/duplicate-modal/index.ts b/apps/web/ce/components/de-dupe/duplicate-modal/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/de-dupe/duplicate-modal/index.ts +++ b/apps/web/ce/components/de-dupe/duplicate-modal/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/de-dupe/duplicate-modal/root.tsx b/apps/web/ce/components/de-dupe/duplicate-modal/root.tsx index 577152beee..60e3ec924c 100644 --- a/apps/web/ce/components/de-dupe/duplicate-modal/root.tsx +++ b/apps/web/ce/components/de-dupe/duplicate-modal/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // types import type { TDeDupeIssue } from "@plane/types"; diff --git a/apps/web/ce/components/de-dupe/duplicate-popover/index.ts b/apps/web/ce/components/de-dupe/duplicate-popover/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/de-dupe/duplicate-popover/index.ts +++ b/apps/web/ce/components/de-dupe/duplicate-popover/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/de-dupe/duplicate-popover/root.tsx b/apps/web/ce/components/de-dupe/duplicate-popover/root.tsx index 957fb01f21..51dfff897f 100644 --- a/apps/web/ce/components/de-dupe/duplicate-popover/root.tsx +++ b/apps/web/ce/components/de-dupe/duplicate-popover/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/ce/components/de-dupe/issue-block/button-label.tsx b/apps/web/ce/components/de-dupe/issue-block/button-label.tsx index 2ec2b8caa6..461187bd09 100644 --- a/apps/web/ce/components/de-dupe/issue-block/button-label.tsx +++ b/apps/web/ce/components/de-dupe/issue-block/button-label.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; type TDeDupeIssueButtonLabelProps = { diff --git a/apps/web/ce/components/desktop/helper.ts b/apps/web/ce/components/desktop/helper.ts index 2082e74ed8..cae74441f4 100644 --- a/apps/web/ce/components/desktop/helper.ts +++ b/apps/web/ce/components/desktop/helper.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export const isSidebarToggleVisible = () => true; diff --git a/apps/web/ce/components/desktop/index.ts b/apps/web/ce/components/desktop/index.ts index c562f81021..8b7f5878ec 100644 --- a/apps/web/ce/components/desktop/index.ts +++ b/apps/web/ce/components/desktop/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./helper"; export * from "./sidebar-workspace-menu"; diff --git a/apps/web/ce/components/desktop/sidebar-workspace-menu.tsx b/apps/web/ce/components/desktop/sidebar-workspace-menu.tsx index 98ea7e961e..9dadb9ef2e 100644 --- a/apps/web/ce/components/desktop/sidebar-workspace-menu.tsx +++ b/apps/web/ce/components/desktop/sidebar-workspace-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export function DesktopSidebarWorkspaceMenu() { return null; } diff --git a/apps/web/ce/components/editor/embeds/mentions/index.ts b/apps/web/ce/components/editor/embeds/mentions/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/editor/embeds/mentions/index.ts +++ b/apps/web/ce/components/editor/embeds/mentions/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/editor/embeds/mentions/root.tsx b/apps/web/ce/components/editor/embeds/mentions/root.tsx index 2f3f9a5b6a..21802e0a6d 100644 --- a/apps/web/ce/components/editor/embeds/mentions/root.tsx +++ b/apps/web/ce/components/editor/embeds/mentions/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import type { TCallbackMentionComponentProps } from "@plane/editor"; diff --git a/apps/web/ce/components/epics/epic-modal/index.ts b/apps/web/ce/components/epics/epic-modal/index.ts index 031608e25f..dd65a9ec34 100644 --- a/apps/web/ce/components/epics/epic-modal/index.ts +++ b/apps/web/ce/components/epics/epic-modal/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./modal"; diff --git a/apps/web/ce/components/epics/epic-modal/modal.tsx b/apps/web/ce/components/epics/epic-modal/modal.tsx index f1dbe83d53..14509d580d 100644 --- a/apps/web/ce/components/epics/epic-modal/modal.tsx +++ b/apps/web/ce/components/epics/epic-modal/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import type { TIssue } from "@plane/types"; diff --git a/apps/web/ce/components/estimates/estimate-list-item-buttons.tsx b/apps/web/ce/components/estimates/estimate-list-item-buttons.tsx index d20c0217ac..02934a2311 100644 --- a/apps/web/ce/components/estimates/estimate-list-item-buttons.tsx +++ b/apps/web/ce/components/estimates/estimate-list-item-buttons.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { PROJECT_SETTINGS_TRACKER_ELEMENTS } from "@plane/constants"; import { TrashIcon } from "@plane/propel/icons"; diff --git a/apps/web/ce/components/estimates/helper.tsx b/apps/web/ce/components/estimates/helper.tsx index 71b5be8a18..12c91f62f7 100644 --- a/apps/web/ce/components/estimates/helper.tsx +++ b/apps/web/ce/components/estimates/helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TEstimateSystemKeys } from "@plane/types"; import { EEstimateSystem } from "@plane/types"; diff --git a/apps/web/ce/components/estimates/index.ts b/apps/web/ce/components/estimates/index.ts index 4852874e24..7fd8f88cfd 100644 --- a/apps/web/ce/components/estimates/index.ts +++ b/apps/web/ce/components/estimates/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./estimate-list-item-buttons"; export * from "./update"; export * from "./points"; diff --git a/apps/web/ce/components/estimates/inputs/index.ts b/apps/web/ce/components/estimates/inputs/index.ts index 49b9c68c44..778cadf32f 100644 --- a/apps/web/ce/components/estimates/inputs/index.ts +++ b/apps/web/ce/components/estimates/inputs/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./time-input"; diff --git a/apps/web/ce/components/estimates/inputs/time-input.tsx b/apps/web/ce/components/estimates/inputs/time-input.tsx index 17d6cec9df..f210f0083a 100644 --- a/apps/web/ce/components/estimates/inputs/time-input.tsx +++ b/apps/web/ce/components/estimates/inputs/time-input.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; export type TEstimateTimeInputProps = { diff --git a/apps/web/ce/components/estimates/points/delete.tsx b/apps/web/ce/components/estimates/points/delete.tsx index e59dae5547..f5969a9392 100644 --- a/apps/web/ce/components/estimates/points/delete.tsx +++ b/apps/web/ce/components/estimates/points/delete.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import type { TEstimatePointsObject, TEstimateSystemKeys, TEstimateTypeErrorObject } from "@plane/types"; diff --git a/apps/web/ce/components/estimates/points/index.ts b/apps/web/ce/components/estimates/points/index.ts index fe722bd231..c83c4600f4 100644 --- a/apps/web/ce/components/estimates/points/index.ts +++ b/apps/web/ce/components/estimates/points/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./delete"; diff --git a/apps/web/ce/components/estimates/update/index.ts b/apps/web/ce/components/estimates/update/index.ts index 031608e25f..dd65a9ec34 100644 --- a/apps/web/ce/components/estimates/update/index.ts +++ b/apps/web/ce/components/estimates/update/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./modal"; diff --git a/apps/web/ce/components/estimates/update/modal.tsx b/apps/web/ce/components/estimates/update/modal.tsx index 09c6e7649f..cfb6720977 100644 --- a/apps/web/ce/components/estimates/update/modal.tsx +++ b/apps/web/ce/components/estimates/update/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/ce/components/gantt-chart/blocks/block-row-list.tsx b/apps/web/ce/components/gantt-chart/blocks/block-row-list.tsx index 8de8f722bb..25cb82a645 100644 --- a/apps/web/ce/components/gantt-chart/blocks/block-row-list.tsx +++ b/apps/web/ce/components/gantt-chart/blocks/block-row-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import type { IBlockUpdateData, IGanttBlock } from "@plane/types"; import RenderIfVisible from "@/components/core/render-if-visible-HOC"; diff --git a/apps/web/ce/components/gantt-chart/blocks/blocks-list.tsx b/apps/web/ce/components/gantt-chart/blocks/blocks-list.tsx index 1a14dd2de3..2c252ded63 100644 --- a/apps/web/ce/components/gantt-chart/blocks/blocks-list.tsx +++ b/apps/web/ce/components/gantt-chart/blocks/blocks-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // import type { IBlockUpdateDependencyData } from "@plane/types"; diff --git a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/index.ts b/apps/web/ce/components/gantt-chart/dependency/blockDraggables/index.ts index c2f4f8aecf..47ac85d92b 100644 --- a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/index.ts +++ b/apps/web/ce/components/gantt-chart/dependency/blockDraggables/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./left-draggable"; export * from "./right-draggable"; diff --git a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx b/apps/web/ce/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx index 5257bacece..252e331760 100644 --- a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx +++ b/apps/web/ce/components/gantt-chart/dependency/blockDraggables/left-draggable.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RefObject } from "react"; import type { IGanttBlock } from "@plane/types"; diff --git a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx b/apps/web/ce/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx index a8388d4f40..059702dd00 100644 --- a/apps/web/ce/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx +++ b/apps/web/ce/components/gantt-chart/dependency/blockDraggables/right-draggable.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RefObject } from "react"; import type { IGanttBlock } from "@plane/types"; diff --git a/apps/web/ce/components/gantt-chart/dependency/dependency-paths.tsx b/apps/web/ce/components/gantt-chart/dependency/dependency-paths.tsx index d88f5206da..92c531cfef 100644 --- a/apps/web/ce/components/gantt-chart/dependency/dependency-paths.tsx +++ b/apps/web/ce/components/gantt-chart/dependency/dependency-paths.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; type Props = { diff --git a/apps/web/ce/components/gantt-chart/dependency/draggable-dependency-path.tsx b/apps/web/ce/components/gantt-chart/dependency/draggable-dependency-path.tsx index d37b2f5506..0f73549ef1 100644 --- a/apps/web/ce/components/gantt-chart/dependency/draggable-dependency-path.tsx +++ b/apps/web/ce/components/gantt-chart/dependency/draggable-dependency-path.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export function TimelineDraggablePath() { return <>; } diff --git a/apps/web/ce/components/gantt-chart/dependency/index.ts b/apps/web/ce/components/gantt-chart/dependency/index.ts index 91d0018db5..d92fa43db6 100644 --- a/apps/web/ce/components/gantt-chart/dependency/index.ts +++ b/apps/web/ce/components/gantt-chart/dependency/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./blockDraggables"; export * from "./dependency-paths"; export * from "./draggable-dependency-path"; diff --git a/apps/web/ce/components/gantt-chart/index.ts b/apps/web/ce/components/gantt-chart/index.ts index d652e4bbce..cebec203cb 100644 --- a/apps/web/ce/components/gantt-chart/index.ts +++ b/apps/web/ce/components/gantt-chart/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./dependency"; export * from "./layers"; diff --git a/apps/web/ce/components/gantt-chart/layers/additional-layers.tsx b/apps/web/ce/components/gantt-chart/layers/additional-layers.tsx index 5cc7c2ce5e..0a5ced219e 100644 --- a/apps/web/ce/components/gantt-chart/layers/additional-layers.tsx +++ b/apps/web/ce/components/gantt-chart/layers/additional-layers.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; type Props = { diff --git a/apps/web/ce/components/gantt-chart/layers/index.ts b/apps/web/ce/components/gantt-chart/layers/index.ts index fcd77a972c..84012f80a4 100644 --- a/apps/web/ce/components/gantt-chart/layers/index.ts +++ b/apps/web/ce/components/gantt-chart/layers/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export { GanttAdditionalLayers } from "./additional-layers"; diff --git a/apps/web/ce/components/global/index.ts b/apps/web/ce/components/global/index.ts index 08b85c764c..1d62fc2cfe 100644 --- a/apps/web/ce/components/global/index.ts +++ b/apps/web/ce/components/global/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./version-number"; diff --git a/apps/web/ce/components/global/product-updates/changelog.tsx b/apps/web/ce/components/global/product-updates/changelog.tsx index 672b7490bc..2418a4f397 100644 --- a/apps/web/ce/components/global/product-updates/changelog.tsx +++ b/apps/web/ce/components/global/product-updates/changelog.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useEffect, useRef } from "react"; import { observer } from "mobx-react"; // hooks diff --git a/apps/web/ce/components/global/product-updates/header.tsx b/apps/web/ce/components/global/product-updates/header.tsx index 0f6d26e572..93720d58c2 100644 --- a/apps/web/ce/components/global/product-updates/header.tsx +++ b/apps/web/ce/components/global/product-updates/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import packageJson from "package.json"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/ce/components/global/version-number.tsx b/apps/web/ce/components/global/version-number.tsx index b04ae581ea..a883eac9d6 100644 --- a/apps/web/ce/components/global/version-number.tsx +++ b/apps/web/ce/components/global/version-number.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // assets import { useTranslation } from "@plane/i18n"; import packageJson from "package.json"; diff --git a/apps/web/ce/components/home/header.tsx b/apps/web/ce/components/home/header.tsx index ac905596ee..5fab957355 100644 --- a/apps/web/ce/components/home/header.tsx +++ b/apps/web/ce/components/home/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export function HomePageHeader() { return <>; } diff --git a/apps/web/ce/components/home/index.ts b/apps/web/ce/components/home/index.ts index d64a7a983d..9a89775602 100644 --- a/apps/web/ce/components/home/index.ts +++ b/apps/web/ce/components/home/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./peek-overviews"; diff --git a/apps/web/ce/components/home/peek-overviews.tsx b/apps/web/ce/components/home/peek-overviews.tsx index 74d2d7d5a9..2c869df144 100644 --- a/apps/web/ce/components/home/peek-overviews.tsx +++ b/apps/web/ce/components/home/peek-overviews.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { IssuePeekOverview } from "@/components/issues/peek-overview"; import { useIssueDetail } from "@/hooks/store/use-issue-detail"; diff --git a/apps/web/ce/components/inbox/source-pill.tsx b/apps/web/ce/components/inbox/source-pill.tsx index 1d8bc06eae..a9f2303088 100644 --- a/apps/web/ce/components/inbox/source-pill.tsx +++ b/apps/web/ce/components/inbox/source-pill.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { EInboxIssueSource } from "@plane/types"; export type TInboxSourcePill = { diff --git a/apps/web/ce/components/instance/index.ts b/apps/web/ce/components/instance/index.ts index 960f954e75..78624d0ec5 100644 --- a/apps/web/ce/components/instance/index.ts +++ b/apps/web/ce/components/instance/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./maintenance-message"; diff --git a/apps/web/ce/components/instance/maintenance-message.tsx b/apps/web/ce/components/instance/maintenance-message.tsx index e8dc103529..d33b3e2bad 100644 --- a/apps/web/ce/components/instance/maintenance-message.tsx +++ b/apps/web/ce/components/instance/maintenance-message.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export function MaintenanceMessage() { const linkMap = [ { diff --git a/apps/web/ce/components/issues/bulk-operations/index.ts b/apps/web/ce/components/issues/bulk-operations/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/issues/bulk-operations/index.ts +++ b/apps/web/ce/components/issues/bulk-operations/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/issues/bulk-operations/root.tsx b/apps/web/ce/components/issues/bulk-operations/root.tsx index fef3b7220d..567fd12d23 100644 --- a/apps/web/ce/components/issues/bulk-operations/root.tsx +++ b/apps/web/ce/components/issues/bulk-operations/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components import { BulkOperationsUpgradeBanner } from "@/components/issues/bulk-operations/upgrade-banner"; diff --git a/apps/web/ce/components/issues/filters/applied-filters/issue-types.tsx b/apps/web/ce/components/issues/filters/applied-filters/issue-types.tsx index 21047074a9..09ff7737f5 100644 --- a/apps/web/ce/components/issues/filters/applied-filters/issue-types.tsx +++ b/apps/web/ce/components/issues/filters/applied-filters/issue-types.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; type Props = { diff --git a/apps/web/ce/components/issues/filters/issue-types.tsx b/apps/web/ce/components/issues/filters/issue-types.tsx index dc3397e2cb..8c9bc6f060 100644 --- a/apps/web/ce/components/issues/filters/issue-types.tsx +++ b/apps/web/ce/components/issues/filters/issue-types.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/ce/components/issues/filters/team-project.tsx b/apps/web/ce/components/issues/filters/team-project.tsx index dd82531901..e231da3d15 100644 --- a/apps/web/ce/components/issues/filters/team-project.tsx +++ b/apps/web/ce/components/issues/filters/team-project.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/ce/components/issues/header.tsx b/apps/web/ce/components/issues/header.tsx index 89772ae197..4871217bb9 100644 --- a/apps/web/ce/components/issues/header.tsx +++ b/apps/web/ce/components/issues/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // icons diff --git a/apps/web/ce/components/issues/issue-detail-widgets/action-buttons.tsx b/apps/web/ce/components/issues/issue-detail-widgets/action-buttons.tsx index bac610826e..d1e200e222 100644 --- a/apps/web/ce/components/issues/issue-detail-widgets/action-buttons.tsx +++ b/apps/web/ce/components/issues/issue-detail-widgets/action-buttons.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // plane types import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types"; diff --git a/apps/web/ce/components/issues/issue-detail-widgets/collapsibles.tsx b/apps/web/ce/components/issues/issue-detail-widgets/collapsibles.tsx index 092663d903..02cf461199 100644 --- a/apps/web/ce/components/issues/issue-detail-widgets/collapsibles.tsx +++ b/apps/web/ce/components/issues/issue-detail-widgets/collapsibles.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // plane types import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types"; diff --git a/apps/web/ce/components/issues/issue-detail-widgets/modals.tsx b/apps/web/ce/components/issues/issue-detail-widgets/modals.tsx index 07327c44c1..8be9058da3 100644 --- a/apps/web/ce/components/issues/issue-detail-widgets/modals.tsx +++ b/apps/web/ce/components/issues/issue-detail-widgets/modals.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // plane types import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types"; diff --git a/apps/web/ce/components/issues/issue-details/additional-activity-root.tsx b/apps/web/ce/components/issues/issue-details/additional-activity-root.tsx index 1097356457..345811e553 100644 --- a/apps/web/ce/components/issues/issue-details/additional-activity-root.tsx +++ b/apps/web/ce/components/issues/issue-details/additional-activity-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/ce/components/issues/issue-details/additional-properties.tsx b/apps/web/ce/components/issues/issue-details/additional-properties.tsx index 69602593e3..7f04dde779 100644 --- a/apps/web/ce/components/issues/issue-details/additional-properties.tsx +++ b/apps/web/ce/components/issues/issue-details/additional-properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; // plane imports diff --git a/apps/web/ce/components/issues/issue-details/index.ts b/apps/web/ce/components/issues/issue-details/index.ts index c5724f0f73..abd9df1638 100644 --- a/apps/web/ce/components/issues/issue-details/index.ts +++ b/apps/web/ce/components/issues/issue-details/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./issue-identifier"; export * from "./issue-properties-activity"; export * from "./issue-type-switcher"; diff --git a/apps/web/ce/components/issues/issue-details/issue-creator.tsx b/apps/web/ce/components/issues/issue-details/issue-creator.tsx index f56de6be97..6b82ad6fd8 100644 --- a/apps/web/ce/components/issues/issue-details/issue-creator.tsx +++ b/apps/web/ce/components/issues/issue-details/issue-creator.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import Link from "next/link"; // hooks diff --git a/apps/web/ce/components/issues/issue-details/issue-identifier.tsx b/apps/web/ce/components/issues/issue-details/issue-identifier.tsx index e4eaba42c2..f2f8a55790 100644 --- a/apps/web/ce/components/issues/issue-details/issue-identifier.tsx +++ b/apps/web/ce/components/issues/issue-details/issue-identifier.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import type { TIssueIdentifierProps, TIssueTypeIdentifier } from "@plane/types"; diff --git a/apps/web/ce/components/issues/issue-details/issue-properties-activity/index.ts b/apps/web/ce/components/issues/issue-details/issue-properties-activity/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/issues/issue-details/issue-properties-activity/index.ts +++ b/apps/web/ce/components/issues/issue-details/issue-properties-activity/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/issues/issue-details/issue-properties-activity/root.tsx b/apps/web/ce/components/issues/issue-details/issue-properties-activity/root.tsx index 43ad4d3aae..db97243b13 100644 --- a/apps/web/ce/components/issues/issue-details/issue-properties-activity/root.tsx +++ b/apps/web/ce/components/issues/issue-details/issue-properties-activity/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; type TIssueAdditionalPropertiesActivity = { diff --git a/apps/web/ce/components/issues/issue-details/issue-type-activity.tsx b/apps/web/ce/components/issues/issue-details/issue-type-activity.tsx index 7eb04be1fc..d85155aaf1 100644 --- a/apps/web/ce/components/issues/issue-details/issue-type-activity.tsx +++ b/apps/web/ce/components/issues/issue-details/issue-type-activity.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/ce/components/issues/issue-details/issue-type-switcher.tsx b/apps/web/ce/components/issues/issue-details/issue-type-switcher.tsx index b46ebe03d2..87e60aca67 100644 --- a/apps/web/ce/components/issues/issue-details/issue-type-switcher.tsx +++ b/apps/web/ce/components/issues/issue-details/issue-type-switcher.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // store hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; diff --git a/apps/web/ce/components/issues/issue-details/parent-select-root.tsx b/apps/web/ce/components/issues/issue-details/parent-select-root.tsx index d606dac816..2a1d2b51d0 100644 --- a/apps/web/ce/components/issues/issue-details/parent-select-root.tsx +++ b/apps/web/ce/components/issues/issue-details/parent-select-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/ce/components/issues/issue-details/sidebar/date-alert.tsx b/apps/web/ce/components/issues/issue-details/sidebar/date-alert.tsx index a0f3afed48..6d5459f53d 100644 --- a/apps/web/ce/components/issues/issue-details/sidebar/date-alert.tsx +++ b/apps/web/ce/components/issues/issue-details/sidebar/date-alert.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TIssue } from "@plane/types"; export type TDateAlertProps = { diff --git a/apps/web/ce/components/issues/issue-details/sidebar/transfer-hop-info.tsx b/apps/web/ce/components/issues/issue-details/sidebar/transfer-hop-info.tsx index 51f616680b..071c8476e9 100644 --- a/apps/web/ce/components/issues/issue-details/sidebar/transfer-hop-info.tsx +++ b/apps/web/ce/components/issues/issue-details/sidebar/transfer-hop-info.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TIssue } from "@plane/types"; // eslint-disable-next-line @typescript-eslint/no-unused-vars export function TransferHopInfo({ workItem }: { workItem: TIssue }) { diff --git a/apps/web/ce/components/issues/issue-layouts/additional-properties.tsx b/apps/web/ce/components/issues/issue-layouts/additional-properties.tsx index 2d10001ee6..37a5505d44 100644 --- a/apps/web/ce/components/issues/issue-layouts/additional-properties.tsx +++ b/apps/web/ce/components/issues/issue-layouts/additional-properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import type { IIssueDisplayProperties, TIssue } from "@plane/types"; diff --git a/apps/web/ce/components/issues/issue-layouts/empty-states/index.ts b/apps/web/ce/components/issues/issue-layouts/empty-states/index.ts index 319b4c6844..27407dd37b 100644 --- a/apps/web/ce/components/issues/issue-layouts/empty-states/index.ts +++ b/apps/web/ce/components/issues/issue-layouts/empty-states/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./team-issues"; export * from "./team-view-issues"; diff --git a/apps/web/ce/components/issues/issue-layouts/empty-states/team-issues.tsx b/apps/web/ce/components/issues/issue-layouts/empty-states/team-issues.tsx index 8f267503c4..fbd6d73dce 100644 --- a/apps/web/ce/components/issues/issue-layouts/empty-states/team-issues.tsx +++ b/apps/web/ce/components/issues/issue-layouts/empty-states/team-issues.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; export const TeamEmptyState = observer(function TeamEmptyState() { diff --git a/apps/web/ce/components/issues/issue-layouts/empty-states/team-project.tsx b/apps/web/ce/components/issues/issue-layouts/empty-states/team-project.tsx index ab15463a0a..b221f01086 100644 --- a/apps/web/ce/components/issues/issue-layouts/empty-states/team-project.tsx +++ b/apps/web/ce/components/issues/issue-layouts/empty-states/team-project.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; export const TeamProjectWorkItemEmptyState = observer(function TeamProjectWorkItemEmptyState() { diff --git a/apps/web/ce/components/issues/issue-layouts/empty-states/team-view-issues.tsx b/apps/web/ce/components/issues/issue-layouts/empty-states/team-view-issues.tsx index c8e7412433..8453b37697 100644 --- a/apps/web/ce/components/issues/issue-layouts/empty-states/team-view-issues.tsx +++ b/apps/web/ce/components/issues/issue-layouts/empty-states/team-view-issues.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; export const TeamViewEmptyState = observer(function TeamViewEmptyState() { diff --git a/apps/web/ce/components/issues/issue-layouts/issue-stats.tsx b/apps/web/ce/components/issues/issue-layouts/issue-stats.tsx index 11f34ac1b6..4ff1eed555 100644 --- a/apps/web/ce/components/issues/issue-layouts/issue-stats.tsx +++ b/apps/web/ce/components/issues/issue-layouts/issue-stats.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; diff --git a/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/copy-menu-helper.tsx b/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/copy-menu-helper.tsx index 641c9fc394..ecea63ccb5 100644 --- a/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/copy-menu-helper.tsx +++ b/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/copy-menu-helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ISvgIcons } from "@plane/propel/icons"; import type { TContextMenuItem } from "@plane/ui"; diff --git a/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/duplicate-modal.tsx b/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/duplicate-modal.tsx index c186c77e3a..4c09712dc4 100644 --- a/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/duplicate-modal.tsx +++ b/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/duplicate-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; type TDuplicateWorkItemModalProps = { diff --git a/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/index.ts b/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/index.ts index 470ae9181e..e99ab1e46d 100644 --- a/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/index.ts +++ b/apps/web/ce/components/issues/issue-layouts/quick-action-dropdowns/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./duplicate-modal"; export * from "./copy-menu-helper"; diff --git a/apps/web/ce/components/issues/issue-layouts/utils.tsx b/apps/web/ce/components/issues/issue-layouts/utils.tsx index 6b6fa529d1..0a0ddf7f72 100644 --- a/apps/web/ce/components/issues/issue-layouts/utils.tsx +++ b/apps/web/ce/components/issues/issue-layouts/utils.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { CalendarDays, LayersIcon, Paperclip } from "lucide-react"; // types diff --git a/apps/web/ce/components/issues/issue-modal/index.ts b/apps/web/ce/components/issues/issue-modal/index.ts index 304be8c916..006cc1c829 100644 --- a/apps/web/ce/components/issues/issue-modal/index.ts +++ b/apps/web/ce/components/issues/issue-modal/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./provider"; export * from "./issue-type-select"; export * from "./template-select"; diff --git a/apps/web/ce/components/issues/issue-modal/issue-type-select.tsx b/apps/web/ce/components/issues/issue-modal/issue-type-select.tsx index 2a02e13672..dd4c29cca8 100644 --- a/apps/web/ce/components/issues/issue-modal/issue-type-select.tsx +++ b/apps/web/ce/components/issues/issue-modal/issue-type-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Control } from "react-hook-form"; // plane imports import type { EditorRefApi } from "@plane/editor"; diff --git a/apps/web/ce/components/issues/issue-modal/modal-additional-properties.tsx b/apps/web/ce/components/issues/issue-modal/modal-additional-properties.tsx index c0011d51a1..4daec9f8b6 100644 --- a/apps/web/ce/components/issues/issue-modal/modal-additional-properties.tsx +++ b/apps/web/ce/components/issues/issue-modal/modal-additional-properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type React from "react"; export type TWorkItemModalAdditionalPropertiesProps = { diff --git a/apps/web/ce/components/issues/issue-modal/provider.tsx b/apps/web/ce/components/issues/issue-modal/provider.tsx index 82763907f7..0494b35a05 100644 --- a/apps/web/ce/components/issues/issue-modal/provider.tsx +++ b/apps/web/ce/components/issues/issue-modal/provider.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/ce/components/issues/issue-modal/template-select.tsx b/apps/web/ce/components/issues/issue-modal/template-select.tsx index 7cad3debb0..ee0a081c6d 100644 --- a/apps/web/ce/components/issues/issue-modal/template-select.tsx +++ b/apps/web/ce/components/issues/issue-modal/template-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export type TWorkItemTemplateDropdownSize = "xs" | "sm"; export type TWorkItemTemplateSelect = { diff --git a/apps/web/ce/components/issues/quick-add/index.ts b/apps/web/ce/components/issues/quick-add/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/issues/quick-add/index.ts +++ b/apps/web/ce/components/issues/quick-add/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/issues/quick-add/root.tsx b/apps/web/ce/components/issues/quick-add/root.tsx index 4857d8bb17..bb5ab7d002 100644 --- a/apps/web/ce/components/issues/quick-add/root.tsx +++ b/apps/web/ce/components/issues/quick-add/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useEffect, useRef } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/ce/components/issues/worklog/activity/filter-root.tsx b/apps/web/ce/components/issues/worklog/activity/filter-root.tsx index 27b109986c..2c40285fe0 100644 --- a/apps/web/ce/components/issues/worklog/activity/filter-root.tsx +++ b/apps/web/ce/components/issues/worklog/activity/filter-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // plane imports import type { TActivityFilters, TActivityFilterOption } from "@plane/constants"; diff --git a/apps/web/ce/components/issues/worklog/activity/index.ts b/apps/web/ce/components/issues/worklog/activity/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/issues/worklog/activity/index.ts +++ b/apps/web/ce/components/issues/worklog/activity/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/issues/worklog/activity/root.tsx b/apps/web/ce/components/issues/worklog/activity/root.tsx index 7b5a8ca9ac..d885232588 100644 --- a/apps/web/ce/components/issues/worklog/activity/root.tsx +++ b/apps/web/ce/components/issues/worklog/activity/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import type { TIssueActivityComment } from "@plane/types"; diff --git a/apps/web/ce/components/issues/worklog/activity/worklog-create-button.tsx b/apps/web/ce/components/issues/worklog/activity/worklog-create-button.tsx index 8e9ac541b9..f9e13ccdf1 100644 --- a/apps/web/ce/components/issues/worklog/activity/worklog-create-button.tsx +++ b/apps/web/ce/components/issues/worklog/activity/worklog-create-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; type TIssueActivityWorklogCreateButton = { diff --git a/apps/web/ce/components/issues/worklog/property/index.ts b/apps/web/ce/components/issues/worklog/property/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/issues/worklog/property/index.ts +++ b/apps/web/ce/components/issues/worklog/property/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/issues/worklog/property/root.tsx b/apps/web/ce/components/issues/worklog/property/root.tsx index 5ab77f3dd3..151be1460e 100644 --- a/apps/web/ce/components/issues/worklog/property/root.tsx +++ b/apps/web/ce/components/issues/worklog/property/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; type TIssueWorklogProperty = { diff --git a/apps/web/ce/components/license/index.ts b/apps/web/ce/components/license/index.ts index 031608e25f..dd65a9ec34 100644 --- a/apps/web/ce/components/license/index.ts +++ b/apps/web/ce/components/license/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./modal"; diff --git a/apps/web/ce/components/license/modal/index.ts b/apps/web/ce/components/license/modal/index.ts index 8add86e5df..c255805ae8 100644 --- a/apps/web/ce/components/license/modal/index.ts +++ b/apps/web/ce/components/license/modal/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./upgrade-modal"; diff --git a/apps/web/ce/components/license/modal/upgrade-modal.tsx b/apps/web/ce/components/license/modal/upgrade-modal.tsx index 2fc439d690..c7e35a1833 100644 --- a/apps/web/ce/components/license/modal/upgrade-modal.tsx +++ b/apps/web/ce/components/license/modal/upgrade-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { diff --git a/apps/web/ce/components/navigations/index.ts b/apps/web/ce/components/navigations/index.ts index ed26407514..b4131e9325 100644 --- a/apps/web/ce/components/navigations/index.ts +++ b/apps/web/ce/components/navigations/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./use-navigation-items"; export * from "./top-navigation-root"; diff --git a/apps/web/ce/components/navigations/top-navigation-root.tsx b/apps/web/ce/components/navigations/top-navigation-root.tsx index 9035e3147e..324494e013 100644 --- a/apps/web/ce/components/navigations/top-navigation-root.tsx +++ b/apps/web/ce/components/navigations/top-navigation-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import { observer } from "mobx-react"; import { useParams, usePathname } from "next/navigation"; @@ -74,7 +80,7 @@ export const TopNavigationRoot = observer(function TopNavigationRoot() {
- +
diff --git a/apps/web/ce/components/navigations/use-navigation-items.ts b/apps/web/ce/components/navigations/use-navigation-items.ts index db051cb631..7e085a1d24 100644 --- a/apps/web/ce/components/navigations/use-navigation-items.ts +++ b/apps/web/ce/components/navigations/use-navigation-items.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useCallback } from "react"; // plane imports import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; diff --git a/apps/web/ce/components/onboarding/tour/root.tsx b/apps/web/ce/components/onboarding/tour/root.tsx index 8e9a87004e..2f68467b35 100644 --- a/apps/web/ce/components/onboarding/tour/root.tsx +++ b/apps/web/ce/components/onboarding/tour/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/ce/components/onboarding/tour/sidebar.tsx b/apps/web/ce/components/onboarding/tour/sidebar.tsx index 2a41cd503b..03b827b5f5 100644 --- a/apps/web/ce/components/onboarding/tour/sidebar.tsx +++ b/apps/web/ce/components/onboarding/tour/sidebar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { CycleIcon, ModuleIcon, PageIcon, ViewsIcon, WorkItemsIcon } from "@plane/propel/icons"; import type { ISvgIcons } from "@plane/propel/icons"; diff --git a/apps/web/ce/components/pages/editor/ai/ask-pi-menu.tsx b/apps/web/ce/components/pages/editor/ai/ask-pi-menu.tsx index 21fe0185b8..686021bb56 100644 --- a/apps/web/ce/components/pages/editor/ai/ask-pi-menu.tsx +++ b/apps/web/ce/components/pages/editor/ai/ask-pi-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { CircleArrowUp, CornerDownRight, RefreshCcw, Sparkles } from "lucide-react"; // ui diff --git a/apps/web/ce/components/pages/editor/ai/index.ts b/apps/web/ce/components/pages/editor/ai/index.ts index d21eb63d70..c2d7f64496 100644 --- a/apps/web/ce/components/pages/editor/ai/index.ts +++ b/apps/web/ce/components/pages/editor/ai/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./ask-pi-menu"; export * from "./menu"; diff --git a/apps/web/ce/components/pages/editor/ai/menu.tsx b/apps/web/ce/components/pages/editor/ai/menu.tsx index 448fbd07a9..0aaa6f36dd 100644 --- a/apps/web/ce/components/pages/editor/ai/menu.tsx +++ b/apps/web/ce/components/pages/editor/ai/menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useRef, useState } from "react"; import type { LucideIcon } from "lucide-react"; import { CornerDownRight, RefreshCcw, Sparkles, TriangleAlert } from "lucide-react"; @@ -10,7 +16,7 @@ import { Tooltip } from "@plane/propel/tooltip"; import { cn } from "@plane/utils"; import { RichTextEditor } from "@/components/editor/rich-text"; // plane web constants -import { AI_EDITOR_TASKS, LOADING_TEXTS } from "@/plane-web/constants/ai"; +import { AI_EDITOR_TASKS, LOADING_TEXTS } from "@/constants/ai"; // plane web services import type { TTaskPayload } from "@/services/ai.service"; import { AIService } from "@/services/ai.service"; diff --git a/apps/web/ce/components/pages/editor/embed/index.ts b/apps/web/ce/components/pages/editor/embed/index.ts index e16822834a..7ab6ada6b6 100644 --- a/apps/web/ce/components/pages/editor/embed/index.ts +++ b/apps/web/ce/components/pages/editor/embed/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./issue-embed-upgrade-card"; diff --git a/apps/web/ce/components/pages/editor/embed/issue-embed-upgrade-card.tsx b/apps/web/ce/components/pages/editor/embed/issue-embed-upgrade-card.tsx index 331db5ec95..703fab3660 100644 --- a/apps/web/ce/components/pages/editor/embed/issue-embed-upgrade-card.tsx +++ b/apps/web/ce/components/pages/editor/embed/issue-embed-upgrade-card.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { getButtonStyling } from "@plane/propel/button"; import { cn } from "@plane/utils"; diff --git a/apps/web/ce/components/pages/editor/index.ts b/apps/web/ce/components/pages/editor/index.ts index 88b26fa277..d95ce40f04 100644 --- a/apps/web/ce/components/pages/editor/index.ts +++ b/apps/web/ce/components/pages/editor/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./ai"; export * from "./embed"; diff --git a/apps/web/ce/components/pages/extra-actions.tsx b/apps/web/ce/components/pages/extra-actions.tsx index 28ebe15371..a6eaee6335 100644 --- a/apps/web/ce/components/pages/extra-actions.tsx +++ b/apps/web/ce/components/pages/extra-actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // store import type { EPageStoreType } from "@/plane-web/hooks/store"; import type { TPageInstance } from "@/store/pages/base-page"; diff --git a/apps/web/ce/components/pages/header/collaborators-list.tsx b/apps/web/ce/components/pages/header/collaborators-list.tsx index 6dbd4cf811..1deaf46760 100644 --- a/apps/web/ce/components/pages/header/collaborators-list.tsx +++ b/apps/web/ce/components/pages/header/collaborators-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // store import type { TPageInstance } from "@/store/pages/base-page"; diff --git a/apps/web/ce/components/pages/header/lock-control.tsx b/apps/web/ce/components/pages/header/lock-control.tsx index d99f8fd9c9..c65cdfe59a 100644 --- a/apps/web/ce/components/pages/header/lock-control.tsx +++ b/apps/web/ce/components/pages/header/lock-control.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useEffect, useRef } from "react"; import { observer } from "mobx-react"; import { LockKeyhole, LockKeyholeOpen } from "lucide-react"; diff --git a/apps/web/ce/components/pages/header/move-control.tsx b/apps/web/ce/components/pages/header/move-control.tsx index dee6b88baf..744893dbb6 100644 --- a/apps/web/ce/components/pages/header/move-control.tsx +++ b/apps/web/ce/components/pages/header/move-control.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // store import type { TPageInstance } from "@/store/pages/base-page"; diff --git a/apps/web/ce/components/pages/header/share-control.tsx b/apps/web/ce/components/pages/header/share-control.tsx index 3b19105573..d84ee26bdc 100644 --- a/apps/web/ce/components/pages/header/share-control.tsx +++ b/apps/web/ce/components/pages/header/share-control.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { EPageStoreType } from "@/plane-web/hooks/store"; // store import type { TPageInstance } from "@/store/pages/base-page"; diff --git a/apps/web/ce/components/pages/index.ts b/apps/web/ce/components/pages/index.ts index c4131c5f95..12beee9cd3 100644 --- a/apps/web/ce/components/pages/index.ts +++ b/apps/web/ce/components/pages/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./editor"; export * from "./modals"; export * from "./extra-actions"; diff --git a/apps/web/ce/components/pages/modals/index.ts b/apps/web/ce/components/pages/modals/index.ts index c1c5c24d22..ee765fe166 100644 --- a/apps/web/ce/components/pages/modals/index.ts +++ b/apps/web/ce/components/pages/modals/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./move-page-modal"; export * from "./modals"; diff --git a/apps/web/ce/components/pages/modals/modals.tsx b/apps/web/ce/components/pages/modals/modals.tsx index ddfe5f3d1c..0b36ce33f2 100644 --- a/apps/web/ce/components/pages/modals/modals.tsx +++ b/apps/web/ce/components/pages/modals/modals.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type React from "react"; import { observer } from "mobx-react"; // components diff --git a/apps/web/ce/components/pages/modals/move-page-modal.tsx b/apps/web/ce/components/pages/modals/move-page-modal.tsx index 9abe0e4ec6..39c3a02225 100644 --- a/apps/web/ce/components/pages/modals/move-page-modal.tsx +++ b/apps/web/ce/components/pages/modals/move-page-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // store types import type { TPageInstance } from "@/store/pages/base-page"; diff --git a/apps/web/ce/components/pages/navigation-pane/index.ts b/apps/web/ce/components/pages/navigation-pane/index.ts index 79ee20c26d..1eb3094a1b 100644 --- a/apps/web/ce/components/pages/navigation-pane/index.ts +++ b/apps/web/ce/components/pages/navigation-pane/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export type TPageNavigationPaneTab = "outline" | "info" | "assets"; export const PAGE_NAVIGATION_PANE_TABS_LIST: Record< diff --git a/apps/web/ce/components/pages/navigation-pane/tab-panels/assets.tsx b/apps/web/ce/components/pages/navigation-pane/tab-panels/assets.tsx index 45d6062861..68487f9c66 100644 --- a/apps/web/ce/components/pages/navigation-pane/tab-panels/assets.tsx +++ b/apps/web/ce/components/pages/navigation-pane/tab-panels/assets.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import type { TEditorAsset } from "@plane/editor"; // store diff --git a/apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/assets.tsx b/apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/assets.tsx index 35c0773040..776d722ee8 100644 --- a/apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/assets.tsx +++ b/apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/assets.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTheme } from "next-themes"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/outline.tsx b/apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/outline.tsx index f9b9e612ec..e4158078da 100644 --- a/apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/outline.tsx +++ b/apps/web/ce/components/pages/navigation-pane/tab-panels/empty-states/outline.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTheme } from "next-themes"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/ce/components/pages/navigation-pane/tab-panels/root.tsx b/apps/web/ce/components/pages/navigation-pane/tab-panels/root.tsx index a12d26be41..14b19476bf 100644 --- a/apps/web/ce/components/pages/navigation-pane/tab-panels/root.tsx +++ b/apps/web/ce/components/pages/navigation-pane/tab-panels/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // store import type { TPageInstance } from "@/store/pages/base-page"; // local imports diff --git a/apps/web/ce/components/preferences/config.ts b/apps/web/ce/components/preferences/config.ts deleted file mode 100644 index 1a67ab7d34..0000000000 --- a/apps/web/ce/components/preferences/config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { StartOfWeekPreference } from "@/components/profile/start-of-week-preference"; -import { ThemeSwitcher } from "./theme-switcher"; - -export const PREFERENCE_COMPONENTS = { - theme: ThemeSwitcher, - start_of_week: StartOfWeekPreference, -}; diff --git a/apps/web/ce/components/preferences/theme-switcher.tsx b/apps/web/ce/components/preferences/theme-switcher.tsx index d6e6dc252c..b335b99b34 100644 --- a/apps/web/ce/components/preferences/theme-switcher.tsx +++ b/apps/web/ce/components/preferences/theme-switcher.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; import { observer } from "mobx-react"; import { useTheme } from "next-themes"; @@ -10,8 +16,7 @@ import { applyCustomTheme } from "@plane/utils"; // components import { CustomThemeSelector } from "@/components/core/theme/custom-theme-selector"; import { ThemeSwitch } from "@/components/core/theme/theme-switch"; -// helpers -import { PreferencesSection } from "@/components/preferences/section"; +import { SettingsControlItem } from "@/components/settings/control-item"; // hooks import { useUserProfile } from "@/hooks/store/user"; @@ -79,18 +84,16 @@ export const ThemeSwitcher = observer(function ThemeSwitcher(props: { return ( <> - - { - void handleThemeChange(themeOption); - }} - /> -
+ { + void handleThemeChange(themeOption); + }} + /> } /> {userProfile.theme?.theme === "custom" && } diff --git a/apps/web/ce/components/projects/create/attributes.tsx b/apps/web/ce/components/projects/create/attributes.tsx index f19537bdca..5e6614eaa8 100644 --- a/apps/web/ce/components/projects/create/attributes.tsx +++ b/apps/web/ce/components/projects/create/attributes.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Controller, useFormContext } from "react-hook-form"; // plane imports import { NETWORK_CHOICES, ETabIndices } from "@plane/constants"; diff --git a/apps/web/ce/components/projects/create/root.tsx b/apps/web/ce/components/projects/create/root.tsx index 8a1d142e56..3e4b5b4166 100644 --- a/apps/web/ce/components/projects/create/root.tsx +++ b/apps/web/ce/components/projects/create/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { FormProvider, useForm } from "react-hook-form"; diff --git a/apps/web/ce/components/projects/create/template-select.tsx b/apps/web/ce/components/projects/create/template-select.tsx index 3220c0fe85..84c089cad1 100644 --- a/apps/web/ce/components/projects/create/template-select.tsx +++ b/apps/web/ce/components/projects/create/template-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export type TProjectTemplateSelect = { disabled?: boolean; onClick?: () => void; diff --git a/apps/web/ce/components/projects/create/utils.ts b/apps/web/ce/components/projects/create/utils.ts index 4605fa2bf8..513819b041 100644 --- a/apps/web/ce/components/projects/create/utils.ts +++ b/apps/web/ce/components/projects/create/utils.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { RANDOM_EMOJI_CODES } from "@plane/constants"; import type { IProject } from "@plane/types"; import { getRandomCoverImage } from "@/helpers/cover-image.helper"; diff --git a/apps/web/ce/components/projects/header.tsx b/apps/web/ce/components/projects/header.tsx index 81cde755f8..08e10d013f 100644 --- a/apps/web/ce/components/projects/header.tsx +++ b/apps/web/ce/components/projects/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { ProjectsBaseHeader } from "@/components/project/header"; export function ProjectsListHeader() { diff --git a/apps/web/ce/components/projects/mobile-header.tsx b/apps/web/ce/components/projects/mobile-header.tsx index 8eff30aaf0..e1d3bfbd82 100644 --- a/apps/web/ce/components/projects/mobile-header.tsx +++ b/apps/web/ce/components/projects/mobile-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/ce/components/projects/navigation/helper.tsx b/apps/web/ce/components/projects/navigation/helper.tsx index 811eb9a17d..26baffb3f7 100644 --- a/apps/web/ce/components/projects/navigation/helper.tsx +++ b/apps/web/ce/components/projects/navigation/helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { EUserPermissions, EProjectFeatureKey } from "@plane/constants"; import { CycleIcon, IntakeIcon, ModuleIcon, PageIcon, ViewsIcon, WorkItemsIcon } from "@plane/propel/icons"; diff --git a/apps/web/ce/components/projects/page.tsx b/apps/web/ce/components/projects/page.tsx index 64ec67bbe0..cb5af31118 100644 --- a/apps/web/ce/components/projects/page.tsx +++ b/apps/web/ce/components/projects/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import useSWR from "swr"; diff --git a/apps/web/ce/components/projects/settings/features-list.tsx b/apps/web/ce/components/projects/settings/features-list.tsx index 26fc591fdb..f256288ae1 100644 --- a/apps/web/ce/components/projects/settings/features-list.tsx +++ b/apps/web/ce/components/projects/settings/features-list.tsx @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export { ProjectFeaturesList } from "@/components/project/settings/features-list"; diff --git a/apps/web/ce/components/projects/settings/intake/header.tsx b/apps/web/ce/components/projects/settings/intake/header.tsx index aba1264d77..89db4e931c 100644 --- a/apps/web/ce/components/projects/settings/intake/header.tsx +++ b/apps/web/ce/components/projects/settings/intake/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/ce/components/projects/settings/useProjectColumns.tsx b/apps/web/ce/components/projects/settings/useProjectColumns.tsx index 378629e2cc..75e6156fc0 100644 --- a/apps/web/ce/components/projects/settings/useProjectColumns.tsx +++ b/apps/web/ce/components/projects/settings/useProjectColumns.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; // plane imports import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; diff --git a/apps/web/ce/components/projects/teamspaces/teamspace-list.tsx b/apps/web/ce/components/projects/teamspaces/teamspace-list.tsx index 137e962ace..2f62c53e11 100644 --- a/apps/web/ce/components/projects/teamspaces/teamspace-list.tsx +++ b/apps/web/ce/components/projects/teamspaces/teamspace-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export type TProjectTeamspaceList = { workspaceSlug: string; projectId: string; diff --git a/apps/web/ce/components/relations/activity.ts b/apps/web/ce/components/relations/activity.ts index 820966f4d3..83a89ef14c 100644 --- a/apps/web/ce/components/relations/activity.ts +++ b/apps/web/ce/components/relations/activity.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TIssueActivity } from "@plane/types"; export const getRelationActivityContent = (activity: TIssueActivity | undefined): string | undefined => { diff --git a/apps/web/ce/components/relations/index.tsx b/apps/web/ce/components/relations/index.tsx index 956bf5acdd..02ff0f28d2 100644 --- a/apps/web/ce/components/relations/index.tsx +++ b/apps/web/ce/components/relations/index.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { CircleDot, XCircle } from "lucide-react"; import { RelatedIcon, DuplicatePropertyIcon } from "@plane/propel/icons"; import type { TRelationObject } from "@/components/issues/issue-detail-widgets/relations"; diff --git a/apps/web/ce/components/rich-filters/filter-value-input/root.tsx b/apps/web/ce/components/rich-filters/filter-value-input/root.tsx index 5119266dda..06a04cb823 100644 --- a/apps/web/ce/components/rich-filters/filter-value-input/root.tsx +++ b/apps/web/ce/components/rich-filters/filter-value-input/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/ce/components/sidebar/app-switcher.tsx b/apps/web/ce/components/sidebar/app-switcher.tsx index 9bd2d21db4..80cc87797f 100644 --- a/apps/web/ce/components/sidebar/app-switcher.tsx +++ b/apps/web/ce/components/sidebar/app-switcher.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export function SidebarAppSwitcher() { return null; } diff --git a/apps/web/ce/components/sidebar/index.ts b/apps/web/ce/components/sidebar/index.ts index 129f420207..4f6ed0ef8d 100644 --- a/apps/web/ce/components/sidebar/index.ts +++ b/apps/web/ce/components/sidebar/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./app-switcher"; export * from "./project-navigation-root"; diff --git a/apps/web/ce/components/sidebar/project-navigation-root.tsx b/apps/web/ce/components/sidebar/project-navigation-root.tsx index 29f66fd8b7..51463851e3 100644 --- a/apps/web/ce/components/sidebar/project-navigation-root.tsx +++ b/apps/web/ce/components/sidebar/project-navigation-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // components import { ProjectNavigation } from "@/components/workspace/sidebar/project-navigation"; diff --git a/apps/web/ce/components/views/access-controller.tsx b/apps/web/ce/components/views/access-controller.tsx index 56b59a0215..5491770507 100644 --- a/apps/web/ce/components/views/access-controller.tsx +++ b/apps/web/ce/components/views/access-controller.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars export function AccessController(props: any) { return <>; diff --git a/apps/web/ce/components/views/filters/access-filter.tsx b/apps/web/ce/components/views/filters/access-filter.tsx index ebc8c3ef8d..65ef98c538 100644 --- a/apps/web/ce/components/views/filters/access-filter.tsx +++ b/apps/web/ce/components/views/filters/access-filter.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars export function FilterByAccess(props: any) { return <>; diff --git a/apps/web/ce/components/views/helper.tsx b/apps/web/ce/components/views/helper.tsx index 155249e2d1..e725632ec0 100644 --- a/apps/web/ce/components/views/helper.tsx +++ b/apps/web/ce/components/views/helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { EIssueLayoutTypes, IProjectView } from "@plane/types"; import type { TWorkspaceLayoutProps } from "@/components/views/helper"; diff --git a/apps/web/ce/components/views/publish/index.ts b/apps/web/ce/components/views/publish/index.ts index 8c04a4e3d8..0bc5586440 100644 --- a/apps/web/ce/components/views/publish/index.ts +++ b/apps/web/ce/components/views/publish/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./modal"; export * from "./use-view-publish"; diff --git a/apps/web/ce/components/views/publish/modal.tsx b/apps/web/ce/components/views/publish/modal.tsx index 241e356806..7be8c47da5 100644 --- a/apps/web/ce/components/views/publish/modal.tsx +++ b/apps/web/ce/components/views/publish/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IProjectView } from "@plane/types"; type Props = { diff --git a/apps/web/ce/components/views/publish/use-view-publish.tsx b/apps/web/ce/components/views/publish/use-view-publish.tsx index 687a79ed76..133db0cf19 100644 --- a/apps/web/ce/components/views/publish/use-view-publish.tsx +++ b/apps/web/ce/components/views/publish/use-view-publish.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars export const useViewPublish = (isPublished: boolean, isAuthorized: boolean) => ({ isPublishModalOpen: false, diff --git a/apps/web/ce/components/workflow/index.ts b/apps/web/ce/components/workflow/index.ts index 07b59ccc3f..4bdac48e5c 100644 --- a/apps/web/ce/components/workflow/index.ts +++ b/apps/web/ce/components/workflow/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./state-option"; export * from "./use-workflow-drag-n-drop"; export * from "./workflow-disabled-message"; diff --git a/apps/web/ce/components/workflow/state-option.tsx b/apps/web/ce/components/workflow/state-option.tsx index ee260e7177..7a2ccc7d47 100644 --- a/apps/web/ce/components/workflow/state-option.tsx +++ b/apps/web/ce/components/workflow/state-option.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Combobox } from "@headlessui/react"; import { CheckIcon } from "@plane/propel/icons"; diff --git a/apps/web/ce/components/workflow/use-workflow-drag-n-drop.ts b/apps/web/ce/components/workflow/use-workflow-drag-n-drop.ts index 20c97eb4fd..4a5be99879 100644 --- a/apps/web/ce/components/workflow/use-workflow-drag-n-drop.ts +++ b/apps/web/ce/components/workflow/use-workflow-drag-n-drop.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + /* eslint-disable @typescript-eslint/no-unused-vars */ import type { TIssueGroupByOptions } from "@plane/types"; diff --git a/apps/web/ce/components/workflow/workflow-disabled-message.tsx b/apps/web/ce/components/workflow/workflow-disabled-message.tsx index 87f2c04080..dad8cf36e9 100644 --- a/apps/web/ce/components/workflow/workflow-disabled-message.tsx +++ b/apps/web/ce/components/workflow/workflow-disabled-message.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + /* eslint-disable @typescript-eslint/no-unused-vars */ type Props = { parentStateId: string; diff --git a/apps/web/ce/components/workflow/workflow-disabled-overlay.tsx b/apps/web/ce/components/workflow/workflow-disabled-overlay.tsx index 197a808a22..a5f22da0a1 100644 --- a/apps/web/ce/components/workflow/workflow-disabled-overlay.tsx +++ b/apps/web/ce/components/workflow/workflow-disabled-overlay.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; export type TWorkflowDisabledOverlayProps = { diff --git a/apps/web/ce/components/workflow/workflow-group-tree.tsx b/apps/web/ce/components/workflow/workflow-group-tree.tsx index 3f0e7300a4..9767e6c892 100644 --- a/apps/web/ce/components/workflow/workflow-group-tree.tsx +++ b/apps/web/ce/components/workflow/workflow-group-tree.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + /* eslint-disable @typescript-eslint/no-unused-vars */ import type { TIssueGroupByOptions } from "@plane/types"; diff --git a/apps/web/ce/components/workspace-notifications/index.ts b/apps/web/ce/components/workspace-notifications/index.ts index ed26efa234..1c9404afa7 100644 --- a/apps/web/ce/components/workspace-notifications/index.ts +++ b/apps/web/ce/components/workspace-notifications/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./list-root"; diff --git a/apps/web/ce/components/workspace-notifications/list-root.tsx b/apps/web/ce/components/workspace-notifications/list-root.tsx index cad9c438b8..1edb479d1f 100644 --- a/apps/web/ce/components/workspace-notifications/list-root.tsx +++ b/apps/web/ce/components/workspace-notifications/list-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { NotificationCardListRoot } from "./notification-card/root"; export type TNotificationListRoot = { diff --git a/apps/web/ce/components/workspace-notifications/notification-card/content.ts b/apps/web/ce/components/workspace-notifications/notification-card/content.ts index 74cdc61996..443a9f02aa 100644 --- a/apps/web/ce/components/workspace-notifications/notification-card/content.ts +++ b/apps/web/ce/components/workspace-notifications/notification-card/content.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { replaceUnderscoreIfSnakeCase } from "@plane/utils"; import type { TNotificationContentMap } from "@/components/workspace-notifications/sidebar/notification-card/content"; diff --git a/apps/web/ce/components/workspace-notifications/notification-card/root.tsx b/apps/web/ce/components/workspace-notifications/notification-card/root.tsx index aed7327667..9c07b8e308 100644 --- a/apps/web/ce/components/workspace-notifications/notification-card/root.tsx +++ b/apps/web/ce/components/workspace-notifications/notification-card/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/ce/components/workspace/app-switcher.tsx b/apps/web/ce/components/workspace/app-switcher.tsx index f4f5ce0ff3..4c1779e375 100644 --- a/apps/web/ce/components/workspace/app-switcher.tsx +++ b/apps/web/ce/components/workspace/app-switcher.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; export function WorkspaceAppSwitcher() { diff --git a/apps/web/ce/components/workspace/billing/billing-actions-button.tsx b/apps/web/ce/components/workspace/billing/billing-actions-button.tsx index 4460eeff39..99aeecae49 100644 --- a/apps/web/ce/components/workspace/billing/billing-actions-button.tsx +++ b/apps/web/ce/components/workspace/billing/billing-actions-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; export type TBillingActionsButtonProps = { diff --git a/apps/web/ce/components/workspace/billing/comparison/frequency-toggle.tsx b/apps/web/ce/components/workspace/billing/comparison/frequency-toggle.tsx index 50c5333982..e18ea7f228 100644 --- a/apps/web/ce/components/workspace/billing/comparison/frequency-toggle.tsx +++ b/apps/web/ce/components/workspace/billing/comparison/frequency-toggle.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { observer } from "mobx-react"; import type { EProductSubscriptionEnum, TBillingFrequency } from "@plane/types"; diff --git a/apps/web/ce/components/workspace/billing/comparison/plan-detail.tsx b/apps/web/ce/components/workspace/billing/comparison/plan-detail.tsx index 26bb31979d..a11c6e7a77 100644 --- a/apps/web/ce/components/workspace/billing/comparison/plan-detail.tsx +++ b/apps/web/ce/components/workspace/billing/comparison/plan-detail.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { diff --git a/apps/web/ce/components/workspace/billing/comparison/root.tsx b/apps/web/ce/components/workspace/billing/comparison/root.tsx index 109667c219..7ff2178840 100644 --- a/apps/web/ce/components/workspace/billing/comparison/root.tsx +++ b/apps/web/ce/components/workspace/billing/comparison/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import type { EProductSubscriptionEnum, TBillingFrequency } from "@plane/types"; diff --git a/apps/web/ce/components/workspace/billing/index.ts b/apps/web/ce/components/workspace/billing/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/ce/components/workspace/billing/index.ts +++ b/apps/web/ce/components/workspace/billing/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/ce/components/workspace/billing/root.tsx b/apps/web/ce/components/workspace/billing/root.tsx index 2753887d17..ee456702dd 100644 --- a/apps/web/ce/components/workspace/billing/root.tsx +++ b/apps/web/ce/components/workspace/billing/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // plane imports @@ -6,6 +12,7 @@ import { useTranslation } from "@plane/i18n"; import type { TBillingFrequency, TProductBillingFrequency } from "@plane/types"; import { EProductSubscriptionEnum } from "@plane/types"; // components +import { SettingsBoxedControlItem } from "@/components/settings/boxed-control-item"; import { SettingsHeading } from "@/components/settings/heading"; // local imports import { PlansComparison } from "./comparison/root"; @@ -37,32 +44,28 @@ export const BillingRoot = observer(function BillingRoot() { setProductBillingFrequency({ ...productBillingFrequency, [subscriptionType]: frequency }); return ( -
- +
-
-
-
-
-

Community

-
- Unlimited projects, issues, cycles, modules, pages, and storage -
-
-
-
+ +
+
-
All plans
- +
+

All plans

+ +
); }); diff --git a/apps/web/ce/components/workspace/content-wrapper.tsx b/apps/web/ce/components/workspace/content-wrapper.tsx index 86e15689dd..868ea946de 100644 --- a/apps/web/ce/components/workspace/content-wrapper.tsx +++ b/apps/web/ce/components/workspace/content-wrapper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/ce/components/workspace/delete-workspace-modal.tsx b/apps/web/ce/components/workspace/delete-workspace-modal.tsx index ae9fdec9a9..19e5e5b24d 100644 --- a/apps/web/ce/components/workspace/delete-workspace-modal.tsx +++ b/apps/web/ce/components/workspace/delete-workspace-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import type { IWorkspace } from "@plane/types"; diff --git a/apps/web/ce/components/workspace/delete-workspace-section.tsx b/apps/web/ce/components/workspace/delete-workspace-section.tsx index 8fb5999291..e66abcf417 100644 --- a/apps/web/ce/components/workspace/delete-workspace-section.tsx +++ b/apps/web/ce/components/workspace/delete-workspace-section.tsx @@ -1,15 +1,20 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; -// types +// plane imports import { WORKSPACE_TRACKER_ELEMENTS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; -import { ChevronDownIcon, ChevronUpIcon } from "@plane/propel/icons"; import type { IWorkspace } from "@plane/types"; -// ui -import { Collapsible } from "@plane/ui"; -import { DeleteWorkspaceModal } from "./delete-workspace-modal"; // components +import { SettingsBoxedControlItem } from "@/components/settings/boxed-control-item"; +// local imports +import { DeleteWorkspaceModal } from "./delete-workspace-modal"; type TDeleteWorkspace = { workspace: IWorkspace | null; @@ -18,8 +23,8 @@ type TDeleteWorkspace = { export const DeleteWorkspaceSection = observer(function DeleteWorkspaceSection(props: TDeleteWorkspace) { const { workspace } = props; // states - const [isOpen, setIsOpen] = useState(false); const [deleteWorkspaceModal, setDeleteWorkspaceModal] = useState(false); + // translation const { t } = useTranslation(); return ( @@ -29,40 +34,19 @@ export const DeleteWorkspaceSection = observer(function DeleteWorkspaceSection(p isOpen={deleteWorkspaceModal} onClose={() => setDeleteWorkspaceModal(false)} /> -
-
- setIsOpen(!isOpen)} - className="w-full" - buttonClassName="flex w-full items-center justify-between py-4" - title={ - <> - - {t("workspace_settings.settings.general.delete_workspace")} - - {isOpen ? : } - - } + setDeleteWorkspaceModal(true)} + data-ph-element={WORKSPACE_TRACKER_ELEMENTS.DELETE_WORKSPACE_BUTTON} > -
- - {t("workspace_settings.settings.general.delete_workspace_description")} - -
- -
-
-
-
-
+ {t("delete")} + + } + /> ); }); diff --git a/apps/web/ce/components/workspace/edition-badge.tsx b/apps/web/ce/components/workspace/edition-badge.tsx index ec7f98675f..34ef704987 100644 --- a/apps/web/ce/components/workspace/edition-badge.tsx +++ b/apps/web/ce/components/workspace/edition-badge.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // ui diff --git a/apps/web/ce/components/workspace/members/index.ts b/apps/web/ce/components/workspace/members/index.ts index 8e7291706c..7511bfeedb 100644 --- a/apps/web/ce/components/workspace/members/index.ts +++ b/apps/web/ce/components/workspace/members/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./invite-modal"; export * from "./members-activity-button"; diff --git a/apps/web/ce/components/workspace/members/invite-modal.tsx b/apps/web/ce/components/workspace/members/invite-modal.tsx index a0b72caedd..5e97a69d92 100644 --- a/apps/web/ce/components/workspace/members/invite-modal.tsx +++ b/apps/web/ce/components/workspace/members/invite-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/ce/components/workspace/members/members-activity-button.tsx b/apps/web/ce/components/workspace/members/members-activity-button.tsx index bf3d333d89..a078b1960e 100644 --- a/apps/web/ce/components/workspace/members/members-activity-button.tsx +++ b/apps/web/ce/components/workspace/members/members-activity-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/apps/web/ce/components/workspace/settings/useMemberColumns.tsx b/apps/web/ce/components/workspace/settings/useMemberColumns.tsx index f59ba65eb2..bf0d188b99 100644 --- a/apps/web/ce/components/workspace/settings/useMemberColumns.tsx +++ b/apps/web/ce/components/workspace/settings/useMemberColumns.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { useParams } from "next/navigation"; import { EUserPermissions, EUserPermissionsLevel, LOGIN_MEDIUM_LABELS } from "@plane/constants"; diff --git a/apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx b/apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx index c442aebf45..008c8901e1 100644 --- a/apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx +++ b/apps/web/ce/components/workspace/sidebar/extended-sidebar-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; diff --git a/apps/web/ce/components/workspace/sidebar/helper.tsx b/apps/web/ce/components/workspace/sidebar/helper.tsx index 50323f3202..9bf4a01bf2 100644 --- a/apps/web/ce/components/workspace/sidebar/helper.tsx +++ b/apps/web/ce/components/workspace/sidebar/helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { AnalyticsIcon, ArchiveIcon, diff --git a/apps/web/ce/components/workspace/sidebar/sidebar-item.tsx b/apps/web/ce/components/workspace/sidebar/sidebar-item.tsx index b497cb4586..a1fb30bfc4 100644 --- a/apps/web/ce/components/workspace/sidebar/sidebar-item.tsx +++ b/apps/web/ce/components/workspace/sidebar/sidebar-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import type { IWorkspaceSidebarNavigationItem } from "@plane/constants"; import { SidebarItemBase } from "@/components/workspace/sidebar/sidebar-item"; diff --git a/apps/web/ce/components/workspace/sidebar/teams-sidebar-list.tsx b/apps/web/ce/components/workspace/sidebar/teams-sidebar-list.tsx index fd8ca8be95..3d6a97d14e 100644 --- a/apps/web/ce/components/workspace/sidebar/teams-sidebar-list.tsx +++ b/apps/web/ce/components/workspace/sidebar/teams-sidebar-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export function SidebarTeamsList() { return null; } diff --git a/apps/web/ce/components/workspace/upgrade-badge.tsx b/apps/web/ce/components/workspace/upgrade-badge.tsx index 463ffedd35..b6f30f63e8 100644 --- a/apps/web/ce/components/workspace/upgrade-badge.tsx +++ b/apps/web/ce/components/workspace/upgrade-badge.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // helpers import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/ce/constants/gantt-chart.ts b/apps/web/ce/constants/gantt-chart.ts deleted file mode 100644 index 95e39bcc8a..0000000000 --- a/apps/web/ce/constants/gantt-chart.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { TIssueRelationTypes } from "../types"; - -export const REVERSE_RELATIONS: { [key in TIssueRelationTypes]: TIssueRelationTypes } = { - blocked_by: "blocking", - blocking: "blocked_by", - relates_to: "relates_to", - duplicate: "duplicate", -}; diff --git a/apps/web/ce/constants/project/index.ts b/apps/web/ce/constants/project/index.ts deleted file mode 100644 index dcf101b0c6..0000000000 --- a/apps/web/ce/constants/project/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./settings"; diff --git a/apps/web/ce/constants/project/settings/features.tsx b/apps/web/ce/constants/project/settings/features.tsx deleted file mode 100644 index 0017d8cef1..0000000000 --- a/apps/web/ce/constants/project/settings/features.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import type { ReactNode } from "react"; -// plane imports -import { CycleIcon, IntakeIcon, ModuleIcon, PageIcon, ViewsIcon } from "@plane/propel/icons"; -import type { IProject } from "@plane/types"; - -export type TProperties = { - key: string; - property: string; - title: string; - description: string; - icon: ReactNode; - isPro: boolean; - isEnabled: boolean; - renderChildren?: (currentProjectDetails: IProject, workspaceSlug: string) => ReactNode; - href?: string; -}; - -type TProjectBaseFeatureKeys = "cycles" | "modules" | "views" | "pages" | "inbox"; - -type TBaseFeatureList = { - [key in TProjectBaseFeatureKeys]: TProperties; -}; - -export const PROJECT_BASE_FEATURES_LIST: TBaseFeatureList = { - cycles: { - key: "cycles", - property: "cycle_view", - title: "Cycles", - description: "Timebox work as you see fit per project and change frequency from one period to the next.", - icon: , - isPro: false, - isEnabled: true, - }, - modules: { - key: "modules", - property: "module_view", - title: "Modules", - description: "Group work into sub-project-like set-ups with their own leads and assignees.", - icon: , - isPro: false, - isEnabled: true, - }, - views: { - key: "views", - property: "issue_views_view", - title: "Views", - description: "Save sorts, filters, and display options for later or share them.", - icon: , - isPro: false, - isEnabled: true, - }, - pages: { - key: "pages", - property: "page_view", - title: "Pages", - description: "Write anything like you write anything.", - icon: , - isPro: false, - isEnabled: true, - }, - inbox: { - key: "intake", - property: "inbox_view", - title: "Intake", - description: "Consider and discuss work items before you add them to your project.", - icon: , - isPro: false, - isEnabled: true, - }, -}; - -type TProjectFeatures = { - project_features: { - key: string; - title: string; - description: string; - featureList: TBaseFeatureList; - }; -}; - -export const PROJECT_FEATURES_LIST: TProjectFeatures = { - project_features: { - key: "projects_and_issues", - title: "Projects and work items", - description: "Toggle these on or off this project.", - featureList: PROJECT_BASE_FEATURES_LIST, - }, -}; diff --git a/apps/web/ce/constants/project/settings/index.ts b/apps/web/ce/constants/project/settings/index.ts deleted file mode 100644 index a6a842e7be..0000000000 --- a/apps/web/ce/constants/project/settings/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./features"; -export * from "./tabs"; diff --git a/apps/web/ce/constants/project/settings/tabs.ts b/apps/web/ce/constants/project/settings/tabs.ts deleted file mode 100644 index f78b51a74f..0000000000 --- a/apps/web/ce/constants/project/settings/tabs.ts +++ /dev/null @@ -1,82 +0,0 @@ -// icons -import { EUserPermissions } from "@plane/constants"; -import { SettingIcon } from "@/components/icons/attachment"; -// types -import type { Props } from "@/components/icons/types"; -// constants - -export const PROJECT_SETTINGS = { - general: { - key: "general", - i18n_label: "common.general", - href: ``, - access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER, EUserPermissions.GUEST], - highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/`, - Icon: SettingIcon, - }, - members: { - key: "members", - i18n_label: "common.members", - href: `/members`, - access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER, EUserPermissions.GUEST], - highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/members/`, - Icon: SettingIcon, - }, - features: { - key: "features", - i18n_label: "common.features", - href: `/features`, - access: [EUserPermissions.ADMIN], - highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/features/`, - Icon: SettingIcon, - }, - states: { - key: "states", - i18n_label: "common.states", - href: `/states`, - access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER], - highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/states/`, - Icon: SettingIcon, - }, - labels: { - key: "labels", - i18n_label: "common.labels", - href: `/labels`, - access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER], - highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/labels/`, - Icon: SettingIcon, - }, - estimates: { - key: "estimates", - i18n_label: "common.estimates", - href: `/estimates`, - access: [EUserPermissions.ADMIN], - highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/estimates/`, - Icon: SettingIcon, - }, - automations: { - key: "automations", - i18n_label: "project_settings.automations.label", - href: `/automations`, - access: [EUserPermissions.ADMIN], - highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/automations/`, - Icon: SettingIcon, - }, -}; - -export const PROJECT_SETTINGS_LINKS: { - key: string; - i18n_label: string; - href: string; - access: EUserPermissions[]; - highlight: (pathname: string, baseUrl: string) => boolean; - Icon: React.FC; -}[] = [ - PROJECT_SETTINGS["general"], - PROJECT_SETTINGS["members"], - PROJECT_SETTINGS["features"], - PROJECT_SETTINGS["states"], - PROJECT_SETTINGS["labels"], - PROJECT_SETTINGS["estimates"], - PROJECT_SETTINGS["automations"], -]; diff --git a/apps/web/ce/helpers/command-palette.ts b/apps/web/ce/helpers/command-palette.ts deleted file mode 100644 index 697d12c283..0000000000 --- a/apps/web/ce/helpers/command-palette.ts +++ /dev/null @@ -1,106 +0,0 @@ -import type { TCommandPaletteActionList, TCommandPaletteShortcut, TCommandPaletteShortcutList } from "@plane/types"; -// store -import { store } from "@/lib/store-context"; - -export const getGlobalShortcutsList: () => TCommandPaletteActionList = () => { - const { toggleCreateIssueModal } = store.commandPalette; - - return { - c: { - title: "Create a new work item", - description: "Create a new work item in the current project", - action: () => { - toggleCreateIssueModal(true); - }, - }, - }; -}; - -export const getWorkspaceShortcutsList: () => TCommandPaletteActionList = () => { - const { toggleCreateProjectModal } = store.commandPalette; - - return { - p: { - title: "Create a new project", - description: "Create a new project in the current workspace", - action: () => { - toggleCreateProjectModal(true); - }, - }, - }; -}; - -export const getProjectShortcutsList: () => TCommandPaletteActionList = () => { - const { - toggleCreatePageModal, - toggleCreateModuleModal, - toggleCreateCycleModal, - toggleCreateViewModal, - toggleBulkDeleteIssueModal, - } = store.commandPalette; - - return { - d: { - title: "Create a new page", - description: "Create a new page in the current project", - action: () => { - toggleCreatePageModal({ isOpen: true }); - }, - }, - m: { - title: "Create a new module", - description: "Create a new module in the current project", - action: () => { - toggleCreateModuleModal(true); - }, - }, - q: { - title: "Create a new cycle", - description: "Create a new cycle in the current project", - action: () => { - toggleCreateCycleModal(true); - }, - }, - v: { - title: "Create a new view", - description: "Create a new view in the current project", - action: () => { - toggleCreateViewModal(true); - }, - }, - backspace: { - title: "Bulk delete work items", - description: "Bulk delete work items in the current project", - action: () => toggleBulkDeleteIssueModal(true), - }, - delete: { - title: "Bulk delete work items", - description: "Bulk delete work items in the current project", - action: () => toggleBulkDeleteIssueModal(true), - }, - }; -}; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export const handleAdditionalKeyDownEvents = (e: KeyboardEvent) => null; - -export const getNavigationShortcutsList = (): TCommandPaletteShortcut[] => [ - { keys: "Ctrl,K", description: "Open command menu" }, -]; - -export const getCommonShortcutsList = (platform: string): TCommandPaletteShortcut[] => [ - { keys: "P", description: "Create project" }, - { keys: "C", description: "Create work item" }, - { keys: "Q", description: "Create cycle" }, - { keys: "M", description: "Create module" }, - { keys: "V", description: "Create view" }, - { keys: "D", description: "Create page" }, - { keys: "Delete", description: "Bulk delete work items" }, - { keys: "Shift,/", description: "Open shortcuts guide" }, - { - keys: platform === "MacOS" ? "Ctrl,control,C" : "Ctrl,Alt,C", - description: "Copy work item URL from the work item details page", - }, -]; - -export const getAdditionalShortcutsList = (): TCommandPaletteShortcutList[] => []; diff --git a/apps/web/ce/helpers/epic-analytics.ts b/apps/web/ce/helpers/epic-analytics.ts deleted file mode 100644 index 1a7a9df411..0000000000 --- a/apps/web/ce/helpers/epic-analytics.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { TEpicAnalyticsGroup } from "@plane/types"; - -export const updateEpicAnalytics = () => { - const updateAnalytics = ( - workspaceSlug: string, - projectId: string, - epicId: string, - data: { - incrementStateGroupCount?: TEpicAnalyticsGroup; - decrementStateGroupCount?: TEpicAnalyticsGroup; - } - ) => {}; - - return { updateAnalytics }; -}; diff --git a/apps/web/ce/helpers/instance.helper.ts b/apps/web/ce/helpers/instance.helper.ts deleted file mode 100644 index 622ef4af7e..0000000000 --- a/apps/web/ce/helpers/instance.helper.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { store } from "@/lib/store-context"; - -export const getIsWorkspaceCreationDisabled = () => { - const instanceConfig = store.instance.config; - - return instanceConfig?.is_workspace_creation_disabled; -}; diff --git a/apps/web/ce/helpers/issue-action-helper.ts b/apps/web/ce/helpers/issue-action-helper.ts deleted file mode 100644 index a3c66e2731..0000000000 --- a/apps/web/ce/helpers/issue-action-helper.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { IssueActions } from "@/hooks/use-issues-actions"; - -export const useTeamIssueActions: () => IssueActions = () => ({ - fetchIssues: () => Promise.resolve(undefined), - fetchNextIssues: () => Promise.resolve(undefined), - removeIssue: () => Promise.resolve(undefined), - updateFilters: () => Promise.resolve(undefined), -}); - -export const useTeamViewIssueActions: () => IssueActions = () => ({ - fetchIssues: () => Promise.resolve(undefined), - fetchNextIssues: () => Promise.resolve(undefined), - removeIssue: () => Promise.resolve(undefined), - updateFilters: () => Promise.resolve(undefined), -}); - -export const useTeamProjectWorkItemsActions: () => IssueActions = () => ({ - fetchIssues: () => Promise.resolve(undefined), - fetchNextIssues: () => Promise.resolve(undefined), - removeIssue: () => Promise.resolve(undefined), - updateFilters: () => Promise.resolve(undefined), -}); diff --git a/apps/web/ce/helpers/pi-chat.helper.ts b/apps/web/ce/helpers/pi-chat.helper.ts deleted file mode 100644 index 5676e9c00e..0000000000 --- a/apps/web/ce/helpers/pi-chat.helper.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const hideFloatingBot = () => {}; - -export const showFloatingBot = () => {}; diff --git a/apps/web/ce/helpers/project-settings.ts b/apps/web/ce/helpers/project-settings.ts deleted file mode 100644 index dbe06507af..0000000000 --- a/apps/web/ce/helpers/project-settings.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @description Get the i18n key for the project settings page label - * @param _settingsKey - The key of the project settings page - * @param defaultLabelKey - The default i18n key for the project settings page label - * @returns The i18n key for the project settings page label - */ -export const getProjectSettingsPageLabelI18nKey = (_settingsKey: string, defaultLabelKey: string) => defaultLabelKey; diff --git a/apps/web/ce/helpers/work-item-filters/project-level.ts b/apps/web/ce/helpers/work-item-filters/project-level.ts deleted file mode 100644 index be0bc64ec9..0000000000 --- a/apps/web/ce/helpers/work-item-filters/project-level.ts +++ /dev/null @@ -1,20 +0,0 @@ -// plane imports -import type { EIssuesStoreType } from "@plane/types"; -// plane web imports -import type { TWorkItemFiltersEntityProps } from "@/plane-web/hooks/work-item-filters/use-work-item-filters-config"; - -export type TGetAdditionalPropsForProjectLevelFiltersHOCParams = { - entityType: EIssuesStoreType; - workspaceSlug: string; - projectId: string; -}; - -export type TGetAdditionalPropsForProjectLevelFiltersHOC = ( - params: TGetAdditionalPropsForProjectLevelFiltersHOCParams -) => TWorkItemFiltersEntityProps; - -export const getAdditionalProjectLevelFiltersHOCProps: TGetAdditionalPropsForProjectLevelFiltersHOC = ({ - workspaceSlug, -}) => ({ - workspaceSlug, -}); diff --git a/apps/web/ce/helpers/workspace.helper.ts b/apps/web/ce/helpers/workspace.helper.ts deleted file mode 100644 index 5e4bf3e464..0000000000 --- a/apps/web/ce/helpers/workspace.helper.ts +++ /dev/null @@ -1,2 +0,0 @@ -export type TRenderSettingsLink = (workspaceSlug: string, settingKey: string) => boolean; -export const shouldRenderSettingLink: TRenderSettingsLink = (workspaceSlug, settingKey) => true; diff --git a/apps/web/ce/hooks/app-rail/index.ts b/apps/web/ce/hooks/app-rail/index.ts index 1a8f850f5f..d46b5c917e 100644 --- a/apps/web/ce/hooks/app-rail/index.ts +++ b/apps/web/ce/hooks/app-rail/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./provider"; diff --git a/apps/web/ce/hooks/app-rail/provider.tsx b/apps/web/ce/hooks/app-rail/provider.tsx index 296ed3dc1a..029f5a8353 100644 --- a/apps/web/ce/hooks/app-rail/provider.tsx +++ b/apps/web/ce/hooks/app-rail/provider.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { AppRailVisibilityProvider as CoreProvider } from "@/lib/app-rail"; diff --git a/apps/web/ce/hooks/editor/use-extended-editor-config.ts b/apps/web/ce/hooks/editor/use-extended-editor-config.ts index 9ca7b74a08..172d9026a8 100644 --- a/apps/web/ce/hooks/editor/use-extended-editor-config.ts +++ b/apps/web/ce/hooks/editor/use-extended-editor-config.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; // plane imports import type { TExtendedFileHandler } from "@plane/editor"; diff --git a/apps/web/ce/hooks/pages/index.ts b/apps/web/ce/hooks/pages/index.ts index e67eaa7975..bc7999e282 100644 --- a/apps/web/ce/hooks/pages/index.ts +++ b/apps/web/ce/hooks/pages/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./use-pages-pane-extensions"; export * from "./use-extended-editor-extensions"; diff --git a/apps/web/ce/hooks/pages/use-extended-editor-extensions.ts b/apps/web/ce/hooks/pages/use-extended-editor-extensions.ts index 737578481b..cc3b0a213e 100644 --- a/apps/web/ce/hooks/pages/use-extended-editor-extensions.ts +++ b/apps/web/ce/hooks/pages/use-extended-editor-extensions.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IEditorPropsExtended } from "@plane/editor"; import type { TSearchEntityRequestPayload, TSearchResponse } from "@plane/types"; import type { TPageInstance } from "@/store/pages/base-page"; diff --git a/apps/web/ce/hooks/pages/use-pages-pane-extensions.ts b/apps/web/ce/hooks/pages/use-pages-pane-extensions.ts index 5aef069cf6..6b2837e2fc 100644 --- a/apps/web/ce/hooks/pages/use-pages-pane-extensions.ts +++ b/apps/web/ce/hooks/pages/use-pages-pane-extensions.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; import type { RefObject } from "react"; import { useSearchParams } from "next/navigation"; diff --git a/apps/web/ce/hooks/rich-filters/use-filters-operator-configs.ts b/apps/web/ce/hooks/rich-filters/use-filters-operator-configs.ts index 0c65a4de82..23d4601094 100644 --- a/apps/web/ce/hooks/rich-filters/use-filters-operator-configs.ts +++ b/apps/web/ce/hooks/rich-filters/use-filters-operator-configs.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TSupportedOperators } from "@plane/types"; import { CORE_OPERATORS } from "@plane/types"; diff --git a/apps/web/ce/hooks/store/index.ts b/apps/web/ce/hooks/store/index.ts index 1962c9b262..c514dcefe5 100644 --- a/apps/web/ce/hooks/store/index.ts +++ b/apps/web/ce/hooks/store/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./use-page-store"; export * from "./use-page"; diff --git a/apps/web/ce/hooks/store/use-page-store.ts b/apps/web/ce/hooks/store/use-page-store.ts index 025e03836c..e9fe5776f1 100644 --- a/apps/web/ce/hooks/store/use-page-store.ts +++ b/apps/web/ce/hooks/store/use-page-store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useContext } from "react"; // context import { StoreContext } from "@/lib/store-context"; diff --git a/apps/web/ce/hooks/store/use-page.ts b/apps/web/ce/hooks/store/use-page.ts index d4c531fe47..7b588321e8 100644 --- a/apps/web/ce/hooks/store/use-page.ts +++ b/apps/web/ce/hooks/store/use-page.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useContext } from "react"; // mobx store import { StoreContext } from "@/lib/store-context"; diff --git a/apps/web/ce/hooks/use-additional-editor-mention.tsx b/apps/web/ce/hooks/use-additional-editor-mention.tsx index a3b719231d..3f936ebd26 100644 --- a/apps/web/ce/hooks/use-additional-editor-mention.tsx +++ b/apps/web/ce/hooks/use-additional-editor-mention.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; // plane editor import type { TMentionSection } from "@plane/editor"; diff --git a/apps/web/ce/hooks/use-additional-favorite-item-details.ts b/apps/web/ce/hooks/use-additional-favorite-item-details.ts index 7d1a6d36fa..7bf502ea11 100644 --- a/apps/web/ce/hooks/use-additional-favorite-item-details.ts +++ b/apps/web/ce/hooks/use-additional-favorite-item-details.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import type { IFavorite } from "@plane/types"; // components diff --git a/apps/web/ce/hooks/use-bulk-operation-status.ts b/apps/web/ce/hooks/use-bulk-operation-status.ts index 0bb6768101..539779061f 100644 --- a/apps/web/ce/hooks/use-bulk-operation-status.ts +++ b/apps/web/ce/hooks/use-bulk-operation-status.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export const useBulkOperationStatus = () => false; diff --git a/apps/web/ce/hooks/use-debounced-duplicate-issues.tsx b/apps/web/ce/hooks/use-debounced-duplicate-issues.tsx index b8c32d1bda..f84f4d2be7 100644 --- a/apps/web/ce/hooks/use-debounced-duplicate-issues.tsx +++ b/apps/web/ce/hooks/use-debounced-duplicate-issues.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TDeDupeIssue } from "@plane/types"; export const useDebouncedDuplicateIssues = ( diff --git a/apps/web/ce/hooks/use-editor-flagging.ts b/apps/web/ce/hooks/use-editor-flagging.ts index 2c8766c955..e1841ff666 100644 --- a/apps/web/ce/hooks/use-editor-flagging.ts +++ b/apps/web/ce/hooks/use-editor-flagging.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // editor import type { TExtensions } from "@plane/editor"; import type { EPageStoreType } from "@/plane-web/hooks/store"; diff --git a/apps/web/ce/hooks/use-file-size.ts b/apps/web/ce/hooks/use-file-size.ts index c72e96da5b..a453d65dc5 100644 --- a/apps/web/ce/hooks/use-file-size.ts +++ b/apps/web/ce/hooks/use-file-size.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { MAX_FILE_SIZE } from "@plane/constants"; // hooks diff --git a/apps/web/ce/hooks/use-issue-embed.tsx b/apps/web/ce/hooks/use-issue-embed.tsx index 67bc79b7eb..6ffbec7cdb 100644 --- a/apps/web/ce/hooks/use-issue-embed.tsx +++ b/apps/web/ce/hooks/use-issue-embed.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // editor import type { TEmbedConfig } from "@plane/editor"; // plane types diff --git a/apps/web/ce/hooks/use-issue-properties.tsx b/apps/web/ce/hooks/use-issue-properties.tsx index 12a020c8ce..4eff976d40 100644 --- a/apps/web/ce/hooks/use-issue-properties.tsx +++ b/apps/web/ce/hooks/use-issue-properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TIssueServiceType } from "@plane/types"; export const useWorkItemProperties = ( diff --git a/apps/web/ce/hooks/use-notification-preview.tsx b/apps/web/ce/hooks/use-notification-preview.tsx index 6e21868a5f..11bcbf4a2c 100644 --- a/apps/web/ce/hooks/use-notification-preview.tsx +++ b/apps/web/ce/hooks/use-notification-preview.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IWorkItemPeekOverview } from "@plane/types"; import { EIssueServiceType } from "@plane/types"; import { IssuePeekOverview } from "@/components/issues/peek-overview"; diff --git a/apps/web/ce/hooks/use-page-flag.ts b/apps/web/ce/hooks/use-page-flag.ts index 94d72065ac..1fff2492a4 100644 --- a/apps/web/ce/hooks/use-page-flag.ts +++ b/apps/web/ce/hooks/use-page-flag.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export type TPageFlagHookArgs = { workspaceSlug: string; }; diff --git a/apps/web/ce/hooks/use-timeline-chart.ts b/apps/web/ce/hooks/use-timeline-chart.ts index b935a74034..2deaae2542 100644 --- a/apps/web/ce/hooks/use-timeline-chart.ts +++ b/apps/web/ce/hooks/use-timeline-chart.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // types import type { TTimelineTypeCore } from "@plane/types"; import { GANTT_TIMELINE_TYPE } from "@plane/types"; diff --git a/apps/web/ce/hooks/use-workspace-issue-properties-extended.tsx b/apps/web/ce/hooks/use-workspace-issue-properties-extended.tsx index 6e9ba79f25..a9d7b019d6 100644 --- a/apps/web/ce/hooks/use-workspace-issue-properties-extended.tsx +++ b/apps/web/ce/hooks/use-workspace-issue-properties-extended.tsx @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars export const useWorkspaceIssuePropertiesExtended = (workspaceSlug: string | string[] | undefined) => {}; diff --git a/apps/web/ce/hooks/work-item-filters/use-work-item-filters-config.tsx b/apps/web/ce/hooks/work-item-filters/use-work-item-filters-config.tsx index e16bdd2bda..67753b1cfe 100644 --- a/apps/web/ce/hooks/work-item-filters/use-work-item-filters-config.tsx +++ b/apps/web/ce/hooks/work-item-filters/use-work-item-filters-config.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; import { AtSign, Briefcase } from "lucide-react"; // plane imports diff --git a/apps/web/ce/layouts/project-wrapper.tsx b/apps/web/ce/layouts/project-wrapper.tsx deleted file mode 100644 index edfd3d41fd..0000000000 --- a/apps/web/ce/layouts/project-wrapper.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { observer } from "mobx-react"; -// layouts -import { ProjectAuthWrapper as CoreProjectAuthWrapper } from "@/layouts/auth-layout/project-wrapper"; - -export type IProjectAuthWrapper = { - workspaceSlug: string; - projectId: string; - children: React.ReactNode; -}; - -export const ProjectAuthWrapper = observer(function ProjectAuthWrapper(props: IProjectAuthWrapper) { - // props - const { workspaceSlug, projectId, children } = props; - - return ( - - {children} - - ); -}); diff --git a/apps/web/ce/layouts/workspace-wrapper.tsx b/apps/web/ce/layouts/workspace-wrapper.tsx deleted file mode 100644 index 1eaba348de..0000000000 --- a/apps/web/ce/layouts/workspace-wrapper.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import type { FC } from "react"; -import { observer } from "mobx-react"; -// layouts -import { WorkspaceAuthWrapper as CoreWorkspaceAuthWrapper } from "@/layouts/auth-layout/workspace-wrapper"; - -export type IWorkspaceAuthWrapper = { - children: React.ReactNode; -}; - -export const WorkspaceAuthWrapper = observer(function WorkspaceAuthWrapper(props: IWorkspaceAuthWrapper) { - // props - const { children } = props; - - return {children}; -}); diff --git a/apps/web/ce/services/index.ts b/apps/web/ce/services/index.ts deleted file mode 100644 index 7e406b1b4c..0000000000 --- a/apps/web/ce/services/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./project"; -export * from "@/services/workspace.service"; diff --git a/apps/web/ce/services/project/index.ts b/apps/web/ce/services/project/index.ts deleted file mode 100644 index 8b75f6bf5a..0000000000 --- a/apps/web/ce/services/project/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./estimate.service"; -export * from "@/services/view.service"; diff --git a/apps/web/ce/services/project/project-state.service.ts b/apps/web/ce/services/project/project-state.service.ts deleted file mode 100644 index f4a48ae717..0000000000 --- a/apps/web/ce/services/project/project-state.service.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "@/services/project/project-state.service"; diff --git a/apps/web/ce/store/analytics.store.ts b/apps/web/ce/store/analytics.store.ts index 9556dcf3aa..9ae14f9b65 100644 --- a/apps/web/ce/store/analytics.store.ts +++ b/apps/web/ce/store/analytics.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IBaseAnalyticsStore } from "@/store/analytics.store"; import { BaseAnalyticsStore } from "@/store/analytics.store"; diff --git a/apps/web/ce/store/command-palette.store.ts b/apps/web/ce/store/command-palette.store.ts index 6a3f8abae1..9d5ff8a01d 100644 --- a/apps/web/ce/store/command-palette.store.ts +++ b/apps/web/ce/store/command-palette.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { computed, makeObservable } from "mobx"; // types / constants import type { IBaseCommandPaletteStore } from "@/store/base-command-palette.store"; diff --git a/apps/web/ce/store/cycle/index.ts b/apps/web/ce/store/cycle/index.ts index d9b3080a86..884a0e71b8 100644 --- a/apps/web/ce/store/cycle/index.ts +++ b/apps/web/ce/store/cycle/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export type { ICycleStore } from "@/store/cycle.store"; diff --git a/apps/web/ce/store/estimates/estimate.ts b/apps/web/ce/store/estimates/estimate.ts index 8a32799bc7..805c00df8d 100644 --- a/apps/web/ce/store/estimates/estimate.ts +++ b/apps/web/ce/store/estimates/estimate.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { orderBy, set } from "lodash-es"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; @@ -8,7 +14,7 @@ import type { TEstimateSystemKeys, } from "@plane/types"; // plane web services -import estimateService from "@/plane-web/services/project/estimate.service"; +import estimateService from "@/services/estimate.service"; // store import type { IEstimatePoint } from "@/store/estimates/estimate-point"; import { EstimatePoint } from "@/store/estimates/estimate-point"; diff --git a/apps/web/ce/store/global-view.store.ts b/apps/web/ce/store/global-view.store.ts index f0d5cdfb40..069b4fcd35 100644 --- a/apps/web/ce/store/global-view.store.ts +++ b/apps/web/ce/store/global-view.store.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "@/store/global-view.store"; diff --git a/apps/web/ce/store/issue/epic/filter.store.ts b/apps/web/ce/store/issue/epic/filter.store.ts index 999e1515d3..be441707cb 100644 --- a/apps/web/ce/store/issue/epic/filter.store.ts +++ b/apps/web/ce/store/issue/epic/filter.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IProjectIssuesFilter } from "@/store/issue/project"; import { ProjectIssuesFilter } from "@/store/issue/project"; import type { IIssueRootStore } from "@/store/issue/root.store"; diff --git a/apps/web/ce/store/issue/epic/index.ts b/apps/web/ce/store/issue/epic/index.ts index 0fe6c946b0..a21a791fef 100644 --- a/apps/web/ce/store/issue/epic/index.ts +++ b/apps/web/ce/store/issue/epic/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./filter.store"; export * from "./issue.store"; diff --git a/apps/web/ce/store/issue/epic/issue.store.ts b/apps/web/ce/store/issue/epic/issue.store.ts index 702a4c05ce..b6761eac89 100644 --- a/apps/web/ce/store/issue/epic/issue.store.ts +++ b/apps/web/ce/store/issue/epic/issue.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IProjectIssues } from "@/store/issue/project"; import { ProjectIssues } from "@/store/issue/project"; import type { IIssueRootStore } from "@/store/issue/root.store"; diff --git a/apps/web/ce/store/issue/helpers/base-issue-store.ts b/apps/web/ce/store/issue/helpers/base-issue-store.ts index eac5cec17c..59d6d7b6a0 100644 --- a/apps/web/ce/store/issue/helpers/base-issue-store.ts +++ b/apps/web/ce/store/issue/helpers/base-issue-store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TIssue } from "@plane/types"; import { getIssueIds } from "@/store/issue/helpers/base-issues-utils"; diff --git a/apps/web/ce/store/issue/helpers/base-issue.store.ts b/apps/web/ce/store/issue/helpers/base-issue.store.ts index eac5cec17c..59d6d7b6a0 100644 --- a/apps/web/ce/store/issue/helpers/base-issue.store.ts +++ b/apps/web/ce/store/issue/helpers/base-issue.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TIssue } from "@plane/types"; import { getIssueIds } from "@/store/issue/helpers/base-issues-utils"; diff --git a/apps/web/ce/store/issue/helpers/filter-utils.ts b/apps/web/ce/store/issue/helpers/filter-utils.ts index eedd126240..66ce743550 100644 --- a/apps/web/ce/store/issue/helpers/filter-utils.ts +++ b/apps/web/ce/store/issue/helpers/filter-utils.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IIssueDisplayFilterOptions } from "@plane/types"; export const getEnabledDisplayFilters = (displayFilters: IIssueDisplayFilterOptions) => displayFilters; diff --git a/apps/web/ce/store/issue/issue-details/activity.store.ts b/apps/web/ce/store/issue/issue-details/activity.store.ts index ab86bc1c1c..a9f4b0a5e5 100644 --- a/apps/web/ce/store/issue/issue-details/activity.store.ts +++ b/apps/web/ce/store/issue/issue-details/activity.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { concat, orderBy, set, uniq, update } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; diff --git a/apps/web/ce/store/issue/issue-details/root.store.ts b/apps/web/ce/store/issue/issue-details/root.store.ts index 2bc4f03ed3..1b96b49e1d 100644 --- a/apps/web/ce/store/issue/issue-details/root.store.ts +++ b/apps/web/ce/store/issue/issue-details/root.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { makeObservable } from "mobx"; import type { TIssueServiceType } from "@plane/types"; import type { IIssueDetail as IIssueDetailCore } from "@/store/issue/issue-details/root.store"; diff --git a/apps/web/ce/store/issue/team-project/filter.store.ts b/apps/web/ce/store/issue/team-project/filter.store.ts index 8cdb7787da..45d5324c89 100644 --- a/apps/web/ce/store/issue/team-project/filter.store.ts +++ b/apps/web/ce/store/issue/team-project/filter.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IProjectIssuesFilter } from "@/store/issue/project"; import { ProjectIssuesFilter } from "@/store/issue/project"; import type { IIssueRootStore } from "@/store/issue/root.store"; diff --git a/apps/web/ce/store/issue/team-project/index.ts b/apps/web/ce/store/issue/team-project/index.ts index 0fe6c946b0..a21a791fef 100644 --- a/apps/web/ce/store/issue/team-project/index.ts +++ b/apps/web/ce/store/issue/team-project/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./filter.store"; export * from "./issue.store"; diff --git a/apps/web/ce/store/issue/team-project/issue.store.ts b/apps/web/ce/store/issue/team-project/issue.store.ts index 496d5fda63..fa27134901 100644 --- a/apps/web/ce/store/issue/team-project/issue.store.ts +++ b/apps/web/ce/store/issue/team-project/issue.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IProjectIssues } from "@/store/issue/project"; import { ProjectIssues } from "@/store/issue/project"; import type { IIssueRootStore } from "@/store/issue/root.store"; diff --git a/apps/web/ce/store/issue/team-views/filter.store.ts b/apps/web/ce/store/issue/team-views/filter.store.ts index a40a3eaa2a..133f98da4d 100644 --- a/apps/web/ce/store/issue/team-views/filter.store.ts +++ b/apps/web/ce/store/issue/team-views/filter.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IProjectViewIssuesFilter } from "@/store/issue/project-views"; import { ProjectViewIssuesFilter } from "@/store/issue/project-views"; import type { IIssueRootStore } from "@/store/issue/root.store"; diff --git a/apps/web/ce/store/issue/team-views/index.ts b/apps/web/ce/store/issue/team-views/index.ts index 0fe6c946b0..a21a791fef 100644 --- a/apps/web/ce/store/issue/team-views/index.ts +++ b/apps/web/ce/store/issue/team-views/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./filter.store"; export * from "./issue.store"; diff --git a/apps/web/ce/store/issue/team-views/issue.store.ts b/apps/web/ce/store/issue/team-views/issue.store.ts index 8bcfbc67ea..610520007f 100644 --- a/apps/web/ce/store/issue/team-views/issue.store.ts +++ b/apps/web/ce/store/issue/team-views/issue.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IProjectViewIssues } from "@/store/issue/project-views"; import { ProjectViewIssues } from "@/store/issue/project-views"; import type { IIssueRootStore } from "@/store/issue/root.store"; diff --git a/apps/web/ce/store/issue/team/filter.store.ts b/apps/web/ce/store/issue/team/filter.store.ts index 62e1f2eb6d..20842d2a32 100644 --- a/apps/web/ce/store/issue/team/filter.store.ts +++ b/apps/web/ce/store/issue/team/filter.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IProjectIssuesFilter } from "@/store/issue/project"; import { ProjectIssuesFilter } from "@/store/issue/project"; import type { IIssueRootStore } from "@/store/issue/root.store"; diff --git a/apps/web/ce/store/issue/team/index.ts b/apps/web/ce/store/issue/team/index.ts index 0fe6c946b0..a21a791fef 100644 --- a/apps/web/ce/store/issue/team/index.ts +++ b/apps/web/ce/store/issue/team/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./filter.store"; export * from "./issue.store"; diff --git a/apps/web/ce/store/issue/team/issue.store.ts b/apps/web/ce/store/issue/team/issue.store.ts index 446332c585..a24515c23c 100644 --- a/apps/web/ce/store/issue/team/issue.store.ts +++ b/apps/web/ce/store/issue/team/issue.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IProjectIssues } from "@/store/issue/project"; import { ProjectIssues } from "@/store/issue/project"; import type { IIssueRootStore } from "@/store/issue/root.store"; diff --git a/apps/web/ce/store/issue/workspace/issue.store.ts b/apps/web/ce/store/issue/workspace/issue.store.ts index 7317da96d3..0862be70c1 100644 --- a/apps/web/ce/store/issue/workspace/issue.store.ts +++ b/apps/web/ce/store/issue/workspace/issue.store.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "@/store/issue/workspace/issue.store"; diff --git a/apps/web/ce/store/member/project-member.store.ts b/apps/web/ce/store/member/project-member.store.ts index f0e5b3069d..6f534a150f 100644 --- a/apps/web/ce/store/member/project-member.store.ts +++ b/apps/web/ce/store/member/project-member.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { computedFn } from "mobx-utils"; import type { EUserProjectRoles } from "@plane/types"; // plane imports diff --git a/apps/web/ce/store/pages/extended-base-page.ts b/apps/web/ce/store/pages/extended-base-page.ts index 2c5cd30664..3144ef647b 100644 --- a/apps/web/ce/store/pages/extended-base-page.ts +++ b/apps/web/ce/store/pages/extended-base-page.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TPage, TPageExtended } from "@plane/types"; import type { RootStore } from "@/plane-web/store/root.store"; import type { TBasePageServices } from "@/store/pages/base-page"; diff --git a/apps/web/ce/store/power-k.store.ts b/apps/web/ce/store/power-k.store.ts index 753d329407..9528c5e166 100644 --- a/apps/web/ce/store/power-k.store.ts +++ b/apps/web/ce/store/power-k.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { makeObservable } from "mobx"; // types import type { IBasePowerKStore } from "@/store/base-power-k.store"; diff --git a/apps/web/ce/store/project-inbox.store.ts b/apps/web/ce/store/project-inbox.store.ts index 327ff23af7..3adbb18627 100644 --- a/apps/web/ce/store/project-inbox.store.ts +++ b/apps/web/ce/store/project-inbox.store.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "@/store/inbox/project-inbox.store"; diff --git a/apps/web/ce/store/project-view.store.ts b/apps/web/ce/store/project-view.store.ts index 41d7ba1ca4..0763fb6653 100644 --- a/apps/web/ce/store/project-view.store.ts +++ b/apps/web/ce/store/project-view.store.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "@/store/project-view.store"; diff --git a/apps/web/ce/store/root.store.ts b/apps/web/ce/store/root.store.ts index ca6caff8ca..9eadadf725 100644 --- a/apps/web/ce/store/root.store.ts +++ b/apps/web/ce/store/root.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // store import { CoreRootStore } from "@/store/root.store"; import type { ITimelineStore } from "./timeline"; diff --git a/apps/web/ce/store/state.store.ts b/apps/web/ce/store/state.store.ts index a25412ca8a..b27221268a 100644 --- a/apps/web/ce/store/state.store.ts +++ b/apps/web/ce/store/state.store.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "@/store/state.store"; diff --git a/apps/web/ce/store/timeline/base-timeline.store.ts b/apps/web/ce/store/timeline/base-timeline.store.ts index 37a75d3de1..b1c70f9940 100644 --- a/apps/web/ce/store/timeline/base-timeline.store.ts +++ b/apps/web/ce/store/timeline/base-timeline.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { isEqual, set } from "lodash-es"; import { action, makeObservable, observable, runInAction } from "mobx"; import { computedFn } from "mobx-utils"; diff --git a/apps/web/ce/store/timeline/index.ts b/apps/web/ce/store/timeline/index.ts index a6afa124c6..7fe482b93f 100644 --- a/apps/web/ce/store/timeline/index.ts +++ b/apps/web/ce/store/timeline/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RootStore } from "@/plane-web/store/root.store"; import { IssuesTimeLineStore } from "@/store/timeline/issues-timeline.store"; import type { IIssuesTimeLineStore } from "@/store/timeline/issues-timeline.store"; diff --git a/apps/web/ce/store/user/permission.store.ts b/apps/web/ce/store/user/permission.store.ts index ea062133de..42b5dd4cca 100644 --- a/apps/web/ce/store/user/permission.store.ts +++ b/apps/web/ce/store/user/permission.store.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { computedFn } from "mobx-utils"; import type { EUserPermissions } from "@plane/constants"; import type { RootStore } from "@/plane-web/store/root.store"; diff --git a/apps/web/ce/store/workspace/index.ts b/apps/web/ce/store/workspace/index.ts index 086063cb4d..b274563645 100644 --- a/apps/web/ce/store/workspace/index.ts +++ b/apps/web/ce/store/workspace/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // store import { BaseWorkspaceRootStore } from "@/store/workspace"; import type { RootStore } from "@/plane-web/store/root.store"; diff --git a/apps/web/ce/types/gantt-chart.ts b/apps/web/ce/types/gantt-chart.ts index 36bb65c60f..ad2324a5de 100644 --- a/apps/web/ce/types/gantt-chart.ts +++ b/apps/web/ce/types/gantt-chart.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export type TIssueRelationTypes = "blocking" | "blocked_by" | "duplicate" | "relates_to"; diff --git a/apps/web/ce/types/index.ts b/apps/web/ce/types/index.ts index 105b7e96a4..c39bc348af 100644 --- a/apps/web/ce/types/index.ts +++ b/apps/web/ce/types/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./projects"; export * from "./issue-types"; export * from "./gantt-chart"; diff --git a/apps/web/ce/types/issue-types/index.ts b/apps/web/ce/types/issue-types/index.ts index 7259fa3518..8406674ae0 100644 --- a/apps/web/ce/types/issue-types/index.ts +++ b/apps/web/ce/types/issue-types/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./issue-property-values.d"; diff --git a/apps/web/ce/types/pages/pane-extensions.ts b/apps/web/ce/types/pages/pane-extensions.ts index 4d89005c1d..72c966850c 100644 --- a/apps/web/ce/types/pages/pane-extensions.ts +++ b/apps/web/ce/types/pages/pane-extensions.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // CE re-exports the core navigation pane extension types directly // EE overrides this with specific extension data types export type { diff --git a/apps/web/ce/types/projects/index.ts b/apps/web/ce/types/projects/index.ts index 9fb35777a3..7acb1c4707 100644 --- a/apps/web/ce/types/projects/index.ts +++ b/apps/web/ce/types/projects/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./projects"; export * from "./project-activity"; diff --git a/apps/web/ce/types/projects/project-activity.ts b/apps/web/ce/types/projects/project-activity.ts index 766b0adaf2..31830d756f 100644 --- a/apps/web/ce/types/projects/project-activity.ts +++ b/apps/web/ce/types/projects/project-activity.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TProjectBaseActivity } from "@plane/types"; export type TProjectActivity = TProjectBaseActivity & { diff --git a/apps/web/ce/types/projects/projects.ts b/apps/web/ce/types/projects/projects.ts index 51427282a0..b39cd81414 100644 --- a/apps/web/ce/types/projects/projects.ts +++ b/apps/web/ce/types/projects/projects.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IPartialProject, IProject } from "@plane/types"; export type TPartialProject = IPartialProject; diff --git a/apps/web/core/components/account/auth-forms/auth-banner.tsx b/apps/web/core/components/account/auth-forms/auth-banner.tsx index 6e7abe6bcb..496a6eddfb 100644 --- a/apps/web/core/components/account/auth-forms/auth-banner.tsx +++ b/apps/web/core/components/account/auth-forms/auth-banner.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Info } from "lucide-react"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/account/auth-forms/auth-header.tsx b/apps/web/core/components/account/auth-forms/auth-header.tsx index c6c4545ea7..239d658291 100644 --- a/apps/web/core/components/account/auth-forms/auth-header.tsx +++ b/apps/web/core/components/account/auth-forms/auth-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import useSWR from "swr"; import { useTranslation } from "@plane/i18n"; @@ -8,7 +14,7 @@ import { WorkspaceLogo } from "@/components/workspace/logo"; // helpers import { EAuthModes, EAuthSteps } from "@/helpers/authentication.helper"; // services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; type TAuthHeader = { workspaceSlug: string | undefined; diff --git a/apps/web/core/components/account/auth-forms/auth-root.tsx b/apps/web/core/components/account/auth-forms/auth-root.tsx index 8356961148..9f075d03f5 100644 --- a/apps/web/core/components/account/auth-forms/auth-root.tsx +++ b/apps/web/core/components/account/auth-forms/auth-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { useSearchParams } from "next/navigation"; @@ -14,10 +20,11 @@ import { } from "@/helpers/authentication.helper"; // hooks import { useOAuthConfig } from "@/hooks/oauth"; +import { useInstance } from "@/hooks/store/use-instance"; // local imports import { TermsAndConditions } from "../terms-and-conditions"; import { AuthBanner } from "./auth-banner"; -import { AuthHeader } from "./auth-header"; +import { AuthHeader, AuthHeaderBase } from "./auth-header"; import { AuthFormRoot } from "./form-root"; type TAuthRoot = { @@ -39,9 +46,13 @@ export const AuthRoot = observer(function AuthRoot(props: TAuthRoot) { const [authStep, setAuthStep] = useState(EAuthSteps.EMAIL); const [email, setEmail] = useState(emailParam ? emailParam.toString() : ""); const [errorInfo, setErrorInfo] = useState(undefined); + // store hooks + const { config } = useInstance(); // derived values const oAuthActionText = authMode === EAuthModes.SIGN_UP ? "Sign up" : "Sign in"; const { isOAuthEnabled, oAuthOptions } = useOAuthConfig(oAuthActionText); + const isEmailBasedAuthEnabled = config?.is_email_password_enabled || config?.is_magic_login_enabled; + const noAuthMethodsAvailable = !isOAuthEnabled && !isEmailBasedAuthEnabled; useEffect(() => { if (!authMode && currentAuthMode) setAuthMode(currentAuthMode); @@ -91,22 +102,37 @@ export const AuthRoot = observer(function AuthRoot(props: TAuthRoot) { if (!authMode) return <>; - return ( -
-
- {errorInfo && errorInfo?.type === EErrorAlertType.BANNER_ALERT && ( - setErrorInfo(value)} /> - )} - + + + ); + } - {isOAuthEnabled && } - + return ( + + {errorInfo && errorInfo?.type === EErrorAlertType.BANNER_ALERT && ( + setErrorInfo(value)} /> + )} + + {isOAuthEnabled && ( + + )} + {isEmailBasedAuthEnabled && ( setErrorInfo(errorInfo)} currentAuthMode={currentAuthMode} /> - -
-
+ )} + + ); }); + +function AuthContainer({ children }: { children: React.ReactNode }) { + return ( +
+
{children}
+
+ ); +} diff --git a/apps/web/core/components/account/auth-forms/common/container.tsx b/apps/web/core/components/account/auth-forms/common/container.tsx index 8eff06f64e..618c183ebe 100644 --- a/apps/web/core/components/account/auth-forms/common/container.tsx +++ b/apps/web/core/components/account/auth-forms/common/container.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export function FormContainer({ children }: { children: React.ReactNode }) { return (
diff --git a/apps/web/core/components/account/auth-forms/common/header.tsx b/apps/web/core/components/account/auth-forms/common/header.tsx index 6d7e68adaf..4639634df6 100644 --- a/apps/web/core/components/account/auth-forms/common/header.tsx +++ b/apps/web/core/components/account/auth-forms/common/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export function AuthFormHeader({ title, description }: { title: string; description: string }) { return (
diff --git a/apps/web/core/components/account/auth-forms/email.tsx b/apps/web/core/components/account/auth-forms/email.tsx index 649824a0b0..7db78762d2 100644 --- a/apps/web/core/components/account/auth-forms/email.tsx +++ b/apps/web/core/components/account/auth-forms/email.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC, FormEvent } from "react"; import { useMemo, useRef, useState } from "react"; import { observer } from "mobx-react"; @@ -68,7 +74,7 @@ export const AuthEmailForm = observer(function AuthEmailForm(props: TAuthEmailFo onChange={(e) => setEmail(e.target.value)} placeholder={t("auth.common.email.placeholder")} className={`disable-autofill-style h-10 w-full placeholder:text-placeholder autofill:bg-danger-primary border-0 focus:bg-none active:bg-transparent`} - autoComplete="on" + autoComplete="off" autoFocus ref={inputRef} /> diff --git a/apps/web/core/components/account/auth-forms/forgot-password-popover.tsx b/apps/web/core/components/account/auth-forms/forgot-password-popover.tsx index 5b6c50d512..1ef9fb71cb 100644 --- a/apps/web/core/components/account/auth-forms/forgot-password-popover.tsx +++ b/apps/web/core/components/account/auth-forms/forgot-password-popover.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Fragment, useState } from "react"; import { usePopper } from "react-popper"; import { Popover } from "@headlessui/react"; diff --git a/apps/web/core/components/account/auth-forms/forgot-password.tsx b/apps/web/core/components/account/auth-forms/forgot-password.tsx index 10d2d82318..3ccdfee20c 100644 --- a/apps/web/core/components/account/auth-forms/forgot-password.tsx +++ b/apps/web/core/components/account/auth-forms/forgot-password.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import Link from "next/link"; import { useSearchParams } from "next/navigation"; @@ -98,7 +104,7 @@ export const ForgotPasswordForm = observer(function ForgotPasswordForm() { hasError={Boolean(errors.email)} placeholder={t("auth.common.email.placeholder")} className="h-10 w-full border border-strong !bg-surface-1 pr-12 placeholder:text-placeholder" - autoComplete="on" + autoComplete="off" disabled={resendTimerCode > 0} /> )} diff --git a/apps/web/core/components/account/auth-forms/form-root.tsx b/apps/web/core/components/account/auth-forms/form-root.tsx index 35ad625cbb..ab3aa8340e 100644 --- a/apps/web/core/components/account/auth-forms/form-root.tsx +++ b/apps/web/core/components/account/auth-forms/form-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; import { useSearchParams } from "next/navigation"; diff --git a/apps/web/core/components/account/auth-forms/index.ts b/apps/web/core/components/account/auth-forms/index.ts index aa4ee6fd87..125f6699c4 100644 --- a/apps/web/core/components/account/auth-forms/index.ts +++ b/apps/web/core/components/account/auth-forms/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./auth-root"; diff --git a/apps/web/core/components/account/auth-forms/password.tsx b/apps/web/core/components/account/auth-forms/password.tsx index e773246153..92bcdfe9d1 100644 --- a/apps/web/core/components/account/auth-forms/password.tsx +++ b/apps/web/core/components/account/auth-forms/password.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useMemo, useRef, useState } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; @@ -207,7 +213,7 @@ export const AuthPasswordForm = observer(function AuthPasswordForm(props: Props) className="disable-autofill-style h-10 w-full border border-strong !bg-surface-1 pr-12 placeholder:text-placeholder" onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} - autoComplete="on" + autoComplete="off" autoFocus />
@@ -138,7 +144,7 @@ export const ResetPasswordForm = observer(function ResetPasswordForm() { minLength={8} onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} - autoComplete="on" + autoComplete="new-password" autoFocus /> {showPassword.password ? ( @@ -169,6 +175,7 @@ export const ResetPasswordForm = observer(function ResetPasswordForm() { className="h-10 w-full border border-strong !bg-surface-1 pr-12 placeholder:text-placeholder" onFocus={() => setIsRetryPasswordInputFocused(true)} onBlur={() => setIsRetryPasswordInputFocused(false)} + autoComplete="new-password" /> {showPassword.retypePassword ? (
@@ -141,7 +147,7 @@ export const SetPasswordForm = observer(function SetPasswordForm() { minLength={8} onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} - autoComplete="on" + autoComplete="new-password" autoFocus /> {showPassword.password ? ( @@ -172,6 +178,7 @@ export const SetPasswordForm = observer(function SetPasswordForm() { className="h-10 w-full border border-strong !bg-surface-1 pr-12 placeholder:text-placeholder" onFocus={() => setIsRetryPasswordInputFocused(true)} onBlur={() => setIsRetryPasswordInputFocused(false)} + autoComplete="new-password" /> {showPassword.retypePassword ? ( handleFormChange("email", e.target.value)} placeholder={t("auth.common.email.placeholder")} className="disable-autofill-style h-10 w-full placeholder:text-placeholder border-0" - autoComplete="on" + autoComplete="off" disabled /> {uniqueCodeFormData.email.length > 0 && ( @@ -128,6 +134,7 @@ export function AuthUniqueCodeForm(props: TAuthUniqueCodeForm) { onChange={(e) => handleFormChange("code", e.target.value)} placeholder={t("auth.common.unique_code.placeholder")} className="disable-autofill-style h-10 w-full border border-strong !bg-surface-1 pr-12 placeholder:text-placeholder" + autoComplete="off" autoFocus />
diff --git a/apps/web/core/components/account/deactivate-account-modal.tsx b/apps/web/core/components/account/deactivate-account-modal.tsx index c5ba6d481a..b094e5d397 100644 --- a/apps/web/core/components/account/deactivate-account-modal.tsx +++ b/apps/web/core/components/account/deactivate-account-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { useTranslation } from "@plane/i18n"; // ui diff --git a/apps/web/core/components/account/terms-and-conditions.tsx b/apps/web/core/components/account/terms-and-conditions.tsx index 6a500df7dc..131e61083e 100644 --- a/apps/web/core/components/account/terms-and-conditions.tsx +++ b/apps/web/core/components/account/terms-and-conditions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import Link from "next/link"; import { EAuthModes } from "@plane/constants"; diff --git a/apps/web/core/components/analytics/analytics-filter-actions.tsx b/apps/web/core/components/analytics/analytics-filter-actions.tsx index 2c10cf7eba..1f9a3d206c 100644 --- a/apps/web/core/components/analytics/analytics-filter-actions.tsx +++ b/apps/web/core/components/analytics/analytics-filter-actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane web components import { observer } from "mobx-react"; // hooks diff --git a/apps/web/core/components/analytics/analytics-section-wrapper.tsx b/apps/web/core/components/analytics/analytics-section-wrapper.tsx index 637d684c4f..1585c3581d 100644 --- a/apps/web/core/components/analytics/analytics-section-wrapper.tsx +++ b/apps/web/core/components/analytics/analytics-section-wrapper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { cn } from "@plane/utils"; type Props = { diff --git a/apps/web/core/components/analytics/analytics-wrapper.tsx b/apps/web/core/components/analytics/analytics-wrapper.tsx index 9f369b1a5c..6cd886b047 100644 --- a/apps/web/core/components/analytics/analytics-wrapper.tsx +++ b/apps/web/core/components/analytics/analytics-wrapper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // plane package imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/analytics/empty-state.tsx b/apps/web/core/components/analytics/empty-state.tsx index 7341b6f1d7..0f862bdee1 100644 --- a/apps/web/core/components/analytics/empty-state.tsx +++ b/apps/web/core/components/analytics/empty-state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTheme } from "next-themes"; // plane package imports import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/analytics/export.ts b/apps/web/core/components/analytics/export.ts index 8a8307857a..c77d1783e0 100644 --- a/apps/web/core/components/analytics/export.ts +++ b/apps/web/core/components/analytics/export.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ColumnDef, Row } from "@tanstack/react-table"; import { download, generateCsv, mkConfig } from "export-to-csv"; diff --git a/apps/web/core/components/analytics/insight-card.tsx b/apps/web/core/components/analytics/insight-card.tsx index b0b2f9ad9d..d8a30a1c91 100644 --- a/apps/web/core/components/analytics/insight-card.tsx +++ b/apps/web/core/components/analytics/insight-card.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane package imports import React from "react"; import type { IAnalyticsResponseFields } from "@plane/types"; diff --git a/apps/web/core/components/analytics/insight-table/data-table.tsx b/apps/web/core/components/analytics/insight-table/data-table.tsx index 87ced204ae..8836bc89e8 100644 --- a/apps/web/core/components/analytics/insight-table/data-table.tsx +++ b/apps/web/core/components/analytics/insight-table/data-table.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import * as React from "react"; import type { ColumnDef, diff --git a/apps/web/core/components/analytics/insight-table/index.ts b/apps/web/core/components/analytics/insight-table/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/analytics/insight-table/index.ts +++ b/apps/web/core/components/analytics/insight-table/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/analytics/insight-table/loader.tsx b/apps/web/core/components/analytics/insight-table/loader.tsx index ff7ea7a19a..e07da23746 100644 --- a/apps/web/core/components/analytics/insight-table/loader.tsx +++ b/apps/web/core/components/analytics/insight-table/loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import * as React from "react"; import type { ColumnDef } from "@tanstack/react-table"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@plane/propel/table"; diff --git a/apps/web/core/components/analytics/insight-table/root.tsx b/apps/web/core/components/analytics/insight-table/root.tsx index 1c7b3cef17..9607d6e958 100644 --- a/apps/web/core/components/analytics/insight-table/root.tsx +++ b/apps/web/core/components/analytics/insight-table/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ColumnDef, Row, Table } from "@tanstack/react-table"; import { Download } from "lucide-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/analytics/loaders.tsx b/apps/web/core/components/analytics/loaders.tsx index cd9f19f22c..c298dd0015 100644 --- a/apps/web/core/components/analytics/loaders.tsx +++ b/apps/web/core/components/analytics/loaders.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Loader } from "@plane/ui"; export function ProjectInsightsLoader() { diff --git a/apps/web/core/components/analytics/overview/active-project-item.tsx b/apps/web/core/components/analytics/overview/active-project-item.tsx index 0b7648e9c6..82127daa42 100644 --- a/apps/web/core/components/analytics/overview/active-project-item.tsx +++ b/apps/web/core/components/analytics/overview/active-project-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane package imports import { Logo } from "@plane/propel/emoji-icon-picker"; import { ProjectIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/analytics/overview/active-projects.tsx b/apps/web/core/components/analytics/overview/active-projects.tsx index 7796f0793b..b34aebcf80 100644 --- a/apps/web/core/components/analytics/overview/active-projects.tsx +++ b/apps/web/core/components/analytics/overview/active-projects.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/analytics/overview/index.ts b/apps/web/core/components/analytics/overview/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/analytics/overview/index.ts +++ b/apps/web/core/components/analytics/overview/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/analytics/overview/project-insights.tsx b/apps/web/core/components/analytics/overview/project-insights.tsx index 56c1275b0e..65735e8a4f 100644 --- a/apps/web/core/components/analytics/overview/project-insights.tsx +++ b/apps/web/core/components/analytics/overview/project-insights.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { lazy, Suspense } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/analytics/overview/root.tsx b/apps/web/core/components/analytics/overview/root.tsx index 7ebb4ed076..600d5692a0 100644 --- a/apps/web/core/components/analytics/overview/root.tsx +++ b/apps/web/core/components/analytics/overview/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import AnalyticsWrapper from "../analytics-wrapper"; import TotalInsights from "../total-insights"; diff --git a/apps/web/core/components/analytics/select/analytics-params.tsx b/apps/web/core/components/analytics/select/analytics-params.tsx index 7cd78abc1a..a577002b7c 100644 --- a/apps/web/core/components/analytics/select/analytics-params.tsx +++ b/apps/web/core/components/analytics/select/analytics-params.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { observer } from "mobx-react"; import type { Control, UseFormSetValue } from "react-hook-form"; diff --git a/apps/web/core/components/analytics/select/duration.tsx b/apps/web/core/components/analytics/select/duration.tsx index f668f3c472..afeb8f7540 100644 --- a/apps/web/core/components/analytics/select/duration.tsx +++ b/apps/web/core/components/analytics/select/duration.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane package imports import type { ReactNode } from "react"; import React from "react"; diff --git a/apps/web/core/components/analytics/select/project.tsx b/apps/web/core/components/analytics/select/project.tsx index 2b657fdc9e..7bdbbddb36 100644 --- a/apps/web/core/components/analytics/select/project.tsx +++ b/apps/web/core/components/analytics/select/project.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane package imports import { getButtonStyling } from "@plane/propel/button"; diff --git a/apps/web/core/components/analytics/select/select-x-axis.tsx b/apps/web/core/components/analytics/select/select-x-axis.tsx index 56f944a915..6effcfa4da 100644 --- a/apps/web/core/components/analytics/select/select-x-axis.tsx +++ b/apps/web/core/components/analytics/select/select-x-axis.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane package imports import type { ChartXAxisProperty } from "@plane/types"; import { CustomSelect } from "@plane/ui"; diff --git a/apps/web/core/components/analytics/select/select-y-axis.tsx b/apps/web/core/components/analytics/select/select-y-axis.tsx index 83fd3b6590..64c69fbff5 100644 --- a/apps/web/core/components/analytics/select/select-y-axis.tsx +++ b/apps/web/core/components/analytics/select/select-y-axis.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { EEstimateSystem } from "@plane/constants"; diff --git a/apps/web/core/components/analytics/total-insights.tsx b/apps/web/core/components/analytics/total-insights.tsx index 8dd996cd40..98e5ed0ee8 100644 --- a/apps/web/core/components/analytics/total-insights.tsx +++ b/apps/web/core/components/analytics/total-insights.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane package imports import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/analytics/trend-piece.tsx b/apps/web/core/components/analytics/trend-piece.tsx index 176c5b4c94..f246c4e418 100644 --- a/apps/web/core/components/analytics/trend-piece.tsx +++ b/apps/web/core/components/analytics/trend-piece.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane package imports import React from "react"; import { TrendingDown, TrendingUp } from "lucide-react"; diff --git a/apps/web/core/components/analytics/work-items/created-vs-resolved.tsx b/apps/web/core/components/analytics/work-items/created-vs-resolved.tsx index 1a81567eaf..66a6a72ac1 100644 --- a/apps/web/core/components/analytics/work-items/created-vs-resolved.tsx +++ b/apps/web/core/components/analytics/work-items/created-vs-resolved.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/analytics/work-items/customized-insights.tsx b/apps/web/core/components/analytics/work-items/customized-insights.tsx index 6e8590fd5b..c40a853b45 100644 --- a/apps/web/core/components/analytics/work-items/customized-insights.tsx +++ b/apps/web/core/components/analytics/work-items/customized-insights.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { useForm } from "react-hook-form"; diff --git a/apps/web/core/components/analytics/work-items/index.ts b/apps/web/core/components/analytics/work-items/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/analytics/work-items/index.ts +++ b/apps/web/core/components/analytics/work-items/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/analytics/work-items/modal/content.tsx b/apps/web/core/components/analytics/work-items/modal/content.tsx index 082b9266d4..259dec20ca 100644 --- a/apps/web/core/components/analytics/work-items/modal/content.tsx +++ b/apps/web/core/components/analytics/work-items/modal/content.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { Tab } from "@headlessui/react"; diff --git a/apps/web/core/components/analytics/work-items/modal/header.tsx b/apps/web/core/components/analytics/work-items/modal/header.tsx index 894ed88adf..c515deb98d 100644 --- a/apps/web/core/components/analytics/work-items/modal/header.tsx +++ b/apps/web/core/components/analytics/work-items/modal/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane package imports import { Expand, Shrink } from "lucide-react"; diff --git a/apps/web/core/components/analytics/work-items/modal/index.tsx b/apps/web/core/components/analytics/work-items/modal/index.tsx index c750bc01a0..a284ba93c8 100644 --- a/apps/web/core/components/analytics/work-items/modal/index.tsx +++ b/apps/web/core/components/analytics/work-items/modal/index.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState } from "react"; import { observer } from "mobx-react"; // plane package imports diff --git a/apps/web/core/components/analytics/work-items/priority-chart.tsx b/apps/web/core/components/analytics/work-items/priority-chart.tsx index fef9a810bb..48180c0fab 100644 --- a/apps/web/core/components/analytics/work-items/priority-chart.tsx +++ b/apps/web/core/components/analytics/work-items/priority-chart.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import type { ColumnDef, Row, RowData, Table } from "@tanstack/react-table"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/analytics/work-items/root.tsx b/apps/web/core/components/analytics/work-items/root.tsx index 94ddfbaceb..55fb767f95 100644 --- a/apps/web/core/components/analytics/work-items/root.tsx +++ b/apps/web/core/components/analytics/work-items/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import AnalyticsWrapper from "../analytics-wrapper"; import TotalInsights from "../total-insights"; diff --git a/apps/web/core/components/analytics/work-items/utils.ts b/apps/web/core/components/analytics/work-items/utils.ts index 613fa6b620..38535a1bf6 100644 --- a/apps/web/core/components/analytics/work-items/utils.ts +++ b/apps/web/core/components/analytics/work-items/utils.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane package imports import type { ChartYAxisMetric, IState } from "@plane/types"; import { ChartXAxisProperty } from "@plane/types"; diff --git a/apps/web/core/components/analytics/work-items/workitems-insight-table.tsx b/apps/web/core/components/analytics/work-items/workitems-insight-table.tsx index d33ec72186..fec1a70360 100644 --- a/apps/web/core/components/analytics/work-items/workitems-insight-table.tsx +++ b/apps/web/core/components/analytics/work-items/workitems-insight-table.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import type { ColumnDef, Row, RowData } from "@tanstack/react-table"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/api-token/delete-token-modal.tsx b/apps/web/core/components/api-token/delete-token-modal.tsx index 40a9a1ef5d..a5d91699d3 100644 --- a/apps/web/core/components/api-token/delete-token-modal.tsx +++ b/apps/web/core/components/api-token/delete-token-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { mutate } from "swr"; // types diff --git a/apps/web/core/components/api-token/empty-state.tsx b/apps/web/core/components/api-token/empty-state.tsx index 155c6a1afb..16b101b0ed 100644 --- a/apps/web/core/components/api-token/empty-state.tsx +++ b/apps/web/core/components/api-token/empty-state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // ui import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/api-token/modal/create-token-modal.tsx b/apps/web/core/components/api-token/modal/create-token-modal.tsx index 6da799422f..b9ca6a2648 100644 --- a/apps/web/core/components/api-token/modal/create-token-modal.tsx +++ b/apps/web/core/components/api-token/modal/create-token-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { mutate } from "swr"; // plane imports diff --git a/apps/web/core/components/api-token/modal/form.tsx b/apps/web/core/components/api-token/modal/form.tsx index 56086afa9e..87d7af327a 100644 --- a/apps/web/core/components/api-token/modal/form.tsx +++ b/apps/web/core/components/api-token/modal/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { add } from "date-fns"; import { Controller, useForm } from "react-hook-form"; diff --git a/apps/web/core/components/api-token/modal/generated-token-details.tsx b/apps/web/core/components/api-token/modal/generated-token-details.tsx index 76bfd2bc99..8995c438e0 100644 --- a/apps/web/core/components/api-token/modal/generated-token-details.tsx +++ b/apps/web/core/components/api-token/modal/generated-token-details.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; import { CopyIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/api-token/token-list-item.tsx b/apps/web/core/components/api-token/token-list-item.tsx index e1979fa32b..466dede529 100644 --- a/apps/web/core/components/api-token/token-list-item.tsx +++ b/apps/web/core/components/api-token/token-list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { XCircle } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/appearance/index.ts b/apps/web/core/components/appearance/index.ts new file mode 100644 index 0000000000..895fab0cf9 --- /dev/null +++ b/apps/web/core/components/appearance/index.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +export * from "./theme-switcher"; diff --git a/apps/web/core/components/appearance/theme-switcher.tsx b/apps/web/core/components/appearance/theme-switcher.tsx new file mode 100644 index 0000000000..4ec2eba432 --- /dev/null +++ b/apps/web/core/components/appearance/theme-switcher.tsx @@ -0,0 +1,76 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { useCallback, useMemo } from "react"; +import { observer } from "mobx-react"; +import { useTheme } from "next-themes"; +// plane imports +import type { I_THEME_OPTION } from "@plane/constants"; +import { THEME_OPTIONS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { setPromiseToast } from "@plane/propel/toast"; +// components +import { CustomThemeSelector } from "@/components/core/theme/custom-theme-selector"; +import { ThemeSwitch } from "@/components/core/theme/theme-switch"; +import { SettingsControlItem } from "@/components/settings/control-item"; +// hooks +import { useUserProfile } from "@/hooks/store/user"; + +export const ThemeSwitcher = observer(function ThemeSwitcher(props: { + option: { + id: string; + title: string; + description: string; + }; +}) { + // store hooks + const { data: userProfile, updateUserTheme } = useUserProfile(); + // theme + const { setTheme } = useTheme(); + // translation + const { t } = useTranslation(); + // derived values + const currentTheme = useMemo(() => { + const userThemeOption = THEME_OPTIONS.find((t) => t.value === userProfile?.theme?.theme); + return userThemeOption || null; + }, [userProfile?.theme?.theme]); + + const handleThemeChange = useCallback( + (themeOption: I_THEME_OPTION) => { + try { + setTheme(themeOption.value); + const updatePromise = updateUserTheme({ theme: themeOption.value }); + setPromiseToast(updatePromise, { + loading: "Updating theme...", + success: { + title: "Success!", + message: () => "Theme updated successfully!", + }, + error: { + title: "Error!", + message: () => "Failed to update the theme", + }, + }); + } catch (error) { + console.error("Error updating theme:", error); + } + }, + [updateUserTheme] + ); + + if (!userProfile) return null; + + return ( + <> + } + /> + {userProfile.theme?.theme === "custom" && } + + ); +}); diff --git a/apps/web/core/components/archives/archive-tabs-list.tsx b/apps/web/core/components/archives/archive-tabs-list.tsx index f9cf3cb585..1b29c14156 100644 --- a/apps/web/core/components/archives/archive-tabs-list.tsx +++ b/apps/web/core/components/archives/archive-tabs-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; diff --git a/apps/web/core/components/archives/index.ts b/apps/web/core/components/archives/index.ts index 4b519fca03..db04e247fe 100644 --- a/apps/web/core/components/archives/index.ts +++ b/apps/web/core/components/archives/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./archive-tabs-list"; diff --git a/apps/web/core/components/auth-screens/auth-base.tsx b/apps/web/core/components/auth-screens/auth-base.tsx index b3b5d361f8..c0b19af250 100644 --- a/apps/web/core/components/auth-screens/auth-base.tsx +++ b/apps/web/core/components/auth-screens/auth-base.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { AuthRoot } from "@/components/account/auth-forms/auth-root"; import type { EAuthModes } from "@/helpers/authentication.helper"; diff --git a/apps/web/core/components/auth-screens/footer.tsx b/apps/web/core/components/auth-screens/footer.tsx index 8bfdd73ffb..fbe6b84289 100644 --- a/apps/web/core/components/auth-screens/footer.tsx +++ b/apps/web/core/components/auth-screens/footer.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { AccentureLogo, DolbyLogo, SonyLogo, ZerodhaLogo } from "@plane/propel/icons"; diff --git a/apps/web/core/components/auth-screens/header.tsx b/apps/web/core/components/auth-screens/header.tsx index 9d7a1e73a1..31ddfeff8d 100644 --- a/apps/web/core/components/auth-screens/header.tsx +++ b/apps/web/core/components/auth-screens/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import Link from "next/link"; diff --git a/apps/web/core/components/auth-screens/not-authorized-view.tsx b/apps/web/core/components/auth-screens/not-authorized-view.tsx index 82d950a2b9..ceb7fae05c 100644 --- a/apps/web/core/components/auth-screens/not-authorized-view.tsx +++ b/apps/web/core/components/auth-screens/not-authorized-view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // assets diff --git a/apps/web/core/components/auth-screens/project/project-access-restriction.tsx b/apps/web/core/components/auth-screens/project/project-access-restriction.tsx index 8484a3c6a5..9110f88dca 100644 --- a/apps/web/core/components/auth-screens/project/project-access-restriction.tsx +++ b/apps/web/core/components/auth-screens/project/project-access-restriction.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/auth-screens/workspace/not-a-member.tsx b/apps/web/core/components/auth-screens/workspace/not-a-member.tsx index 6b80d64b8b..b38603006f 100644 --- a/apps/web/core/components/auth-screens/workspace/not-a-member.tsx +++ b/apps/web/core/components/auth-screens/workspace/not-a-member.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import Link from "next/link"; // ui import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/automation/auto-archive-automation.tsx b/apps/web/core/components/automation/auto-archive-automation.tsx index 9d3e14afd5..d724f43db7 100644 --- a/apps/web/core/components/automation/auto-archive-automation.tsx +++ b/apps/web/core/components/automation/auto-archive-automation.tsx @@ -1,15 +1,21 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { ArchiveRestore } from "lucide-react"; -// types +// plane imports import { PROJECT_AUTOMATION_MONTHS, EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import type { IProject } from "@plane/types"; -// ui import { CustomSelect, Loader, ToggleSwitch } from "@plane/ui"; // component import { SelectMonthModal } from "@/components/automation"; +import { SettingsControlItem } from "@/components/settings/control-item"; // hooks import { useProject } from "@/hooks/store/use-project"; import { useUserPermissions } from "@/hooks/store/user"; @@ -61,25 +67,22 @@ export const AutoArchiveAutomation = observer(function AutoArchiveAutomation(pro handleClose={() => setmonthModal(false)} handleChange={handleChange} /> -
-
-
-
- -
-
-

{t("project_settings.automations.auto-archive.title")}

-

- {t("project_settings.automations.auto-archive.description")} -

-
+
+
+
+
- + + } + />
- {currentProjectDetails ? ( autoArchiveStatus && ( -
+
{t("project_settings.automations.auto-archive.duration")} @@ -90,9 +93,7 @@ export const AutoArchiveAutomation = observer(function AutoArchiveAutomation(pro label={`${currentProjectDetails?.archive_in} ${ currentProjectDetails?.archive_in === 1 ? "month" : "months" }`} - onChange={(val: number) => { - handleChange({ archive_in: val }); - }} + onChange={(val: number) => void handleChange({ archive_in: val })} input disabled={!isAdmin} > @@ -117,7 +118,7 @@ export const AutoArchiveAutomation = observer(function AutoArchiveAutomation(pro
) ) : ( - + )} diff --git a/apps/web/core/components/automation/auto-close-automation.tsx b/apps/web/core/components/automation/auto-close-automation.tsx index 6b9e7a8d42..51c3fdddc7 100644 --- a/apps/web/core/components/automation/auto-close-automation.tsx +++ b/apps/web/core/components/automation/auto-close-automation.tsx @@ -1,18 +1,21 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; -// icons import { ArchiveX } from "lucide-react"; -// types +// plane imports import { PROJECT_AUTOMATION_MONTHS, EUserPermissions, EUserPermissionsLevel, EIconSize } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { StateGroupIcon, StatePropertyIcon } from "@plane/propel/icons"; import type { IProject } from "@plane/types"; -// ui import { CustomSelect, CustomSearchSelect, ToggleSwitch, Loader } from "@plane/ui"; -// component import { SelectMonthModal } from "@/components/automation"; -// constants +import { SettingsControlItem } from "@/components/settings/control-item"; // hooks import { useProject } from "@/hooks/store/use-project"; import { useProjectState } from "@/hooks/store/use-project-state"; @@ -82,36 +85,34 @@ export const AutoCloseAutomation = observer(function AutoCloseAutomation(props: handleClose={() => setmonthModal(false)} handleChange={handleChange} /> -
-
-
-
- -
-
-

{t("project_settings.automations.auto-close.title")}

-

- {t("project_settings.automations.auto-close.description")} -

-
+
+
+
+
- { - if (currentProjectDetails?.close_in === 0) { - await handleChange({ close_in: 1, default_state: defaultState }); - } else { - await handleChange({ close_in: 0, default_state: null }); - } - }} - size="sm" - disabled={!isAdmin} + { + if (currentProjectDetails?.close_in === 0) { + void handleChange({ close_in: 1, default_state: defaultState }); + } else { + void handleChange({ close_in: 0, default_state: null }); + } + }} + size="sm" + disabled={!isAdmin} + /> + } />
{currentProjectDetails ? ( autoCloseStatus && ( -
+
@@ -123,9 +124,7 @@ export const AutoCloseAutomation = observer(function AutoCloseAutomation(props: label={`${currentProjectDetails?.close_in} ${ currentProjectDetails?.close_in === 1 ? "month" : "months" }`} - onChange={(val: number) => { - handleChange({ close_in: val }); - }} + onChange={(val: number) => void handleChange({ close_in: val })} input disabled={!isAdmin} > @@ -176,9 +175,7 @@ export const AutoCloseAutomation = observer(function AutoCloseAutomation(props: : (currentDefaultState?.name ?? {t("state")})}
} - onChange={(val: string) => { - handleChange({ default_state: val }); - }} + onChange={(val: string) => void handleChange({ default_state: val })} options={options} disabled={!multipleOptions} input @@ -189,7 +186,7 @@ export const AutoCloseAutomation = observer(function AutoCloseAutomation(props:
) ) : ( - + )} diff --git a/apps/web/core/components/automation/index.ts b/apps/web/core/components/automation/index.ts index 73decae11c..9f126cd0d0 100644 --- a/apps/web/core/components/automation/index.ts +++ b/apps/web/core/components/automation/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./auto-close-automation"; export * from "./auto-archive-automation"; export * from "./select-month-modal"; diff --git a/apps/web/core/components/automation/select-month-modal.tsx b/apps/web/core/components/automation/select-month-modal.tsx index f1459c107c..e29e247df2 100644 --- a/apps/web/core/components/automation/select-month-modal.tsx +++ b/apps/web/core/components/automation/select-month-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useParams } from "next/navigation"; // react-hook-form import { Controller, useForm } from "react-hook-form"; diff --git a/apps/web/core/components/base-layouts/constants.ts b/apps/web/core/components/base-layouts/constants.ts index 943d23c7fe..4965963732 100644 --- a/apps/web/core/components/base-layouts/constants.ts +++ b/apps/web/core/components/base-layouts/constants.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { BoardLayoutIcon, ListLayoutIcon, TimelineLayoutIcon } from "@plane/propel/icons"; import type { IBaseLayoutConfig } from "@plane/types"; diff --git a/apps/web/core/components/base-layouts/gantt/index.ts b/apps/web/core/components/base-layouts/gantt/index.ts index 9f4e2dafb0..d7b4e143b9 100644 --- a/apps/web/core/components/base-layouts/gantt/index.ts +++ b/apps/web/core/components/base-layouts/gantt/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export { BaseGanttLayout } from "./layout"; export { BaseGanttSidebar } from "./sidebar"; diff --git a/apps/web/core/components/base-layouts/gantt/layout.tsx b/apps/web/core/components/base-layouts/gantt/layout.tsx index b21510c46b..17fa2fc8dd 100644 --- a/apps/web/core/components/base-layouts/gantt/layout.tsx +++ b/apps/web/core/components/base-layouts/gantt/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; import { observer } from "mobx-react"; import { GANTT_TIMELINE_TYPE } from "@plane/types"; diff --git a/apps/web/core/components/base-layouts/gantt/sidebar.tsx b/apps/web/core/components/base-layouts/gantt/sidebar.tsx index 7ab1446a14..c044cca45f 100644 --- a/apps/web/core/components/base-layouts/gantt/sidebar.tsx +++ b/apps/web/core/components/base-layouts/gantt/sidebar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RefObject } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/base-layouts/hooks/use-group-drop-target.ts b/apps/web/core/components/base-layouts/hooks/use-group-drop-target.ts index 5fa232092c..a28f344a9d 100644 --- a/apps/web/core/components/base-layouts/hooks/use-group-drop-target.ts +++ b/apps/web/core/components/base-layouts/hooks/use-group-drop-target.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; diff --git a/apps/web/core/components/base-layouts/hooks/use-layout-state.ts b/apps/web/core/components/base-layouts/hooks/use-layout-state.ts index 8d8bc75b27..0aba3edd38 100644 --- a/apps/web/core/components/base-layouts/hooks/use-layout-state.ts +++ b/apps/web/core/components/base-layouts/hooks/use-layout-state.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState, useCallback } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element"; diff --git a/apps/web/core/components/base-layouts/kanban/group-header.tsx b/apps/web/core/components/base-layouts/kanban/group-header.tsx index c8e3f6b146..9d69bd22c5 100644 --- a/apps/web/core/components/base-layouts/kanban/group-header.tsx +++ b/apps/web/core/components/base-layouts/kanban/group-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IGroupHeaderProps } from "@plane/types"; export function GroupHeader({ group, itemCount, onToggleGroup }: IGroupHeaderProps) { diff --git a/apps/web/core/components/base-layouts/kanban/group.tsx b/apps/web/core/components/base-layouts/kanban/group.tsx index 39bd2c3ed9..87dadf36d5 100644 --- a/apps/web/core/components/base-layouts/kanban/group.tsx +++ b/apps/web/core/components/base-layouts/kanban/group.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; import type { IBaseLayoutsKanbanItem, IBaseLayoutsKanbanGroupProps } from "@plane/types"; diff --git a/apps/web/core/components/base-layouts/kanban/item.tsx b/apps/web/core/components/base-layouts/kanban/item.tsx index 1bc5609430..648d5cd3e9 100644 --- a/apps/web/core/components/base-layouts/kanban/item.tsx +++ b/apps/web/core/components/base-layouts/kanban/item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; diff --git a/apps/web/core/components/base-layouts/kanban/layout.tsx b/apps/web/core/components/base-layouts/kanban/layout.tsx index 1006eb10b6..8305ad9ce8 100644 --- a/apps/web/core/components/base-layouts/kanban/layout.tsx +++ b/apps/web/core/components/base-layouts/kanban/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import type { IBaseLayoutsKanbanItem, IBaseLayoutsKanbanProps } from "@plane/types"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/base-layouts/layout-switcher.tsx b/apps/web/core/components/base-layouts/layout-switcher.tsx index 45d30ac444..0ee433f979 100644 --- a/apps/web/core/components/base-layouts/layout-switcher.tsx +++ b/apps/web/core/components/base-layouts/layout-switcher.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTranslation } from "@plane/i18n"; import { Tooltip } from "@plane/propel/tooltip"; import type { TBaseLayoutType } from "@plane/types"; diff --git a/apps/web/core/components/base-layouts/list/group-header.tsx b/apps/web/core/components/base-layouts/list/group-header.tsx index ade7ecbfb3..d26f8322e4 100644 --- a/apps/web/core/components/base-layouts/list/group-header.tsx +++ b/apps/web/core/components/base-layouts/list/group-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IGroupHeaderProps } from "@plane/types"; export function GroupHeader({ group, itemCount, onToggleGroup }: IGroupHeaderProps) { diff --git a/apps/web/core/components/base-layouts/list/group.tsx b/apps/web/core/components/base-layouts/list/group.tsx index ff50c11de8..8cda8691ad 100644 --- a/apps/web/core/components/base-layouts/list/group.tsx +++ b/apps/web/core/components/base-layouts/list/group.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; import type { IBaseLayoutsListItem, IBaseLayoutsListGroupProps } from "@plane/types"; diff --git a/apps/web/core/components/base-layouts/list/item.tsx b/apps/web/core/components/base-layouts/list/item.tsx index 22f808b8cd..759b75b1c5 100644 --- a/apps/web/core/components/base-layouts/list/item.tsx +++ b/apps/web/core/components/base-layouts/list/item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; diff --git a/apps/web/core/components/base-layouts/list/layout.tsx b/apps/web/core/components/base-layouts/list/layout.tsx index 36e91ec301..7e631e2434 100644 --- a/apps/web/core/components/base-layouts/list/layout.tsx +++ b/apps/web/core/components/base-layouts/list/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import type { IBaseLayoutsListItem, IBaseLayoutsListProps } from "@plane/types"; import { cn } from "@plane/ui"; diff --git a/apps/web/core/components/base-layouts/loaders/layout-loader.tsx b/apps/web/core/components/base-layouts/loaders/layout-loader.tsx index 894c8cafd1..177c3027f3 100644 --- a/apps/web/core/components/base-layouts/loaders/layout-loader.tsx +++ b/apps/web/core/components/base-layouts/loaders/layout-loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TBaseLayoutType } from "@plane/types"; import { KanbanLayoutLoader } from "@/components/ui/loader/layouts/kanban-layout-loader"; import { ListLayoutLoader } from "@/components/ui/loader/layouts/list-layout-loader"; diff --git a/apps/web/core/components/chart/utils.ts b/apps/web/core/components/chart/utils.ts index 7bd8c41208..e7055a96d4 100644 --- a/apps/web/core/components/chart/utils.ts +++ b/apps/web/core/components/chart/utils.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { getWeekOfMonth, isValid } from "date-fns"; import { CHART_X_AXIS_DATE_PROPERTIES, ChartXAxisDateGrouping, TO_CAPITALIZE_PROPERTIES } from "@plane/constants"; import type { ChartXAxisProperty, TChart, TChartDatum } from "@plane/types"; diff --git a/apps/web/core/components/comments/card/display.tsx b/apps/web/core/components/comments/card/display.tsx index ea8911a25a..17de130527 100644 --- a/apps/web/core/components/comments/card/display.tsx +++ b/apps/web/core/components/comments/card/display.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { useCallback, useEffect, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/comments/card/edit-form.tsx b/apps/web/core/components/comments/card/edit-form.tsx index 6747df1233..a8cac90455 100644 --- a/apps/web/core/components/comments/card/edit-form.tsx +++ b/apps/web/core/components/comments/card/edit-form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef } from "react"; import { observer } from "mobx-react"; import { useForm } from "react-hook-form"; diff --git a/apps/web/core/components/comments/card/root.tsx b/apps/web/core/components/comments/card/root.tsx index 18666a42c2..006a365dd2 100644 --- a/apps/web/core/components/comments/card/root.tsx +++ b/apps/web/core/components/comments/card/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef, useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/comments/comment-create.tsx b/apps/web/core/components/comments/comment-create.tsx index 4038170511..f727fc7896 100644 --- a/apps/web/core/components/comments/comment-create.tsx +++ b/apps/web/core/components/comments/comment-create.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useRef, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/comments/comment-reaction.tsx b/apps/web/core/components/comments/comment-reaction.tsx index deb32bc92b..e9d1c931b0 100644 --- a/apps/web/core/components/comments/comment-reaction.tsx +++ b/apps/web/core/components/comments/comment-reaction.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useMemo, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/comments/comments.tsx b/apps/web/core/components/comments/comments.tsx index e370fcb1d0..b5fe0194ae 100644 --- a/apps/web/core/components/comments/comments.tsx +++ b/apps/web/core/components/comments/comments.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/comments/index.ts b/apps/web/core/components/comments/index.ts index 222a6656c0..b20656c8ff 100644 --- a/apps/web/core/components/comments/index.ts +++ b/apps/web/core/components/comments/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./comments"; diff --git a/apps/web/core/components/comments/quick-actions.tsx b/apps/web/core/components/comments/quick-actions.tsx index e80497d257..5d20f5a231 100644 --- a/apps/web/core/components/comments/quick-actions.tsx +++ b/apps/web/core/components/comments/quick-actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { observer } from "mobx-react"; import { MoreHorizontal } from "lucide-react"; diff --git a/apps/web/core/components/common/access-field.tsx b/apps/web/core/components/common/access-field.tsx index f8c4aa8d9b..14ee044bc4 100644 --- a/apps/web/core/components/common/access-field.tsx +++ b/apps/web/core/components/common/access-field.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { LucideIcon } from "lucide-react"; // plane ui import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/common/activity/activity-block.tsx b/apps/web/core/components/common/activity/activity-block.tsx index 5ed9e17beb..25b3b2767c 100644 --- a/apps/web/core/components/common/activity/activity-block.tsx +++ b/apps/web/core/components/common/activity/activity-block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC, ReactNode } from "react"; import { Network } from "lucide-react"; // types diff --git a/apps/web/core/components/common/activity/activity-item.tsx b/apps/web/core/components/common/activity/activity-item.tsx index cb4241887d..c4b3e363aa 100644 --- a/apps/web/core/components/common/activity/activity-item.tsx +++ b/apps/web/core/components/common/activity/activity-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/common/activity/helper.tsx b/apps/web/core/components/common/activity/helper.tsx index 639a0c2739..b633c86b99 100644 --- a/apps/web/core/components/common/activity/helper.tsx +++ b/apps/web/core/components/common/activity/helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC, ReactNode } from "react"; import { RotateCcw, diff --git a/apps/web/core/components/common/activity/user.tsx b/apps/web/core/components/common/activity/user.tsx index c9fff9b849..0fda94d3bf 100644 --- a/apps/web/core/components/common/activity/user.tsx +++ b/apps/web/core/components/common/activity/user.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; diff --git a/apps/web/core/components/common/applied-filters/date.tsx b/apps/web/core/components/common/applied-filters/date.tsx index 9ea7233330..9638efac3d 100644 --- a/apps/web/core/components/common/applied-filters/date.tsx +++ b/apps/web/core/components/common/applied-filters/date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // icons import { DATE_BEFORE_FILTER_OPTIONS } from "@plane/constants"; diff --git a/apps/web/core/components/common/applied-filters/members.tsx b/apps/web/core/components/common/applied-filters/members.tsx index 161103dac1..ad19a8fd0b 100644 --- a/apps/web/core/components/common/applied-filters/members.tsx +++ b/apps/web/core/components/common/applied-filters/members.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { CloseIcon } from "@plane/propel/icons"; // plane ui diff --git a/apps/web/core/components/common/breadcrumb-link.tsx b/apps/web/core/components/common/breadcrumb-link.tsx index cff11e7626..3e5fcd0700 100644 --- a/apps/web/core/components/common/breadcrumb-link.tsx +++ b/apps/web/core/components/common/breadcrumb-link.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useMemo } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; diff --git a/apps/web/core/components/common/count-chip.tsx b/apps/web/core/components/common/count-chip.tsx index 255fe4e7e2..df413f217a 100644 --- a/apps/web/core/components/common/count-chip.tsx +++ b/apps/web/core/components/common/count-chip.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/common/cover-image.tsx b/apps/web/core/components/common/cover-image.tsx index d0b410bfc3..2162e254d6 100644 --- a/apps/web/core/components/common/cover-image.tsx +++ b/apps/web/core/components/common/cover-image.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { cn } from "@plane/utils"; // helpers import { getCoverImageDisplayURL, DEFAULT_COVER_IMAGE_URL } from "@/helpers/cover-image.helper"; diff --git a/apps/web/core/components/common/empty-state.tsx b/apps/web/core/components/common/empty-state.tsx index 796aa7fbca..d259d65988 100644 --- a/apps/web/core/components/common/empty-state.tsx +++ b/apps/web/core/components/common/empty-state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // ui diff --git a/apps/web/core/components/common/filters/created-at.tsx b/apps/web/core/components/common/filters/created-at.tsx index 23082626fa..7fa0870dee 100644 --- a/apps/web/core/components/common/filters/created-at.tsx +++ b/apps/web/core/components/common/filters/created-at.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/common/filters/created-by.tsx b/apps/web/core/components/common/filters/created-by.tsx index c3ba0eaea7..b3ccacee92 100644 --- a/apps/web/core/components/common/filters/created-by.tsx +++ b/apps/web/core/components/common/filters/created-by.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/common/latest-feature-block.tsx b/apps/web/core/components/common/latest-feature-block.tsx index 33dfc508ba..7ea1289b2d 100644 --- a/apps/web/core/components/common/latest-feature-block.tsx +++ b/apps/web/core/components/common/latest-feature-block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import Link from "next/link"; import { useTheme } from "next-themes"; // icons diff --git a/apps/web/core/components/common/layout/sidebar/property-list-item.tsx b/apps/web/core/components/common/layout/sidebar/property-list-item.tsx index 33b4d58a9b..9ca01cb193 100644 --- a/apps/web/core/components/common/layout/sidebar/property-list-item.tsx +++ b/apps/web/core/components/common/layout/sidebar/property-list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/common/logo-spinner.tsx b/apps/web/core/components/common/logo-spinner.tsx index 0d08b77e59..039cff59e7 100644 --- a/apps/web/core/components/common/logo-spinner.tsx +++ b/apps/web/core/components/common/logo-spinner.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTheme } from "next-themes"; // assets import LogoSpinnerDark from "@/app/assets/images/logo-spinner-dark.gif?url"; diff --git a/apps/web/core/components/common/new-empty-state.tsx b/apps/web/core/components/common/new-empty-state.tsx index 2445a46c11..af4e51a407 100644 --- a/apps/web/core/components/common/new-empty-state.tsx +++ b/apps/web/core/components/common/new-empty-state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; // ui diff --git a/apps/web/core/components/common/page-access-icon.tsx b/apps/web/core/components/common/page-access-icon.tsx index 42fb39dfa6..a4ece44dc0 100644 --- a/apps/web/core/components/common/page-access-icon.tsx +++ b/apps/web/core/components/common/page-access-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { ArchiveIcon, Earth } from "lucide-react"; import { EPageAccess } from "@plane/constants"; import { LockIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/common/pro-icon.tsx b/apps/web/core/components/common/pro-icon.tsx index 21fa05aed2..177b9cb32c 100644 --- a/apps/web/core/components/common/pro-icon.tsx +++ b/apps/web/core/components/common/pro-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { Crown } from "lucide-react"; // helpers diff --git a/apps/web/core/components/common/quick-actions-factory.tsx b/apps/web/core/components/common/quick-actions-factory.tsx index 52e6bfbd30..ee7f8fb5f7 100644 --- a/apps/web/core/components/common/quick-actions-factory.tsx +++ b/apps/web/core/components/common/quick-actions-factory.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Pencil, ExternalLink, Link, Trash2, ArchiveRestoreIcon } from "lucide-react"; import { useTranslation } from "@plane/i18n"; import { ArchiveIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/common/quick-actions-helper.tsx b/apps/web/core/components/common/quick-actions-helper.tsx index eadb1a7062..4b9af1dadd 100644 --- a/apps/web/core/components/common/quick-actions-helper.tsx +++ b/apps/web/core/components/common/quick-actions-helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // types import type { ICycle, IModule, IProjectView, IWorkspaceView } from "@plane/types"; import type { TContextMenuItem } from "@plane/ui"; diff --git a/apps/web/core/components/common/switcher-label.tsx b/apps/web/core/components/common/switcher-label.tsx index 291cb3a8cd..e19d23278d 100644 --- a/apps/web/core/components/common/switcher-label.tsx +++ b/apps/web/core/components/common/switcher-label.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { Logo } from "@plane/propel/emoji-icon-picker"; import type { ISvgIcons } from "@plane/propel/icons"; diff --git a/apps/web/core/components/core/activity.tsx b/apps/web/core/components/core/activity.tsx index e898578d97..dd8705fcdd 100644 --- a/apps/web/core/components/core/activity.tsx +++ b/apps/web/core/components/core/activity.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/core/app-header.tsx b/apps/web/core/components/core/app-header.tsx index f13fcd134c..2badf4574e 100644 --- a/apps/web/core/components/core/app-header.tsx +++ b/apps/web/core/components/core/app-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/core/content-overflow-HOC.tsx b/apps/web/core/components/core/content-overflow-HOC.tsx index cb60eaaee5..963429cc29 100644 --- a/apps/web/core/components/core/content-overflow-HOC.tsx +++ b/apps/web/core/components/core/content-overflow-HOC.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/core/content-wrapper.tsx b/apps/web/core/components/core/content-wrapper.tsx index 0d0d796be0..c40b50470a 100644 --- a/apps/web/core/components/core/content-wrapper.tsx +++ b/apps/web/core/components/core/content-wrapper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; // helpers import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/core/description-versions/dropdown-item.tsx b/apps/web/core/components/core/description-versions/dropdown-item.tsx index a4513c098c..4b66274a58 100644 --- a/apps/web/core/components/core/description-versions/dropdown-item.tsx +++ b/apps/web/core/components/core/description-versions/dropdown-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/core/description-versions/dropdown.tsx b/apps/web/core/components/core/description-versions/dropdown.tsx index d39fc49e38..f12f2011f6 100644 --- a/apps/web/core/components/core/description-versions/dropdown.tsx +++ b/apps/web/core/components/core/description-versions/dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { History } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/core/description-versions/index.ts b/apps/web/core/components/core/description-versions/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/core/description-versions/index.ts +++ b/apps/web/core/components/core/description-versions/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/core/description-versions/modal.tsx b/apps/web/core/components/core/description-versions/modal.tsx index 1a61095b5b..d0e0989bc2 100644 --- a/apps/web/core/components/core/description-versions/modal.tsx +++ b/apps/web/core/components/core/description-versions/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useRef } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/core/description-versions/root.tsx b/apps/web/core/components/core/description-versions/root.tsx index e465293512..9922cd27ac 100644 --- a/apps/web/core/components/core/description-versions/root.tsx +++ b/apps/web/core/components/core/description-versions/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useState } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; diff --git a/apps/web/core/components/core/filters/date-filter-modal.tsx b/apps/web/core/components/core/filters/date-filter-modal.tsx index 545dd3b77e..0f1ac2c53c 100644 --- a/apps/web/core/components/core/filters/date-filter-modal.tsx +++ b/apps/web/core/components/core/filters/date-filter-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Controller, useForm } from "react-hook-form"; import { Button } from "@plane/propel/button"; import { Calendar } from "@plane/propel/calendar"; diff --git a/apps/web/core/components/core/filters/date-filter-select.tsx b/apps/web/core/components/core/filters/date-filter-select.tsx index 44a838feba..fd106a9fbe 100644 --- a/apps/web/core/components/core/filters/date-filter-select.tsx +++ b/apps/web/core/components/core/filters/date-filter-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { CalendarDays } from "lucide-react"; // ui diff --git a/apps/web/core/components/core/image-picker-popover.tsx b/apps/web/core/components/core/image-picker-popover.tsx index 42712ab719..3682845545 100644 --- a/apps/web/core/components/core/image-picker-popover.tsx +++ b/apps/web/core/components/core/image-picker-popover.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState, useRef, useCallback, useMemo } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/core/list/index.ts b/apps/web/core/components/core/list/index.ts index d5489c45ea..fd1bcf1f26 100644 --- a/apps/web/core/components/core/list/index.ts +++ b/apps/web/core/components/core/list/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./list-item"; export * from "./list-root"; diff --git a/apps/web/core/components/core/list/list-item.tsx b/apps/web/core/components/core/list/list-item.tsx index ce68d6fba0..fa48c8ebc6 100644 --- a/apps/web/core/components/core/list/list-item.tsx +++ b/apps/web/core/components/core/list/list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // ui import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/core/list/list-root.tsx b/apps/web/core/components/core/list/list-root.tsx index 391ca29648..a47075454e 100644 --- a/apps/web/core/components/core/list/list-root.tsx +++ b/apps/web/core/components/core/list/list-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { Row, ERowVariant } from "@plane/ui"; diff --git a/apps/web/core/components/core/modals/bulk-delete-issues-modal-item.tsx b/apps/web/core/components/core/modals/bulk-delete-issues-modal-item.tsx index 589959c623..7f3615959f 100644 --- a/apps/web/core/components/core/modals/bulk-delete-issues-modal-item.tsx +++ b/apps/web/core/components/core/modals/bulk-delete-issues-modal-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Combobox } from "@headlessui/react"; // hooks diff --git a/apps/web/core/components/core/modals/bulk-delete-issues-modal.tsx b/apps/web/core/components/core/modals/bulk-delete-issues-modal.tsx index 5015dd3d62..aec8f83272 100644 --- a/apps/web/core/components/core/modals/bulk-delete-issues-modal.tsx +++ b/apps/web/core/components/core/modals/bulk-delete-issues-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/core/modals/change-email-modal.tsx b/apps/web/core/components/core/modals/change-email-modal.tsx index 8917d07863..c13b03775e 100644 --- a/apps/web/core/components/core/modals/change-email-modal.tsx +++ b/apps/web/core/components/core/modals/change-email-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; @@ -158,6 +164,7 @@ export const ChangeEmailModal = observer(function ChangeEmailModal(props: Props) { "border-danger-strong": errors.email }, { "cursor-not-allowed !bg-surface-2": secondStep } )} + autoComplete="off" disabled={secondStep} /> )} @@ -181,6 +188,7 @@ export const ChangeEmailModal = observer(function ChangeEmailModal(props: Props) ref={ref} placeholder={changeEmailT("form.code.placeholder")} className={cn({ "border-danger-strong": errors.code })} + autoComplete="off" autoFocus /> )} diff --git a/apps/web/core/components/core/modals/existing-issues-list-modal.tsx b/apps/web/core/components/core/modals/existing-issues-list-modal.tsx index 0d95a90f26..146d5e7a58 100644 --- a/apps/web/core/components/core/modals/existing-issues-list-modal.tsx +++ b/apps/web/core/components/core/modals/existing-issues-list-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState, useRef } from "react"; import { Rocket } from "lucide-react"; import { Combobox } from "@headlessui/react"; diff --git a/apps/web/core/components/core/modals/gpt-assistant-popover.tsx b/apps/web/core/components/core/modals/gpt-assistant-popover.tsx index 0e64a12c52..12cd2474cf 100644 --- a/apps/web/core/components/core/modals/gpt-assistant-popover.tsx +++ b/apps/web/core/components/core/modals/gpt-assistant-popover.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Ref } from "react"; import React, { useEffect, useState, useRef, Fragment } from "react"; import type { Placement } from "@popperjs/core"; diff --git a/apps/web/core/components/core/modals/issue-search-modal-empty-state.tsx b/apps/web/core/components/core/modals/issue-search-modal-empty-state.tsx index b3269fdbf2..24b1343fce 100644 --- a/apps/web/core/components/core/modals/issue-search-modal-empty-state.tsx +++ b/apps/web/core/components/core/modals/issue-search-modal-empty-state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { useTheme } from "next-themes"; // plane imports diff --git a/apps/web/core/components/core/modals/user-image-upload-modal.tsx b/apps/web/core/components/core/modals/user-image-upload-modal.tsx index 72f4f18d98..74796e93a7 100644 --- a/apps/web/core/components/core/modals/user-image-upload-modal.tsx +++ b/apps/web/core/components/core/modals/user-image-upload-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useDropzone } from "react-dropzone"; diff --git a/apps/web/core/components/core/modals/workspace-image-upload-modal.tsx b/apps/web/core/components/core/modals/workspace-image-upload-modal.tsx index 6915bfd2fa..2c2f64cf45 100644 --- a/apps/web/core/components/core/modals/workspace-image-upload-modal.tsx +++ b/apps/web/core/components/core/modals/workspace-image-upload-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/core/multiple-select/entity-select-action.tsx b/apps/web/core/components/core/multiple-select/entity-select-action.tsx index 31f59e6e23..a4b40e5610 100644 --- a/apps/web/core/components/core/multiple-select/entity-select-action.tsx +++ b/apps/web/core/components/core/multiple-select/entity-select-action.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // ui import { Checkbox } from "@plane/ui"; diff --git a/apps/web/core/components/core/multiple-select/group-select-action.tsx b/apps/web/core/components/core/multiple-select/group-select-action.tsx index ec67bbac66..900b0e18e5 100644 --- a/apps/web/core/components/core/multiple-select/group-select-action.tsx +++ b/apps/web/core/components/core/multiple-select/group-select-action.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // ui import { Checkbox } from "@plane/ui"; // helpers diff --git a/apps/web/core/components/core/multiple-select/index.ts b/apps/web/core/components/core/multiple-select/index.ts index b2cdf13c36..e14cb4c82f 100644 --- a/apps/web/core/components/core/multiple-select/index.ts +++ b/apps/web/core/components/core/multiple-select/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./entity-select-action"; export * from "./group-select-action"; export * from "./select-group"; diff --git a/apps/web/core/components/core/multiple-select/select-group.tsx b/apps/web/core/components/core/multiple-select/select-group.tsx index c23ee07ee3..7881b9e7d7 100644 --- a/apps/web/core/components/core/multiple-select/select-group.tsx +++ b/apps/web/core/components/core/multiple-select/select-group.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // hooks import type { TSelectionHelper } from "@/hooks/use-multiple-select"; diff --git a/apps/web/core/components/core/page-title.tsx b/apps/web/core/components/core/page-title.tsx index cd51986451..5f7d51d972 100644 --- a/apps/web/core/components/core/page-title.tsx +++ b/apps/web/core/components/core/page-title.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; type PageHeadTitleProps = { diff --git a/apps/web/core/components/core/render-if-visible-HOC.tsx b/apps/web/core/components/core/render-if-visible-HOC.tsx index 07962bdd35..bd8a77a04a 100644 --- a/apps/web/core/components/core/render-if-visible-HOC.tsx +++ b/apps/web/core/components/core/render-if-visible-HOC.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode, MutableRefObject } from "react"; import React, { useState, useRef, useEffect } from "react"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/core/sidebar/progress-chart.tsx b/apps/web/core/components/core/sidebar/progress-chart.tsx index 190a8cc8ca..a5b99a9cdd 100644 --- a/apps/web/core/components/core/sidebar/progress-chart.tsx +++ b/apps/web/core/components/core/sidebar/progress-chart.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // plane imports import { AreaChart } from "@plane/propel/charts/area-chart"; diff --git a/apps/web/core/components/core/sidebar/progress-stats/assignee.tsx b/apps/web/core/components/core/sidebar/progress-stats/assignee.tsx index 6410cca287..374cd7adff 100644 --- a/apps/web/core/components/core/sidebar/progress-stats/assignee.tsx +++ b/apps/web/core/components/core/sidebar/progress-stats/assignee.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/core/sidebar/progress-stats/label.tsx b/apps/web/core/components/core/sidebar/progress-stats/label.tsx index 7472ac4523..0fb9b95bd5 100644 --- a/apps/web/core/components/core/sidebar/progress-stats/label.tsx +++ b/apps/web/core/components/core/sidebar/progress-stats/label.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/core/sidebar/progress-stats/shared.ts b/apps/web/core/components/core/sidebar/progress-stats/shared.ts index 38f2352f35..93e0c8bf55 100644 --- a/apps/web/core/components/core/sidebar/progress-stats/shared.ts +++ b/apps/web/core/components/core/sidebar/progress-stats/shared.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TWorkItemFilterCondition } from "@plane/shared-state"; import type { TFilterConditionNodeForDisplay, TFilterValue, TWorkItemFilterProperty } from "@plane/types"; diff --git a/apps/web/core/components/core/sidebar/progress-stats/state_group.tsx b/apps/web/core/components/core/sidebar/progress-stats/state_group.tsx index 7391ac63a6..bcc4fdb765 100644 --- a/apps/web/core/components/core/sidebar/progress-stats/state_group.tsx +++ b/apps/web/core/components/core/sidebar/progress-stats/state_group.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { StateGroupIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/core/sidebar/sidebar-menu-hamburger-toggle.tsx b/apps/web/core/components/core/sidebar/sidebar-menu-hamburger-toggle.tsx index dc61ea8b1f..72d8d8f920 100644 --- a/apps/web/core/components/core/sidebar/sidebar-menu-hamburger-toggle.tsx +++ b/apps/web/core/components/core/sidebar/sidebar-menu-hamburger-toggle.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { PanelRight } from "lucide-react"; import { useAppTheme } from "@/hooks/store/use-app-theme"; diff --git a/apps/web/core/components/core/sidebar/single-progress-stats.tsx b/apps/web/core/components/core/sidebar/single-progress-stats.tsx index ecb453b9b5..59c219b362 100644 --- a/apps/web/core/components/core/sidebar/single-progress-stats.tsx +++ b/apps/web/core/components/core/sidebar/single-progress-stats.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; type TSingleProgressStatsProps = { diff --git a/apps/web/core/components/core/theme/color-inputs.tsx b/apps/web/core/components/core/theme/color-inputs.tsx new file mode 100644 index 0000000000..3b08acfd52 --- /dev/null +++ b/apps/web/core/components/core/theme/color-inputs.tsx @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +import type { Control } from "react-hook-form"; +import { Controller } from "react-hook-form"; +// plane imports +import type { IUserTheme } from "@plane/types"; +import { InputColorPicker } from "@plane/ui"; + +type Props = { + control: Control; +}; + +export const CustomThemeColorInputs = observer(function CustomThemeColorInputs(props: Props) { + const { control } = props; + + const handleValueChange = (val: string | undefined, onChange: (...args: unknown[]) => void) => { + let hex = val; + // prepend a hashtag if it doesn't exist + if (val && val[0] !== "#") hex = `#${val}`; + onChange(hex); + }; + + return ( +
+ {/* Neutral Color */} +
+

+ Neutral color* +

+
+ ( + handleValueChange(val, onChange)} + placeholder="#1a1a1a" + className="w-full placeholder:text-placeholder" + style={{ + backgroundColor: value, + color: "#ffffff", + }} + hasError={false} + /> + )} + /> +
+
+ {/* Brand Color */} +
+

+ Brand color* +

+
+ ( + handleValueChange(val, onChange)} + placeholder="#3f76ff" + className="w-full placeholder:text-placeholder" + style={{ + backgroundColor: value, + color: "#ffffff", + }} + hasError={false} + /> + )} + /> +
+
+
+ ); +}); diff --git a/apps/web/core/components/core/theme/custom-theme-selector.tsx b/apps/web/core/components/core/theme/custom-theme-selector.tsx index 1091966e1c..416a5468ad 100644 --- a/apps/web/core/components/core/theme/custom-theme-selector.tsx +++ b/apps/web/core/components/core/theme/custom-theme-selector.tsx @@ -1,17 +1,27 @@ -import { useState } from "react"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { useMemo, useState } from "react"; import { observer } from "mobx-react"; -import { Controller, useForm } from "react-hook-form"; +import { useForm } from "react-hook-form"; // plane imports import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { IUserTheme } from "@plane/types"; -import { InputColorPicker, ToggleSwitch } from "@plane/ui"; import { applyCustomTheme } from "@plane/utils"; +// components +import { ProfileSettingsHeading } from "@/components/settings/profile/heading"; // hooks import { useUserProfile } from "@/hooks/store/user"; // local imports -import { CustomThemeConfigHandler } from "./config-handler"; +import { CustomThemeColorInputs } from "./color-inputs"; +import { CustomThemeDownloadConfigButton } from "./download-config-button"; +import { CustomThemeImportConfigButton } from "./import-config-button"; +import { CustomThemeModeSelector } from "./theme-mode-selector"; export const CustomThemeSelector = observer(function CustomThemeSelector() { // store hooks @@ -23,18 +33,17 @@ export const CustomThemeSelector = observer(function CustomThemeSelector() { const [isLoadingPalette, setIsLoadingPalette] = useState(false); // Load saved theme from userProfile (fallback to defaults) - const getSavedTheme = (): IUserTheme => { - if (userProfile?.theme) { - const theme = userProfile.theme; - if (theme.primary && theme.background && theme.darkPalette !== undefined) { - return { - theme: "custom", - primary: theme.primary, - background: theme.background, - darkPalette: theme.darkPalette, - }; - } + const savedTheme = useMemo((): IUserTheme => { + const theme = userProfile?.theme; + if (theme && theme.primary && theme.background) { + return { + theme: "custom", + primary: theme.primary, + background: theme.background, + darkPalette: !!theme.darkPalette, + }; } + // Fallback to defaults return { theme: "custom", @@ -42,21 +51,20 @@ export const CustomThemeSelector = observer(function CustomThemeSelector() { background: "#1a1a1a", darkPalette: false, }; - }; + }, [userProfile?.theme]); const { control, formState: { isSubmitting }, handleSubmit, getValues, - watch, setValue, } = useForm({ - defaultValues: getSavedTheme(), + defaultValues: savedTheme, }); const handleUpdateTheme = async (formData: IUserTheme) => { - if (!formData.primary || !formData.background || formData.darkPalette === undefined) return; + if (!formData.primary || !formData.background) return; try { setIsLoadingPalette(true); @@ -90,109 +98,29 @@ export const CustomThemeSelector = observer(function CustomThemeSelector() { } }; - const handleValueChange = (val: string | undefined, onChange: (...args: unknown[]) => void) => { - let hex = val; - // prepend a hashtag if it doesn't exist - if (val && val[0] !== "#") hex = `#${val}`; - onChange(hex); - }; - return ( -
+ { + void handleSubmit(handleUpdateTheme)(e); + }} + className="bg-layer-1 border border-subtle rounded-lg py-3 px-4" + >
-

{t("customize_your_theme")}

- -
- {/* Color Inputs */} -
- {/* Brand Color */} -
-

Brand color

-
- ( - handleValueChange(val, onChange)} - placeholder="#3f76ff" - className="w-full placeholder:text-placeholder" - style={{ - backgroundColor: value, - color: "#ffffff", - }} - hasError={false} - /> - )} - /> -
-
- - {/* Neutral Color */} -
-

Neutral color

-
- ( - handleValueChange(val, onChange)} - placeholder="#1a1a1a" - className="w-full placeholder:text-placeholder" - style={{ - backgroundColor: value, - color: "#ffffff", - }} - hasError={false} - /> - )} - /> -
-
-
-
+ } + /> + + {/* Color Inputs */} +
-
+ {/* Save Theme Button */} + {/* Import/Export Section */} - - -
- {/* Theme Mode Toggle */} -
- ( - - )} - /> - {watch("darkPalette") ? "Dark mode" : "Light mode"} -
- {/* Save Theme Button */} - -
+
); diff --git a/apps/web/core/components/core/theme/download-config-button.tsx b/apps/web/core/components/core/theme/download-config-button.tsx new file mode 100644 index 0000000000..c2ffc0bc3d --- /dev/null +++ b/apps/web/core/components/core/theme/download-config-button.tsx @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +import type { UseFormGetValues } from "react-hook-form"; +// plane imports +import { useTranslation } from "@plane/i18n"; +import { Button } from "@plane/propel/button"; +import { setToast, TOAST_TYPE } from "@plane/propel/toast"; +import type { IUserTheme } from "@plane/types"; + +type Props = { + getValues: UseFormGetValues; +}; + +export const CustomThemeDownloadConfigButton = observer(function CustomThemeDownloadConfigButton(props: Props) { + const { getValues } = props; + // translation + const { t } = useTranslation(); + + const handleDownloadConfig = () => { + try { + const currentValues = getValues(); + const config = { + version: "1.0", + themeName: "Custom Theme", + primary: currentValues.primary, + background: currentValues.background, + darkPalette: currentValues.darkPalette, + }; + + const blob = new Blob([JSON.stringify(config, null, 2)], { type: "application/json" }); + const url = URL.createObjectURL(blob); + const link = document.createElement("a"); + link.href = url; + link.download = `plane-theme-${Date.now()}.json`; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + URL.revokeObjectURL(url); + + setToast({ + type: TOAST_TYPE.SUCCESS, + title: t("success"), + message: "Theme configuration downloaded successfully.", + }); + } catch (error) { + console.error("Failed to download config:", error); + setToast({ + type: TOAST_TYPE.ERROR, + title: t("error"), + message: "Failed to download theme configuration.", + }); + } + }; + + return ( + + ); +}); diff --git a/apps/web/core/components/core/theme/config-handler.tsx b/apps/web/core/components/core/theme/import-config-button.tsx similarity index 62% rename from apps/web/core/components/core/theme/config-handler.tsx rename to apps/web/core/components/core/theme/import-config-button.tsx index a426c75079..a4586163b4 100644 --- a/apps/web/core/components/core/theme/config-handler.tsx +++ b/apps/web/core/components/core/theme/import-config-button.tsx @@ -1,6 +1,12 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef } from "react"; import { observer } from "mobx-react"; -import type { UseFormGetValues, UseFormSetValue } from "react-hook-form"; +import type { UseFormSetValue } from "react-hook-form"; // plane imports import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; @@ -8,54 +14,17 @@ import { setToast, TOAST_TYPE } from "@plane/propel/toast"; import type { IUserTheme } from "@plane/types"; type Props = { - getValues: UseFormGetValues; handleUpdateTheme: (formData: IUserTheme) => Promise; setValue: UseFormSetValue; }; -export const CustomThemeConfigHandler = observer(function CustomThemeConfigHandler(props: Props) { - const { getValues, handleUpdateTheme, setValue } = props; +export const CustomThemeImportConfigButton = observer(function CustomThemeImportConfigButton(props: Props) { + const { handleUpdateTheme, setValue } = props; // refs const fileInputRef = useRef(null); // translation const { t } = useTranslation(); - const handleDownloadConfig = () => { - try { - const currentValues = getValues(); - const config = { - version: "1.0", - themeName: "Custom Theme", - primary: currentValues.primary, - background: currentValues.background, - darkPalette: currentValues.darkPalette, - }; - - const blob = new Blob([JSON.stringify(config, null, 2)], { type: "application/json" }); - const url = URL.createObjectURL(blob); - const link = document.createElement("a"); - link.href = url; - link.download = `plane-theme-${Date.now()}.json`; - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - URL.revokeObjectURL(url); - - setToast({ - type: TOAST_TYPE.SUCCESS, - title: t("success"), - message: "Theme configuration downloaded successfully.", - }); - } catch (error) { - console.error("Failed to download config:", error); - setToast({ - type: TOAST_TYPE.ERROR, - title: t("error"), - message: "Failed to download theme configuration.", - }); - } - }; - const handleUploadConfig = async (event: React.ChangeEvent) => { const file = event.target.files?.[0]; if (!file) return; @@ -122,14 +91,11 @@ export const CustomThemeConfigHandler = observer(function CustomThemeConfigHandl }; return ( -
+ <> - - -
+ ); }); diff --git a/apps/web/core/components/core/theme/theme-mode-selector.tsx b/apps/web/core/components/core/theme/theme-mode-selector.tsx new file mode 100644 index 0000000000..06cc637500 --- /dev/null +++ b/apps/web/core/components/core/theme/theme-mode-selector.tsx @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +import type { Control } from "react-hook-form"; +import { Controller } from "react-hook-form"; +// plane imports +import type { IUserTheme } from "@plane/types"; + +type Props = { + control: Control; +}; + +export const CustomThemeModeSelector = observer(function CustomThemeModeSelector(props: Props) { + const { control } = props; + + return ( +
+
+ Choose color mode* +
+ ( +
+ + +
+ )} + /> +
+ ); +}); diff --git a/apps/web/core/components/core/theme/theme-switch.tsx b/apps/web/core/components/core/theme/theme-switch.tsx index a6cd5cb41f..15785d9f4e 100644 --- a/apps/web/core/components/core/theme/theme-switch.tsx +++ b/apps/web/core/components/core/theme/theme-switch.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // plane imports import type { I_THEME_OPTION } from "@plane/constants"; @@ -50,6 +56,7 @@ export function ThemeSwitch(props: Props) { ) } onChange={onChange} + buttonClassName="border border-subtle-1" placement="bottom-end" input > diff --git a/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx b/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx index ec2668323e..78f52aa13f 100644 --- a/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx +++ b/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { Fragment, useCallback, useRef, useState } from "react"; import { isEmpty } from "lodash-es"; diff --git a/apps/web/core/components/cycles/active-cycle/productivity.tsx b/apps/web/core/components/cycles/active-cycle/productivity.tsx index f34153b64c..f78c2f1113 100644 --- a/apps/web/core/components/cycles/active-cycle/productivity.tsx +++ b/apps/web/core/components/cycles/active-cycle/productivity.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { Fragment } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/cycles/active-cycle/progress.tsx b/apps/web/core/components/cycles/active-cycle/progress.tsx index b0d5ac74e8..61a02339b1 100644 --- a/apps/web/core/components/cycles/active-cycle/progress.tsx +++ b/apps/web/core/components/cycles/active-cycle/progress.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { useTheme } from "next-themes"; diff --git a/apps/web/core/components/cycles/active-cycle/use-cycles-details.ts b/apps/web/core/components/cycles/active-cycle/use-cycles-details.ts index 7f9154320f..d404520c59 100644 --- a/apps/web/core/components/cycles/active-cycle/use-cycles-details.ts +++ b/apps/web/core/components/cycles/active-cycle/use-cycles-details.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { useRouter } from "next/navigation"; import useSWR from "swr"; diff --git a/apps/web/core/components/cycles/analytics-sidebar/index.ts b/apps/web/core/components/cycles/analytics-sidebar/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/cycles/analytics-sidebar/index.ts +++ b/apps/web/core/components/cycles/analytics-sidebar/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx b/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx index 711bfc66a2..c05d967f97 100644 --- a/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx +++ b/apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useMemo } from "react"; import { isEmpty } from "lodash-es"; diff --git a/apps/web/core/components/cycles/analytics-sidebar/progress-stats.tsx b/apps/web/core/components/cycles/analytics-sidebar/progress-stats.tsx index 79db497626..a6735f4357 100644 --- a/apps/web/core/components/cycles/analytics-sidebar/progress-stats.tsx +++ b/apps/web/core/components/cycles/analytics-sidebar/progress-stats.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Tab } from "@headlessui/react"; // plane imports diff --git a/apps/web/core/components/cycles/analytics-sidebar/root.tsx b/apps/web/core/components/cycles/analytics-sidebar/root.tsx index af1fd07a19..b714e9daf4 100644 --- a/apps/web/core/components/cycles/analytics-sidebar/root.tsx +++ b/apps/web/core/components/cycles/analytics-sidebar/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx b/apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx index 2f33d3364e..c2cada51d4 100644 --- a/apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx +++ b/apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { isEmpty } from "lodash-es"; diff --git a/apps/web/core/components/cycles/analytics-sidebar/sidebar-header.tsx b/apps/web/core/components/cycles/analytics-sidebar/sidebar-header.tsx index f30f26ea06..c5ddb03796 100644 --- a/apps/web/core/components/cycles/analytics-sidebar/sidebar-header.tsx +++ b/apps/web/core/components/cycles/analytics-sidebar/sidebar-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; diff --git a/apps/web/core/components/cycles/applied-filters/date.tsx b/apps/web/core/components/cycles/applied-filters/date.tsx index cadb83e6e8..85e2210c80 100644 --- a/apps/web/core/components/cycles/applied-filters/date.tsx +++ b/apps/web/core/components/cycles/applied-filters/date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // helpers import { DATE_AFTER_FILTER_OPTIONS } from "@plane/constants"; diff --git a/apps/web/core/components/cycles/applied-filters/index.ts b/apps/web/core/components/cycles/applied-filters/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/cycles/applied-filters/index.ts +++ b/apps/web/core/components/cycles/applied-filters/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/cycles/applied-filters/root.tsx b/apps/web/core/components/cycles/applied-filters/root.tsx index 7dcad6dd2f..5f1ef09744 100644 --- a/apps/web/core/components/cycles/applied-filters/root.tsx +++ b/apps/web/core/components/cycles/applied-filters/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; diff --git a/apps/web/core/components/cycles/applied-filters/status.tsx b/apps/web/core/components/cycles/applied-filters/status.tsx index c0bfb956b8..762b1b05d4 100644 --- a/apps/web/core/components/cycles/applied-filters/status.tsx +++ b/apps/web/core/components/cycles/applied-filters/status.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { CYCLE_STATUS } from "@plane/constants"; diff --git a/apps/web/core/components/cycles/archived-cycles/header.tsx b/apps/web/core/components/cycles/archived-cycles/header.tsx index 85cda87b65..bf54518f62 100644 --- a/apps/web/core/components/cycles/archived-cycles/header.tsx +++ b/apps/web/core/components/cycles/archived-cycles/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useRef, useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/cycles/archived-cycles/index.ts b/apps/web/core/components/cycles/archived-cycles/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/cycles/archived-cycles/index.ts +++ b/apps/web/core/components/cycles/archived-cycles/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/cycles/archived-cycles/modal.tsx b/apps/web/core/components/cycles/archived-cycles/modal.tsx index a686e580af..e29c05fed9 100644 --- a/apps/web/core/components/cycles/archived-cycles/modal.tsx +++ b/apps/web/core/components/cycles/archived-cycles/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; // ui import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/cycles/archived-cycles/root.tsx b/apps/web/core/components/cycles/archived-cycles/root.tsx index f14c153ca3..fdb0ad0e36 100644 --- a/apps/web/core/components/cycles/archived-cycles/root.tsx +++ b/apps/web/core/components/cycles/archived-cycles/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/cycles/archived-cycles/view.tsx b/apps/web/core/components/cycles/archived-cycles/view.tsx index 6e99016e22..1595958570 100644 --- a/apps/web/core/components/cycles/archived-cycles/view.tsx +++ b/apps/web/core/components/cycles/archived-cycles/view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // assets diff --git a/apps/web/core/components/cycles/cycle-peek-overview.tsx b/apps/web/core/components/cycles/cycle-peek-overview.tsx index a604958a5a..6b0b65f6c8 100644 --- a/apps/web/core/components/cycles/cycle-peek-overview.tsx +++ b/apps/web/core/components/cycles/cycle-peek-overview.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect } from "react"; import { observer } from "mobx-react"; import { usePathname, useSearchParams } from "next/navigation"; diff --git a/apps/web/core/components/cycles/cycles-view-header.tsx b/apps/web/core/components/cycles/cycles-view-header.tsx index 549251feba..cdbc189720 100644 --- a/apps/web/core/components/cycles/cycles-view-header.tsx +++ b/apps/web/core/components/cycles/cycles-view-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; import { ListFilter } from "lucide-react"; diff --git a/apps/web/core/components/cycles/cycles-view.tsx b/apps/web/core/components/cycles/cycles-view.tsx index 13fce57436..fb2885e4be 100644 --- a/apps/web/core/components/cycles/cycles-view.tsx +++ b/apps/web/core/components/cycles/cycles-view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // components diff --git a/apps/web/core/components/cycles/delete-modal.tsx b/apps/web/core/components/cycles/delete-modal.tsx index d491ffe90b..0bfadd2876 100644 --- a/apps/web/core/components/cycles/delete-modal.tsx +++ b/apps/web/core/components/cycles/delete-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams, useSearchParams } from "next/navigation"; diff --git a/apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx b/apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx index e1c371c50d..510457097d 100644 --- a/apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx +++ b/apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import type { TCycleEstimateType } from "@plane/types"; diff --git a/apps/web/core/components/cycles/dropdowns/filters/end-date.tsx b/apps/web/core/components/cycles/dropdowns/filters/end-date.tsx index a34aef8486..ce34f56f80 100644 --- a/apps/web/core/components/cycles/dropdowns/filters/end-date.tsx +++ b/apps/web/core/components/cycles/dropdowns/filters/end-date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/cycles/dropdowns/filters/index.ts b/apps/web/core/components/cycles/dropdowns/filters/index.ts index 3d097b6f06..95c8d66c94 100644 --- a/apps/web/core/components/cycles/dropdowns/filters/index.ts +++ b/apps/web/core/components/cycles/dropdowns/filters/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./end-date"; export * from "./root"; export * from "./start-date"; diff --git a/apps/web/core/components/cycles/dropdowns/filters/root.tsx b/apps/web/core/components/cycles/dropdowns/filters/root.tsx index 386a80938b..014542210e 100644 --- a/apps/web/core/components/cycles/dropdowns/filters/root.tsx +++ b/apps/web/core/components/cycles/dropdowns/filters/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { SearchIcon, CloseIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/cycles/dropdowns/filters/start-date.tsx b/apps/web/core/components/cycles/dropdowns/filters/start-date.tsx index 922a4c1c16..655f739311 100644 --- a/apps/web/core/components/cycles/dropdowns/filters/start-date.tsx +++ b/apps/web/core/components/cycles/dropdowns/filters/start-date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // constants diff --git a/apps/web/core/components/cycles/dropdowns/filters/status.tsx b/apps/web/core/components/cycles/dropdowns/filters/status.tsx index b0abe13352..ce39377da4 100644 --- a/apps/web/core/components/cycles/dropdowns/filters/status.tsx +++ b/apps/web/core/components/cycles/dropdowns/filters/status.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; import { CYCLE_STATUS } from "@plane/constants"; diff --git a/apps/web/core/components/cycles/dropdowns/index.ts b/apps/web/core/components/cycles/dropdowns/index.ts index 2d1f115541..9c20b30b1b 100644 --- a/apps/web/core/components/cycles/dropdowns/index.ts +++ b/apps/web/core/components/cycles/dropdowns/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./filters"; export * from "./estimate-type-dropdown"; diff --git a/apps/web/core/components/cycles/form.tsx b/apps/web/core/components/cycles/form.tsx index a046dd7a2f..55e978e0d6 100644 --- a/apps/web/core/components/cycles/form.tsx +++ b/apps/web/core/components/cycles/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; // plane imports diff --git a/apps/web/core/components/cycles/list/cycle-list-group-header.tsx b/apps/web/core/components/cycles/list/cycle-list-group-header.tsx index 2dfd4867dc..0ac641ff1c 100644 --- a/apps/web/core/components/cycles/list/cycle-list-group-header.tsx +++ b/apps/web/core/components/cycles/list/cycle-list-group-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; // types diff --git a/apps/web/core/components/cycles/list/cycle-list-item-action.tsx b/apps/web/core/components/cycles/list/cycle-list-item-action.tsx index e918dd53f6..93b5227eac 100644 --- a/apps/web/core/components/cycles/list/cycle-list-item-action.tsx +++ b/apps/web/core/components/cycles/list/cycle-list-item-action.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { MouseEvent } from "react"; import React, { useEffect, useMemo, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/cycles/list/cycle-list-project-group-header.tsx b/apps/web/core/components/cycles/list/cycle-list-project-group-header.tsx index 401a555330..8b055872ea 100644 --- a/apps/web/core/components/cycles/list/cycle-list-project-group-header.tsx +++ b/apps/web/core/components/cycles/list/cycle-list-project-group-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/cycles/list/cycles-list-item.tsx b/apps/web/core/components/cycles/list/cycles-list-item.tsx index 09c32ddf0f..c0b25f3647 100644 --- a/apps/web/core/components/cycles/list/cycles-list-item.tsx +++ b/apps/web/core/components/cycles/list/cycles-list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { MouseEvent } from "react"; import { useRef } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/cycles/list/cycles-list-map.tsx b/apps/web/core/components/cycles/list/cycles-list-map.tsx index 887f026c8c..d59c7f94bf 100644 --- a/apps/web/core/components/cycles/list/cycles-list-map.tsx +++ b/apps/web/core/components/cycles/list/cycles-list-map.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import { CyclesListItem } from "./cycles-list-item"; diff --git a/apps/web/core/components/cycles/list/index.ts b/apps/web/core/components/cycles/list/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/cycles/list/index.ts +++ b/apps/web/core/components/cycles/list/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/cycles/list/root.tsx b/apps/web/core/components/cycles/list/root.tsx index 92278ffb46..a1155e577b 100644 --- a/apps/web/core/components/cycles/list/root.tsx +++ b/apps/web/core/components/cycles/list/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/cycles/modal.tsx b/apps/web/core/components/cycles/modal.tsx index bc068ddd70..2128bc3461 100644 --- a/apps/web/core/components/cycles/modal.tsx +++ b/apps/web/core/components/cycles/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { mutate } from "swr"; // types diff --git a/apps/web/core/components/cycles/quick-actions.tsx b/apps/web/core/components/cycles/quick-actions.tsx index 4254a0f315..72b4bf10d2 100644 --- a/apps/web/core/components/cycles/quick-actions.tsx +++ b/apps/web/core/components/cycles/quick-actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { MoreHorizontal } from "lucide-react"; diff --git a/apps/web/core/components/cycles/transfer-issues-modal.tsx b/apps/web/core/components/cycles/transfer-issues-modal.tsx index caf2e6a5f7..2518eea8c3 100644 --- a/apps/web/core/components/cycles/transfer-issues-modal.tsx +++ b/apps/web/core/components/cycles/transfer-issues-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/cycles/transfer-issues.tsx b/apps/web/core/components/cycles/transfer-issues.tsx index 666a98c117..adbab83aa4 100644 --- a/apps/web/core/components/cycles/transfer-issues.tsx +++ b/apps/web/core/components/cycles/transfer-issues.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { AlertCircle } from "lucide-react"; // ui diff --git a/apps/web/core/components/dropdowns/buttons.tsx b/apps/web/core/components/dropdowns/buttons.tsx index b7e04a3673..421d012679 100644 --- a/apps/web/core/components/dropdowns/buttons.tsx +++ b/apps/web/core/components/dropdowns/buttons.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // helpers import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/dropdowns/constants.ts b/apps/web/core/components/dropdowns/constants.ts index 9451b1fca9..77479c8d3a 100644 --- a/apps/web/core/components/dropdowns/constants.ts +++ b/apps/web/core/components/dropdowns/constants.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // types import type { TButtonVariants } from "./types"; diff --git a/apps/web/core/components/dropdowns/cycle/cycle-options.tsx b/apps/web/core/components/dropdowns/cycle/cycle-options.tsx index 75d40a80ca..4e08a27019 100644 --- a/apps/web/core/components/dropdowns/cycle/cycle-options.tsx +++ b/apps/web/core/components/dropdowns/cycle/cycle-options.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import type { Placement } from "@popperjs/core"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/dropdowns/cycle/index.tsx b/apps/web/core/components/dropdowns/cycle/index.tsx index f5d8d7adb1..a2a9919b1b 100644 --- a/apps/web/core/components/dropdowns/cycle/index.tsx +++ b/apps/web/core/components/dropdowns/cycle/index.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { useRef, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/dropdowns/date-range.tsx b/apps/web/core/components/dropdowns/date-range.tsx index 1ffb264311..1ee1e0ad8b 100644 --- a/apps/web/core/components/dropdowns/date-range.tsx +++ b/apps/web/core/components/dropdowns/date-range.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useRef, useState } from "react"; import type { Placement } from "@popperjs/core"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/dropdowns/date.tsx b/apps/web/core/components/dropdowns/date.tsx index d1185c3a9a..2181edab48 100644 --- a/apps/web/core/components/dropdowns/date.tsx +++ b/apps/web/core/components/dropdowns/date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useRef, useState } from "react"; import { observer } from "mobx-react"; import { createPortal } from "react-dom"; diff --git a/apps/web/core/components/dropdowns/estimate.tsx b/apps/web/core/components/dropdowns/estimate.tsx index b938dc67ee..98a7ef3596 100644 --- a/apps/web/core/components/dropdowns/estimate.tsx +++ b/apps/web/core/components/dropdowns/estimate.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { useRef, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/dropdowns/intake-state/base.tsx b/apps/web/core/components/dropdowns/intake-state/base.tsx index 48b19edbda..f08ebff978 100644 --- a/apps/web/core/components/dropdowns/intake-state/base.tsx +++ b/apps/web/core/components/dropdowns/intake-state/base.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { useRef, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/dropdowns/intake-state/dropdown.tsx b/apps/web/core/components/dropdowns/intake-state/dropdown.tsx index 2a0e419885..a9220ee7a6 100644 --- a/apps/web/core/components/dropdowns/intake-state/dropdown.tsx +++ b/apps/web/core/components/dropdowns/intake-state/dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/dropdowns/layout.tsx b/apps/web/core/components/dropdowns/layout.tsx index ae3e01a232..5b6ef2186c 100644 --- a/apps/web/core/components/dropdowns/layout.tsx +++ b/apps/web/core/components/dropdowns/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/dropdowns/member/avatar.tsx b/apps/web/core/components/dropdowns/member/avatar.tsx index 3ca658c814..13f4078bf5 100644 --- a/apps/web/core/components/dropdowns/member/avatar.tsx +++ b/apps/web/core/components/dropdowns/member/avatar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import type { LucideIcon } from "lucide-react"; import { MembersPropertyIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/dropdowns/member/base.tsx b/apps/web/core/components/dropdowns/member/base.tsx index 73190676b1..32c035d95b 100644 --- a/apps/web/core/components/dropdowns/member/base.tsx +++ b/apps/web/core/components/dropdowns/member/base.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef, useState } from "react"; import { observer } from "mobx-react"; import type { LucideIcon } from "lucide-react"; @@ -177,6 +183,7 @@ export const MemberDropdownBase = observer(function MemberDropdownBase(props: TM optionsClassName={optionsClassName} placement={placement} referenceElement={referenceElement} + value={value} /> )} diff --git a/apps/web/core/components/dropdowns/member/dropdown.tsx b/apps/web/core/components/dropdowns/member/dropdown.tsx index b573bc074a..2ab8e5c350 100644 --- a/apps/web/core/components/dropdowns/member/dropdown.tsx +++ b/apps/web/core/components/dropdowns/member/dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import type { LucideIcon } from "lucide-react"; diff --git a/apps/web/core/components/dropdowns/member/member-options.tsx b/apps/web/core/components/dropdowns/member/member-options.tsx index e45e68f18c..c3fd99405f 100644 --- a/apps/web/core/components/dropdowns/member/member-options.tsx +++ b/apps/web/core/components/dropdowns/member/member-options.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import type { Placement } from "@popperjs/core"; import { observer } from "mobx-react"; @@ -11,7 +17,7 @@ import { CheckIcon, SearchIcon, SuspendedUserIcon } from "@plane/propel/icons"; import { EPillSize, EPillVariant, Pill } from "@plane/propel/pill"; import type { IUserLite } from "@plane/types"; import { Avatar } from "@plane/ui"; -import { cn, getFileURL } from "@plane/utils"; +import { cn, getFileURL, sortByCurrentUserThenSelected } from "@plane/utils"; // hooks import { useMember } from "@/hooks/store/use-member"; import { useUser } from "@/hooks/store/user"; @@ -26,6 +32,7 @@ interface Props { optionsClassName?: string; placement: Placement | undefined; referenceElement: HTMLButtonElement | null; + value?: string[] | string | null; } export const MemberOptions = observer(function MemberOptions(props: Props) { @@ -37,6 +44,7 @@ export const MemberOptions = observer(function MemberOptions(props: Props) { optionsClassName = "", placement, referenceElement, + value, } = props; // router const { workspaceSlug } = useParams(); @@ -111,8 +119,11 @@ export const MemberOptions = observer(function MemberOptions(props: Props) { }) .filter((o) => !!o); - const filteredOptions = - query === "" ? options : options?.filter((o) => o?.query.toLowerCase().includes(query.toLowerCase())); + const filteredOptions = sortByCurrentUserThenSelected( + query === "" ? options : options?.filter((o) => o?.query.toLowerCase().includes(query.toLowerCase())), + value, + currentUser?.id + ); return createPortal( diff --git a/apps/web/core/components/dropdowns/merged-date.tsx b/apps/web/core/components/dropdowns/merged-date.tsx index bbf337ac78..62966e5cb6 100644 --- a/apps/web/core/components/dropdowns/merged-date.tsx +++ b/apps/web/core/components/dropdowns/merged-date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // helpers diff --git a/apps/web/core/components/dropdowns/module/base.tsx b/apps/web/core/components/dropdowns/module/base.tsx index 83459d17d5..6487e57ba7 100644 --- a/apps/web/core/components/dropdowns/module/base.tsx +++ b/apps/web/core/components/dropdowns/module/base.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; @@ -187,6 +193,7 @@ export const ModuleDropdownBase = observer(function ModuleDropdownBase(props: TM multiple={multiple} getModuleById={getModuleById} moduleIds={moduleIds} + value={value} /> )} diff --git a/apps/web/core/components/dropdowns/module/button-content.tsx b/apps/web/core/components/dropdowns/module/button-content.tsx index 2d6d68c713..5b69f7aa0f 100644 --- a/apps/web/core/components/dropdowns/module/button-content.tsx +++ b/apps/web/core/components/dropdowns/module/button-content.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { CloseIcon, ModuleIcon, ChevronDownIcon } from "@plane/propel/icons"; import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/dropdowns/module/dropdown.tsx b/apps/web/core/components/dropdowns/module/dropdown.tsx index 40fad645d8..5a8f948111 100644 --- a/apps/web/core/components/dropdowns/module/dropdown.tsx +++ b/apps/web/core/components/dropdowns/module/dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/dropdowns/module/module-options.tsx b/apps/web/core/components/dropdowns/module/module-options.tsx index 243684987e..263906f045 100644 --- a/apps/web/core/components/dropdowns/module/module-options.tsx +++ b/apps/web/core/components/dropdowns/module/module-options.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import type { Placement } from "@popperjs/core"; import { observer } from "mobx-react"; @@ -7,7 +13,7 @@ import { Combobox } from "@headlessui/react"; import { useTranslation } from "@plane/i18n"; import { CheckIcon, SearchIcon, ModuleIcon } from "@plane/propel/icons"; import type { IModule } from "@plane/types"; -import { cn } from "@plane/utils"; +import { cn, sortBySelectedFirst } from "@plane/utils"; // hooks import { usePlatformOS } from "@/hooks/use-platform-os"; @@ -27,10 +33,11 @@ interface Props { onDropdownOpen?: () => void; placement: Placement | undefined; referenceElement: HTMLButtonElement | null; + value?: string[] | string | null; } export const ModuleOptions = observer(function ModuleOptions(props: Props) { - const { getModuleById, isOpen, moduleIds, multiple, onDropdownOpen, placement, referenceElement } = props; + const { getModuleById, isOpen, moduleIds, multiple, onDropdownOpen, placement, referenceElement, value } = props; // refs const inputRef = useRef(null); // states @@ -100,8 +107,10 @@ export const ModuleOptions = observer(function ModuleOptions(props: Props) { ), }); - const filteredOptions = - query === "" ? options : options?.filter((o) => o.query.toLowerCase().includes(query.toLowerCase())); + const filteredOptions = sortBySelectedFirst( + query === "" ? options : options?.filter((o) => o.query.toLowerCase().includes(query.toLowerCase())), + value + ); return ( diff --git a/apps/web/core/components/dropdowns/priority.tsx b/apps/web/core/components/dropdowns/priority.tsx index 809c4be36c..a7ccae829a 100644 --- a/apps/web/core/components/dropdowns/priority.tsx +++ b/apps/web/core/components/dropdowns/priority.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { useRef, useState } from "react"; import { usePopper } from "react-popper"; diff --git a/apps/web/core/components/dropdowns/project/base.tsx b/apps/web/core/components/dropdowns/project/base.tsx index e3362e83ff..df6eabef04 100644 --- a/apps/web/core/components/dropdowns/project/base.tsx +++ b/apps/web/core/components/dropdowns/project/base.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { useRef, useState } from "react"; import { observer } from "mobx-react"; @@ -8,7 +14,7 @@ import { useTranslation } from "@plane/i18n"; import { Logo } from "@plane/propel/emoji-icon-picker"; import { CheckIcon, SearchIcon, ProjectIcon, ChevronDownIcon } from "@plane/propel/icons"; import { ComboDropDown } from "@plane/ui"; -import { cn } from "@plane/utils"; +import { cn, sortBySelectedFirst } from "@plane/utils"; // components // hooks import { useDropdown } from "@/hooks/use-dropdown"; @@ -110,10 +116,13 @@ export const ProjectDropdownBase = observer(function ProjectDropdownBase(props: }; }); - const filteredOptions = - query === "" + const filteredOptions = sortBySelectedFirst( + (query === "" ? options?.filter((o) => o?.value !== currentProjectId) - : options?.filter((o) => o?.value !== currentProjectId && o?.query.toLowerCase().includes(query.toLowerCase())); + : options?.filter((o) => o?.value !== currentProjectId && o?.query.toLowerCase().includes(query.toLowerCase())) + )?.filter((o): o is NonNullable => o !== undefined), + value + ); const { handleClose, handleKeyDown, handleOnClick, searchInputKeyDown } = useDropdown({ dropdownRef, diff --git a/apps/web/core/components/dropdowns/project/dropdown.tsx b/apps/web/core/components/dropdowns/project/dropdown.tsx index 1d59330526..165f734db5 100644 --- a/apps/web/core/components/dropdowns/project/dropdown.tsx +++ b/apps/web/core/components/dropdowns/project/dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { observer } from "mobx-react"; // hooks diff --git a/apps/web/core/components/dropdowns/state/base.tsx b/apps/web/core/components/dropdowns/state/base.tsx index 06e369196a..687e227b8c 100644 --- a/apps/web/core/components/dropdowns/state/base.tsx +++ b/apps/web/core/components/dropdowns/state/base.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import { useRef, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/dropdowns/state/dropdown.tsx b/apps/web/core/components/dropdowns/state/dropdown.tsx index d7fe55fe1f..ea6bbc6567 100644 --- a/apps/web/core/components/dropdowns/state/dropdown.tsx +++ b/apps/web/core/components/dropdowns/state/dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/editor/document/editor.tsx b/apps/web/core/components/editor/document/editor.tsx index 383325c518..20f8c6e095 100644 --- a/apps/web/core/components/editor/document/editor.tsx +++ b/apps/web/core/components/editor/document/editor.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { forwardRef } from "react"; // plane imports import { DocumentEditorWithRef } from "@plane/editor"; diff --git a/apps/web/core/components/editor/embeds/mentions/index.ts b/apps/web/core/components/editor/embeds/mentions/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/editor/embeds/mentions/index.ts +++ b/apps/web/core/components/editor/embeds/mentions/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/editor/embeds/mentions/root.tsx b/apps/web/core/components/editor/embeds/mentions/root.tsx index 6f83f064fb..88621d6de2 100644 --- a/apps/web/core/components/editor/embeds/mentions/root.tsx +++ b/apps/web/core/components/editor/embeds/mentions/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane web imports import type { TEditorMentionComponentProps } from "@/plane-web/components/editor/embeds/mentions"; import { EditorAdditionalMentionsRoot } from "@/plane-web/components/editor/embeds/mentions"; diff --git a/apps/web/core/components/editor/embeds/mentions/user.tsx b/apps/web/core/components/editor/embeds/mentions/user.tsx index 7d47857f0f..4ffce3b2cd 100644 --- a/apps/web/core/components/editor/embeds/mentions/user.tsx +++ b/apps/web/core/components/editor/embeds/mentions/user.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import { Link } from "react-router"; diff --git a/apps/web/core/components/editor/lite-text/editor.tsx b/apps/web/core/components/editor/lite-text/editor.tsx index 6cae6fed8d..5dd50e0c2e 100644 --- a/apps/web/core/components/editor/lite-text/editor.tsx +++ b/apps/web/core/components/editor/lite-text/editor.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; // plane constants import type { EIssueCommentAccessSpecifier } from "@plane/constants"; @@ -17,7 +23,7 @@ import { useParseEditorContent } from "@/hooks/use-parse-editor-content"; // plane web hooks import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging"; // plane web service -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; import { LiteToolbar } from "./lite-toolbar"; const workspaceService = new WorkspaceService(); diff --git a/apps/web/core/components/editor/lite-text/index.ts b/apps/web/core/components/editor/lite-text/index.ts index f73ee92ef6..459e4deca8 100644 --- a/apps/web/core/components/editor/lite-text/index.ts +++ b/apps/web/core/components/editor/lite-text/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./editor"; export * from "./toolbar"; diff --git a/apps/web/core/components/editor/lite-text/lite-toolbar.tsx b/apps/web/core/components/editor/lite-text/lite-toolbar.tsx index 4eee50976d..7166575596 100644 --- a/apps/web/core/components/editor/lite-text/lite-toolbar.tsx +++ b/apps/web/core/components/editor/lite-text/lite-toolbar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { ArrowUp, Paperclip } from "lucide-react"; // constants diff --git a/apps/web/core/components/editor/lite-text/toolbar.tsx b/apps/web/core/components/editor/lite-text/toolbar.tsx index 95389fe9eb..9e8f01c83f 100644 --- a/apps/web/core/components/editor/lite-text/toolbar.tsx +++ b/apps/web/core/components/editor/lite-text/toolbar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState, useCallback } from "react"; import type { LucideIcon } from "lucide-react"; diff --git a/apps/web/core/components/editor/pdf/document.tsx b/apps/web/core/components/editor/pdf/document.tsx index a1d5b12ad2..1c439bfae1 100644 --- a/apps/web/core/components/editor/pdf/document.tsx +++ b/apps/web/core/components/editor/pdf/document.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { PageProps } from "@react-pdf/renderer"; import { Document, Font, Page } from "@react-pdf/renderer"; import { Html } from "react-pdf-html"; diff --git a/apps/web/core/components/editor/pdf/index.ts b/apps/web/core/components/editor/pdf/index.ts index fe6d89c0eb..a53ff8fb4e 100644 --- a/apps/web/core/components/editor/pdf/index.ts +++ b/apps/web/core/components/editor/pdf/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./document"; diff --git a/apps/web/core/components/editor/rich-text/description-input/index.ts b/apps/web/core/components/editor/rich-text/description-input/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/editor/rich-text/description-input/index.ts +++ b/apps/web/core/components/editor/rich-text/description-input/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/editor/rich-text/description-input/loader.tsx b/apps/web/core/components/editor/rich-text/description-input/loader.tsx index 2d3a068ee4..06db68b0f7 100644 --- a/apps/web/core/components/editor/rich-text/description-input/loader.tsx +++ b/apps/web/core/components/editor/rich-text/description-input/loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { Loader } from "@plane/ui"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/editor/rich-text/description-input/root.tsx b/apps/web/core/components/editor/rich-text/description-input/root.tsx index 7c95e1ace5..fefa49f9cc 100644 --- a/apps/web/core/components/editor/rich-text/description-input/root.tsx +++ b/apps/web/core/components/editor/rich-text/description-input/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useEffect, useState, useRef } from "react"; import { debounce } from "lodash-es"; import { observer } from "mobx-react"; @@ -13,7 +19,7 @@ import { RichTextEditor } from "@/components/editor/rich-text"; import { useEditorAsset } from "@/hooks/store/use-editor-asset"; import { useWorkspace } from "@/hooks/store/use-workspace"; // plane web services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; // local imports import { DescriptionInputLoader } from "./loader"; // services init @@ -113,6 +119,8 @@ export const DescriptionInput = observer(function DescriptionInput(props: Props) }); // ref to track if there are unsaved changes const hasUnsavedChanges = useRef(false); + // ref to track last saved content (to skip onChange when content hasn't actually changed) + const lastSavedContent = useRef(initialValue?.trim() === "" ? "

" : (initialValue ?? "

")); // store hooks const { getWorkspaceBySlug } = useWorkspace(); const { uploadEditorAsset, duplicateEditorAsset } = useEditorAsset(); @@ -133,6 +141,8 @@ export const DescriptionInput = observer(function DescriptionInput(props: Props) const handleDescriptionFormSubmit = useCallback( async (formData: TFormData) => { await onSubmit(formData.description_html, formData.isMigrationUpdate); + // Update lastSavedContent after successful save + lastSavedContent.current = formData.description_html; }, [onSubmit] ); @@ -140,14 +150,17 @@ export const DescriptionInput = observer(function DescriptionInput(props: Props) // reset form values useEffect(() => { if (!entityId) return; + const normalizedValue = initialValue?.trim() === "" ? "

" : (initialValue ?? "

"); + // Update last saved content when entity/initialValue changes + lastSavedContent.current = normalizedValue; reset({ id: entityId, - description_html: initialValue?.trim() === "" ? "

" : (initialValue ?? "

"), + description_html: normalizedValue, isMigrationUpdate: false, }); setLocalDescription({ id: entityId, - description_html: initialValue?.trim() === "" ? "

" : (initialValue ?? "

"), + description_html: normalizedValue, isMigrationUpdate: false, }); // Reset unsaved changes flag when form is reset @@ -200,6 +213,7 @@ export const DescriptionInput = observer(function DescriptionInput(props: Props) control={control} render={({ field: { onChange } }) => ( { + // Skip if content hasn't actually changed (handles editor normalization on init) + if (description_html === lastSavedContent.current) return; setIsSubmitting("submitting"); onChange(description_html); setValue("isMigrationUpdate", options?.isMigrationUpdate ?? false); diff --git a/apps/web/core/components/editor/rich-text/editor.tsx b/apps/web/core/components/editor/rich-text/editor.tsx index e3cb6ba613..3e667ef6f4 100644 --- a/apps/web/core/components/editor/rich-text/editor.tsx +++ b/apps/web/core/components/editor/rich-text/editor.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { forwardRef } from "react"; // plane imports import { RichTextEditorWithRef } from "@plane/editor"; diff --git a/apps/web/core/components/editor/rich-text/index.ts b/apps/web/core/components/editor/rich-text/index.ts index 8b1fd904bb..4c9233aa45 100644 --- a/apps/web/core/components/editor/rich-text/index.ts +++ b/apps/web/core/components/editor/rich-text/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./editor"; diff --git a/apps/web/core/components/editor/sticky-editor/color-palette.tsx b/apps/web/core/components/editor/sticky-editor/color-palette.tsx index 09f7f16e55..ea9f7615d9 100644 --- a/apps/web/core/components/editor/sticky-editor/color-palette.tsx +++ b/apps/web/core/components/editor/sticky-editor/color-palette.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TSticky } from "@plane/types"; export const STICKY_COLORS_LIST: { diff --git a/apps/web/core/components/editor/sticky-editor/editor.tsx b/apps/web/core/components/editor/sticky-editor/editor.tsx index 999c047a4d..0a0347c780 100644 --- a/apps/web/core/components/editor/sticky-editor/editor.tsx +++ b/apps/web/core/components/editor/sticky-editor/editor.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; // plane constants import type { EIssueCommentAccessSpecifier } from "@plane/constants"; diff --git a/apps/web/core/components/editor/sticky-editor/index.ts b/apps/web/core/components/editor/sticky-editor/index.ts index f73ee92ef6..459e4deca8 100644 --- a/apps/web/core/components/editor/sticky-editor/index.ts +++ b/apps/web/core/components/editor/sticky-editor/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./editor"; export * from "./toolbar"; diff --git a/apps/web/core/components/editor/sticky-editor/toolbar.tsx b/apps/web/core/components/editor/sticky-editor/toolbar.tsx index 6753eeeec2..35d12cc87a 100644 --- a/apps/web/core/components/editor/sticky-editor/toolbar.tsx +++ b/apps/web/core/components/editor/sticky-editor/toolbar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState, useCallback } from "react"; import { Palette } from "lucide-react"; // editor diff --git a/apps/web/core/components/empty-state/comic-box-button.tsx b/apps/web/core/components/empty-state/comic-box-button.tsx index c4a8d23fd2..591b0cc73f 100644 --- a/apps/web/core/components/empty-state/comic-box-button.tsx +++ b/apps/web/core/components/empty-state/comic-box-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Ref } from "react"; import { Fragment, useState } from "react"; import { usePopper } from "react-popper"; diff --git a/apps/web/core/components/empty-state/detailed-empty-state-root.tsx b/apps/web/core/components/empty-state/detailed-empty-state-root.tsx index 6f26f321e6..9dfcdf39ec 100644 --- a/apps/web/core/components/empty-state/detailed-empty-state-root.tsx +++ b/apps/web/core/components/empty-state/detailed-empty-state-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // ui diff --git a/apps/web/core/components/empty-state/helper.tsx b/apps/web/core/components/empty-state/helper.tsx index 4f5cfc1274..03460f62e1 100644 --- a/apps/web/core/components/empty-state/helper.tsx +++ b/apps/web/core/components/empty-state/helper.tsx @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export const getEmptyStateImagePath = (category: string, type: string, isLightMode: boolean) => `/empty-state/${category}/${type}-${isLightMode ? "light" : "dark"}.webp`; diff --git a/apps/web/core/components/empty-state/section-empty-state-root.tsx b/apps/web/core/components/empty-state/section-empty-state-root.tsx index 50227504f0..37cd702123 100644 --- a/apps/web/core/components/empty-state/section-empty-state-root.tsx +++ b/apps/web/core/components/empty-state/section-empty-state-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/empty-state/simple-empty-state-root.tsx b/apps/web/core/components/empty-state/simple-empty-state-root.tsx index fc92cfdf0c..38c9c7ffba 100644 --- a/apps/web/core/components/empty-state/simple-empty-state-root.tsx +++ b/apps/web/core/components/empty-state/simple-empty-state-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // utils import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/estimates/create/modal.tsx b/apps/web/core/components/estimates/create/modal.tsx index 54392b5e17..7894a0af2a 100644 --- a/apps/web/core/components/estimates/create/modal.tsx +++ b/apps/web/core/components/estimates/create/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useEffect, useMemo, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/estimates/create/stage-one.tsx b/apps/web/core/components/estimates/create/stage-one.tsx index 3013a56655..92f4ef23a7 100644 --- a/apps/web/core/components/estimates/create/stage-one.tsx +++ b/apps/web/core/components/estimates/create/stage-one.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Info } from "lucide-react"; // plane imports import { EEstimateSystem, ESTIMATE_SYSTEMS } from "@plane/constants"; diff --git a/apps/web/core/components/estimates/delete/modal.tsx b/apps/web/core/components/estimates/delete/modal.tsx index f583bec023..d47468489c 100644 --- a/apps/web/core/components/estimates/delete/modal.tsx +++ b/apps/web/core/components/estimates/delete/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // ui diff --git a/apps/web/core/components/estimates/empty-screen.tsx b/apps/web/core/components/estimates/empty-screen.tsx index 28c69729a1..0591a0d6c1 100644 --- a/apps/web/core/components/estimates/empty-screen.tsx +++ b/apps/web/core/components/estimates/empty-screen.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTheme } from "next-themes"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/estimates/estimate-disable-switch.tsx b/apps/web/core/components/estimates/estimate-disable-switch.tsx index 4378ce2abb..7553ce0757 100644 --- a/apps/web/core/components/estimates/estimate-disable-switch.tsx +++ b/apps/web/core/components/estimates/estimate-disable-switch.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; diff --git a/apps/web/core/components/estimates/estimate-list-item.tsx b/apps/web/core/components/estimates/estimate-list-item.tsx index b8f951192b..e16dcf9912 100644 --- a/apps/web/core/components/estimates/estimate-list-item.tsx +++ b/apps/web/core/components/estimates/estimate-list-item.tsx @@ -1,12 +1,19 @@ -import type { FC } from "react"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; +// plane imports import { EEstimateSystem } from "@plane/constants"; -import { convertMinutesToHoursMinutesString, cn } from "@plane/utils"; -// helpers +import { convertMinutesToHoursMinutesString } from "@plane/utils"; +// components +import { SettingsBoxedControlItem } from "@/components/settings/boxed-control-item"; // hooks import { useProjectEstimates } from "@/hooks/store/estimates"; import { useEstimate } from "@/hooks/store/estimates/use-estimate"; -// plane web components +// plane web imports import { EstimateListItemButtons } from "@/plane-web/components/estimates"; type TEstimateListItem = { @@ -19,40 +26,31 @@ type TEstimateListItem = { }; export const EstimateListItem = observer(function EstimateListItem(props: TEstimateListItem) { - const { estimateId, isAdmin, isEstimateEnabled, isEditable } = props; - // hooks + const { estimateId } = props; + // store hooks const { estimateById } = useProjectEstimates(); const { estimatePointIds, estimatePointById } = useEstimate(estimateId); const currentEstimate = estimateById(estimateId); - // derived values const estimatePointValues = estimatePointIds?.map((estimatePointId) => { const estimatePoint = estimatePointById(estimatePointId); if (estimatePoint) return estimatePoint.value; }); - if (!currentEstimate) return <>; + if (!currentEstimate) return null; + return ( -
-
-

{currentEstimate?.name}

-

- {estimatePointValues - ?.map((estimatePointValue) => { - if (currentEstimate?.type === EEstimateSystem.TIME) { - return convertMinutesToHoursMinutesString(Number(estimatePointValue)); - } - return estimatePointValue; - }) - .join(", ")} -

-
- -
+ { + if (currentEstimate.type === EEstimateSystem.TIME) { + return convertMinutesToHoursMinutesString(Number(estimatePointValue)); + } + return estimatePointValue; + }) + .join(", ")} + control={} + /> ); }); diff --git a/apps/web/core/components/estimates/estimate-list.tsx b/apps/web/core/components/estimates/estimate-list.tsx index f52055e766..0a428e8f71 100644 --- a/apps/web/core/components/estimates/estimate-list.tsx +++ b/apps/web/core/components/estimates/estimate-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // local imports diff --git a/apps/web/core/components/estimates/estimate-search.tsx b/apps/web/core/components/estimates/estimate-search.tsx index d67403c9db..38a6439f18 100644 --- a/apps/web/core/components/estimates/estimate-search.tsx +++ b/apps/web/core/components/estimates/estimate-search.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/estimates/index.ts b/apps/web/core/components/estimates/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/estimates/index.ts +++ b/apps/web/core/components/estimates/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/estimates/inputs/index.ts b/apps/web/core/components/estimates/inputs/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/estimates/inputs/index.ts +++ b/apps/web/core/components/estimates/inputs/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/estimates/inputs/number-input.tsx b/apps/web/core/components/estimates/inputs/number-input.tsx index 4b4db415bb..6f898dfa7d 100644 --- a/apps/web/core/components/estimates/inputs/number-input.tsx +++ b/apps/web/core/components/estimates/inputs/number-input.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useTranslation } from "@plane/i18n"; type TEstimateNumberInputProps = { @@ -18,7 +24,7 @@ export function EstimateNumberInput(props: TEstimateNumberInputProps) { className="border-none focus:ring-0 focus:border-0 focus:outline-none px-2 py-2 w-full bg-transparent text-13" placeholder={t("project_settings.estimates.create.enter_estimate_point")} autoFocus - type="number" + step="any" /> ); } diff --git a/apps/web/core/components/estimates/inputs/root.tsx b/apps/web/core/components/estimates/inputs/root.tsx index 117f68fe77..1c38f41cfe 100644 --- a/apps/web/core/components/estimates/inputs/root.tsx +++ b/apps/web/core/components/estimates/inputs/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // plane imports import type { TEstimateSystemKeys } from "@plane/types"; @@ -21,7 +27,7 @@ export function EstimateInputRoot(props: TEstimateInputRootProps) { case EEstimateSystem.POINTS: return ( ); diff --git a/apps/web/core/components/estimates/inputs/text-input.tsx b/apps/web/core/components/estimates/inputs/text-input.tsx index 477d0b5fd9..4dabb65da4 100644 --- a/apps/web/core/components/estimates/inputs/text-input.tsx +++ b/apps/web/core/components/estimates/inputs/text-input.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useTranslation } from "@plane/i18n"; type TEstimateTextInputProps = { diff --git a/apps/web/core/components/estimates/loader-screen.tsx b/apps/web/core/components/estimates/loader-screen.tsx index 29474b9c96..79f3b03947 100644 --- a/apps/web/core/components/estimates/loader-screen.tsx +++ b/apps/web/core/components/estimates/loader-screen.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/estimates/points/create-root.tsx b/apps/web/core/components/estimates/points/create-root.tsx index 75d447be91..b309b2890c 100644 --- a/apps/web/core/components/estimates/points/create-root.tsx +++ b/apps/web/core/components/estimates/points/create-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Dispatch, FC, SetStateAction } from "react"; import { useCallback, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/estimates/points/create.tsx b/apps/web/core/components/estimates/points/create.tsx index 7c78626006..f06a53f324 100644 --- a/apps/web/core/components/estimates/points/create.tsx +++ b/apps/web/core/components/estimates/points/create.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FormEvent } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/estimates/points/index.ts b/apps/web/core/components/estimates/points/index.ts index 2ef48eb2ad..26c9e6ed3b 100644 --- a/apps/web/core/components/estimates/points/index.ts +++ b/apps/web/core/components/estimates/points/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./create-root"; diff --git a/apps/web/core/components/estimates/points/preview.tsx b/apps/web/core/components/estimates/points/preview.tsx index a10288abd5..b34aa8d615 100644 --- a/apps/web/core/components/estimates/points/preview.tsx +++ b/apps/web/core/components/estimates/points/preview.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/estimates/points/update.tsx b/apps/web/core/components/estimates/points/update.tsx index 3ca443bc5e..5504f905ce 100644 --- a/apps/web/core/components/estimates/points/update.tsx +++ b/apps/web/core/components/estimates/points/update.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FormEvent } from "react"; import { useEffect, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/estimates/radio-select.tsx b/apps/web/core/components/estimates/radio-select.tsx index 1401357239..f4954e8ef5 100644 --- a/apps/web/core/components/estimates/radio-select.tsx +++ b/apps/web/core/components/estimates/radio-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // helpers import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/estimates/root.tsx b/apps/web/core/components/estimates/root.tsx index 3a2310b581..85d18cf5bf 100644 --- a/apps/web/core/components/estimates/root.tsx +++ b/apps/web/core/components/estimates/root.tsx @@ -1,9 +1,17 @@ -import type { FC } from "react"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; // plane imports import { useTranslation } from "@plane/i18n"; +// components +import { SettingsBoxedControlItem } from "@/components/settings/boxed-control-item"; +import { SettingsHeading } from "@/components/settings/heading"; // hooks import { EmptyStateCompact } from "@plane/propel/empty-state"; import { useProjectEstimates } from "@/hooks/store/estimates"; @@ -11,7 +19,6 @@ import { useProject } from "@/hooks/store/use-project"; // plane web components import { UpdateEstimateModal } from "@/plane-web/components/estimates"; // local imports -import { SettingsHeading } from "../settings/heading"; import { CreateEstimateModal } from "./create/modal"; import { DeleteEstimateModal } from "./delete/modal"; import { EstimateDisableSwitch } from "./estimate-disable-switch"; @@ -41,40 +48,43 @@ export const EstimateRoot = observer(function EstimateRoot(props: TEstimateRoot) async () => workspaceSlug && projectId && getProjectEstimates(workspaceSlug, projectId) ); + if (loader === "init-loader" || isSWRLoading) { + return ; + } + return ( -
- {loader === "init-loader" || isSWRLoading ? ( - - ) : ( -
- {/* header */} - - - + <> +
+ {/* header */} + +
{/* current active estimate section */} {currentActiveEstimateId ? ( -
+ <> {/* estimates activated deactivated section */} -
-
-

{t("project_settings.estimates.title")}

-

{t("project_settings.estimates.enable_description")}

-
- -
- {/* active estimates section */} - setEstimateToUpdate(estimateId)} - onDeleteClick={(estimateId: string) => setEstimateToDelete(estimateId)} + + } /> -
+ {/* active estimates section */} +
+ + setEstimateToUpdate(estimateId)} + onDeleteClick={(estimateId: string) => setEstimateToDelete(estimateId)} + /> +
+ ) : ( )} - {/* archived estimates section */} {archivedEstimateIds && archivedEstimateIds.length > 0 && ( -
-
-

Archived estimates

-

- Estimates have gone through a change, these are the estimates you had in your older versions which - were not in use. Read more about them  - - here. - -

-
+
+ + Estimates have gone through a change, these are the estimates you had in your older versions which + were not in use. Read more about them  + + here. + + + } + variant="h6" + />
)}
- )} - +
{/* CRUD modals */} setEstimateToDelete(undefined)} /> -
+ ); }); diff --git a/apps/web/core/components/exporter/column.tsx b/apps/web/core/components/exporter/column.tsx index a1d25cd9e6..524beaec02 100644 --- a/apps/web/core/components/exporter/column.tsx +++ b/apps/web/core/components/exporter/column.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Download } from "lucide-react"; import type { IExportData } from "@plane/types"; import { getDate, getFileURL, renderFormattedDate } from "@plane/utils"; diff --git a/apps/web/core/components/exporter/export-form.tsx b/apps/web/core/components/exporter/export-form.tsx index c56e462b50..3c2016d9ca 100644 --- a/apps/web/core/components/exporter/export-form.tsx +++ b/apps/web/core/components/exporter/export-form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { intersection } from "lodash-es"; import { observer } from "mobx-react"; @@ -21,6 +27,8 @@ import { CustomSearchSelect, CustomSelect } from "@plane/ui"; import { useProject } from "@/hooks/store/use-project"; import { useUser, useUserPermissions } from "@/hooks/store/user"; import { ProjectExportService } from "@/services/project/project-export.service"; +// local imports +import { SettingsBoxedControlItem } from "../settings/boxed-control-item"; type Props = { workspaceSlug: string; @@ -134,68 +142,75 @@ export const ExportForm = observer(function ExportForm(props: Props) { onSubmit={(e) => { void handleSubmit(ExportCSVToMail)(e); }} - className="flex flex-col gap-4 mt-4" + className="flex flex-col gap-5" > -
+
{/* Project Selector */} -
-
- {t("workspace_settings.settings.exports.exporting_projects")} -
- ( - onChange(val)} - options={options} - input - label={ - value && value.length > 0 - ? value - .map((projectId) => { - const projectDetails = getProjectById(projectId); + ( + onChange(val)} + options={options} + input + label={ + value && value.length > 0 + ? value + .map((projectId) => { + const projectDetails = getProjectById(projectId); - return projectDetails?.identifier; - }) - .join(", ") - : "All projects" - } - optionsClassName="max-w-48 sm:max-w-[532px]" - placement="bottom-end" - multiple - /> - )} - /> -
+ return projectDetails?.identifier; + }) + .join(", ") + : "All projects" + } + optionsClassName="max-w-48 sm:max-w-[532px]" + placement="bottom-end" + multiple + /> + )} + /> + } + /> {/* Format Selector */} -
-
- {t("workspace_settings.settings.exports.format")} -
- ( - - {EXPORTERS_LIST.map((service) => ( - - {t(service.i18n_title)} - - ))} - - )} - /> + ( + + {EXPORTERS_LIST.map((service) => ( + + {t(service.i18n_title)} + + ))} + + )} + /> + } + /> +
+
{/* Rich Filters */} @@ -241,11 +256,6 @@ export const ExportForm = observer(function ExportForm(props: Props) { )} />
*/} -
- -
); }); diff --git a/apps/web/core/components/exporter/export-modal.tsx b/apps/web/core/components/exporter/export-modal.tsx index 309e842ccb..5b7fc39f69 100644 --- a/apps/web/core/components/exporter/export-modal.tsx +++ b/apps/web/core/components/exporter/export-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { intersection } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/exporter/guide.tsx b/apps/web/core/components/exporter/guide.tsx index b35a9125f0..e8d20cad5b 100644 --- a/apps/web/core/components/exporter/guide.tsx +++ b/apps/web/core/components/exporter/guide.tsx @@ -1,12 +1,20 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams, useSearchParams } from "next/navigation"; import { mutate } from "swr"; +// constants import { EXPORT_SERVICES_LIST } from "@/constants/fetch-keys"; +// local imports import { ExportForm } from "./export-form"; import { PrevExports } from "./prev-exports"; -const IntegrationGuide = observer(function IntegrationGuide() { +export const ExportGuide = observer(function ExportGuide() { // router const { workspaceSlug } = useParams(); const searchParams = useSearchParams(); @@ -17,18 +25,14 @@ const IntegrationGuide = observer(function IntegrationGuide() { return ( <> -
- <> - mutate(EXPORT_SERVICES_LIST(workspaceSlug, `${cursor}`, `${per_page}`))} - /> - - +
+ mutate(EXPORT_SERVICES_LIST(workspaceSlug, `${cursor}`, `${per_page}`))} + /> +
); }); - -export default IntegrationGuide; diff --git a/apps/web/core/components/exporter/prev-exports.tsx b/apps/web/core/components/exporter/prev-exports.tsx index dbb8dbb73a..2d747e00bd 100644 --- a/apps/web/core/components/exporter/prev-exports.tsx +++ b/apps/web/core/components/exporter/prev-exports.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import useSWR, { mutate } from "swr"; @@ -59,11 +65,9 @@ export const PrevExports = observer(function PrevExports(props: Props) { return (
-
+
-

- {t("workspace_settings.settings.exports.previous_exports")} -

+

{t("workspace_settings.settings.exports.previous_exports")}

)}
-
{exporterServices && exporterServices?.results ? ( exporterServices?.results?.length > 0 ? ( diff --git a/apps/web/core/components/exporter/single-export.tsx b/apps/web/core/components/exporter/single-export.tsx index e536e9daf2..a327068723 100644 --- a/apps/web/core/components/exporter/single-export.tsx +++ b/apps/web/core/components/exporter/single-export.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; // ui diff --git a/apps/web/core/components/gantt-chart/blocks/block-row.tsx b/apps/web/core/components/gantt-chart/blocks/block-row.tsx index 6f37d6805e..b71aabdd62 100644 --- a/apps/web/core/components/gantt-chart/blocks/block-row.tsx +++ b/apps/web/core/components/gantt-chart/blocks/block-row.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { ArrowRight } from "lucide-react"; diff --git a/apps/web/core/components/gantt-chart/blocks/block.tsx b/apps/web/core/components/gantt-chart/blocks/block.tsx index 4e5e52988d..75e770a649 100644 --- a/apps/web/core/components/gantt-chart/blocks/block.tsx +++ b/apps/web/core/components/gantt-chart/blocks/block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RefObject } from "react"; import { useRef } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/gantt-chart/chart/header.tsx b/apps/web/core/components/gantt-chart/chart/header.tsx index 6ad34b6002..5c47b4ab5a 100644 --- a/apps/web/core/components/gantt-chart/chart/header.tsx +++ b/apps/web/core/components/gantt-chart/chart/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Expand, Shrink } from "lucide-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/gantt-chart/chart/index.ts b/apps/web/core/components/gantt-chart/chart/index.ts index 68b20b89a1..cf20bf51d0 100644 --- a/apps/web/core/components/gantt-chart/chart/index.ts +++ b/apps/web/core/components/gantt-chart/chart/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./views"; export * from "./header"; export * from "./main-content"; diff --git a/apps/web/core/components/gantt-chart/chart/main-content.tsx b/apps/web/core/components/gantt-chart/chart/main-content.tsx index 4a3047f3a9..f6e53bdf48 100644 --- a/apps/web/core/components/gantt-chart/chart/main-content.tsx +++ b/apps/web/core/components/gantt-chart/chart/main-content.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element"; diff --git a/apps/web/core/components/gantt-chart/chart/root.tsx b/apps/web/core/components/gantt-chart/chart/root.tsx index 2eae619e47..22effbef89 100644 --- a/apps/web/core/components/gantt-chart/chart/root.tsx +++ b/apps/web/core/components/gantt-chart/chart/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useEffect, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/gantt-chart/chart/timeline-drag-helper.tsx b/apps/web/core/components/gantt-chart/chart/timeline-drag-helper.tsx index 12441f9240..48d1145b8f 100644 --- a/apps/web/core/components/gantt-chart/chart/timeline-drag-helper.tsx +++ b/apps/web/core/components/gantt-chart/chart/timeline-drag-helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RefObject } from "react"; import { observer } from "mobx-react"; // hooks diff --git a/apps/web/core/components/gantt-chart/chart/views/index.ts b/apps/web/core/components/gantt-chart/chart/views/index.ts index ea7c85e841..b7964eb50e 100644 --- a/apps/web/core/components/gantt-chart/chart/views/index.ts +++ b/apps/web/core/components/gantt-chart/chart/views/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./month"; export * from "./quarter"; export * from "./week"; diff --git a/apps/web/core/components/gantt-chart/chart/views/month.tsx b/apps/web/core/components/gantt-chart/chart/views/month.tsx index 7c2c7bdc65..1e2ee55551 100644 --- a/apps/web/core/components/gantt-chart/chart/views/month.tsx +++ b/apps/web/core/components/gantt-chart/chart/views/month.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/gantt-chart/chart/views/quarter.tsx b/apps/web/core/components/gantt-chart/chart/views/quarter.tsx index 02d746c059..98e482a7a1 100644 --- a/apps/web/core/components/gantt-chart/chart/views/quarter.tsx +++ b/apps/web/core/components/gantt-chart/chart/views/quarter.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane utils import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/gantt-chart/chart/views/week.tsx b/apps/web/core/components/gantt-chart/chart/views/week.tsx index 976ea717e4..a1c9a2d900 100644 --- a/apps/web/core/components/gantt-chart/chart/views/week.tsx +++ b/apps/web/core/components/gantt-chart/chart/views/week.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane utils import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/gantt-chart/constants.ts b/apps/web/core/components/gantt-chart/constants.ts index e875fb8eae..04ab7d2250 100644 --- a/apps/web/core/components/gantt-chart/constants.ts +++ b/apps/web/core/components/gantt-chart/constants.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export const BLOCK_HEIGHT = 44; export const HEADER_HEIGHT = 48; diff --git a/apps/web/core/components/gantt-chart/contexts/index.tsx b/apps/web/core/components/gantt-chart/contexts/index.tsx index 894a06d75e..c3fbcdc8e3 100644 --- a/apps/web/core/components/gantt-chart/contexts/index.tsx +++ b/apps/web/core/components/gantt-chart/contexts/index.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { createContext, useContext } from "react"; import type { TTimelineType } from "@plane/types"; diff --git a/apps/web/core/components/gantt-chart/data/index.ts b/apps/web/core/components/gantt-chart/data/index.ts index 50cc76ec5a..18640a4f7a 100644 --- a/apps/web/core/components/gantt-chart/data/index.ts +++ b/apps/web/core/components/gantt-chart/data/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // types import type { WeekMonthDataType, ChartDataType, TGanttViews } from "@plane/types"; import { EStartOfTheWeek } from "@plane/types"; diff --git a/apps/web/core/components/gantt-chart/helpers/add-block.tsx b/apps/web/core/components/gantt-chart/helpers/add-block.tsx index 8db7ab7780..cffab8ff26 100644 --- a/apps/web/core/components/gantt-chart/helpers/add-block.tsx +++ b/apps/web/core/components/gantt-chart/helpers/add-block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import { addDays } from "date-fns"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/gantt-chart/helpers/blockResizables/left-resizable.tsx b/apps/web/core/components/gantt-chart/helpers/blockResizables/left-resizable.tsx index a2a1d7dd26..3c91c30a41 100644 --- a/apps/web/core/components/gantt-chart/helpers/blockResizables/left-resizable.tsx +++ b/apps/web/core/components/gantt-chart/helpers/blockResizables/left-resizable.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // plane utils diff --git a/apps/web/core/components/gantt-chart/helpers/blockResizables/right-resizable.tsx b/apps/web/core/components/gantt-chart/helpers/blockResizables/right-resizable.tsx index b6c1c689da..3cb02ff3c9 100644 --- a/apps/web/core/components/gantt-chart/helpers/blockResizables/right-resizable.tsx +++ b/apps/web/core/components/gantt-chart/helpers/blockResizables/right-resizable.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // plane utils diff --git a/apps/web/core/components/gantt-chart/helpers/blockResizables/use-gantt-resizable.ts b/apps/web/core/components/gantt-chart/helpers/blockResizables/use-gantt-resizable.ts index 2a6814ff3b..3a79ec618a 100644 --- a/apps/web/core/components/gantt-chart/helpers/blockResizables/use-gantt-resizable.ts +++ b/apps/web/core/components/gantt-chart/helpers/blockResizables/use-gantt-resizable.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef, useState } from "react"; // Plane import { TOAST_TYPE, setToast } from "@plane/propel/toast"; diff --git a/apps/web/core/components/gantt-chart/helpers/draggable.tsx b/apps/web/core/components/gantt-chart/helpers/draggable.tsx index 9ea0e71b3d..a0065141a8 100644 --- a/apps/web/core/components/gantt-chart/helpers/draggable.tsx +++ b/apps/web/core/components/gantt-chart/helpers/draggable.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RefObject } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/gantt-chart/helpers/index.ts b/apps/web/core/components/gantt-chart/helpers/index.ts index c96d42eec4..c63e7fe512 100644 --- a/apps/web/core/components/gantt-chart/helpers/index.ts +++ b/apps/web/core/components/gantt-chart/helpers/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./add-block"; export * from "./draggable"; diff --git a/apps/web/core/components/gantt-chart/index.ts b/apps/web/core/components/gantt-chart/index.ts index 49aaf6eeae..b9a1d964fb 100644 --- a/apps/web/core/components/gantt-chart/index.ts +++ b/apps/web/core/components/gantt-chart/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./chart"; export * from "./helpers"; export * from "./root"; diff --git a/apps/web/core/components/gantt-chart/root.tsx b/apps/web/core/components/gantt-chart/root.tsx index 18bedc87f7..ecf27a4e11 100644 --- a/apps/web/core/components/gantt-chart/root.tsx +++ b/apps/web/core/components/gantt-chart/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useEffect } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx b/apps/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx index 5d09cf507c..fe4bf0bc5e 100644 --- a/apps/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx +++ b/apps/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; diff --git a/apps/web/core/components/gantt-chart/sidebar/index.ts b/apps/web/core/components/gantt-chart/sidebar/index.ts index e0e48c81eb..4ff511812a 100644 --- a/apps/web/core/components/gantt-chart/sidebar/index.ts +++ b/apps/web/core/components/gantt-chart/sidebar/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./issues"; export * from "./modules"; export * from "./root"; diff --git a/apps/web/core/components/gantt-chart/sidebar/issues/block.tsx b/apps/web/core/components/gantt-chart/sidebar/issues/block.tsx index cdefcc39cd..f4a4594bab 100644 --- a/apps/web/core/components/gantt-chart/sidebar/issues/block.tsx +++ b/apps/web/core/components/gantt-chart/sidebar/issues/block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import type { IGanttBlock } from "@plane/types"; diff --git a/apps/web/core/components/gantt-chart/sidebar/issues/index.ts b/apps/web/core/components/gantt-chart/sidebar/issues/index.ts index 01acaeffb1..1f9c99db0c 100644 --- a/apps/web/core/components/gantt-chart/sidebar/issues/index.ts +++ b/apps/web/core/components/gantt-chart/sidebar/issues/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./sidebar"; diff --git a/apps/web/core/components/gantt-chart/sidebar/issues/sidebar.tsx b/apps/web/core/components/gantt-chart/sidebar/issues/sidebar.tsx index a210c40016..48a90a9625 100644 --- a/apps/web/core/components/gantt-chart/sidebar/issues/sidebar.tsx +++ b/apps/web/core/components/gantt-chart/sidebar/issues/sidebar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RefObject } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/gantt-chart/sidebar/modules/block.tsx b/apps/web/core/components/gantt-chart/sidebar/modules/block.tsx index 0afffda566..479390afd7 100644 --- a/apps/web/core/components/gantt-chart/sidebar/modules/block.tsx +++ b/apps/web/core/components/gantt-chart/sidebar/modules/block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // Plane import { Row } from "@plane/ui"; diff --git a/apps/web/core/components/gantt-chart/sidebar/modules/index.ts b/apps/web/core/components/gantt-chart/sidebar/modules/index.ts index 01acaeffb1..1f9c99db0c 100644 --- a/apps/web/core/components/gantt-chart/sidebar/modules/index.ts +++ b/apps/web/core/components/gantt-chart/sidebar/modules/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./sidebar"; diff --git a/apps/web/core/components/gantt-chart/sidebar/modules/sidebar.tsx b/apps/web/core/components/gantt-chart/sidebar/modules/sidebar.tsx index 1e8373f57c..0bfaa7c80b 100644 --- a/apps/web/core/components/gantt-chart/sidebar/modules/sidebar.tsx +++ b/apps/web/core/components/gantt-chart/sidebar/modules/sidebar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // ui import { GANTT_TIMELINE_TYPE } from "@plane/types"; diff --git a/apps/web/core/components/gantt-chart/sidebar/root.tsx b/apps/web/core/components/gantt-chart/sidebar/root.tsx index 4235db09f9..21d3837234 100644 --- a/apps/web/core/components/gantt-chart/sidebar/root.tsx +++ b/apps/web/core/components/gantt-chart/sidebar/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { RefObject } from "react"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/gantt-chart/sidebar/utils.ts b/apps/web/core/components/gantt-chart/sidebar/utils.ts index 1130fd389d..6844316867 100644 --- a/apps/web/core/components/gantt-chart/sidebar/utils.ts +++ b/apps/web/core/components/gantt-chart/sidebar/utils.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ChartDataType, IBlockUpdateData, IGanttBlock } from "@plane/types"; export const handleOrderChange = ( diff --git a/apps/web/core/components/gantt-chart/views/helpers.ts b/apps/web/core/components/gantt-chart/views/helpers.ts index 3a603f70bd..5d02405873 100644 --- a/apps/web/core/components/gantt-chart/views/helpers.ts +++ b/apps/web/core/components/gantt-chart/views/helpers.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ChartDataType, IGanttBlock } from "@plane/types"; import { addDaysToDate, findTotalDaysInRange, getDate } from "@plane/utils"; import { DEFAULT_BLOCK_WIDTH } from "../constants"; diff --git a/apps/web/core/components/gantt-chart/views/index.ts b/apps/web/core/components/gantt-chart/views/index.ts index 8a4835739c..1e94dbfe97 100644 --- a/apps/web/core/components/gantt-chart/views/index.ts +++ b/apps/web/core/components/gantt-chart/views/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./week-view"; export * from "./month-view"; export * from "./quarter-view"; diff --git a/apps/web/core/components/gantt-chart/views/month-view.ts b/apps/web/core/components/gantt-chart/views/month-view.ts index ffd12d9e9b..3b3f507345 100644 --- a/apps/web/core/components/gantt-chart/views/month-view.ts +++ b/apps/web/core/components/gantt-chart/views/month-view.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { cloneDeep, uniqBy } from "lodash-es"; // plane imports import type { ChartDataType } from "@plane/types"; diff --git a/apps/web/core/components/gantt-chart/views/quarter-view.ts b/apps/web/core/components/gantt-chart/views/quarter-view.ts index ab307dee30..95f99128ac 100644 --- a/apps/web/core/components/gantt-chart/views/quarter-view.ts +++ b/apps/web/core/components/gantt-chart/views/quarter-view.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // import type { ChartDataType } from "@plane/types"; import { quarters } from "../data"; diff --git a/apps/web/core/components/gantt-chart/views/week-view.ts b/apps/web/core/components/gantt-chart/views/week-view.ts index f50afeeae1..a94ffab14e 100644 --- a/apps/web/core/components/gantt-chart/views/week-view.ts +++ b/apps/web/core/components/gantt-chart/views/week-view.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // import type { ChartDataType } from "@plane/types"; import { EStartOfTheWeek } from "@plane/types"; diff --git a/apps/web/core/components/global/chat-support-modal.tsx b/apps/web/core/components/global/chat-support-modal.tsx index 75c6c10ad1..5956c5e8f3 100644 --- a/apps/web/core/components/global/chat-support-modal.tsx +++ b/apps/web/core/components/global/chat-support-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { Intercom, shutdown, show } from "@intercom/messenger-js-sdk"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/global/index.ts b/apps/web/core/components/global/index.ts index bb0ffcec8a..32e2d4a18a 100644 --- a/apps/web/core/components/global/index.ts +++ b/apps/web/core/components/global/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./product-updates"; export * from "./timezone-select"; diff --git a/apps/web/core/components/global/product-updates/fallback.tsx b/apps/web/core/components/global/product-updates/fallback.tsx index ac865f437e..57ed75f958 100644 --- a/apps/web/core/components/global/product-updates/fallback.tsx +++ b/apps/web/core/components/global/product-updates/fallback.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { EmptyStateDetailed } from "@plane/propel/empty-state"; type TProductUpdatesFallbackProps = { diff --git a/apps/web/core/components/global/product-updates/footer.tsx b/apps/web/core/components/global/product-updates/footer.tsx index 2e88607a95..daf9a20f4f 100644 --- a/apps/web/core/components/global/product-updates/footer.tsx +++ b/apps/web/core/components/global/product-updates/footer.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { USER_TRACKER_ELEMENTS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; // ui diff --git a/apps/web/core/components/global/product-updates/index.ts b/apps/web/core/components/global/product-updates/index.ts index 6886b55038..b9ae9c0117 100644 --- a/apps/web/core/components/global/product-updates/index.ts +++ b/apps/web/core/components/global/product-updates/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./modal"; export * from "./footer"; diff --git a/apps/web/core/components/global/product-updates/modal.tsx b/apps/web/core/components/global/product-updates/modal.tsx index ef3f7540da..8239769c69 100644 --- a/apps/web/core/components/global/product-updates/modal.tsx +++ b/apps/web/core/components/global/product-updates/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // ui import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui"; diff --git a/apps/web/core/components/global/timezone-select.tsx b/apps/web/core/components/global/timezone-select.tsx index 59f3285e75..a4d692a557 100644 --- a/apps/web/core/components/global/timezone-select.tsx +++ b/apps/web/core/components/global/timezone-select.tsx @@ -1,5 +1,11 @@ -import type { FC } from "react"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; +// plane imports import { CustomSearchSelect } from "@plane/ui"; import { cn } from "@plane/utils"; // hooks @@ -38,13 +44,14 @@ export const TimezoneSelect = observer(function TimezoneSelect(props: TTimezoneS label={value && selectedValue ? selectedValue(value) : label} options={isDisabled || disabled ? [] : timezones} onChange={onChange} - buttonClassName={cn(buttonClassName, { + buttonClassName={cn(buttonClassName, "border border-subtle-1", { "border-danger-strong": error, })} - className={cn("rounded-md border-[0.5px] !border-subtle", className)} + className={cn("rounded-md", className)} optionsClassName={cn("w-72", optionsClassName)} input disabled={isDisabled || disabled} + placement="bottom-end" />
); diff --git a/apps/web/core/components/home/home-dashboard-widgets.tsx b/apps/web/core/components/home/home-dashboard-widgets.tsx index 40f3f59da2..5cc635dfe4 100644 --- a/apps/web/core/components/home/home-dashboard-widgets.tsx +++ b/apps/web/core/components/home/home-dashboard-widgets.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams, usePathname } from "next/navigation"; import { useTheme } from "next-themes"; diff --git a/apps/web/core/components/home/index.ts b/apps/web/core/components/home/index.ts index 09005cb24a..696c86c92e 100644 --- a/apps/web/core/components/home/index.ts +++ b/apps/web/core/components/home/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./widgets"; export * from "./home-dashboard-widgets"; export * from "./root"; diff --git a/apps/web/core/components/home/root.tsx b/apps/web/core/components/home/root.tsx index 8735e8812b..6473c35c1e 100644 --- a/apps/web/core/components/home/root.tsx +++ b/apps/web/core/components/home/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import useSWR from "swr"; diff --git a/apps/web/core/components/home/user-greetings.tsx b/apps/web/core/components/home/user-greetings.tsx index 5c46d7e1d9..170da6c1bb 100644 --- a/apps/web/core/components/home/user-greetings.tsx +++ b/apps/web/core/components/home/user-greetings.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; // plane types import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/home/widgets/empty-states/index.ts b/apps/web/core/components/home/widgets/empty-states/index.ts index 72b042924d..2300b912a1 100644 --- a/apps/web/core/components/home/widgets/empty-states/index.ts +++ b/apps/web/core/components/home/widgets/empty-states/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./links"; export * from "./no-projects"; export * from "./recents"; diff --git a/apps/web/core/components/home/widgets/empty-states/links.tsx b/apps/web/core/components/home/widgets/empty-states/links.tsx index 05e93db936..a881ad5c2f 100644 --- a/apps/web/core/components/home/widgets/empty-states/links.tsx +++ b/apps/web/core/components/home/widgets/empty-states/links.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTranslation } from "@plane/i18n"; import { EmptyStateCompact } from "@plane/propel/empty-state"; diff --git a/apps/web/core/components/home/widgets/empty-states/no-projects.tsx b/apps/web/core/components/home/widgets/empty-states/no-projects.tsx index fe4384cb7e..9b11d0a538 100644 --- a/apps/web/core/components/home/widgets/empty-states/no-projects.tsx +++ b/apps/web/core/components/home/widgets/empty-states/no-projects.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // mobx import { observer } from "mobx-react"; @@ -108,7 +114,7 @@ export const NoProjectsEmptyState = observer(function NoProjectsEmptyState() { flag: "visited_profile", cta: { text: "home.empty.personalize_account.cta", - link: `/${workspaceSlug}/settings/account`, + link: `/settings/profile/general`, disabled: false, }, }, diff --git a/apps/web/core/components/home/widgets/empty-states/recents.tsx b/apps/web/core/components/home/widgets/empty-states/recents.tsx index 02cb744fb8..eec43c25ed 100644 --- a/apps/web/core/components/home/widgets/empty-states/recents.tsx +++ b/apps/web/core/components/home/widgets/empty-states/recents.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTranslation } from "@plane/i18n"; import { EmptyStateCompact } from "@plane/propel/empty-state"; import type { CompactAssetType } from "@plane/propel/empty-state"; diff --git a/apps/web/core/components/home/widgets/empty-states/stickies.tsx b/apps/web/core/components/home/widgets/empty-states/stickies.tsx index d6b2e1d186..5ccf408274 100644 --- a/apps/web/core/components/home/widgets/empty-states/stickies.tsx +++ b/apps/web/core/components/home/widgets/empty-states/stickies.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTranslation } from "@plane/i18n"; import { EmptyStateCompact } from "@plane/propel/empty-state"; diff --git a/apps/web/core/components/home/widgets/index.ts b/apps/web/core/components/home/widgets/index.ts index 038e42ff1b..18e0accce9 100644 --- a/apps/web/core/components/home/widgets/index.ts +++ b/apps/web/core/components/home/widgets/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./empty-states"; export * from "./loaders"; export * from "./recents"; diff --git a/apps/web/core/components/home/widgets/links/action.tsx b/apps/web/core/components/home/widgets/links/action.tsx index 0b3f4b6e09..37a85db4b6 100644 --- a/apps/web/core/components/home/widgets/links/action.tsx +++ b/apps/web/core/components/home/widgets/links/action.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTranslation } from "@plane/i18n"; import { PlusIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/home/widgets/links/create-update-link-modal.tsx b/apps/web/core/components/home/widgets/links/create-update-link-modal.tsx index f412b6e754..04b351b1f9 100644 --- a/apps/web/core/components/home/widgets/links/create-update-link-modal.tsx +++ b/apps/web/core/components/home/widgets/links/create-update-link-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useEffect } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/home/widgets/links/index.ts b/apps/web/core/components/home/widgets/links/index.ts index 380f7763c1..a8215b5b25 100644 --- a/apps/web/core/components/home/widgets/links/index.ts +++ b/apps/web/core/components/home/widgets/links/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; export * from "./links"; export * from "./link-detail"; diff --git a/apps/web/core/components/home/widgets/links/link-detail.tsx b/apps/web/core/components/home/widgets/links/link-detail.tsx index 26bb203708..e2a7bc7274 100644 --- a/apps/web/core/components/home/widgets/links/link-detail.tsx +++ b/apps/web/core/components/home/widgets/links/link-detail.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/home/widgets/links/links.tsx b/apps/web/core/components/home/widgets/links/links.tsx index e0a533a6a5..874340160a 100644 --- a/apps/web/core/components/home/widgets/links/links.tsx +++ b/apps/web/core/components/home/widgets/links/links.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // computed diff --git a/apps/web/core/components/home/widgets/links/root.tsx b/apps/web/core/components/home/widgets/links/root.tsx index 8e02c3a2c7..ac8fe40c2b 100644 --- a/apps/web/core/components/home/widgets/links/root.tsx +++ b/apps/web/core/components/home/widgets/links/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; diff --git a/apps/web/core/components/home/widgets/links/use-links.tsx b/apps/web/core/components/home/widgets/links/use-links.tsx index 4413258755..72da254219 100644 --- a/apps/web/core/components/home/widgets/links/use-links.tsx +++ b/apps/web/core/components/home/widgets/links/use-links.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { useTranslation } from "@plane/i18n"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; diff --git a/apps/web/core/components/home/widgets/loaders/home-loader.tsx b/apps/web/core/components/home/widgets/loaders/home-loader.tsx index 220f3c2f3c..61a57356cf 100644 --- a/apps/web/core/components/home/widgets/loaders/home-loader.tsx +++ b/apps/web/core/components/home/widgets/loaders/home-loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { range } from "lodash-es"; // ui import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/home/widgets/loaders/index.ts b/apps/web/core/components/home/widgets/loaders/index.ts index a0925eccdf..1ea5354505 100644 --- a/apps/web/core/components/home/widgets/loaders/index.ts +++ b/apps/web/core/components/home/widgets/loaders/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./loader"; export * from "./home-loader"; diff --git a/apps/web/core/components/home/widgets/loaders/loader.tsx b/apps/web/core/components/home/widgets/loaders/loader.tsx index 75b87daf00..afdfe3834c 100644 --- a/apps/web/core/components/home/widgets/loaders/loader.tsx +++ b/apps/web/core/components/home/widgets/loaders/loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import { QuickLinksWidgetLoader } from "./quick-links"; import { RecentActivityWidgetLoader } from "./recent-activity"; diff --git a/apps/web/core/components/home/widgets/loaders/quick-links.tsx b/apps/web/core/components/home/widgets/loaders/quick-links.tsx index 08915ce6b5..3745a003ca 100644 --- a/apps/web/core/components/home/widgets/loaders/quick-links.tsx +++ b/apps/web/core/components/home/widgets/loaders/quick-links.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { range } from "lodash-es"; // ui import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/home/widgets/loaders/recent-activity.tsx b/apps/web/core/components/home/widgets/loaders/recent-activity.tsx index 96a73679bc..337e34df97 100644 --- a/apps/web/core/components/home/widgets/loaders/recent-activity.tsx +++ b/apps/web/core/components/home/widgets/loaders/recent-activity.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { range } from "lodash-es"; // ui import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/home/widgets/manage/index.tsx b/apps/web/core/components/home/widgets/manage/index.tsx index b0b2939460..912b3ed7c8 100644 --- a/apps/web/core/components/home/widgets/manage/index.tsx +++ b/apps/web/core/components/home/widgets/manage/index.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // plane types diff --git a/apps/web/core/components/home/widgets/manage/widget-item-drag-handle.tsx b/apps/web/core/components/home/widgets/manage/widget-item-drag-handle.tsx index ac898f62db..40bbf3723f 100644 --- a/apps/web/core/components/home/widgets/manage/widget-item-drag-handle.tsx +++ b/apps/web/core/components/home/widgets/manage/widget-item-drag-handle.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/home/widgets/manage/widget-item.tsx b/apps/web/core/components/home/widgets/manage/widget-item.tsx index f42384cfd5..320cf29314 100644 --- a/apps/web/core/components/home/widgets/manage/widget-item.tsx +++ b/apps/web/core/components/home/widgets/manage/widget-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; diff --git a/apps/web/core/components/home/widgets/manage/widget-list.tsx b/apps/web/core/components/home/widgets/manage/widget-list.tsx index 0fdec3a534..972c7691b6 100644 --- a/apps/web/core/components/home/widgets/manage/widget-list.tsx +++ b/apps/web/core/components/home/widgets/manage/widget-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { DragLocationHistory, DropTargetRecord, diff --git a/apps/web/core/components/home/widgets/manage/widget.helpers.ts b/apps/web/core/components/home/widgets/manage/widget.helpers.ts index e9429e13e6..1f25a7bb7a 100644 --- a/apps/web/core/components/home/widgets/manage/widget.helpers.ts +++ b/apps/web/core/components/home/widgets/manage/widget.helpers.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item"; import type { InstructionType, IPragmaticPayloadLocation, TDropTarget, TWidgetEntityData } from "@plane/types"; diff --git a/apps/web/core/components/home/widgets/recents/filters.tsx b/apps/web/core/components/home/widgets/recents/filters.tsx index febd4b3066..d383ec94bc 100644 --- a/apps/web/core/components/home/widgets/recents/filters.tsx +++ b/apps/web/core/components/home/widgets/recents/filters.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/home/widgets/recents/index.tsx b/apps/web/core/components/home/widgets/recents/index.tsx index e1331ede0a..988f079a17 100644 --- a/apps/web/core/components/home/widgets/recents/index.tsx +++ b/apps/web/core/components/home/widgets/recents/index.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef, useState } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; @@ -9,7 +15,7 @@ import type { TActivityEntityData, THomeWidgetProps, TRecentActivityFilterKeys } // components import { ContentOverflowWrapper } from "@/components/core/content-overflow-HOC"; // plane web services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; import { RecentsEmptyState } from "../empty-states"; import { EWidgetKeys, WidgetLoader } from "../loaders"; import { FiltersDropdown } from "./filters"; diff --git a/apps/web/core/components/home/widgets/recents/issue.tsx b/apps/web/core/components/home/widgets/recents/issue.tsx index 4bee13bdf5..13811be9a3 100644 --- a/apps/web/core/components/home/widgets/recents/issue.tsx +++ b/apps/web/core/components/home/widgets/recents/issue.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import { PriorityIcon, StateGroupIcon, WorkItemsIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/home/widgets/recents/page.tsx b/apps/web/core/components/home/widgets/recents/page.tsx index 8235bb3a65..48a7516973 100644 --- a/apps/web/core/components/home/widgets/recents/page.tsx +++ b/apps/web/core/components/home/widgets/recents/page.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRouter } from "next/navigation"; import { Logo } from "@plane/propel/emoji-icon-picker"; import { PageIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/home/widgets/recents/project.tsx b/apps/web/core/components/home/widgets/recents/project.tsx index 4397f77c48..af00d4c11a 100644 --- a/apps/web/core/components/home/widgets/recents/project.tsx +++ b/apps/web/core/components/home/widgets/recents/project.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRouter } from "next/navigation"; // plane types import { Logo } from "@plane/propel/emoji-icon-picker"; diff --git a/apps/web/core/components/icons/attachment/attachment-icon.tsx b/apps/web/core/components/icons/attachment/attachment-icon.tsx index e21ae88937..dcbf652cd8 100644 --- a/apps/web/core/components/icons/attachment/attachment-icon.tsx +++ b/apps/web/core/components/icons/attachment/attachment-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { AudioIcon, CssIcon, diff --git a/apps/web/core/components/icons/attachment/audio-file-icon.tsx b/apps/web/core/components/icons/attachment/audio-file-icon.tsx index d8e893b8cf..0cb2b87509 100644 --- a/apps/web/core/components/icons/attachment/audio-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/audio-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import AudioFileIcon from "@/app/assets/attachment/audio-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/css-file-icon.tsx b/apps/web/core/components/icons/attachment/css-file-icon.tsx index 7f6f27c16f..662d6c08c0 100644 --- a/apps/web/core/components/icons/attachment/css-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/css-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import CssFileIcon from "@/app/assets/attachment/css-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/csv-file-icon.tsx b/apps/web/core/components/icons/attachment/csv-file-icon.tsx index 2856575b1d..b770314b39 100644 --- a/apps/web/core/components/icons/attachment/csv-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/csv-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import CSVFileIcon from "@/app/assets/attachment/csv-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/default-file-icon.tsx b/apps/web/core/components/icons/attachment/default-file-icon.tsx index fac931af93..fb7e5d8514 100644 --- a/apps/web/core/components/icons/attachment/default-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/default-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import DefaultFileIcon from "@/app/assets/attachment/default-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/doc-file-icon.tsx b/apps/web/core/components/icons/attachment/doc-file-icon.tsx index 2f8c174eec..23982ffd37 100644 --- a/apps/web/core/components/icons/attachment/doc-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/doc-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import DocFileIcon from "@/app/assets/attachment/doc-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/document-icon.tsx b/apps/web/core/components/icons/attachment/document-icon.tsx index aeccb9f648..d1518edb30 100644 --- a/apps/web/core/components/icons/attachment/document-icon.tsx +++ b/apps/web/core/components/icons/attachment/document-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import type { Props } from "../types"; diff --git a/apps/web/core/components/icons/attachment/figma-file-icon.tsx b/apps/web/core/components/icons/attachment/figma-file-icon.tsx index a88fb8e607..3efbdad307 100644 --- a/apps/web/core/components/icons/attachment/figma-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/figma-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import FigmaFileIcon from "@/app/assets/attachment/figma-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/html-file-icon.tsx b/apps/web/core/components/icons/attachment/html-file-icon.tsx index 1f82f0761b..37b0347046 100644 --- a/apps/web/core/components/icons/attachment/html-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/html-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import HtmlFileIcon from "@/app/assets/attachment/html-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/img-file-icon.tsx b/apps/web/core/components/icons/attachment/img-file-icon.tsx index 93055cd8a8..077b8aefc2 100644 --- a/apps/web/core/components/icons/attachment/img-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/img-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import ImgFileIcon from "@/app/assets/attachment/img-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/index.ts b/apps/web/core/components/icons/attachment/index.ts index a2c65ceef1..b56265b834 100644 --- a/apps/web/core/components/icons/attachment/index.ts +++ b/apps/web/core/components/icons/attachment/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./attachment-icon"; export * from "./audio-file-icon"; export * from "./css-file-icon"; diff --git a/apps/web/core/components/icons/attachment/jpg-file-icon.tsx b/apps/web/core/components/icons/attachment/jpg-file-icon.tsx index 88118585a4..5ab72faba2 100644 --- a/apps/web/core/components/icons/attachment/jpg-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/jpg-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import JpgFileIcon from "@/app/assets/attachment/jpg-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/js-file-icon.tsx b/apps/web/core/components/icons/attachment/js-file-icon.tsx index 5bfadeee32..e35827b144 100644 --- a/apps/web/core/components/icons/attachment/js-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/js-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import JsFileIcon from "@/app/assets/attachment/js-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/pdf-file-icon.tsx b/apps/web/core/components/icons/attachment/pdf-file-icon.tsx index 84ef4cff25..449fa6efd0 100644 --- a/apps/web/core/components/icons/attachment/pdf-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/pdf-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import PDFFileIcon from "@/app/assets/attachment/pdf-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/png-file-icon.tsx b/apps/web/core/components/icons/attachment/png-file-icon.tsx index fd294addaa..4346141e29 100644 --- a/apps/web/core/components/icons/attachment/png-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/png-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import PngFileIcon from "@/app/assets/attachment/png-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/rar-file-icon.tsx b/apps/web/core/components/icons/attachment/rar-file-icon.tsx index 6e813520bc..50f75e36e6 100644 --- a/apps/web/core/components/icons/attachment/rar-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/rar-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import RarFileIcon from "@/app/assets/attachment/rar-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/setting-icon.tsx b/apps/web/core/components/icons/attachment/setting-icon.tsx index aedcc87bb9..3842e88035 100644 --- a/apps/web/core/components/icons/attachment/setting-icon.tsx +++ b/apps/web/core/components/icons/attachment/setting-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import type { Props } from "../types"; diff --git a/apps/web/core/components/icons/attachment/sheet-file-icon.tsx b/apps/web/core/components/icons/attachment/sheet-file-icon.tsx index e78beb1dfd..1881ccb72e 100644 --- a/apps/web/core/components/icons/attachment/sheet-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/sheet-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import SheetFileIcon from "@/app/assets/attachment/excel-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/svg-file-icon.tsx b/apps/web/core/components/icons/attachment/svg-file-icon.tsx index 56541e5255..e603afde90 100644 --- a/apps/web/core/components/icons/attachment/svg-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/svg-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import SvgFileIcon from "@/app/assets/attachment/svg-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/tune-icon.tsx b/apps/web/core/components/icons/attachment/tune-icon.tsx index ef3d439d61..3574729341 100644 --- a/apps/web/core/components/icons/attachment/tune-icon.tsx +++ b/apps/web/core/components/icons/attachment/tune-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import type { Props } from "../types"; diff --git a/apps/web/core/components/icons/attachment/txt-file-icon.tsx b/apps/web/core/components/icons/attachment/txt-file-icon.tsx index c1b2033671..c7fb36d954 100644 --- a/apps/web/core/components/icons/attachment/txt-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/txt-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import TxtFileIcon from "@/app/assets/attachment/txt-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/video-file-icon.tsx b/apps/web/core/components/icons/attachment/video-file-icon.tsx index 9d201ae088..e67ab6c393 100644 --- a/apps/web/core/components/icons/attachment/video-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/video-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import VideoFileIcon from "@/app/assets/attachment/video-icon.png?url"; diff --git a/apps/web/core/components/icons/attachment/zip-file-icon.tsx b/apps/web/core/components/icons/attachment/zip-file-icon.tsx index 787eede55b..2d7a88a067 100644 --- a/apps/web/core/components/icons/attachment/zip-file-icon.tsx +++ b/apps/web/core/components/icons/attachment/zip-file-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // image import ZipFileIcon from "@/app/assets/attachment/zip-icon.png?url"; diff --git a/apps/web/core/components/icons/index.ts b/apps/web/core/components/icons/index.ts index 9f9f388606..32ce7e5a6c 100644 --- a/apps/web/core/components/icons/index.ts +++ b/apps/web/core/components/icons/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./attachment"; diff --git a/apps/web/core/components/icons/locked-component.tsx b/apps/web/core/components/icons/locked-component.tsx index 8c32fa437d..d98984f19c 100644 --- a/apps/web/core/components/icons/locked-component.tsx +++ b/apps/web/core/components/icons/locked-component.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { LockIcon } from "@plane/propel/icons"; import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/inbox/content/inbox-issue-header.tsx b/apps/web/core/components/inbox/content/inbox-issue-header.tsx index f326186f10..f89e460508 100644 --- a/apps/web/core/components/inbox/content/inbox-issue-header.tsx +++ b/apps/web/core/components/inbox/content/inbox-issue-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useCallback, useEffect, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/inbox/content/inbox-issue-mobile-header.tsx b/apps/web/core/components/inbox/content/inbox-issue-mobile-header.tsx index 8b8439e7ad..67f4f72659 100644 --- a/apps/web/core/components/inbox/content/inbox-issue-mobile-header.tsx +++ b/apps/web/core/components/inbox/content/inbox-issue-mobile-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { CircleCheck, CircleX, Clock, FileStack, PanelLeft, MoveRight } from "lucide-react"; diff --git a/apps/web/core/components/inbox/content/index.ts b/apps/web/core/components/inbox/content/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/inbox/content/index.ts +++ b/apps/web/core/components/inbox/content/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/inbox/content/issue-properties.tsx b/apps/web/core/components/inbox/content/issue-properties.tsx index c9d1419777..91916518f0 100644 --- a/apps/web/core/components/inbox/content/issue-properties.tsx +++ b/apps/web/core/components/inbox/content/issue-properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { StatePropertyIcon, diff --git a/apps/web/core/components/inbox/content/issue-root.tsx b/apps/web/core/components/inbox/content/issue-root.tsx index c09dc192f2..530c7c3abd 100644 --- a/apps/web/core/components/inbox/content/issue-root.tsx +++ b/apps/web/core/components/inbox/content/issue-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Dispatch, SetStateAction } from "react"; import { useEffect, useMemo, useRef } from "react"; import { observer } from "mobx-react"; @@ -179,7 +185,6 @@ export const InboxIssueMainContent = observer(function InboxIssueMainContent(pro }} projectId={issue.project_id} setIsSubmitting={(value) => setIsSubmitting(value)} - swrDescription={issue.description_html ?? "

"} workspaceSlug={workspaceSlug} /> )} diff --git a/apps/web/core/components/inbox/content/root.tsx b/apps/web/core/components/inbox/content/root.tsx index f330f64689..3de80d4c41 100644 --- a/apps/web/core/components/inbox/content/root.tsx +++ b/apps/web/core/components/inbox/content/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; diff --git a/apps/web/core/components/inbox/inbox-filter/applied-filters/date.tsx b/apps/web/core/components/inbox/inbox-filter/applied-filters/date.tsx index ae02289552..d076829b16 100644 --- a/apps/web/core/components/inbox/inbox-filter/applied-filters/date.tsx +++ b/apps/web/core/components/inbox/inbox-filter/applied-filters/date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { PAST_DURATION_FILTER_OPTIONS } from "@plane/constants"; diff --git a/apps/web/core/components/inbox/inbox-filter/applied-filters/label.tsx b/apps/web/core/components/inbox/inbox-filter/applied-filters/label.tsx index 592226227f..8231a00114 100644 --- a/apps/web/core/components/inbox/inbox-filter/applied-filters/label.tsx +++ b/apps/web/core/components/inbox/inbox-filter/applied-filters/label.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // hooks diff --git a/apps/web/core/components/inbox/inbox-filter/applied-filters/member.tsx b/apps/web/core/components/inbox/inbox-filter/applied-filters/member.tsx index 11ef82db7f..335a69def5 100644 --- a/apps/web/core/components/inbox/inbox-filter/applied-filters/member.tsx +++ b/apps/web/core/components/inbox/inbox-filter/applied-filters/member.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/inbox/inbox-filter/applied-filters/priority.tsx b/apps/web/core/components/inbox/inbox-filter/applied-filters/priority.tsx index 18339b9cf1..f910f08a95 100644 --- a/apps/web/core/components/inbox/inbox-filter/applied-filters/priority.tsx +++ b/apps/web/core/components/inbox/inbox-filter/applied-filters/priority.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { ISSUE_PRIORITIES } from "@plane/constants"; diff --git a/apps/web/core/components/inbox/inbox-filter/applied-filters/root.tsx b/apps/web/core/components/inbox/inbox-filter/applied-filters/root.tsx index bf33b282eb..29b158d106 100644 --- a/apps/web/core/components/inbox/inbox-filter/applied-filters/root.tsx +++ b/apps/web/core/components/inbox/inbox-filter/applied-filters/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/inbox/inbox-filter/applied-filters/state.tsx b/apps/web/core/components/inbox/inbox-filter/applied-filters/state.tsx index 86450c6093..a7b8ae0b2f 100644 --- a/apps/web/core/components/inbox/inbox-filter/applied-filters/state.tsx +++ b/apps/web/core/components/inbox/inbox-filter/applied-filters/state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { EIconSize } from "@plane/constants"; diff --git a/apps/web/core/components/inbox/inbox-filter/applied-filters/status.tsx b/apps/web/core/components/inbox/inbox-filter/applied-filters/status.tsx index 6c07b4ad43..889b0b62b8 100644 --- a/apps/web/core/components/inbox/inbox-filter/applied-filters/status.tsx +++ b/apps/web/core/components/inbox/inbox-filter/applied-filters/status.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { INBOX_STATUS } from "@plane/constants"; diff --git a/apps/web/core/components/inbox/inbox-filter/filters/date.tsx b/apps/web/core/components/inbox/inbox-filter/filters/date.tsx index 135aee2a20..e817c06ab4 100644 --- a/apps/web/core/components/inbox/inbox-filter/filters/date.tsx +++ b/apps/web/core/components/inbox/inbox-filter/filters/date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { concat, uniq } from "lodash-es"; diff --git a/apps/web/core/components/inbox/inbox-filter/filters/filter-selection.tsx b/apps/web/core/components/inbox/inbox-filter/filters/filter-selection.tsx index fbfe55fc61..eb1fe2a615 100644 --- a/apps/web/core/components/inbox/inbox-filter/filters/filter-selection.tsx +++ b/apps/web/core/components/inbox/inbox-filter/filters/filter-selection.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/inbox/inbox-filter/filters/labels.tsx b/apps/web/core/components/inbox/inbox-filter/filters/labels.tsx index 7d7884c26b..5fb9fdf1d5 100644 --- a/apps/web/core/components/inbox/inbox-filter/filters/labels.tsx +++ b/apps/web/core/components/inbox/inbox-filter/filters/labels.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/inbox/inbox-filter/filters/members.tsx b/apps/web/core/components/inbox/inbox-filter/filters/members.tsx index a9831be68e..505b220b36 100644 --- a/apps/web/core/components/inbox/inbox-filter/filters/members.tsx +++ b/apps/web/core/components/inbox/inbox-filter/filters/members.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; diff --git a/apps/web/core/components/inbox/inbox-filter/filters/priority.tsx b/apps/web/core/components/inbox/inbox-filter/filters/priority.tsx index ca5b8b6b08..8036dddbc7 100644 --- a/apps/web/core/components/inbox/inbox-filter/filters/priority.tsx +++ b/apps/web/core/components/inbox/inbox-filter/filters/priority.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/inbox/inbox-filter/filters/state.tsx b/apps/web/core/components/inbox/inbox-filter/filters/state.tsx index 147e402014..936c25757d 100644 --- a/apps/web/core/components/inbox/inbox-filter/filters/state.tsx +++ b/apps/web/core/components/inbox/inbox-filter/filters/state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/inbox/inbox-filter/filters/status.tsx b/apps/web/core/components/inbox/inbox-filter/filters/status.tsx index 0580667916..e042fc9fe7 100644 --- a/apps/web/core/components/inbox/inbox-filter/filters/status.tsx +++ b/apps/web/core/components/inbox/inbox-filter/filters/status.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/inbox/inbox-filter/index.ts b/apps/web/core/components/inbox/inbox-filter/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/inbox/inbox-filter/index.ts +++ b/apps/web/core/components/inbox/inbox-filter/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/inbox/inbox-filter/root.tsx b/apps/web/core/components/inbox/inbox-filter/root.tsx index 4130fb1e51..b9b1807178 100644 --- a/apps/web/core/components/inbox/inbox-filter/root.tsx +++ b/apps/web/core/components/inbox/inbox-filter/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { ListFilter } from "lucide-react"; import { getButtonStyling } from "@plane/propel/button"; diff --git a/apps/web/core/components/inbox/inbox-filter/sorting/order-by.tsx b/apps/web/core/components/inbox/inbox-filter/sorting/order-by.tsx index daa1093273..60e7c72f1b 100644 --- a/apps/web/core/components/inbox/inbox-filter/sorting/order-by.tsx +++ b/apps/web/core/components/inbox/inbox-filter/sorting/order-by.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { ArrowDownWideNarrow, ArrowUpWideNarrow } from "lucide-react"; diff --git a/apps/web/core/components/inbox/inbox-issue-status.tsx b/apps/web/core/components/inbox/inbox-issue-status.tsx index 8c93d7f299..57b05b6adf 100644 --- a/apps/web/core/components/inbox/inbox-issue-status.tsx +++ b/apps/web/core/components/inbox/inbox-issue-status.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // constants diff --git a/apps/web/core/components/inbox/inbox-status-icon.tsx b/apps/web/core/components/inbox/inbox-status-icon.tsx index 61450b6086..ed92f91dc6 100644 --- a/apps/web/core/components/inbox/inbox-status-icon.tsx +++ b/apps/web/core/components/inbox/inbox-status-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { AlertTriangle, CheckCircle2, Clock, XCircle } from "lucide-react"; import { CopyIcon } from "@plane/propel/icons"; import type { TInboxIssueStatus } from "@plane/types"; diff --git a/apps/web/core/components/inbox/index.ts b/apps/web/core/components/inbox/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/inbox/index.ts +++ b/apps/web/core/components/inbox/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/inbox/modals/create-modal/create-root.tsx b/apps/web/core/components/inbox/modals/create-modal/create-root.tsx index 059a4d2f78..ad02e18cd0 100644 --- a/apps/web/core/components/inbox/modals/create-modal/create-root.tsx +++ b/apps/web/core/components/inbox/modals/create-modal/create-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FormEvent } from "react"; import { useCallback, useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/inbox/modals/create-modal/index.ts b/apps/web/core/components/inbox/modals/create-modal/index.ts index 031608e25f..dd65a9ec34 100644 --- a/apps/web/core/components/inbox/modals/create-modal/index.ts +++ b/apps/web/core/components/inbox/modals/create-modal/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./modal"; diff --git a/apps/web/core/components/inbox/modals/create-modal/issue-description.tsx b/apps/web/core/components/inbox/modals/create-modal/issue-description.tsx index d17acd2a14..f67f9b25d4 100644 --- a/apps/web/core/components/inbox/modals/create-modal/issue-description.tsx +++ b/apps/web/core/components/inbox/modals/create-modal/issue-description.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC, RefObject } from "react"; import { observer } from "mobx-react"; // plane imports @@ -15,7 +21,7 @@ import { useEditorAsset } from "@/hooks/store/use-editor-asset"; import { useProjectInbox } from "@/hooks/store/use-project-inbox"; import { usePlatformOS } from "@/hooks/use-platform-os"; // services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; const workspaceService = new WorkspaceService(); diff --git a/apps/web/core/components/inbox/modals/create-modal/issue-properties.tsx b/apps/web/core/components/inbox/modals/create-modal/issue-properties.tsx index cb013c6bc9..f0f1e7bb0f 100644 --- a/apps/web/core/components/inbox/modals/create-modal/issue-properties.tsx +++ b/apps/web/core/components/inbox/modals/create-modal/issue-properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/inbox/modals/create-modal/issue-title.tsx b/apps/web/core/components/inbox/modals/create-modal/issue-title.tsx index 116d352af9..3c8c809ec9 100644 --- a/apps/web/core/components/inbox/modals/create-modal/issue-title.tsx +++ b/apps/web/core/components/inbox/modals/create-modal/issue-title.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/inbox/modals/create-modal/modal.tsx b/apps/web/core/components/inbox/modals/create-modal/modal.tsx index 9c3eff145f..267424f5d8 100644 --- a/apps/web/core/components/inbox/modals/create-modal/modal.tsx +++ b/apps/web/core/components/inbox/modals/create-modal/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; // plane imports diff --git a/apps/web/core/components/inbox/modals/decline-issue-modal.tsx b/apps/web/core/components/inbox/modals/decline-issue-modal.tsx index f0b3207eb8..10c516c831 100644 --- a/apps/web/core/components/inbox/modals/decline-issue-modal.tsx +++ b/apps/web/core/components/inbox/modals/decline-issue-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; // types import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/inbox/modals/delete-issue-modal.tsx b/apps/web/core/components/inbox/modals/delete-issue-modal.tsx index a90f1727be..88089cecbd 100644 --- a/apps/web/core/components/inbox/modals/delete-issue-modal.tsx +++ b/apps/web/core/components/inbox/modals/delete-issue-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // types diff --git a/apps/web/core/components/inbox/modals/select-duplicate.tsx b/apps/web/core/components/inbox/modals/select-duplicate.tsx index 22344aa9c9..3d3b9a6e10 100644 --- a/apps/web/core/components/inbox/modals/select-duplicate.tsx +++ b/apps/web/core/components/inbox/modals/select-duplicate.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { useParams } from "next/navigation"; import { useTheme } from "next-themes"; diff --git a/apps/web/core/components/inbox/modals/snooze-issue-modal.tsx b/apps/web/core/components/inbox/modals/snooze-issue-modal.tsx index 4f05552df9..708458efbb 100644 --- a/apps/web/core/components/inbox/modals/snooze-issue-modal.tsx +++ b/apps/web/core/components/inbox/modals/snooze-issue-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; // ui import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/inbox/root.tsx b/apps/web/core/components/inbox/root.tsx index 21ca11134c..18b6c9a5a5 100644 --- a/apps/web/core/components/inbox/root.tsx +++ b/apps/web/core/components/inbox/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { PanelLeft } from "lucide-react"; diff --git a/apps/web/core/components/inbox/sidebar/inbox-list-item.tsx b/apps/web/core/components/inbox/sidebar/inbox-list-item.tsx index 2bdf1c239d..3f7016cd2d 100644 --- a/apps/web/core/components/inbox/sidebar/inbox-list-item.tsx +++ b/apps/web/core/components/inbox/sidebar/inbox-list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC, MouseEvent } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; diff --git a/apps/web/core/components/inbox/sidebar/inbox-list.tsx b/apps/web/core/components/inbox/sidebar/inbox-list.tsx index 7cace3d50d..886171cda4 100644 --- a/apps/web/core/components/inbox/sidebar/inbox-list.tsx +++ b/apps/web/core/components/inbox/sidebar/inbox-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { Fragment } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/inbox/sidebar/index.ts b/apps/web/core/components/inbox/sidebar/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/inbox/sidebar/index.ts +++ b/apps/web/core/components/inbox/sidebar/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/inbox/sidebar/root.tsx b/apps/web/core/components/inbox/sidebar/root.tsx index 7d89f271d8..064604ffd4 100644 --- a/apps/web/core/components/inbox/sidebar/root.tsx +++ b/apps/web/core/components/inbox/sidebar/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/instance/index.ts b/apps/web/core/components/instance/index.ts index 43e76eba72..0b4b6ab363 100644 --- a/apps/web/core/components/instance/index.ts +++ b/apps/web/core/components/instance/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./not-ready-view"; export * from "./maintenance-view"; diff --git a/apps/web/core/components/instance/maintenance-view.tsx b/apps/web/core/components/instance/maintenance-view.tsx index d703ddd171..1e6ff3a5f2 100644 --- a/apps/web/core/components/instance/maintenance-view.tsx +++ b/apps/web/core/components/instance/maintenance-view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useTheme } from "next-themes"; // assets diff --git a/apps/web/core/components/instance/not-ready-view.tsx b/apps/web/core/components/instance/not-ready-view.tsx index 7bedc9fb86..98bb8b8af5 100644 --- a/apps/web/core/components/instance/not-ready-view.tsx +++ b/apps/web/core/components/instance/not-ready-view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import Link from "next/link"; import { useTheme } from "next-themes"; diff --git a/apps/web/core/components/integration/delete-import-modal.tsx b/apps/web/core/components/integration/delete-import-modal.tsx deleted file mode 100644 index c09b0feac8..0000000000 --- a/apps/web/core/components/integration/delete-import-modal.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { useState } from "react"; -import { useParams } from "next/navigation"; -import { mutate } from "swr"; -// icons -import { AlertTriangle } from "lucide-react"; -// services -import { Button } from "@plane/propel/button"; -import { TOAST_TYPE, setToast } from "@plane/propel/toast"; -import type { IUser, IImporterService } from "@plane/types"; -import { Input, EModalPosition, EModalWidth, ModalCore } from "@plane/ui"; -import { IMPORTER_SERVICES_LIST } from "@/constants/fetch-keys"; -import { IntegrationService } from "@/services/integrations/integration.service"; - -type Props = { - isOpen: boolean; - handleClose: () => void; - data: IImporterService | null; - user: IUser | null; -}; - -// services -const integrationService = new IntegrationService(); - -export function DeleteImportModal({ isOpen, handleClose, data }: Props) { - const [deleteLoading, setDeleteLoading] = useState(false); - const [confirmDeleteImport, setConfirmDeleteImport] = useState(false); - - const { workspaceSlug } = useParams(); - - const handleDeletion = () => { - if (!workspaceSlug || !data) return; - - setDeleteLoading(true); - - mutate( - IMPORTER_SERVICES_LIST(workspaceSlug), - (prevData) => (prevData ?? []).filter((i) => i.id !== data.id), - false - ); - - integrationService - .deleteImporterService(workspaceSlug, data.service, data.id) - .catch(() => - setToast({ - type: TOAST_TYPE.ERROR, - title: "Error!", - message: "Something went wrong. Please try again.", - }) - ) - .finally(() => { - setDeleteLoading(false); - handleClose(); - }); - }; - - if (!data) return <>; - - return ( - -
-
- - - -

Delete project

-
-
- -

- Are you sure you want to delete import from{" "} - {data?.service}? All of the data - related to the import will be permanently removed. This action cannot be undone. -

-
-
-

- To confirm, type delete import below: -

- { - if (e.target.value === "delete import") setConfirmDeleteImport(true); - else setConfirmDeleteImport(false); - }} - placeholder="Enter 'delete import'" - className="mt-2 w-full" - /> -
-
- - -
-
-
- ); -} diff --git a/apps/web/core/components/integration/github/auth.tsx b/apps/web/core/components/integration/github/auth.tsx deleted file mode 100644 index 60ed2e35fa..0000000000 --- a/apps/web/core/components/integration/github/auth.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { observer } from "mobx-react"; -// types -import { Button } from "@plane/propel/button"; -import type { IWorkspaceIntegration } from "@plane/types"; -// ui -// hooks -import { useInstance } from "@/hooks/store/use-instance"; -import useIntegrationPopup from "@/hooks/use-integration-popup"; - -type Props = { - workspaceIntegration: false | IWorkspaceIntegration | undefined; - provider: string | undefined; -}; - -export const GithubAuth = observer(function GithubAuth({ workspaceIntegration, provider }: Props) { - // store hooks - const { config } = useInstance(); - // hooks - const { startAuth, isConnecting } = useIntegrationPopup({ - provider, - github_app_name: config?.github_app_name || "", - slack_client_id: config?.slack_client_id || "", - }); - - return ( -
- {workspaceIntegration && workspaceIntegration?.id ? ( - - ) : ( - - )} -
- ); -}); diff --git a/apps/web/core/components/integration/github/import-configure.tsx b/apps/web/core/components/integration/github/import-configure.tsx deleted file mode 100644 index edcc316c6e..0000000000 --- a/apps/web/core/components/integration/github/import-configure.tsx +++ /dev/null @@ -1,50 +0,0 @@ -// components -import { Button } from "@plane/propel/button"; -import type { IAppIntegration, IWorkspaceIntegration } from "@plane/types"; -import type { TIntegrationSteps } from "@/components/integration"; -import { GithubAuth } from "@/components/integration"; -// types - -type Props = { - provider: string | undefined; - handleStepChange: (value: TIntegrationSteps) => void; - appIntegrations: IAppIntegration[] | undefined; - workspaceIntegrations: IWorkspaceIntegration[] | undefined; -}; - -export function GithubImportConfigure({ handleStepChange, provider, appIntegrations, workspaceIntegrations }: Props) { - // current integration from all the integrations available - const integration = - appIntegrations && appIntegrations.length > 0 && appIntegrations.find((i) => i.provider === provider); - - // current integration from workspace integrations - const workspaceIntegration = - integration && - workspaceIntegrations && - workspaceIntegrations.length > 0 && - workspaceIntegrations.find((i: any) => i.integration_detail.id === integration.id); - - return ( -
-
-
-
Configure
-
Set up your GitHub import.
-
-
- -
-
- -
- -
-
- ); -} diff --git a/apps/web/core/components/integration/github/import-confirm.tsx b/apps/web/core/components/integration/github/import-confirm.tsx deleted file mode 100644 index ba15e1a668..0000000000 --- a/apps/web/core/components/integration/github/import-confirm.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import type { FC } from "react"; - -// react-hook-form -import type { UseFormWatch } from "react-hook-form"; -// ui -import { Button } from "@plane/propel/button"; -// types -import type { TFormValues, TIntegrationSteps } from "@/components/integration"; - -type Props = { - handleStepChange: (value: TIntegrationSteps) => void; - watch: UseFormWatch; -}; - -export function GithubImportConfirm({ handleStepChange, watch }: Props) { - return ( -
-

- You are about to import work items from {watch("github").full_name}. Click on {'"'}Confirm & Import{'" '} - to complete the process. -

-
- - -
-
- ); -} diff --git a/apps/web/core/components/integration/github/import-data.tsx b/apps/web/core/components/integration/github/import-data.tsx deleted file mode 100644 index 83926e2d7f..0000000000 --- a/apps/web/core/components/integration/github/import-data.tsx +++ /dev/null @@ -1,121 +0,0 @@ -import type { FC } from "react"; -import { observer } from "mobx-react"; -import type { Control, UseFormWatch } from "react-hook-form"; -import { Controller } from "react-hook-form"; -import { Button } from "@plane/propel/button"; -import type { IWorkspaceIntegration } from "@plane/types"; -// hooks -// components -import { CustomSearchSelect, ToggleSwitch } from "@plane/ui"; -import { truncateText } from "@plane/utils"; -import type { TFormValues, TIntegrationSteps } from "@/components/integration"; -import { SelectRepository } from "@/components/integration"; -// ui -// helpers -import { useProject } from "@/hooks/store/use-project"; -// types - -type Props = { - handleStepChange: (value: TIntegrationSteps) => void; - integration: IWorkspaceIntegration | false | undefined; - control: Control; - watch: UseFormWatch; -}; - -export const GithubImportData = observer(function GithubImportData(props: Props) { - const { handleStepChange, integration, control, watch } = props; - // store hooks - const { workspaceProjectIds, getProjectById } = useProject(); - - const options = workspaceProjectIds?.map((projectId) => { - const projectDetails = getProjectById(projectId); - - return { - value: `${projectDetails?.id}`, - query: `${projectDetails?.name}`, - content:

{truncateText(projectDetails?.name ?? "", 25)}

, - }; - }); - - return ( -
-
-
-
-

Select Repository

-

- Select the repository that you want the work items to be imported from. -

-
-
- {integration && ( - ( - Select Repository} - onChange={onChange} - characterLimit={50} - /> - )} - /> - )} -
-
-
-
-

Select Project

-

Select the project to import the work item to.

-
-
- {workspaceProjectIds && ( - ( - Select Project} - onChange={onChange} - options={options} - optionsClassName="w-48" - /> - )} - /> - )} -
-
-
-
-

Sync work item

-

Set whether you want to sync the work items or not.

-
-
- ( - onChange(!value)} /> - )} - /> -
-
-
-
- - -
-
- ); -}); diff --git a/apps/web/core/components/integration/github/import-users.tsx b/apps/web/core/components/integration/github/import-users.tsx deleted file mode 100644 index 0e53aa3d75..0000000000 --- a/apps/web/core/components/integration/github/import-users.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import type { FC } from "react"; - -// react-hook-form -import type { UseFormWatch } from "react-hook-form"; -// ui -import { Button } from "@plane/propel/button"; -// types -import type { IUserDetails, TFormValues, TIntegrationSteps } from "@/components/integration"; -import { SingleUserSelect } from "@/components/integration"; - -type Props = { - handleStepChange: (value: TIntegrationSteps) => void; - users: IUserDetails[]; - setUsers: React.Dispatch>; - watch: UseFormWatch; -}; - -export function GithubImportUsers({ handleStepChange, users, setUsers, watch }: Props) { - const isInvalid = users.filter((u) => u.import !== false && u.email === "").length > 0; - - return ( -
-
-
-
Name
-
Import as...
-
{users.filter((u) => u.import !== false).length} users selected
-
-
- {watch("collaborators").map((collaborator, index) => ( - - ))} -
-
-
- - -
-
- ); -} diff --git a/apps/web/core/components/integration/github/index.ts b/apps/web/core/components/integration/github/index.ts deleted file mode 100644 index c215e9a0c5..0000000000 --- a/apps/web/core/components/integration/github/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from "./auth"; -export * from "./import-configure"; -export * from "./import-confirm"; -export * from "./import-data"; -export * from "./import-users"; -export * from "./repo-details"; -export * from "./root"; -export * from "./select-repository"; -export * from "./single-user-select"; diff --git a/apps/web/core/components/integration/github/repo-details.tsx b/apps/web/core/components/integration/github/repo-details.tsx deleted file mode 100644 index a04474075c..0000000000 --- a/apps/web/core/components/integration/github/repo-details.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import type { FC } from "react"; -import { useEffect } from "react"; - -import { useParams } from "next/navigation"; - -// react-hook-form -import type { UseFormSetValue } from "react-hook-form"; -import useSWR from "swr"; -// services -// ui -import { Button } from "@plane/propel/button"; -import { Loader } from "@plane/ui"; -// types -import type { IUserDetails, TFormValues, TIntegrationSteps } from "@/components/integration"; -// fetch-keys -import { GITHUB_REPOSITORY_INFO } from "@/constants/fetch-keys"; -import { GithubIntegrationService } from "@/services/integrations"; - -type Props = { - selectedRepo: any; - handleStepChange: (value: TIntegrationSteps) => void; - setUsers: React.Dispatch>; - setValue: UseFormSetValue; -}; - -// services -const githubIntegrationService = new GithubIntegrationService(); - -export function GithubRepoDetails({ selectedRepo, handleStepChange, setUsers, setValue }: Props) { - const { workspaceSlug } = useParams(); - - const { data: repoInfo } = useSWR( - workspaceSlug && selectedRepo ? GITHUB_REPOSITORY_INFO(workspaceSlug, selectedRepo.name) : null, - workspaceSlug && selectedRepo - ? () => - githubIntegrationService.getGithubRepoInfo(workspaceSlug, { - owner: selectedRepo.owner.login, - repo: selectedRepo.name, - }) - : null - ); - - useEffect(() => { - if (!repoInfo) return; - - setValue("collaborators", repoInfo.collaborators); - - const fetchedUsers = repoInfo.collaborators.map((collaborator) => ({ - username: collaborator.login, - import: "map", - email: "", - })); - setUsers(fetchedUsers); - }, [repoInfo, setUsers, setValue]); - - return ( -
- {repoInfo ? ( - repoInfo.issue_count > 0 ? ( -
-
-
Repository Details
-
Import completed. We have found:
-
-
-
-

{repoInfo.issue_count}

-
Work items
-
-
-

{repoInfo.labels}

-
Labels
-
-
-

{repoInfo.collaborators.length}

-
Users
-
-
-
- ) : ( -
-
We didn{"'"}t find any work item in this repository.
-
- ) - ) : ( - - - - )} -
- - -
-
- ); -} diff --git a/apps/web/core/components/integration/github/root.tsx b/apps/web/core/components/integration/github/root.tsx deleted file mode 100644 index 4e144fe45d..0000000000 --- a/apps/web/core/components/integration/github/root.tsx +++ /dev/null @@ -1,246 +0,0 @@ -import React, { useState } from "react"; -import Link from "next/link"; -import { useParams, useSearchParams } from "next/navigation"; -import { useForm } from "react-hook-form"; -import useSWR, { mutate } from "swr"; -import { ArrowLeft, List, Settings, UploadCloud } from "lucide-react"; -import { CheckIcon, MembersPropertyIcon } from "@plane/propel/icons"; -// types -import { TOAST_TYPE, setToast } from "@plane/propel/toast"; -import type { IGithubRepoCollaborator, IGithubServiceImportFormData } from "@plane/types"; -// assets -import GithubLogo from "@/app/assets/services/github.png?url"; -// components -import { - GithubImportConfigure, - GithubImportData, - GithubRepoDetails, - GithubImportUsers, - GithubImportConfirm, -} from "@/components/integration"; -// fetch keys -import { APP_INTEGRATIONS, IMPORTER_SERVICES_LIST, WORKSPACE_INTEGRATIONS } from "@/constants/fetch-keys"; -// hooks -import { useAppRouter } from "@/hooks/use-app-router"; -// services -import { IntegrationService, GithubIntegrationService } from "@/services/integrations"; - -export type TIntegrationSteps = "import-configure" | "import-data" | "repo-details" | "import-users" | "import-confirm"; -export interface IIntegrationData { - state: TIntegrationSteps; -} - -export interface IUserDetails { - username: string; - import: any; - email: string; -} - -export type TFormValues = { - github: any; - project: string | null; - sync: boolean; - collaborators: IGithubRepoCollaborator[]; - users: IUserDetails[]; -}; - -const defaultFormValues = { - github: null, - project: null, - sync: false, -}; - -const integrationWorkflowData = [ - { - title: "Configure", - key: "import-configure", - icon: Settings, - }, - { - title: "Import Data", - key: "import-data", - icon: UploadCloud, - }, - { title: "Work item", key: "repo-details", icon: List }, - { - title: "Users", - key: "import-users", - icon: MembersPropertyIcon, - }, - { - title: "Confirm", - key: "import-confirm", - icon: CheckIcon, - }, -]; - -// services -const integrationService = new IntegrationService(); -const githubIntegrationService = new GithubIntegrationService(); - -export function GithubImporterRoot() { - const [currentStep, setCurrentStep] = useState({ - state: "import-configure", - }); - const [users, setUsers] = useState([]); - - const router = useAppRouter(); - const { workspaceSlug } = useParams(); - const searchParams = useSearchParams(); - const provider = searchParams.get("provider"); - - const { handleSubmit, control, setValue, watch } = useForm({ - defaultValues: defaultFormValues, - }); - - const { data: appIntegrations } = useSWR(APP_INTEGRATIONS, () => integrationService.getAppIntegrationsList()); - - const { data: workspaceIntegrations } = useSWR( - workspaceSlug ? WORKSPACE_INTEGRATIONS(workspaceSlug) : null, - workspaceSlug ? () => integrationService.getWorkspaceIntegrationsList(workspaceSlug) : null - ); - - const activeIntegrationState = () => { - const currentElementIndex = integrationWorkflowData.findIndex((i) => i?.key === currentStep?.state); - - return currentElementIndex; - }; - - const handleStepChange = (value: TIntegrationSteps) => { - setCurrentStep((prevData) => ({ ...prevData, state: value })); - }; - - // current integration from all the integrations available - const integration = - appIntegrations && appIntegrations.length > 0 && appIntegrations.find((i) => i.provider === provider); - - // current integration from workspace integrations - const workspaceIntegration = - integration && workspaceIntegrations?.find((i: any) => i.integration_detail.id === integration.id); - - const createGithubImporterService = async (formData: TFormValues) => { - if (!formData.github || !formData.project) return; - - const payload: IGithubServiceImportFormData = { - metadata: { - owner: formData.github.owner.login, - name: formData.github.name, - repository_id: formData.github.id, - url: formData.github.html_url, - }, - data: { - users: users, - }, - config: { - sync: formData.sync, - }, - project_id: formData.project, - }; - - await githubIntegrationService - .createGithubServiceImport(workspaceSlug, payload) - .then(() => { - router.push(`/${workspaceSlug}/settings/imports`); - mutate(IMPORTER_SERVICES_LIST(workspaceSlug)); - }) - .catch(() => - setToast({ - type: TOAST_TYPE.ERROR, - title: "Error!", - message: "Import was unsuccessful. Please try again.", - }) - ); - }; - - return ( -
-
- - - -
Cancel import & go back
-
- - -
-
-
- GitHubLogo -
-
- {integrationWorkflowData.map((integration, index) => ( - -
- -
- {index < integrationWorkflowData.length - 1 && ( -
- {" "} -
- )} -
- ))} -
-
- -
-
- {currentStep?.state === "import-configure" && ( - - )} - {currentStep?.state === "import-data" && ( - - )} - {currentStep?.state === "repo-details" && ( - - )} - {currentStep?.state === "import-users" && ( - - )} - {currentStep?.state === "import-confirm" && ( - - )} -
-
-
-
-
- ); -} diff --git a/apps/web/core/components/integration/github/select-repository.tsx b/apps/web/core/components/integration/github/select-repository.tsx index 6a9ff58077..bcfa001a94 100644 --- a/apps/web/core/components/integration/github/select-repository.tsx +++ b/apps/web/core/components/integration/github/select-repository.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { useParams } from "next/navigation"; import useSWRInfinite from "swr/infinite"; diff --git a/apps/web/core/components/integration/github/single-user-select.tsx b/apps/web/core/components/integration/github/single-user-select.tsx deleted file mode 100644 index 09b417f5e3..0000000000 --- a/apps/web/core/components/integration/github/single-user-select.tsx +++ /dev/null @@ -1,132 +0,0 @@ -import { useParams } from "next/navigation"; -import useSWR from "swr"; -// plane types -import type { IGithubRepoCollaborator } from "@plane/types"; -// plane ui -import { Avatar, CustomSelect, CustomSearchSelect, Input } from "@plane/ui"; -// constants -import { getFileURL } from "@plane/utils"; -import { WORKSPACE_MEMBERS } from "@/constants/fetch-keys"; -// helpers -// plane web services -import { WorkspaceService } from "@/plane-web/services"; -// types -import type { IUserDetails } from "./root"; - -type Props = { - collaborator: IGithubRepoCollaborator; - index: number; - users: IUserDetails[]; - setUsers: React.Dispatch>; -}; - -const importOptions = [ - { - key: "map", - label: "Map to existing", - }, - { - key: "invite", - label: "Invite by email", - }, - { - key: false, - label: "Do not import", - }, -]; - -// services -const workspaceService = new WorkspaceService(); - -export function SingleUserSelect({ collaborator, index, users, setUsers }: Props) { - const { workspaceSlug } = useParams(); - - const { data: members } = useSWR( - workspaceSlug ? WORKSPACE_MEMBERS(workspaceSlug.toString()) : null, - workspaceSlug ? () => workspaceService.fetchWorkspaceMembers(workspaceSlug.toString()) : null - ); - - const options = members - ?.map((member) => { - if (!member?.member) return; - return { - value: member.member?.display_name, - query: member.member?.display_name ?? "", - content: ( -
- - {member.member?.display_name} -
- ), - }; - }) - .filter((member) => !!member) as - | { - value: string; - query: string; - content: React.ReactNode; - }[] - | undefined; - - return ( -
-
-
- {`${collaborator.login} -
-

{collaborator.login}

-
-
- {importOptions.find((o) => o.key === users[index].import)?.label}
} - onChange={(val: any) => { - const newUsers = [...users]; - newUsers[index].import = val; - newUsers[index].email = ""; - setUsers(newUsers); - }} - noChevron - > - {importOptions.map((option) => ( - -
{option.label}
-
- ))} - -
- {users[index].import === "invite" && ( - { - const newUsers = [...users]; - newUsers[index].email = e.target.value; - setUsers(newUsers); - }} - placeholder="Enter email of the user" - className="w-full py-1 text-11" - /> - )} - {users[index].import === "map" && members && ( - { - const newUsers = [...users]; - newUsers[index].email = val; - setUsers(newUsers); - }} - optionsClassName="w-48" - /> - )} -
- ); -} diff --git a/apps/web/core/components/integration/guide.tsx b/apps/web/core/components/integration/guide.tsx deleted file mode 100644 index eac78513f6..0000000000 --- a/apps/web/core/components/integration/guide.tsx +++ /dev/null @@ -1,177 +0,0 @@ -import { useState } from "react"; -import { observer } from "mobx-react"; -import Link from "next/link"; -import { useParams, useSearchParams } from "next/navigation"; -import useSWR, { mutate } from "swr"; -// icons -import { RefreshCw } from "lucide-react"; -// plane imports -import { IMPORTERS_LIST } from "@plane/constants"; -import { useTranslation } from "@plane/i18n"; -// types -import { Button } from "@plane/propel/button"; -import type { IImporterService } from "@plane/types"; -// assets -import GithubLogo from "@/app/assets/services/github.png?url"; -import JiraLogo from "@/app/assets/services/jira.svg?url"; -// components -import { DeleteImportModal, GithubImporterRoot, JiraImporterRoot, SingleImport } from "@/components/integration"; -import { ImportExportSettingsLoader } from "@/components/ui/loader/settings/import-and-export"; -// constants -import { IMPORTER_SERVICES_LIST } from "@/constants/fetch-keys"; -// hooks -import { useUser } from "@/hooks/store/user"; -// services -import { IntegrationService } from "@/services/integrations"; - -// services -const integrationService = new IntegrationService(); - -const getImporterLogo = (provider: string) => { - switch (provider) { - case "github": - return GithubLogo; - case "jira": - return JiraLogo; - default: - return ""; - } -}; - -// FIXME: [Deprecated] Remove this component -const IntegrationGuide = observer(function IntegrationGuide() { - // states - const [refreshing, setRefreshing] = useState(false); - const [deleteImportModal, setDeleteImportModal] = useState(false); - const [importToDelete, setImportToDelete] = useState(null); - // router - const { workspaceSlug } = useParams(); - const searchParams = useSearchParams(); - const provider = searchParams.get("provider"); - // store hooks - const { data: currentUser } = useUser(); - - const { t } = useTranslation(); - - const { data: importerServices } = useSWR( - workspaceSlug ? IMPORTER_SERVICES_LIST(workspaceSlug) : null, - workspaceSlug ? () => integrationService.getImporterServicesList(workspaceSlug) : null - ); - - const handleDeleteImport = (importService: IImporterService) => { - setImportToDelete(importService); - setDeleteImportModal(true); - }; - - return ( - <> - setDeleteImportModal(false)} - data={importToDelete} - user={currentUser || null} - /> -
- {(!provider || provider === "csv") && ( - <> - {/* */} - {IMPORTERS_LIST.map((service) => ( -
-
-
- {`${t(service.i18n_title)} -
-
-

{t(service.i18n_title)}

-

{t(service.i18n_description)}

-
-
-
- - - - - -
-
- ))} -
-
-

- Previous Imports - -

-
-
- {importerServices ? ( - importerServices.length > 0 ? ( -
-
- {importerServices.map((service) => ( - handleDeleteImport(service)} - /> - ))} -
-
- ) : ( -
- {/* */} -
- ) - ) : ( - - )} -
-
- - )} - - {provider && provider === "github" && } - {provider && provider === "jira" && } -
- - ); -}); - -export default IntegrationGuide; - -export { IntegrationGuide }; diff --git a/apps/web/core/components/integration/index.ts b/apps/web/core/components/integration/index.ts deleted file mode 100644 index a734113b6c..0000000000 --- a/apps/web/core/components/integration/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -// layout -export * from "./delete-import-modal"; -export * from "./guide"; -export * from "./single-import"; -export * from "./single-integration-card"; - -// github -export * from "./github"; -// jira -export * from "./jira"; -// slack -export * from "./slack"; diff --git a/apps/web/core/components/integration/jira/confirm-import.tsx b/apps/web/core/components/integration/jira/confirm-import.tsx deleted file mode 100644 index 15cc0da26b..0000000000 --- a/apps/web/core/components/integration/jira/confirm-import.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from "react"; - -// react hook form -import { useFormContext } from "react-hook-form"; -import type { IJiraImporterForm } from "@plane/types"; - -// types - -export function JiraConfirmImport() { - const { watch } = useFormContext(); - - return ( -
-
-
-

Confirm

-
- -
-

Migrating

-
-
-
-

{watch("data.total_issues")}

-

Work items

-
-
-

{watch("data.total_states")}

-

States

-
-
-

{watch("data.total_modules")}

-

Modules

-
-
-

{watch("data.total_labels")}

-

Labels

-
-
-

{watch("data.users").filter((user) => user.import).length}

-

User

-
-
-
-
- ); -} diff --git a/apps/web/core/components/integration/jira/give-details.tsx b/apps/web/core/components/integration/jira/give-details.tsx deleted file mode 100644 index 65601beecc..0000000000 --- a/apps/web/core/components/integration/jira/give-details.tsx +++ /dev/null @@ -1,214 +0,0 @@ -import { observer } from "mobx-react"; -import Link from "next/link"; -import { useFormContext, Controller } from "react-hook-form"; -import { PlusIcon } from "@plane/propel/icons"; -import type { IJiraImporterForm } from "@plane/types"; -// hooks -// components -import { CustomSelect, Input } from "@plane/ui"; -// helpers -import { checkEmailValidity } from "@plane/utils"; -import { useCommandPalette } from "@/hooks/store/use-command-palette"; -import { useProject } from "@/hooks/store/use-project"; -// types - -export const JiraGetImportDetail = observer(function JiraGetImportDetail() { - // store hooks - const { toggleCreateProjectModal } = useCommandPalette(); - const { workspaceProjectIds, getProjectById } = useProject(); - // form info - const { - control, - formState: { errors }, - } = useFormContext(); - - return ( -
-
-
-

Jira Personal Access Token

-

- Get to know your access token by navigating to{" "} - - Atlassian Settings - -

-
- -
- ( - - )} - /> - {errors.metadata?.api_token && ( -

{errors.metadata.api_token.message}

- )} -
-
-
-
-

Jira Project Key

-

If XXX-123 is your work item, then enter XXX

-
-
- ( - - )} - /> - {errors.metadata?.project_key && ( -

{errors.metadata.project_key.message}

- )} -
-
-
-
-

Jira Email Address

-

Enter the Email account that you use in Jira account

-
-
- checkEmailValidity(value) || "Please enter a valid email address", - }} - render={({ field: { value, onChange, ref } }) => ( - - )} - /> - {errors.metadata?.email &&

{errors.metadata.email.message}

} -
-
-
-
-

Jira Installation or Cloud Host Name

-

Enter your companies cloud host name

-
-
- !/^https?:\/\//.test(value) || "Hostname should not begin with http:// or https://", - }} - render={({ field: { value, onChange, ref } }) => ( - - )} - /> - {errors.metadata?.cloud_hostname && ( -

{errors.metadata.cloud_hostname.message}

- )} -
-
-
-
-

Import to project

-

Select which project you want to import to.

-
-
- ( - - {value && value.trim() !== "" ? ( - getProjectById(value)?.name - ) : ( - Select a project - )} - - } - > - {workspaceProjectIds && workspaceProjectIds.length > 0 ? ( - workspaceProjectIds.map((projectId) => { - const projectDetails = getProjectById(projectId); - - if (!projectDetails) return; - - return ( - - {projectDetails.name} - - ); - }) - ) : ( -
-

You don{"'"}t have any project. Please create a project first.

-
- )} -
- -
-
- )} - /> -
-
-
- ); -}); diff --git a/apps/web/core/components/integration/jira/import-users.tsx b/apps/web/core/components/integration/jira/import-users.tsx deleted file mode 100644 index 9f64f53496..0000000000 --- a/apps/web/core/components/integration/jira/import-users.tsx +++ /dev/null @@ -1,152 +0,0 @@ -import type { FC } from "react"; -import { useParams } from "next/navigation"; -import { useFormContext, useFieldArray, Controller } from "react-hook-form"; -import useSWR from "swr"; -// plane types -import type { IJiraImporterForm } from "@plane/types"; -// plane ui -import { Avatar, CustomSelect, CustomSearchSelect, Input, ToggleSwitch } from "@plane/ui"; -// constants -import { getFileURL } from "@plane/utils"; -import { WORKSPACE_MEMBERS } from "@/constants/fetch-keys"; -// helpers -// plane web services -import { WorkspaceService } from "@/plane-web/services"; - -const workspaceService = new WorkspaceService(); - -export function JiraImportUsers() { - const { workspaceSlug } = useParams(); - // form info - const { - control, - watch, - formState: { errors }, - } = useFormContext(); - - const { fields } = useFieldArray({ - control, - name: "data.users", - }); - - const { data: members } = useSWR( - workspaceSlug ? WORKSPACE_MEMBERS(workspaceSlug?.toString() ?? "") : null, - workspaceSlug ? () => workspaceService.fetchWorkspaceMembers(workspaceSlug?.toString() ?? "") : null - ); - - const options = members - ?.map((member) => { - if (!member?.member) return; - return { - value: member.member.email, - query: member.member.display_name ?? "", - content: ( -
- - {member.member.display_name} -
- ), - }; - }) - .filter((member) => !!member) as - | { - value: string; - query: string; - content: React.ReactNode; - }[] - | undefined; - - return ( -
-
-
-

Users

-

Update, invite or choose not to invite assignee

-
-
- } - /> -
-
- - {watch("data.invite_users") && ( -
-
-
Name
-
Import as
-
- -
- {fields.map((user, index) => ( -
-
-

{user.username}

-
-
- ( - {value ? value : ("Ignore" as any)}} - > - Invite by email - Map to existing - Do not import - - )} - /> -
-
- {watch(`data.users.${index}.import`) === "invite" && ( - ( - - )} - /> - )} - {watch(`data.users.${index}.import`) === "map" && ( - ( - - )} - /> - )} -
-
- ))} -
-
- )} -
- ); -} diff --git a/apps/web/core/components/integration/jira/index.ts b/apps/web/core/components/integration/jira/index.ts deleted file mode 100644 index bc22a82461..0000000000 --- a/apps/web/core/components/integration/jira/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -export * from "./root"; -export * from "./give-details"; -export * from "./jira-project-detail"; -export * from "./import-users"; -export * from "./confirm-import"; - -import type { IJiraImporterForm } from "@plane/types"; - -export type TJiraIntegrationSteps = - | "import-configure" - | "display-import-data" - | "select-import-data" - | "import-users" - | "import-confirmation"; - -export interface IJiraIntegrationData { - state: TJiraIntegrationSteps; -} - -export const jiraFormDefaultValues: IJiraImporterForm = { - metadata: { - cloud_hostname: "", - api_token: "", - project_key: "", - email: "", - }, - config: { - epics_to_modules: false, - }, - data: { - users: [], - invite_users: true, - total_issues: 0, - total_labels: 0, - total_modules: 0, - total_states: 0, - }, - project_id: "", -}; diff --git a/apps/web/core/components/integration/jira/jira-project-detail.tsx b/apps/web/core/components/integration/jira/jira-project-detail.tsx deleted file mode 100644 index 2fc79180b3..0000000000 --- a/apps/web/core/components/integration/jira/jira-project-detail.tsx +++ /dev/null @@ -1,167 +0,0 @@ -import React, { useEffect } from "react"; - -// next -import { useParams } from "next/navigation"; - -// swr -import { useFormContext, Controller } from "react-hook-form"; -import useSWR from "swr"; -import type { IJiraImporterForm, IJiraMetadata } from "@plane/types"; - -// react hook form - -// services -import { ToggleSwitch, Spinner } from "@plane/ui"; -import { JIRA_IMPORTER_DETAIL } from "@/constants/fetch-keys"; -import { JiraImporterService } from "@/services/integrations"; - -// fetch keys - -// components - -import type { IJiraIntegrationData, TJiraIntegrationSteps } from "."; - -type Props = { - setCurrentStep: React.Dispatch>; - setDisableTopBarAfter: React.Dispatch>; -}; - -// services -const jiraImporterService = new JiraImporterService(); - -export function JiraProjectDetail(props: Props) { - const { setCurrentStep, setDisableTopBarAfter } = props; - - const { - watch, - setValue, - control, - formState: { errors }, - } = useFormContext(); - - const { workspaceSlug } = useParams(); - - const params: IJiraMetadata = { - api_token: watch("metadata.api_token"), - project_key: watch("metadata.project_key"), - email: watch("metadata.email"), - cloud_hostname: watch("metadata.cloud_hostname"), - }; - - const { data: projectInfo, error } = useSWR( - workspaceSlug && - !errors.metadata?.api_token && - !errors.metadata?.project_key && - !errors.metadata?.email && - !errors.metadata?.cloud_hostname - ? JIRA_IMPORTER_DETAIL(workspaceSlug.toString(), params) - : null, - workspaceSlug && - !errors.metadata?.api_token && - !errors.metadata?.project_key && - !errors.metadata?.email && - !errors.metadata?.cloud_hostname - ? () => jiraImporterService.getJiraProjectInfo(workspaceSlug.toString(), params) - : null - ); - - useEffect(() => { - if (!projectInfo) return; - - setValue("data.total_issues", projectInfo.issues); - setValue("data.total_labels", projectInfo.labels); - setValue( - "data.users", - projectInfo.users?.map((user) => ({ - email: user.emailAddress, - import: false, - username: user.displayName, - })) - ); - setValue("data.total_states", projectInfo.states); - setValue("data.total_modules", projectInfo.modules); - }, [projectInfo, setValue]); - - useEffect(() => { - if (error) setDisableTopBarAfter("display-import-data"); - else setDisableTopBarAfter(null); - }, [error, setDisableTopBarAfter]); - - useEffect(() => { - if (!projectInfo && !error) setDisableTopBarAfter("display-import-data"); - else if (!error) setDisableTopBarAfter(null); - }, [projectInfo, error, setDisableTopBarAfter]); - - if (!projectInfo && !error) { - return ( -
- -
- ); - } - - if (error) { - return ( -
-

- Something went wrong. Please{" "} - {" "} - and check your Jira project details. -

-
- ); - } - - return ( -
-
-
-

Import Data

-

Import Completed. We have found:

-
-
-
-

{projectInfo?.issues}

-

Work items

-
-
-

{projectInfo?.states}

-

States

-
-
-

{projectInfo?.modules}

-

Modules

-
-
-

{projectInfo?.labels}

-

Labels

-
-
-

{projectInfo?.users?.length}

-

Users

-
-
-
- -
-
-

Import Epics

-

Import epics as modules

-
-
- } - /> -
-
-
- ); -} diff --git a/apps/web/core/components/integration/jira/root.tsx b/apps/web/core/components/integration/jira/root.tsx deleted file mode 100644 index 2941d5ff5e..0000000000 --- a/apps/web/core/components/integration/jira/root.tsx +++ /dev/null @@ -1,200 +0,0 @@ -import React, { useState } from "react"; -import Link from "next/link"; -import { useParams } from "next/navigation"; -import { FormProvider, useForm } from "react-hook-form"; -import { mutate } from "swr"; -// icons -import { ArrowLeft, List, Settings } from "lucide-react"; -import { Button } from "@plane/propel/button"; -import { CheckIcon, MembersPropertyIcon } from "@plane/propel/icons"; -// types -import type { IJiraImporterForm } from "@plane/types"; -// assets -import JiraLogo from "@/app/assets/services/jira.svg?url"; -// fetch keys -import { IMPORTER_SERVICES_LIST } from "@/constants/fetch-keys"; -// hooks -import { useAppRouter } from "@/hooks/use-app-router"; -// services -import { JiraImporterService } from "@/services/integrations"; -// components -import type { TJiraIntegrationSteps, IJiraIntegrationData } from "."; -import { JiraGetImportDetail, JiraProjectDetail, JiraImportUsers, JiraConfirmImport, jiraFormDefaultValues } from "."; - -const integrationWorkflowData: Array<{ - title: string; - key: TJiraIntegrationSteps; - icon: any; -}> = [ - { - title: "Configure", - key: "import-configure", - icon: Settings, - }, - { - title: "Import Data", - key: "display-import-data", - icon: List, - }, - { - title: "Users", - key: "import-users", - icon: MembersPropertyIcon, - }, - { - title: "Confirm", - key: "import-confirmation", - icon: CheckIcon, - }, -]; - -// services -const jiraImporterService = new JiraImporterService(); - -export function JiraImporterRoot() { - const [currentStep, setCurrentStep] = useState({ - state: "import-configure", - }); - const [disableTopBarAfter, setDisableTopBarAfter] = useState(null); - - const router = useAppRouter(); - const { workspaceSlug } = useParams(); - - const methods = useForm({ - defaultValues: jiraFormDefaultValues, - mode: "all", - reValidateMode: "onChange", - }); - - const isValid = methods.formState.isValid; - - const onSubmit = async (data: IJiraImporterForm) => { - if (!workspaceSlug) return; - - await jiraImporterService - .createJiraImporter(workspaceSlug.toString(), data) - .then(() => { - mutate(IMPORTER_SERVICES_LIST(workspaceSlug.toString())); - router.push(`/${workspaceSlug}/settings/imports`); - }) - .catch((err) => { - console.error(err); - }); - }; - - const activeIntegrationState = () => { - const currentElementIndex = integrationWorkflowData.findIndex((i) => i?.key === currentStep?.state); - - return currentElementIndex; - }; - - return ( -
- - -
- -
-
Cancel import & go back
-
- - -
-
-
- jira logo -
-
- {integrationWorkflowData.map((integration, index) => ( - - - {index < integrationWorkflowData.length - 1 && ( -
- {" "} -
- )} -
- ))} -
-
- -
- -
-
- {currentStep.state === "import-configure" && } - {currentStep.state === "display-import-data" && ( - - )} - {currentStep?.state === "import-users" && } - {currentStep?.state === "import-confirmation" && } -
- -
- {currentStep?.state !== "import-configure" && ( - - )} - -
-
-
-
-
-
- ); -} diff --git a/apps/web/core/components/integration/single-import.tsx b/apps/web/core/components/integration/single-import.tsx deleted file mode 100644 index 43241ed2d6..0000000000 --- a/apps/web/core/components/integration/single-import.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import { observer } from "mobx-react"; - -// plane imports -import { IMPORTERS_LIST } from "@plane/constants"; -import { useTranslation } from "@plane/i18n"; -import { TrashIcon } from "@plane/propel/icons"; -import type { IImporterService } from "@plane/types"; -import { CustomMenu } from "@plane/ui"; -// icons -// helpers - -import { renderFormattedDate } from "@plane/utils"; -// types -// constants - -type Props = { - service: IImporterService; - refreshing: boolean; - handleDelete: () => void; -}; - -export const SingleImport = observer(function SingleImport({ service, refreshing, handleDelete }: Props) { - const { t } = useTranslation(); - - const importer = IMPORTERS_LIST.find((i) => i.provider === service.service); - return ( -
-
-

- {importer && ( - - Import from {t(importer.i18n_title)} to{" "} - - )} - {service.project_detail.name} - - {refreshing ? "Refreshing..." : service.status} - -

-
- {renderFormattedDate(service.created_at)}| - Imported by {service.initiated_by_detail?.display_name} -
-
- - - - - Delete import - - - -
- ); -}); diff --git a/apps/web/core/components/integration/single-integration-card.tsx b/apps/web/core/components/integration/single-integration-card.tsx index 926625821d..caeb31fe32 100644 --- a/apps/web/core/components/integration/single-integration-card.tsx +++ b/apps/web/core/components/integration/single-integration-card.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/integration/slack/index.ts b/apps/web/core/components/integration/slack/index.ts deleted file mode 100644 index 4ea6cd1e4b..0000000000 --- a/apps/web/core/components/integration/slack/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./select-channel"; diff --git a/apps/web/core/components/integration/slack/select-channel.tsx b/apps/web/core/components/integration/slack/select-channel.tsx index 827b8d438b..4ed32564f0 100644 --- a/apps/web/core/components/integration/slack/select-channel.tsx +++ b/apps/web/core/components/integration/slack/select-channel.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useEffect } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/archive-issue-modal.tsx b/apps/web/core/components/issues/archive-issue-modal.tsx index f54518406e..ad487abca1 100644 --- a/apps/web/core/components/issues/archive-issue-modal.tsx +++ b/apps/web/core/components/issues/archive-issue-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; // i18n import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/archived-issues-header.tsx b/apps/web/core/components/issues/archived-issues-header.tsx index e6db994441..2f0077911e 100644 --- a/apps/web/core/components/issues/archived-issues-header.tsx +++ b/apps/web/core/components/issues/archived-issues-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/attachment/attachment-detail.tsx b/apps/web/core/components/issues/attachment/attachment-detail.tsx index 235832413b..1d7db39795 100644 --- a/apps/web/core/components/issues/attachment/attachment-detail.tsx +++ b/apps/web/core/components/issues/attachment/attachment-detail.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/attachment/attachment-item-list.tsx b/apps/web/core/components/issues/attachment/attachment-item-list.tsx index c9754d2cd2..04b0b0049c 100644 --- a/apps/web/core/components/issues/attachment/attachment-item-list.tsx +++ b/apps/web/core/components/issues/attachment/attachment-item-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useCallback, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/attachment/attachment-list-item.tsx b/apps/web/core/components/issues/attachment/attachment-list-item.tsx index d0823097ec..3a6752fd16 100644 --- a/apps/web/core/components/issues/attachment/attachment-list-item.tsx +++ b/apps/web/core/components/issues/attachment/attachment-list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/attachment/attachment-list-upload-item.tsx b/apps/web/core/components/issues/attachment/attachment-list-upload-item.tsx index 06743cdf06..5086b799db 100644 --- a/apps/web/core/components/issues/attachment/attachment-list-upload-item.tsx +++ b/apps/web/core/components/issues/attachment/attachment-list-upload-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // ui import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/issues/attachment/attachment-upload-details.tsx b/apps/web/core/components/issues/attachment/attachment-upload-details.tsx index b70b28f1cb..d5ebd65deb 100644 --- a/apps/web/core/components/issues/attachment/attachment-upload-details.tsx +++ b/apps/web/core/components/issues/attachment/attachment-upload-details.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Tooltip } from "@plane/propel/tooltip"; import { CircularProgressIndicator } from "@plane/ui"; diff --git a/apps/web/core/components/issues/attachment/attachment-upload.tsx b/apps/web/core/components/issues/attachment/attachment-upload.tsx index 9ecb101b48..c537361ef9 100644 --- a/apps/web/core/components/issues/attachment/attachment-upload.tsx +++ b/apps/web/core/components/issues/attachment/attachment-upload.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useState } from "react"; import { observer } from "mobx-react"; import { useDropzone } from "react-dropzone"; diff --git a/apps/web/core/components/issues/attachment/attachments-list.tsx b/apps/web/core/components/issues/attachment/attachments-list.tsx index 6cd0636bad..2811709075 100644 --- a/apps/web/core/components/issues/attachment/attachments-list.tsx +++ b/apps/web/core/components/issues/attachment/attachments-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // hooks diff --git a/apps/web/core/components/issues/attachment/delete-attachment-modal.tsx b/apps/web/core/components/issues/attachment/delete-attachment-modal.tsx index 5ea7225d9d..691b312617 100644 --- a/apps/web/core/components/issues/attachment/delete-attachment-modal.tsx +++ b/apps/web/core/components/issues/attachment/delete-attachment-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/attachment/index.ts b/apps/web/core/components/issues/attachment/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/issues/attachment/index.ts +++ b/apps/web/core/components/issues/attachment/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/issues/attachment/root.tsx b/apps/web/core/components/issues/attachment/root.tsx index e1060746b1..7e8597ccfb 100644 --- a/apps/web/core/components/issues/attachment/root.tsx +++ b/apps/web/core/components/issues/attachment/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // hooks import { useAttachmentOperations } from "../issue-detail-widgets/attachments/helper"; diff --git a/apps/web/core/components/issues/bulk-operations/upgrade-banner.tsx b/apps/web/core/components/issues/bulk-operations/upgrade-banner.tsx index 743b420e8b..6906b0eb94 100644 --- a/apps/web/core/components/issues/bulk-operations/upgrade-banner.tsx +++ b/apps/web/core/components/issues/bulk-operations/upgrade-banner.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { MARKETING_PLANE_ONE_PAGE_LINK } from "@plane/constants"; import { getButtonStyling } from "@plane/propel/button"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/issues/confirm-issue-discard.tsx b/apps/web/core/components/issues/confirm-issue-discard.tsx index 16ca19a2d9..79bb004827 100644 --- a/apps/web/core/components/issues/confirm-issue-discard.tsx +++ b/apps/web/core/components/issues/confirm-issue-discard.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; // ui import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/issues/create-issue-toast-action-items.tsx b/apps/web/core/components/issues/create-issue-toast-action-items.tsx index 550bc2ec4f..43647a9d94 100644 --- a/apps/web/core/components/issues/create-issue-toast-action-items.tsx +++ b/apps/web/core/components/issues/create-issue-toast-action-items.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/delete-issue-modal.tsx b/apps/web/core/components/issues/delete-issue-modal.tsx index 9230e4aae9..a9d853cd56 100644 --- a/apps/web/core/components/issues/delete-issue-modal.tsx +++ b/apps/web/core/components/issues/delete-issue-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/filters.tsx b/apps/web/core/components/issues/filters.tsx index dbe85651a9..36c686ffe8 100644 --- a/apps/web/core/components/issues/filters.tsx +++ b/apps/web/core/components/issues/filters.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useState } from "react"; import { observer } from "mobx-react"; import { ChartNoAxesColumn, SlidersHorizontal } from "lucide-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/action-buttons.tsx b/apps/web/core/components/issues/issue-detail-widgets/action-buttons.tsx index b52ed6af9d..5c0dda4019 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/action-buttons.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/action-buttons.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { Paperclip } from "lucide-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/attachments/content.tsx b/apps/web/core/components/issues/issue-detail-widgets/attachments/content.tsx index efadb710df..a536acf5a5 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/attachments/content.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/attachments/content.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/attachments/helper.tsx b/apps/web/core/components/issues/issue-detail-widgets/attachments/helper.tsx index 0ca891f17a..e32dfbbd09 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/attachments/helper.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/attachments/helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { setPromiseToast, TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { TIssueServiceType } from "@plane/types"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/attachments/index.ts b/apps/web/core/components/issues/issue-detail-widgets/attachments/index.ts index 78eef97686..3c6016adb3 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/attachments/index.ts +++ b/apps/web/core/components/issues/issue-detail-widgets/attachments/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./content"; export * from "./title"; export * from "./root"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/attachments/quick-action-button.tsx b/apps/web/core/components/issues/issue-detail-widgets/attachments/quick-action-button.tsx index 8c52d7b60b..4354d38069 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/attachments/quick-action-button.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/attachments/quick-action-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useCallback, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/attachments/root.tsx b/apps/web/core/components/issues/issue-detail-widgets/attachments/root.tsx index 1bf1d457e5..0c94fca605 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/attachments/root.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/attachments/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/attachments/title.tsx b/apps/web/core/components/issues/issue-detail-widgets/attachments/title.tsx index 6ff4047ccc..b94a9f4811 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/attachments/title.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/attachments/title.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useMemo } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/index.ts b/apps/web/core/components/issues/issue-detail-widgets/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/index.ts +++ b/apps/web/core/components/issues/issue-detail-widgets/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx b/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx index fa792e8008..962e933190 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-collapsibles.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-modals.tsx b/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-modals.tsx index c13ec40888..fc08f6a7b9 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-modals.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/issue-detail-widget-modals.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/links/content.tsx b/apps/web/core/components/issues/issue-detail-widgets/links/content.tsx index 49f2a56b1a..999721885c 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/links/content.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/links/content.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import type { TIssueServiceType } from "@plane/types"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/links/helper.tsx b/apps/web/core/components/issues/issue-detail-widgets/links/helper.tsx index cdce12ca57..c1bb10f2e2 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/links/helper.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/links/helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/links/index.ts b/apps/web/core/components/issues/issue-detail-widgets/links/index.ts index 78eef97686..3c6016adb3 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/links/index.ts +++ b/apps/web/core/components/issues/issue-detail-widgets/links/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./content"; export * from "./title"; export * from "./root"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/links/quick-action-button.tsx b/apps/web/core/components/issues/issue-detail-widgets/links/quick-action-button.tsx index 3cb3d98fc1..f10504ef7a 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/links/quick-action-button.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/links/quick-action-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/links/root.tsx b/apps/web/core/components/issues/issue-detail-widgets/links/root.tsx index 5f809be46b..b38c6b2b6f 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/links/root.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/links/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/links/title.tsx b/apps/web/core/components/issues/issue-detail-widgets/links/title.tsx index b4bc38fd58..4a3ff4410e 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/links/title.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/links/title.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useMemo } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx b/apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx index 8406d8895f..1a420334bc 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/relations/helper.tsx b/apps/web/core/components/issues/issue-detail-widgets/relations/helper.tsx index 1666613330..4842a9d177 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/relations/helper.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/relations/helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/relations/index.ts b/apps/web/core/components/issues/issue-detail-widgets/relations/index.ts index 78eef97686..3c6016adb3 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/relations/index.ts +++ b/apps/web/core/components/issues/issue-detail-widgets/relations/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./content"; export * from "./title"; export * from "./root"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsx b/apps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsx index 11d16c3995..98700c9181 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/relations/root.tsx b/apps/web/core/components/issues/issue-detail-widgets/relations/root.tsx index e13f9beb72..edebdb19b6 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/relations/root.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/relations/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/relations/title.tsx b/apps/web/core/components/issues/issue-detail-widgets/relations/title.tsx index e4d8061c80..5b9c29a536 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/relations/title.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/relations/title.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useMemo } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/root.tsx b/apps/web/core/components/issues/issue-detail-widgets/root.tsx index 44b5a76f71..037e345f1f 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/root.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/content.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/content.tsx index f5b5f12c95..96e020113a 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/content.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/content.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useEffect, useState, useCallback } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/display-filters.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/display-filters.tsx index f4f9f4c83b..8010fc88b9 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/display-filters.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/display-filters.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useMemo } from "react"; import { isEmpty } from "lodash-es"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/filters.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/filters.tsx index 1823d491b6..7e9eb339ed 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/filters.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/filters.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useMemo, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/helper.ts b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/helper.ts index ab1722b364..8cf524ed9a 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/helper.ts +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/helper.ts @@ -1,5 +1,10 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; -import { useParams } from "next/navigation"; // plane imports import { useTranslation } from "@plane/i18n"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; @@ -8,18 +13,12 @@ import { EIssueServiceType } from "@plane/types"; import { copyUrlToClipboard } from "@plane/utils"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; -import { useProjectState } from "@/hooks/store/use-project-state"; -// plane web helpers -import { updateEpicAnalytics } from "@/plane-web/helpers/epic-analytics"; export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSubIssueOperations => { - // router - const { epicId: epicIdParam } = useParams(); // translation const { t } = useTranslation(); // store hooks const { - issue: { getIssueById }, subIssues: { setSubIssueHelpers }, createSubIssues, fetchSubIssues, @@ -27,13 +26,6 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub deleteSubIssue, removeSubIssue, } = useIssueDetail(issueServiceType); - const { getStateById } = useProjectState(); - const { peekIssue: epicPeekIssue } = useIssueDetail(EIssueServiceType.EPICS); - // const { updateEpicAnalytics } = useIssueTypes(); - const { updateAnalytics } = updateEpicAnalytics(); - - // derived values - const epicId = epicIdParam || epicPeekIssue?.issueId; const subIssueOperations: TSubIssueOperations = useMemo( () => ({ @@ -104,30 +96,6 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub try { setSubIssueHelpers(parentIssueId, "issue_loader", issueId); await updateSubIssue(workspaceSlug, projectId, parentIssueId, issueId, issueData, oldIssue, fromModal); - - if (issueServiceType === EIssueServiceType.EPICS) { - const oldState = getStateById(oldIssue?.state_id)?.group; - - if (oldState && oldIssue && issueData && epicId) { - // Check if parent_id is changed if yes then decrement the epic analytics count - if (issueData.parent_id && oldIssue?.parent_id && issueData.parent_id !== oldIssue?.parent_id) { - updateAnalytics(workspaceSlug, projectId, epicId.toString(), { - decrementStateGroupCount: `${oldState}_issues`, - }); - } - - // Check if state_id is changed if yes then decrement the old state group count and increment the new state group count - if (issueData.state_id) { - const newState = getStateById(issueData.state_id)?.group; - if (oldState && newState && oldState !== newState) { - updateAnalytics(workspaceSlug, projectId, epicId.toString(), { - decrementStateGroupCount: `${oldState}_issues`, - incrementStateGroupCount: `${newState}_issues`, - }); - } - } - } - } setToast({ type: TOAST_TYPE.SUCCESS, title: t("toast.success"), @@ -146,16 +114,6 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub try { setSubIssueHelpers(parentIssueId, "issue_loader", issueId); await removeSubIssue(workspaceSlug, projectId, parentIssueId, issueId); - if (issueServiceType === EIssueServiceType.EPICS) { - const issueBeforeRemoval = getIssueById(issueId); - const oldState = getStateById(issueBeforeRemoval?.state_id)?.group; - - if (epicId && oldState) { - updateAnalytics(workspaceSlug, projectId, epicId.toString(), { - decrementStateGroupCount: `${oldState}_issues`, - }); - } - } setToast({ type: TOAST_TYPE.SUCCESS, title: t("toast.success"), @@ -183,9 +141,8 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub deleteSubIssue: async (workspaceSlug, projectId, parentIssueId, issueId) => { try { setSubIssueHelpers(parentIssueId, "issue_loader", issueId); - return deleteSubIssue(workspaceSlug, projectId, parentIssueId, issueId).then(() => { - setSubIssueHelpers(parentIssueId, "issue_loader", issueId); - }); + await deleteSubIssue(workspaceSlug, projectId, parentIssueId, issueId); + setSubIssueHelpers(parentIssueId, "issue_loader", issueId); } catch (_error) { setToast({ type: TOAST_TYPE.ERROR, @@ -203,15 +160,11 @@ export const useSubIssueOperations = (issueServiceType: TIssueServiceType): TSub [ createSubIssues, deleteSubIssue, - epicId, fetchSubIssues, - getIssueById, - getStateById, issueServiceType, removeSubIssue, setSubIssueHelpers, t, - updateAnalytics, updateSubIssue, ] ); diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/index.ts b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/index.ts index a5fd0a41af..bc6b004bbb 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/index.ts +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./content"; export * from "./display-filters"; export * from "./quick-action-button"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-group.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-group.tsx index 0a1068d4e2..37b633dec1 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-group.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-group.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-item.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-item.tsx index 35689cbef9..c17bd38796 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-item.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Link as Loader } from "lucide-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx index 921b8daba4..70b2507ea1 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import type { SyntheticEvent } from "react"; import { useMemo } from "react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx index f33c441f1f..ef808a1fe7 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/quick-action-button.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/quick-action-button.tsx index 56f5a8c4a7..8e825e00c0 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/quick-action-button.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/quick-action-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/root.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/root.tsx index ccfa46ac61..c0de91cb92 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/root.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title-actions.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title-actions.tsx index de6c8ccd02..36d593c052 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title-actions.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title-actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useCallback } from "react"; import { cloneDeep } from "lodash-es"; diff --git a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title.tsx b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title.tsx index db66f8e68c..6ea45824ff 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/sub-issues/title.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail-widgets/widget-button.tsx b/apps/web/core/components/issues/issue-detail-widgets/widget-button.tsx index 3b27711a97..c848aeea11 100644 --- a/apps/web/core/components/issues/issue-detail-widgets/widget-button.tsx +++ b/apps/web/core/components/issues/issue-detail-widgets/widget-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; // helpers diff --git a/apps/web/core/components/issues/issue-detail/cycle-select.tsx b/apps/web/core/components/issues/issue-detail/cycle-select.tsx index 7ac2b5b01f..00dcdb8cf4 100644 --- a/apps/web/core/components/issues/issue-detail/cycle-select.tsx +++ b/apps/web/core/components/issues/issue-detail/cycle-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/issue-detail/identifier-text.tsx b/apps/web/core/components/issues/issue-detail/identifier-text.tsx index 4c1282079f..466074905e 100644 --- a/apps/web/core/components/issues/issue-detail/identifier-text.tsx +++ b/apps/web/core/components/issues/issue-detail/identifier-text.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { setToast, TOAST_TYPE } from "@plane/propel/toast"; import { Tooltip } from "@plane/propel/tooltip"; import type { TIdentifierTextProps, TIdentifierTextVariant, TIssueIdentifierSize } from "@plane/types"; diff --git a/apps/web/core/components/issues/issue-detail/index.ts b/apps/web/core/components/issues/issue-detail/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/issues/issue-detail/index.ts +++ b/apps/web/core/components/issues/issue-detail/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity-comment-root.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity-comment-root.tsx index ec802686ca..689def91c7 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity-comment-root.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity-comment-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import type { E_SORT_ORDER, TActivityFilters, EActivityFilterType } from "@plane/constants"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity-filter.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity-filter.tsx index b63aa81444..de8a675688 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity-filter.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity-filter.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { ListFilter } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/archived-at.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/archived-at.tsx index 49e86aea7a..588d298339 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/archived-at.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/archived-at.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { RotateCcw } from "lucide-react"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/assignee.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/assignee.tsx index 8ed796b30c..0ab22b2b0c 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/assignee.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/assignee.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // icons import { MembersPropertyIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/attachment.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/attachment.tsx index f68e5be2ba..c25c4539bb 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/attachment.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/attachment.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Paperclip } from "lucide-react"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/cycle.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/cycle.tsx index def64665d0..35fada263b 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/cycle.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/cycle.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // hooks import { CycleIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/default.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/default.tsx index cbc9b55ff2..b95177cff0 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/default.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/default.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { WorkItemsIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/description.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/description.tsx index a1be80e5ff..1c40cfb12f 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/description.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/description.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { AlignLeft } from "lucide-react"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/estimate.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/estimate.tsx index f3eeac4715..e4ae08471e 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/estimate.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/estimate.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { EstimatePropertyIcon } from "@plane/propel/icons"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/activity-block.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/activity-block.tsx index 5cc9eea444..bfe47cf749 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/activity-block.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/activity-block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC, ReactNode } from "react"; import { Network } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/issue-link.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/issue-link.tsx index 41f3faa96e..922f32437e 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/issue-link.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/issue-link.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Tooltip } from "@plane/propel/tooltip"; import { generateWorkItemLink } from "@plane/utils"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/issue-user.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/issue-user.tsx index 5cf3aacc52..7a510bf021 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/issue-user.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/helpers/issue-user.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import Link from "next/link"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/inbox.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/inbox.tsx index b9d7df24d3..4dd03c0877 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/inbox.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/inbox.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // hooks import { IntakeIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/index.ts b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/index.ts index ea69163085..c64e4afeca 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/index.ts +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./default"; export * from "./name"; export * from "./description"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/label-activity-chip.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/label-activity-chip.tsx index 94929187ae..0ef269c658 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/label-activity-chip.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/label-activity-chip.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Tooltip } from "@plane/propel/tooltip"; type TIssueLabelPill = { name?: string; color?: string }; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/label.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/label.tsx index 0f6ae75c31..d0584f2d0f 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/label.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/label.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { LabelPropertyIcon } from "@plane/propel/icons"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/link.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/link.tsx index a9a371481b..1af4cf9e51 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/link.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/link.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { MessageSquare } from "lucide-react"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/module.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/module.tsx index a9668b7f3a..8e4b53c50d 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/module.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/module.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // hooks import { ModuleIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/name.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/name.tsx index 5e1c0b073b..60058c2919 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/name.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/name.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Type } from "lucide-react"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/parent.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/parent.tsx index 2239bd77d9..d1060a276a 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/parent.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/parent.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { ParentPropertyIcon } from "@plane/propel/icons"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/priority.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/priority.tsx index d36c821eb1..3b89a348a6 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/priority.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/priority.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { PriorityPropertyIcon } from "@plane/propel/icons"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsx index 91ce152da4..fc036611f8 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // hooks import { useIssueDetail } from "@/hooks/store/use-issue-detail"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/start_date.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/start_date.tsx index a6bdde67cc..c25eb6d149 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/start_date.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/start_date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { CalendarDays } from "lucide-react"; // hooks diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/state.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/state.tsx index 49022acefd..c51625573c 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/state.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // hooks import { StatePropertyIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/target_date.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/target_date.tsx index 6af4f7e092..a7da1d45d2 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/target_date.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/target_date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { CalendarDays } from "lucide-react"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx index 68d7312554..579569ef07 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/activity/activity-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // helpers import { getValidKeysFromObject } from "@plane/utils"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/helper.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/helper.tsx index 07361cf130..8f13d0f504 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/helper.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/helper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { useTranslation } from "@plane/i18n"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/index.ts b/apps/web/core/components/issues/issue-detail/issue-activity/index.ts index 5eb4ac7d30..c20c39ce62 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/index.ts +++ b/apps/web/core/components/issues/issue-detail/issue-activity/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; export * from "./activity-comment-root"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/loader.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/loader.tsx index e0fa46f4b6..46562ac565 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/loader.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/root.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/root.tsx index ca3f524b45..66e3bad674 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/root.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import uniq from "lodash-es/uniq"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail/issue-activity/sort-root.tsx b/apps/web/core/components/issues/issue-detail/issue-activity/sort-root.tsx index 8e6a64e312..c2eca48be5 100644 --- a/apps/web/core/components/issues/issue-detail/issue-activity/sort-root.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-activity/sort-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { memo } from "react"; import { ArrowUpWideNarrow, ArrowDownWideNarrow } from "lucide-react"; // plane package imports diff --git a/apps/web/core/components/issues/issue-detail/issue-detail-quick-actions.tsx b/apps/web/core/components/issues/issue-detail/issue-detail-quick-actions.tsx index fc084bf5ef..cc00a6d170 100644 --- a/apps/web/core/components/issues/issue-detail/issue-detail-quick-actions.tsx +++ b/apps/web/core/components/issues/issue-detail/issue-detail-quick-actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail/label/create-label.tsx b/apps/web/core/components/issues/issue-detail/label/create-label.tsx index bc9fec02a4..d2fa6063ed 100644 --- a/apps/web/core/components/issues/issue-detail/label/create-label.tsx +++ b/apps/web/core/components/issues/issue-detail/label/create-label.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, Fragment, useEffect } from "react"; import { TwitterPicker } from "react-color"; import { Controller, useForm } from "react-hook-form"; diff --git a/apps/web/core/components/issues/issue-detail/label/index.ts b/apps/web/core/components/issues/issue-detail/label/index.ts index 83f1e73bc6..cb23f59483 100644 --- a/apps/web/core/components/issues/issue-detail/label/index.ts +++ b/apps/web/core/components/issues/issue-detail/label/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; export * from "./label-list"; diff --git a/apps/web/core/components/issues/issue-detail/label/label-list-item.tsx b/apps/web/core/components/issues/issue-detail/label/label-list-item.tsx index 90f457e289..3d677f8b77 100644 --- a/apps/web/core/components/issues/issue-detail/label/label-list-item.tsx +++ b/apps/web/core/components/issues/issue-detail/label/label-list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Button } from "@plane/propel/button"; import { CloseIcon, LabelFilledIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-detail/label/label-list.tsx b/apps/web/core/components/issues/issue-detail/label/label-list.tsx index 4e3d9030ad..054f84a299 100644 --- a/apps/web/core/components/issues/issue-detail/label/label-list.tsx +++ b/apps/web/core/components/issues/issue-detail/label/label-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components import { LabelListItem } from "./label-list-item"; diff --git a/apps/web/core/components/issues/issue-detail/label/root.tsx b/apps/web/core/components/issues/issue-detail/label/root.tsx index c8c669bfe0..7e5faabd21 100644 --- a/apps/web/core/components/issues/issue-detail/label/root.tsx +++ b/apps/web/core/components/issues/issue-detail/label/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/issue-detail/label/select/label-select.tsx b/apps/web/core/components/issues/issue-detail/label/select/label-select.tsx index c3621ab206..57234d73b4 100644 --- a/apps/web/core/components/issues/issue-detail/label/select/label-select.tsx +++ b/apps/web/core/components/issues/issue-detail/label/select/label-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Fragment, useState } from "react"; import { observer } from "mobx-react"; import { usePopper } from "react-popper"; diff --git a/apps/web/core/components/issues/issue-detail/label/select/root.tsx b/apps/web/core/components/issues/issue-detail/label/select/root.tsx index 22dc6a8258..c43ec6ad36 100644 --- a/apps/web/core/components/issues/issue-detail/label/select/root.tsx +++ b/apps/web/core/components/issues/issue-detail/label/select/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import type { TLabelOperations } from "../root"; import { IssueLabelSelect } from "./label-select"; diff --git a/apps/web/core/components/issues/issue-detail/links/create-update-link-modal.tsx b/apps/web/core/components/issues/issue-detail/links/create-update-link-modal.tsx index b68eb6ca32..d35cf3eeaa 100644 --- a/apps/web/core/components/issues/issue-detail/links/create-update-link-modal.tsx +++ b/apps/web/core/components/issues/issue-detail/links/create-update-link-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useEffect } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail/links/index.ts b/apps/web/core/components/issues/issue-detail/links/index.ts index 1241167ab2..4ee36de924 100644 --- a/apps/web/core/components/issues/issue-detail/links/index.ts +++ b/apps/web/core/components/issues/issue-detail/links/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; export * from "./links"; diff --git a/apps/web/core/components/issues/issue-detail/links/link-detail.tsx b/apps/web/core/components/issues/issue-detail/links/link-detail.tsx index a2161d1c92..26ecd02d84 100644 --- a/apps/web/core/components/issues/issue-detail/links/link-detail.tsx +++ b/apps/web/core/components/issues/issue-detail/links/link-detail.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { NewTabIcon, EditIcon, TrashIcon } from "@plane/propel/icons"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/issues/issue-detail/links/link-item.tsx b/apps/web/core/components/issues/issue-detail/links/link-item.tsx index 1cac1cc783..3910f63b36 100644 --- a/apps/web/core/components/issues/issue-detail/links/link-item.tsx +++ b/apps/web/core/components/issues/issue-detail/links/link-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/issue-detail/links/link-list.tsx b/apps/web/core/components/issues/issue-detail/links/link-list.tsx index 34d842c146..e691ecba38 100644 --- a/apps/web/core/components/issues/issue-detail/links/link-list.tsx +++ b/apps/web/core/components/issues/issue-detail/links/link-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import type { TIssueServiceType } from "@plane/types"; diff --git a/apps/web/core/components/issues/issue-detail/links/links.tsx b/apps/web/core/components/issues/issue-detail/links/links.tsx index c4b2ca08de..524c344395 100644 --- a/apps/web/core/components/issues/issue-detail/links/links.tsx +++ b/apps/web/core/components/issues/issue-detail/links/links.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // computed import { useIssueDetail } from "@/hooks/store/use-issue-detail"; diff --git a/apps/web/core/components/issues/issue-detail/links/root.tsx b/apps/web/core/components/issues/issue-detail/links/root.tsx index c045faa606..5ba3340062 100644 --- a/apps/web/core/components/issues/issue-detail/links/root.tsx +++ b/apps/web/core/components/issues/issue-detail/links/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo, useState } from "react"; import { PlusIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-detail/main-content.tsx b/apps/web/core/components/issues/issue-detail/main-content.tsx index 78ac4e7507..a42b821ba7 100644 --- a/apps/web/core/components/issues/issue-detail/main-content.tsx +++ b/apps/web/core/components/issues/issue-detail/main-content.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail/module-select.tsx b/apps/web/core/components/issues/issue-detail/module-select.tsx index 42e0fe1ec2..f0b6b2a4d5 100644 --- a/apps/web/core/components/issues/issue-detail/module-select.tsx +++ b/apps/web/core/components/issues/issue-detail/module-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { xor } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-detail/parent-select.tsx b/apps/web/core/components/issues/issue-detail/parent-select.tsx index 8249e0476b..71542928bb 100644 --- a/apps/web/core/components/issues/issue-detail/parent-select.tsx +++ b/apps/web/core/components/issues/issue-detail/parent-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import Link from "next/link"; diff --git a/apps/web/core/components/issues/issue-detail/parent/index.ts b/apps/web/core/components/issues/issue-detail/parent/index.ts index 1b5a967495..38f9dc2dd8 100644 --- a/apps/web/core/components/issues/issue-detail/parent/index.ts +++ b/apps/web/core/components/issues/issue-detail/parent/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; export * from "./siblings"; diff --git a/apps/web/core/components/issues/issue-detail/parent/root.tsx b/apps/web/core/components/issues/issue-detail/parent/root.tsx index 043f793da2..15972f08a9 100644 --- a/apps/web/core/components/issues/issue-detail/parent/root.tsx +++ b/apps/web/core/components/issues/issue-detail/parent/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useRouter } from "next/navigation"; import { MinusCircle } from "lucide-react"; diff --git a/apps/web/core/components/issues/issue-detail/parent/sibling-item.tsx b/apps/web/core/components/issues/issue-detail/parent/sibling-item.tsx index 518a336cef..aeb1925aa7 100644 --- a/apps/web/core/components/issues/issue-detail/parent/sibling-item.tsx +++ b/apps/web/core/components/issues/issue-detail/parent/sibling-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // ui import { CustomMenu } from "@plane/ui"; diff --git a/apps/web/core/components/issues/issue-detail/parent/siblings.tsx b/apps/web/core/components/issues/issue-detail/parent/siblings.tsx index 4a666db2e1..b00a17ff66 100644 --- a/apps/web/core/components/issues/issue-detail/parent/siblings.tsx +++ b/apps/web/core/components/issues/issue-detail/parent/siblings.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import useSWR from "swr"; import type { TIssue } from "@plane/types"; diff --git a/apps/web/core/components/issues/issue-detail/reactions/index.ts b/apps/web/core/components/issues/issue-detail/reactions/index.ts index 9ab00bd773..535518720f 100644 --- a/apps/web/core/components/issues/issue-detail/reactions/index.ts +++ b/apps/web/core/components/issues/issue-detail/reactions/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./issue"; export * from "./issue-comment"; diff --git a/apps/web/core/components/issues/issue-detail/reactions/issue-comment.tsx b/apps/web/core/components/issues/issue-detail/reactions/issue-comment.tsx index 4abe66ce9b..2ece8b9b7e 100644 --- a/apps/web/core/components/issues/issue-detail/reactions/issue-comment.tsx +++ b/apps/web/core/components/issues/issue-detail/reactions/issue-comment.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { observer } from "mobx-react"; import { stringToEmoji } from "@plane/propel/emoji-icon-picker"; diff --git a/apps/web/core/components/issues/issue-detail/reactions/issue.tsx b/apps/web/core/components/issues/issue-detail/reactions/issue.tsx index edc16742c4..20e2e17bc5 100644 --- a/apps/web/core/components/issues/issue-detail/reactions/issue.tsx +++ b/apps/web/core/components/issues/issue-detail/reactions/issue.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { observer } from "mobx-react"; import { stringToEmoji } from "@plane/propel/emoji-icon-picker"; diff --git a/apps/web/core/components/issues/issue-detail/relation-select.tsx b/apps/web/core/components/issues/issue-detail/relation-select.tsx index f01100a932..8559c6c423 100644 --- a/apps/web/core/components/issues/issue-detail/relation-select.tsx +++ b/apps/web/core/components/issues/issue-detail/relation-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import Link from "next/link"; diff --git a/apps/web/core/components/issues/issue-detail/root.tsx b/apps/web/core/components/issues/issue-detail/root.tsx index fcb07e07f4..72484c696b 100644 --- a/apps/web/core/components/issues/issue-detail/root.tsx +++ b/apps/web/core/components/issues/issue-detail/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-detail/sidebar.tsx b/apps/web/core/components/issues/issue-detail/sidebar.tsx index 67dfcfa24a..b51c55b5e4 100644 --- a/apps/web/core/components/issues/issue-detail/sidebar.tsx +++ b/apps/web/core/components/issues/issue-detail/sidebar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // i18n import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/issue-detail/subscription.tsx b/apps/web/core/components/issues/issue-detail/subscription.tsx index 33f58a9297..16c3fa4107 100644 --- a/apps/web/core/components/issues/issue-detail/subscription.tsx +++ b/apps/web/core/components/issues/issue-detail/subscription.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { isNil } from "lodash-es"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/base-calendar-root.tsx b/apps/web/core/components/issues/issue-layouts/calendar/base-calendar-root.tsx index 21980eab95..3f4eef8de5 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/base-calendar-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/base-calendar-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useCallback, useEffect } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/calendar.tsx b/apps/web/core/components/issues/issue-layouts/calendar/calendar.tsx index b6569300f4..b088c48067 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/calendar.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/calendar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/day-tile.tsx b/apps/web/core/components/issues/issue-layouts/calendar/day-tile.tsx index 9c92945eb4..97c94aa37b 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/day-tile.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/day-tile.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/index.ts b/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/index.ts index 3f32637c32..eded9f4e9b 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/index.ts +++ b/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./months-dropdown"; export * from "./options-dropdown"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/months-dropdown.tsx b/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/months-dropdown.tsx index dff887c26f..e6228890dc 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/months-dropdown.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/months-dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; import { usePopper } from "react-popper"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx b/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx index a2c3076838..2a8736516d 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/dropdowns/options-dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/header.tsx b/apps/web/core/components/issues/issue-layouts/calendar/header.tsx index 6f653963dd..8d1f1e5eb1 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/header.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components diff --git a/apps/web/core/components/issues/issue-layouts/calendar/issue-block-root.tsx b/apps/web/core/components/issues/issue-layouts/calendar/issue-block-root.tsx index fbc5177ac9..d2aaf6f38b 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/issue-block-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/issue-block-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { draggable } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/issue-block.tsx b/apps/web/core/components/issues/issue-layouts/calendar/issue-block.tsx index 1f440609c2..fcd2bb811d 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/issue-block.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/issue-block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useRef, forwardRef } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/issue-blocks.tsx b/apps/web/core/components/issues/issue-layouts/calendar/issue-blocks.tsx index 48bda9e73a..cddb9d8d3c 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/issue-blocks.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/issue-blocks.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; import type { TIssue, TPaginationData } from "@plane/types"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/quick-add-issue-actions.tsx b/apps/web/core/components/issues/issue-layouts/calendar/quick-add-issue-actions.tsx index 08ff9651e7..99f2e7fe87 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/quick-add-issue-actions.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/quick-add-issue-actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/roots/cycle-root.tsx b/apps/web/core/components/issues/issue-layouts/calendar/roots/cycle-root.tsx index 69469c89f7..5d98ec5a25 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/roots/cycle-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/roots/cycle-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/roots/module-root.tsx b/apps/web/core/components/issues/issue-layouts/calendar/roots/module-root.tsx index b06e5b87c8..30a1e544d7 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/roots/module-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/roots/module-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/roots/project-root.tsx b/apps/web/core/components/issues/issue-layouts/calendar/roots/project-root.tsx index 0214473a1c..4d696b3167 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/roots/project-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/roots/project-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/calendar/roots/project-view-root.tsx b/apps/web/core/components/issues/issue-layouts/calendar/roots/project-view-root.tsx index 0cb8915b7b..45c56c5c58 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/roots/project-view-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/roots/project-view-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // local imports diff --git a/apps/web/core/components/issues/issue-layouts/calendar/utils.ts b/apps/web/core/components/issues/issue-layouts/calendar/utils.ts index bab8c863b9..b795eb9092 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/utils.ts +++ b/apps/web/core/components/issues/issue-layouts/calendar/utils.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TIssue } from "@plane/types"; export const handleDragDrop = async ( diff --git a/apps/web/core/components/issues/issue-layouts/calendar/week-days.tsx b/apps/web/core/components/issues/issue-layouts/calendar/week-days.tsx index edc8716ea4..5f3381e0c7 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/week-days.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/week-days.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import type { TGroupedIssues, TIssue, TIssueMap, TPaginationData, ICalendarDate, ICalendarWeek } from "@plane/types"; diff --git a/apps/web/core/components/issues/issue-layouts/calendar/week-header.tsx b/apps/web/core/components/issues/issue-layouts/calendar/week-header.tsx index 1bf5b6a95f..16dfd94d59 100644 --- a/apps/web/core/components/issues/issue-layouts/calendar/week-header.tsx +++ b/apps/web/core/components/issues/issue-layouts/calendar/week-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { EStartOfTheWeek } from "@plane/types"; import { getOrderedDays } from "@plane/utils"; diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/archived-issues.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/archived-issues.tsx index de57575b8e..8ae22d842f 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/archived-issues.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/archived-issues.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/cycle.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/cycle.tsx index c98fafacc4..14d0e14f7f 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/cycle.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/cycle.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/global-view.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/global-view.tsx index e2c2553e81..9be06fa7a0 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/global-view.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/global-view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { EUserPermissionsLevel } from "@plane/constants"; diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/index.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/index.tsx index 44573f94d6..3f6523ba86 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/index.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/index.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane web components import { EIssuesStoreType } from "@plane/types"; import { TeamEmptyState } from "@/plane-web/components/issues/issue-layouts/empty-states/team-issues"; diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/module.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/module.tsx index 461ecc5c6b..6c0022d269 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/module.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/module.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/profile-view.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/profile-view.tsx index 26c90e6982..9d6283ab25 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/profile-view.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/profile-view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // components diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/project-epic.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/project-epic.tsx index d2249c683f..83d332a97a 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/project-epic.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/project-epic.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export function ProjectEpicsEmptyState() { return <>; } diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/project-issues.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/project-issues.tsx index 488c8d205b..dd9ab174f0 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/project-issues.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/project-issues.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/empty-states/project-view.tsx b/apps/web/core/components/issues/issue-layouts/empty-states/project-view.tsx index 3e8bb73513..e5b8b1ce4e 100644 --- a/apps/web/core/components/issues/issue-layouts/empty-states/project-view.tsx +++ b/apps/web/core/components/issues/issue-layouts/empty-states/project-view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components import { EUserPermissions, EUserPermissionsLevel, WORK_ITEM_TRACKER_ELEMENTS } from "@plane/constants"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/cycle.tsx b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/cycle.tsx index c6df0b2919..a3b2c7525b 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/cycle.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/cycle.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { CloseIcon, CycleGroupIcon } from "@plane/propel/icons"; import type { TCycleGroups } from "@plane/types"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/date.tsx b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/date.tsx index da9038c08a..89bec65783 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/date.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // icons import { DATE_AFTER_FILTER_OPTIONS } from "@plane/constants"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/index.ts b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/index.ts index b2b7ab67b0..0f2f68865f 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/index.ts +++ b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./date"; export * from "./label"; export * from "./members"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/label.tsx b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/label.tsx index 61f358d1cd..34dcb6114f 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/label.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/label.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // icons diff --git a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/members.tsx b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/members.tsx index f8e56dcc99..760be503ff 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/members.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/members.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { CloseIcon } from "@plane/propel/icons"; // plane ui diff --git a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/module.tsx b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/module.tsx index 1053619bb0..8c57a5ff33 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/module.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/module.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // hooks import { CloseIcon, ModuleIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/priority.tsx b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/priority.tsx index 0bc7c768d1..db4ae8ddf0 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/priority.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/priority.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // icons diff --git a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/project.tsx b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/project.tsx index e46210de4d..9375bebd97 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/project.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/project.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Logo } from "@plane/propel/emoji-icon-picker"; import { CloseIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/state-group.tsx b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/state-group.tsx index f11c5eeab6..f3ec236d9a 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/state-group.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/state-group.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // icons diff --git a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/state.tsx b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/state.tsx index 545ce7e6a8..47be180965 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/applied-filters/state.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/applied-filters/state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // icons // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx index f601aeaa0f..b761c5b8d9 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-filters-selection.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-properties.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-properties.tsx index 3555a381dd..3eeccb58be 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-properties.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-properties.tsx @@ -1,14 +1,17 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; -import { useParams } from "next/navigation"; // plane constants import { ISSUE_DISPLAY_PROPERTIES } from "@plane/constants"; // plane i18n import { useTranslation } from "@plane/i18n"; // types import type { IIssueDisplayProperties } from "@plane/types"; -// plane web helpers -import { shouldRenderDisplayProperty } from "@/plane-web/helpers/issue-filter.helper"; // components import { FilterHeader } from "../helpers/filter-header"; @@ -32,12 +35,8 @@ export const FilterDisplayProperties = observer(function FilterDisplayProperties } = props; // hooks const { t } = useTranslation(); - // router - const { workspaceSlug, projectId: routerProjectId } = useParams(); // states const [previewEnabled, setPreviewEnabled] = React.useState(true); - // derived values - const projectId = routerProjectId ? routerProjectId?.toString() : undefined; // Filter out "cycle" and "module" keys if cycleViewDisabled or moduleViewDisabled is true // Also filter out display properties that should not be rendered @@ -49,7 +48,7 @@ export const FilterDisplayProperties = observer(function FilterDisplayProperties case "modules": return !moduleViewDisabled; default: - return shouldRenderDisplayProperty({ workspaceSlug: workspaceSlug?.toString(), projectId, key: property.key }); + return true; } }).map((property) => { if (isEpic && property.key === "sub_issue_count") { diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/extra-options.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/extra-options.tsx index 5ff566c86f..7daaec7aea 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/extra-options.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/extra-options.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/group-by.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/group-by.tsx index 4e60772389..a15d80c0ea 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/group-by.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/group-by.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/index.ts b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/index.ts index 07b50f85ee..7f9e7350c9 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/index.ts +++ b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./display-filters-selection"; export * from "./display-properties"; export * from "./extra-options"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/order-by.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/order-by.tsx index 98eab66336..8905f85565 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/order-by.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/order-by.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; import { ISSUE_ORDER_BY_OPTIONS } from "@plane/constants"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/sub-group-by.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/sub-group-by.tsx index 0ce1eebf91..c367b6f626 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/sub-group-by.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/display-filters/sub-group-by.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; import { ISSUE_GROUP_BY_OPTIONS } from "@plane/constants"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/assignee.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/assignee.tsx index 0bd2c18e33..31dfb06276 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/assignee.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/assignee.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx index b04b5b2056..9b395955f2 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx index d9a11c7f78..4778ae5bc5 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/due-date.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/due-date.tsx index dbb1b9e1f5..ec8b2881a6 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/due-date.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/due-date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // constants diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/index.ts b/apps/web/core/components/issues/issue-layouts/filters/header/filters/index.ts index 65bca8ba8d..24a2444240 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/index.ts +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./assignee"; export * from "./mentions"; export * from "./created-by"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx index e296676cfe..259664cabe 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/mentions.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/mentions.tsx index bb41b99b88..71a187fe76 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/mentions.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/mentions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx index 31a64db28a..71ef7ed8d9 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/priority.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/priority.tsx index f83d547075..5bdf6a40b9 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/priority.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/priority.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // plane constants diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/project.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/project.tsx index 5abd5ca778..89559be0dc 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/project.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/project.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/start-date.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/start-date.tsx index 1a596186a8..97c9d6a780 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/start-date.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/start-date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // constants diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/state-group.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/state-group.tsx index cd9edcc068..05397dd397 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/state-group.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/state-group.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx index c301c8ec59..37b9d3982d 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/helpers/dropdown.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/helpers/dropdown.tsx index 2a58f70bde..f904fb931d 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/helpers/dropdown.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/helpers/dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { Fragment, useState } from "react"; import type { Placement } from "@popperjs/core"; import { usePopper } from "react-popper"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/helpers/filter-header.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/helpers/filter-header.tsx index ffe374f60e..e6e2b80af0 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/helpers/filter-header.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/helpers/filter-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { ChevronDownIcon, ChevronUpIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/helpers/filter-option.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/helpers/filter-option.tsx index 72bccb111b..d0cf3c259b 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/helpers/filter-option.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/helpers/filter-option.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { CheckIcon } from "@plane/propel/icons"; type Props = { diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/helpers/index.ts b/apps/web/core/components/issues/issue-layouts/filters/header/helpers/index.ts index ef38d9884d..a817cc1c76 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/helpers/index.ts +++ b/apps/web/core/components/issues/issue-layouts/filters/header/helpers/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./dropdown"; export * from "./filter-header"; export * from "./filter-option"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/index.ts b/apps/web/core/components/issues/issue-layouts/filters/header/index.ts index 9a0c40d640..ae7cf17c13 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/index.ts +++ b/apps/web/core/components/issues/issue-layouts/filters/header/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./display-filters"; export * from "./filters"; export * from "./helpers"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/layout-selection.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/layout-selection.tsx index adb33b0d70..6b8f857b1a 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/layout-selection.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/layout-selection.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { ISSUE_LAYOUTS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/header/mobile-layout-selection.tsx b/apps/web/core/components/issues/issue-layouts/filters/header/mobile-layout-selection.tsx index cf6cf09d9e..2ca1b4616e 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/header/mobile-layout-selection.tsx +++ b/apps/web/core/components/issues/issue-layouts/filters/header/mobile-layout-selection.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { ISSUE_LAYOUTS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/issues/issue-layouts/filters/index.ts b/apps/web/core/components/issues/issue-layouts/filters/index.ts index 427d969431..2196c7bb2d 100644 --- a/apps/web/core/components/issues/issue-layouts/filters/index.ts +++ b/apps/web/core/components/issues/issue-layouts/filters/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./header"; export * from "./applied-filters"; diff --git a/apps/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx b/apps/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx index 5d45e4286b..3404b438ca 100644 --- a/apps/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/gantt/base-gantt-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useCallback, useEffect } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/gantt/blocks.tsx b/apps/web/core/components/issues/issue-layouts/gantt/blocks.tsx index 3910d6bbd5..3a8141e0b5 100644 --- a/apps/web/core/components/issues/issue-layouts/gantt/blocks.tsx +++ b/apps/web/core/components/issues/issue-layouts/gantt/blocks.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/gantt/index.ts b/apps/web/core/components/issues/issue-layouts/gantt/index.ts index 6728bd6590..53d7de8215 100644 --- a/apps/web/core/components/issues/issue-layouts/gantt/index.ts +++ b/apps/web/core/components/issues/issue-layouts/gantt/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./base-gantt-root"; diff --git a/apps/web/core/components/issues/issue-layouts/group-drag-overlay.tsx b/apps/web/core/components/issues/issue-layouts/group-drag-overlay.tsx index 26f5b1b327..a3fe1c7918 100644 --- a/apps/web/core/components/issues/issue-layouts/group-drag-overlay.tsx +++ b/apps/web/core/components/issues/issue-layouts/group-drag-overlay.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef } from "react"; import { AlertCircle } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx b/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx index a838604825..50a0323a9a 100644 --- a/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx +++ b/apps/web/core/components/issues/issue-layouts/issue-layout-HOC.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { EIssueLayoutTypes } from "@plane/types"; diff --git a/apps/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx b/apps/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx index a172d8687d..231c6a8e43 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useCallback, useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; diff --git a/apps/web/core/components/issues/issue-layouts/kanban/block.tsx b/apps/web/core/components/issues/issue-layouts/kanban/block.tsx index 70a849e76b..b1cbca9ffb 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/block.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { MutableRefObject } from "react"; import { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; diff --git a/apps/web/core/components/issues/issue-layouts/kanban/blocks-list.tsx b/apps/web/core/components/issues/issue-layouts/kanban/blocks-list.tsx index e4357ce33d..9361e4cedc 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/blocks-list.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/blocks-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { MutableRefObject } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/kanban/default.tsx b/apps/web/core/components/issues/issue-layouts/kanban/default.tsx index 7b10c9a772..d015bd8402 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/default.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/default.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { MutableRefObject } from "react"; import { observer } from "mobx-react"; // i18n diff --git a/apps/web/core/components/issues/issue-layouts/kanban/headers/group-by-card.tsx b/apps/web/core/components/issues/issue-layouts/kanban/headers/group-by-card.tsx index 67664b4a0f..c6e35aa20e 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/headers/group-by-card.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/headers/group-by-card.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/kanban/headers/sub-group-by-card.tsx b/apps/web/core/components/issues/issue-layouts/kanban/headers/sub-group-by-card.tsx index 533ec8cd1c..b052766e84 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/headers/sub-group-by-card.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/headers/sub-group-by-card.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx b/apps/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx index 675fcb0be5..b05869d3d6 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/kanban-group.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { MutableRefObject } from "react"; import { useCallback, useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; @@ -305,7 +311,17 @@ export const KanbanGroup = observer(function KanbanGroup(props: IKanbanGroup) { isEpic={isEpic} /> - {shouldLoadMore && (isSubGroup ? <>{loadMore} : )} + {shouldLoadMore && + (isSubGroup ? ( + <>{loadMore} + ) : ( +
+ {Array.from({ length: 2 }).map((_, index) => ( + + ))} + +
+ ))} {enableQuickIssueCreate && !disableIssueCreation && diff --git a/apps/web/core/components/issues/issue-layouts/kanban/roots/cycle-root.tsx b/apps/web/core/components/issues/issue-layouts/kanban/roots/cycle-root.tsx index a766ebad16..5aa59c66d1 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/roots/cycle-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/roots/cycle-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/kanban/roots/module-root.tsx b/apps/web/core/components/issues/issue-layouts/kanban/roots/module-root.tsx index 26f3e4e31f..5c17b8873e 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/roots/module-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/roots/module-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/kanban/roots/profile-issues-root.tsx b/apps/web/core/components/issues/issue-layouts/kanban/roots/profile-issues-root.tsx index db6eb64185..5224212f64 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/roots/profile-issues-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/roots/profile-issues-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/kanban/roots/project-root.tsx b/apps/web/core/components/issues/issue-layouts/kanban/roots/project-root.tsx index 22250fd810..6d691ad906 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/roots/project-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/roots/project-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/kanban/roots/project-view-root.tsx b/apps/web/core/components/issues/issue-layouts/kanban/roots/project-view-root.tsx index ef4239fd81..01e9823a5f 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/roots/project-view-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/roots/project-view-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx b/apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx index 735123ed85..1fe40fb219 100644 --- a/apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx +++ b/apps/web/core/components/issues/issue-layouts/kanban/swimlanes.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { MutableRefObject } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/issues/issue-layouts/layout-icon.tsx b/apps/web/core/components/issues/issue-layouts/layout-icon.tsx index 6788a8aea2..5b06251f62 100644 --- a/apps/web/core/components/issues/issue-layouts/layout-icon.tsx +++ b/apps/web/core/components/issues/issue-layouts/layout-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { ListLayoutIcon, BoardLayoutIcon, diff --git a/apps/web/core/components/issues/issue-layouts/list/base-list-root.tsx b/apps/web/core/components/issues/issue-layouts/list/base-list-root.tsx index e437adcd02..4122b7e953 100644 --- a/apps/web/core/components/issues/issue-layouts/list/base-list-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/base-list-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useCallback, useEffect } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-layouts/list/block-root.tsx b/apps/web/core/components/issues/issue-layouts/list/block-root.tsx index 10a083eed7..8ab27463dd 100644 --- a/apps/web/core/components/issues/issue-layouts/list/block-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/block-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC, MutableRefObject } from "react"; import React, { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; diff --git a/apps/web/core/components/issues/issue-layouts/list/block.tsx b/apps/web/core/components/issues/issue-layouts/list/block.tsx index 70c22a6e3b..1d93d53b10 100644 --- a/apps/web/core/components/issues/issue-layouts/list/block.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Dispatch, MouseEvent, SetStateAction } from "react"; import { useEffect, useRef } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; diff --git a/apps/web/core/components/issues/issue-layouts/list/blocks-list.tsx b/apps/web/core/components/issues/issue-layouts/list/blocks-list.tsx index 72be4c66be..958ebb26e2 100644 --- a/apps/web/core/components/issues/issue-layouts/list/blocks-list.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/blocks-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC, MutableRefObject } from "react"; // components import type { TIssue, IIssueDisplayProperties, TIssueMap, TGroupedIssues } from "@plane/types"; diff --git a/apps/web/core/components/issues/issue-layouts/list/default.tsx b/apps/web/core/components/issues/issue-layouts/list/default.tsx index b4948266f8..0ee2a9d2a1 100644 --- a/apps/web/core/components/issues/issue-layouts/list/default.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/default.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element"; diff --git a/apps/web/core/components/issues/issue-layouts/list/headers/group-by-card.tsx b/apps/web/core/components/issues/issue-layouts/list/headers/group-by-card.tsx index 3b1396cfc2..bdb137b34c 100644 --- a/apps/web/core/components/issues/issue-layouts/list/headers/group-by-card.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/headers/group-by-card.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/list/list-group.tsx b/apps/web/core/components/issues/issue-layouts/list/list-group.tsx index ee5b81f27d..747ddf2da3 100644 --- a/apps/web/core/components/issues/issue-layouts/list/list-group.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/list-group.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { MutableRefObject } from "react"; import { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; @@ -306,7 +312,17 @@ export const ListGroup = observer(function ListGroup(props: Props) { /> )} - {shouldLoadMore && (group_by ? <>{loadMore} : )} + {shouldLoadMore && + (group_by ? ( + <>{loadMore} + ) : ( + <> + {Array.from({ length: 2 }).map((_, index) => ( + + ))} + + + ))} {enableIssueQuickAdd && !disableIssueCreation && diff --git a/apps/web/core/components/issues/issue-layouts/list/roots/archived-issue-root.tsx b/apps/web/core/components/issues/issue-layouts/list/roots/archived-issue-root.tsx index 21f85da306..7d134080b0 100644 --- a/apps/web/core/components/issues/issue-layouts/list/roots/archived-issue-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/roots/archived-issue-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // local imports diff --git a/apps/web/core/components/issues/issue-layouts/list/roots/cycle-root.tsx b/apps/web/core/components/issues/issue-layouts/list/roots/cycle-root.tsx index 65f66b185e..acf44ae6be 100644 --- a/apps/web/core/components/issues/issue-layouts/list/roots/cycle-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/roots/cycle-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/list/roots/module-root.tsx b/apps/web/core/components/issues/issue-layouts/list/roots/module-root.tsx index bd1dd7b48b..e2930736c5 100644 --- a/apps/web/core/components/issues/issue-layouts/list/roots/module-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/roots/module-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/list/roots/profile-issues-root.tsx b/apps/web/core/components/issues/issue-layouts/list/roots/profile-issues-root.tsx index 4affe00765..eb1c3450e7 100644 --- a/apps/web/core/components/issues/issue-layouts/list/roots/profile-issues-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/roots/profile-issues-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/list/roots/project-root.tsx b/apps/web/core/components/issues/issue-layouts/list/roots/project-root.tsx index 8819433aed..7d4eb226ea 100644 --- a/apps/web/core/components/issues/issue-layouts/list/roots/project-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/roots/project-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/list/roots/project-view-root.tsx b/apps/web/core/components/issues/issue-layouts/list/roots/project-view-root.tsx index 0c11123647..9e57dddeb4 100644 --- a/apps/web/core/components/issues/issue-layouts/list/roots/project-view-root.tsx +++ b/apps/web/core/components/issues/issue-layouts/list/roots/project-view-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx b/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx index d0358d46d9..f8975acac7 100644 --- a/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx +++ b/apps/web/core/components/issues/issue-layouts/properties/all-properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { SyntheticEvent } from "react"; import { useCallback, useMemo } from "react"; import { xor } from "lodash-es"; diff --git a/apps/web/core/components/issues/issue-layouts/properties/index.ts b/apps/web/core/components/issues/issue-layouts/properties/index.ts index 668979012c..c45303fa54 100644 --- a/apps/web/core/components/issues/issue-layouts/properties/index.ts +++ b/apps/web/core/components/issues/issue-layouts/properties/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./labels"; export * from "./all-properties"; export * from "./label-dropdown"; diff --git a/apps/web/core/components/issues/issue-layouts/properties/label-dropdown.tsx b/apps/web/core/components/issues/issue-layouts/properties/label-dropdown.tsx index cc52345a50..d1f166d969 100644 --- a/apps/web/core/components/issues/issue-layouts/properties/label-dropdown.tsx +++ b/apps/web/core/components/issues/issue-layouts/properties/label-dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import type { Placement } from "@popperjs/core"; import { useParams } from "next/navigation"; @@ -14,6 +20,7 @@ import type { IIssueLabel } from "@plane/types"; import { EUserProjectRoles } from "@plane/types"; // components import { ComboDropDown } from "@plane/ui"; +import { sortBySelectedFirst } from "@plane/utils"; // hooks import { useLabel } from "@/hooks/store/use-label"; import { useUserPermissions } from "@/hooks/store/user"; @@ -112,8 +119,11 @@ export function LabelDropdown(props: ILabelDropdownProps) { const filteredOptions = useMemo( () => - query === "" ? options : options?.filter((option) => option.query.toLowerCase().includes(query.toLowerCase())), - [options, query] + sortBySelectedFirst( + query === "" ? options : options?.filter((option) => option.query.toLowerCase().includes(query.toLowerCase())), + value + ), + [options, query, value] ); const { styles, attributes } = usePopper(referenceElement, popperElement, { @@ -264,7 +274,7 @@ export function LabelDropdown(props: ILabelDropdownProps) {
{isLoading ? (

{t("common.loading")}

- ) : filteredOptions.length > 0 ? ( + ) : filteredOptions && filteredOptions.length > 0 ? ( filteredOptions.map((option) => ( {canLoadMoreIssues && ( - + {Array.from({ length: 3 }).map((_, index) => ( + + ))} )} diff --git a/apps/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx b/apps/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx index c6c6792ef3..0f8efa2ac1 100644 --- a/apps/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx +++ b/apps/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useRef } from "react"; import { observer } from "mobx-react"; // plane constants diff --git a/apps/web/core/components/issues/issue-layouts/utils.tsx b/apps/web/core/components/issues/issue-layouts/utils.tsx index d3cca81dd7..f7add99327 100644 --- a/apps/web/core/components/issues/issue-layouts/utils.tsx +++ b/apps/web/core/components/issues/issue-layouts/utils.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { CSSProperties, FC } from "react"; import { extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item"; import { clone, isNil, pull, uniq, concat } from "lodash-es"; @@ -589,7 +595,7 @@ export const removeNillKeys = (obj: T) => Object.fromEntries(Object.entries(obj ?? {}).filter(([key, value]) => key && !isNil(value))); /** - * This Method returns if the the grouped values are subGrouped + * This Method returns if the grouped values are subGrouped * @param groupedIssueIds * @returns */ diff --git a/apps/web/core/components/issues/issue-modal/base.tsx b/apps/web/core/components/issues/issue-modal/base.tsx index f6dfe63a81..d30ac73bb7 100644 --- a/apps/web/core/components/issues/issue-modal/base.tsx +++ b/apps/web/core/components/issues/issue-modal/base.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef, useState } from "react"; import { xor } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-modal/components/default-properties.tsx b/apps/web/core/components/issues/issue-modal/components/default-properties.tsx index 76bfb7d2f3..249f9dd6c0 100644 --- a/apps/web/core/components/issues/issue-modal/components/default-properties.tsx +++ b/apps/web/core/components/issues/issue-modal/components/default-properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import type { Control } from "react-hook-form"; diff --git a/apps/web/core/components/issues/issue-modal/components/description-editor.tsx b/apps/web/core/components/issues/issue-modal/components/description-editor.tsx index 5373378e8e..5a20b6c1c5 100644 --- a/apps/web/core/components/issues/issue-modal/components/description-editor.tsx +++ b/apps/web/core/components/issues/issue-modal/components/description-editor.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState } from "react"; import { observer } from "mobx-react"; import type { Control } from "react-hook-form"; @@ -23,7 +29,7 @@ import { useWorkspace } from "@/hooks/store/use-workspace"; import useKeypress from "@/hooks/use-keypress"; import { usePlatformOS } from "@/hooks/use-platform-os"; // plane web services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; // services import { AIService } from "@/services/ai.service"; const workspaceService = new WorkspaceService(); diff --git a/apps/web/core/components/issues/issue-modal/components/index.ts b/apps/web/core/components/issues/issue-modal/components/index.ts index 3e0c1d4d9a..951a4c1604 100644 --- a/apps/web/core/components/issues/issue-modal/components/index.ts +++ b/apps/web/core/components/issues/issue-modal/components/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./project-select"; export * from "./parent-tag"; export * from "./title-input"; diff --git a/apps/web/core/components/issues/issue-modal/components/parent-tag.tsx b/apps/web/core/components/issues/issue-modal/components/parent-tag.tsx index d6f774e279..0912e8cb56 100644 --- a/apps/web/core/components/issues/issue-modal/components/parent-tag.tsx +++ b/apps/web/core/components/issues/issue-modal/components/parent-tag.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import type { Control } from "react-hook-form"; diff --git a/apps/web/core/components/issues/issue-modal/components/project-select.tsx b/apps/web/core/components/issues/issue-modal/components/project-select.tsx index b996bbbe21..2c2d605224 100644 --- a/apps/web/core/components/issues/issue-modal/components/project-select.tsx +++ b/apps/web/core/components/issues/issue-modal/components/project-select.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import type { Control } from "react-hook-form"; diff --git a/apps/web/core/components/issues/issue-modal/components/title-input.tsx b/apps/web/core/components/issues/issue-modal/components/title-input.tsx index c844dc8465..cf1a1795f5 100644 --- a/apps/web/core/components/issues/issue-modal/components/title-input.tsx +++ b/apps/web/core/components/issues/issue-modal/components/title-input.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import type { Control, FormState } from "react-hook-form"; diff --git a/apps/web/core/components/issues/issue-modal/context/index.ts b/apps/web/core/components/issues/issue-modal/context/index.ts index e396ff2c17..1681445635 100644 --- a/apps/web/core/components/issues/issue-modal/context/index.ts +++ b/apps/web/core/components/issues/issue-modal/context/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./issue-modal-context"; diff --git a/apps/web/core/components/issues/issue-modal/context/issue-modal-context.tsx b/apps/web/core/components/issues/issue-modal/context/issue-modal-context.tsx index fab55cee6f..fa7ea1ab0a 100644 --- a/apps/web/core/components/issues/issue-modal/context/issue-modal-context.tsx +++ b/apps/web/core/components/issues/issue-modal/context/issue-modal-context.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { createContext } from "react"; // ce imports import type { UseFormReset, UseFormWatch } from "react-hook-form"; @@ -6,7 +12,7 @@ import type { EditorRefApi } from "@plane/editor"; import type { ISearchIssueResponse, TIssue } from "@plane/types"; // plane web imports import type { TIssuePropertyValues, TIssuePropertyValueErrors } from "@/plane-web/types/issue-types"; -import type { TIssueFields } from "ce/components/issues/issue-modal"; +import type { TIssueFields } from "@/plane-web/components/issues/issue-modal"; export type TPropertyValuesValidationProps = { projectId: string | null; diff --git a/apps/web/core/components/issues/issue-modal/draft-issue-layout.tsx b/apps/web/core/components/issues/issue-modal/draft-issue-layout.tsx index bb9082422e..af8ba95022 100644 --- a/apps/web/core/components/issues/issue-modal/draft-issue-layout.tsx +++ b/apps/web/core/components/issues/issue-modal/draft-issue-layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { isEmpty } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-modal/form.tsx b/apps/web/core/components/issues/issue-modal/form.tsx index 1648d9d990..be024feb9a 100644 --- a/apps/web/core/components/issues/issue-modal/form.tsx +++ b/apps/web/core/components/issues/issue-modal/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useState, useRef, useEffect } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/issue-modal/modal.tsx b/apps/web/core/components/issues/issue-modal/modal.tsx index 8c504da06d..ba03fbbdbd 100644 --- a/apps/web/core/components/issues/issue-modal/modal.tsx +++ b/apps/web/core/components/issues/issue-modal/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/issue-update-status.tsx b/apps/web/core/components/issues/issue-update-status.tsx index 8cdce83ceb..0b2e3588b0 100644 --- a/apps/web/core/components/issues/issue-update-status.tsx +++ b/apps/web/core/components/issues/issue-update-status.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { RefreshCw } from "lucide-react"; diff --git a/apps/web/core/components/issues/label.tsx b/apps/web/core/components/issues/label.tsx index 70ae462bb3..2b9fa832f8 100644 --- a/apps/web/core/components/issues/label.tsx +++ b/apps/web/core/components/issues/label.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // components import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/issues/layout-quick-actions.tsx b/apps/web/core/components/issues/layout-quick-actions.tsx index 3d3a5d1d5d..0c7b983d6a 100644 --- a/apps/web/core/components/issues/layout-quick-actions.tsx +++ b/apps/web/core/components/issues/layout-quick-actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { TContextMenuItem } from "@plane/ui"; diff --git a/apps/web/core/components/issues/parent-issues-list-modal.tsx b/apps/web/core/components/issues/parent-issues-list-modal.tsx index b197b7e9d5..98b266e1c6 100644 --- a/apps/web/core/components/issues/parent-issues-list-modal.tsx +++ b/apps/web/core/components/issues/parent-issues-list-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState } from "react"; import { useParams } from "next/navigation"; // icons diff --git a/apps/web/core/components/issues/peek-overview/error.tsx b/apps/web/core/components/issues/peek-overview/error.tsx index 7b65cc6c4f..b2e46cbc16 100644 --- a/apps/web/core/components/issues/peek-overview/error.tsx +++ b/apps/web/core/components/issues/peek-overview/error.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { MoveRight } from "lucide-react"; import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/issues/peek-overview/header.tsx b/apps/web/core/components/issues/peek-overview/header.tsx index 98393c3957..fb91acd6ca 100644 --- a/apps/web/core/components/issues/peek-overview/header.tsx +++ b/apps/web/core/components/issues/peek-overview/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; diff --git a/apps/web/core/components/issues/peek-overview/index.ts b/apps/web/core/components/issues/peek-overview/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/issues/peek-overview/index.ts +++ b/apps/web/core/components/issues/peek-overview/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/issues/peek-overview/issue-detail.tsx b/apps/web/core/components/issues/peek-overview/issue-detail.tsx index 3efdbf6418..87a3d347db 100644 --- a/apps/web/core/components/issues/peek-overview/issue-detail.tsx +++ b/apps/web/core/components/issues/peek-overview/issue-detail.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useEffect } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/peek-overview/loader.tsx b/apps/web/core/components/issues/peek-overview/loader.tsx index e3ca80bab9..ac99523e91 100644 --- a/apps/web/core/components/issues/peek-overview/loader.tsx +++ b/apps/web/core/components/issues/peek-overview/loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { MoveRight } from "lucide-react"; import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/issues/peek-overview/properties.tsx b/apps/web/core/components/issues/peek-overview/properties.tsx index 73fb91007c..c2cbcdf767 100644 --- a/apps/web/core/components/issues/peek-overview/properties.tsx +++ b/apps/web/core/components/issues/peek-overview/properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // i18n import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/issues/peek-overview/root.tsx b/apps/web/core/components/issues/peek-overview/root.tsx index 42bdd0c573..7e964edba4 100644 --- a/apps/web/core/components/issues/peek-overview/root.tsx +++ b/apps/web/core/components/issues/peek-overview/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useMemo, useCallback } from "react"; import { observer } from "mobx-react"; import { usePathname } from "next/navigation"; diff --git a/apps/web/core/components/issues/peek-overview/view.tsx b/apps/web/core/components/issues/peek-overview/view.tsx index b5d091e35a..a55a260e59 100644 --- a/apps/web/core/components/issues/peek-overview/view.tsx +++ b/apps/web/core/components/issues/peek-overview/view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useRef, useState } from "react"; import { observer } from "mobx-react"; @@ -90,7 +96,8 @@ export const IssueView = observer(function IssueView(props: IIssueView) { } } }, - issueId + issueId, + ["main-sidebar"] ); const handleKeyDown = () => { diff --git a/apps/web/core/components/issues/preview-card/date.tsx b/apps/web/core/components/issues/preview-card/date.tsx index dc1a016ac5..d0ba4f61e8 100644 --- a/apps/web/core/components/issues/preview-card/date.tsx +++ b/apps/web/core/components/issues/preview-card/date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { CalendarDays } from "lucide-react"; // plane imports import { DueDatePropertyIcon, StartDatePropertyIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/preview-card/index.ts b/apps/web/core/components/issues/preview-card/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/issues/preview-card/index.ts +++ b/apps/web/core/components/issues/preview-card/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/issues/preview-card/root.tsx b/apps/web/core/components/issues/preview-card/root.tsx index c506abb4f2..22f5254ec8 100644 --- a/apps/web/core/components/issues/preview-card/root.tsx +++ b/apps/web/core/components/issues/preview-card/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { PriorityIcon, StateGroupIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/issues/relations/issue-list-item.tsx b/apps/web/core/components/issues/relations/issue-list-item.tsx index fa2ecc81c3..1a12e35d9e 100644 --- a/apps/web/core/components/issues/relations/issue-list-item.tsx +++ b/apps/web/core/components/issues/relations/issue-list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/relations/issue-list.tsx b/apps/web/core/components/issues/relations/issue-list.tsx index e78ab6086e..b5a23e7718 100644 --- a/apps/web/core/components/issues/relations/issue-list.tsx +++ b/apps/web/core/components/issues/relations/issue-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/relations/properties.tsx b/apps/web/core/components/issues/relations/properties.tsx index 2609ee69f1..80bf9567b4 100644 --- a/apps/web/core/components/issues/relations/properties.tsx +++ b/apps/web/core/components/issues/relations/properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/select/base.tsx b/apps/web/core/components/issues/select/base.tsx index 97a2b5db9e..e4e44443a4 100644 --- a/apps/web/core/components/issues/select/base.tsx +++ b/apps/web/core/components/issues/select/base.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useRef, useState } from "react"; import type { Placement } from "@popperjs/core"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/issues/select/dropdown.tsx b/apps/web/core/components/issues/select/dropdown.tsx index ea0d803c79..b21bb267da 100644 --- a/apps/web/core/components/issues/select/dropdown.tsx +++ b/apps/web/core/components/issues/select/dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/select/index.ts b/apps/web/core/components/issues/select/index.ts index 22dfbe30b4..9bcbbe62bf 100644 --- a/apps/web/core/components/issues/select/index.ts +++ b/apps/web/core/components/issues/select/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./dropdown"; diff --git a/apps/web/core/components/issues/title-input.tsx b/apps/web/core/components/issues/title-input.tsx index fac79d4ee5..8befc5ac12 100644 --- a/apps/web/core/components/issues/title-input.tsx +++ b/apps/web/core/components/issues/title-input.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState, useEffect, useCallback, useRef } from "react"; import { observer } from "mobx-react"; @@ -39,7 +45,7 @@ export const IssueTitleInput = observer(function IssueTitleInput(props: IssueTit } = props; const { t } = useTranslation(); // states - const [title, setTitle] = useState(""); + const [title, setTitle] = useState(value || ""); const [isLengthVisible, setIsLengthVisible] = useState(false); // ref to track if there are unsaved changes const hasUnsavedChanges = useRef(false); diff --git a/apps/web/core/components/issues/workspace-draft/delete-modal.tsx b/apps/web/core/components/issues/workspace-draft/delete-modal.tsx index 380b45cbf9..1b0634c2c0 100644 --- a/apps/web/core/components/issues/workspace-draft/delete-modal.tsx +++ b/apps/web/core/components/issues/workspace-draft/delete-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; // types import { PROJECT_ERROR_MESSAGES, EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; diff --git a/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx b/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx index 0f5f0e34de..294cd0d1e4 100644 --- a/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx +++ b/apps/web/core/components/issues/workspace-draft/draft-issue-block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useRef, useState } from "react"; import { omit } from "lodash-es"; diff --git a/apps/web/core/components/issues/workspace-draft/draft-issue-properties.tsx b/apps/web/core/components/issues/workspace-draft/draft-issue-properties.tsx index a3d3d8e5b2..e526909abb 100644 --- a/apps/web/core/components/issues/workspace-draft/draft-issue-properties.tsx +++ b/apps/web/core/components/issues/workspace-draft/draft-issue-properties.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/issues/workspace-draft/empty-state.tsx b/apps/web/core/components/issues/workspace-draft/empty-state.tsx index 6ea7f82bcf..a720a58a5e 100644 --- a/apps/web/core/components/issues/workspace-draft/empty-state.tsx +++ b/apps/web/core/components/issues/workspace-draft/empty-state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { Fragment, useState } from "react"; // components diff --git a/apps/web/core/components/issues/workspace-draft/index.ts b/apps/web/core/components/issues/workspace-draft/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/issues/workspace-draft/index.ts +++ b/apps/web/core/components/issues/workspace-draft/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/issues/workspace-draft/loader.tsx b/apps/web/core/components/issues/workspace-draft/loader.tsx index 62f2c9bc54..60d0a610e5 100644 --- a/apps/web/core/components/issues/workspace-draft/loader.tsx +++ b/apps/web/core/components/issues/workspace-draft/loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { range } from "lodash-es"; // components diff --git a/apps/web/core/components/issues/workspace-draft/quick-action.tsx b/apps/web/core/components/issues/workspace-draft/quick-action.tsx index 1166ea1621..45ba5c37be 100644 --- a/apps/web/core/components/issues/workspace-draft/quick-action.tsx +++ b/apps/web/core/components/issues/workspace-draft/quick-action.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; // ui diff --git a/apps/web/core/components/issues/workspace-draft/root.tsx b/apps/web/core/components/issues/workspace-draft/root.tsx index fd1d167429..f9dab2a515 100644 --- a/apps/web/core/components/issues/workspace-draft/root.tsx +++ b/apps/web/core/components/issues/workspace-draft/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Fragment } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; diff --git a/apps/web/core/components/labels/create-update-label-inline.tsx b/apps/web/core/components/labels/create-update-label-inline.tsx index 73cf4ebe80..e721552262 100644 --- a/apps/web/core/components/labels/create-update-label-inline.tsx +++ b/apps/web/core/components/labels/create-update-label-inline.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { forwardRef, useEffect } from "react"; import { observer } from "mobx-react"; import { TwitterPicker } from "react-color"; diff --git a/apps/web/core/components/labels/delete-label-modal.tsx b/apps/web/core/components/labels/delete-label-modal.tsx index 3528f2963c..9adc238349 100644 --- a/apps/web/core/components/labels/delete-label-modal.tsx +++ b/apps/web/core/components/labels/delete-label-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/labels/index.ts b/apps/web/core/components/labels/index.ts index 7fe388345f..6fe30a046e 100644 --- a/apps/web/core/components/labels/index.ts +++ b/apps/web/core/components/labels/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./create-update-label-inline"; export * from "./delete-label-modal"; export * from "./project-setting-label-group"; diff --git a/apps/web/core/components/labels/label-block/label-item-block.tsx b/apps/web/core/components/labels/label-block/label-item-block.tsx index a60fbdcb56..7f8bc075ee 100644 --- a/apps/web/core/components/labels/label-block/label-item-block.tsx +++ b/apps/web/core/components/labels/label-block/label-item-block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { MutableRefObject } from "react"; import { useRef, useState } from "react"; import type { LucideIcon } from "lucide-react"; diff --git a/apps/web/core/components/labels/label-block/label-name.tsx b/apps/web/core/components/labels/label-block/label-name.tsx index 7978ff2447..23e0c60ac8 100644 --- a/apps/web/core/components/labels/label-block/label-name.tsx +++ b/apps/web/core/components/labels/label-block/label-name.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Component } from "lucide-react"; interface ILabelName { diff --git a/apps/web/core/components/labels/label-drag-n-drop-HOC.tsx b/apps/web/core/components/labels/label-drag-n-drop-HOC.tsx index 81fdfb1c5e..0c7cd60f2a 100644 --- a/apps/web/core/components/labels/label-drag-n-drop-HOC.tsx +++ b/apps/web/core/components/labels/label-drag-n-drop-HOC.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { MutableRefObject } from "react"; import { useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; diff --git a/apps/web/core/components/labels/label-utils.ts b/apps/web/core/components/labels/label-utils.ts index 7181a899b7..2d5402151a 100644 --- a/apps/web/core/components/labels/label-utils.ts +++ b/apps/web/core/components/labels/label-utils.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item"; import type { IIssueLabel, IPragmaticPayloadLocation, InstructionType, TDropTarget } from "@plane/types"; diff --git a/apps/web/core/components/labels/project-setting-label-group.tsx b/apps/web/core/components/labels/project-setting-label-group.tsx index e6c507dc80..d204c6d73f 100644 --- a/apps/web/core/components/labels/project-setting-label-group.tsx +++ b/apps/web/core/components/labels/project-setting-label-group.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Dispatch, SetStateAction } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/labels/project-setting-label-item.tsx b/apps/web/core/components/labels/project-setting-label-item.tsx index 53c26f3753..0d2eb00283 100644 --- a/apps/web/core/components/labels/project-setting-label-item.tsx +++ b/apps/web/core/components/labels/project-setting-label-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Dispatch, SetStateAction } from "react"; import { useState } from "react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/labels/project-setting-label-list.tsx b/apps/web/core/components/labels/project-setting-label-list.tsx index 1791c003b9..c8be577e78 100644 --- a/apps/web/core/components/labels/project-setting-label-list.tsx +++ b/apps/web/core/components/labels/project-setting-label-list.tsx @@ -1,9 +1,16 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useRef } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; +import { Button } from "@plane/propel/button"; import { EmptyStateCompact } from "@plane/propel/empty-state"; import type { IIssueLabel } from "@plane/types"; import { Loader } from "@plane/ui"; @@ -76,16 +83,15 @@ export const ProjectSettingsLabelList = observer(function ProjectSettingsLabelLi { - newLabel(); - }, - }} - showButton={isEditable} + control={ + isEditable && ( + + ) + } /> - -
+
{showLabelForm && (
) : ( - projectLabelsTree && ( -
- {projectLabelsTree.map((label, index) => { - if (label.children && label.children.length) { - return ( - setSelectDeleteLabel(label)} - isUpdating={isUpdating} - setIsUpdating={setIsUpdating} - isLastChild={index === projectLabelsTree.length - 1} - onDrop={onDrop} - isEditable={isEditable} - labelOperationsCallbacks={labelOperationsCallbacks} - /> - ); - } - return ( - setSelectDeleteLabel(label)} - isChild={false} - isLastChild={index === projectLabelsTree.length - 1} - onDrop={onDrop} - isEditable={isEditable} - labelOperationsCallbacks={labelOperationsCallbacks} - /> - ); - })} -
- ) + projectLabelsTree?.map((label, index) => { + if (label.children && label.children.length) { + return ( + setSelectDeleteLabel(label)} + isUpdating={isUpdating} + setIsUpdating={setIsUpdating} + isLastChild={index === projectLabelsTree.length - 1} + onDrop={onDrop} + isEditable={isEditable} + labelOperationsCallbacks={labelOperationsCallbacks} + /> + ); + } + return ( + setSelectDeleteLabel(label)} + isChild={false} + isLastChild={index === projectLabelsTree.length - 1} + onDrop={onDrop} + isEditable={isEditable} + labelOperationsCallbacks={labelOperationsCallbacks} + /> + ); + }) ) ) : ( !showLabelForm && ( diff --git a/apps/web/core/components/license/index.ts b/apps/web/core/components/license/index.ts index 031608e25f..dd65a9ec34 100644 --- a/apps/web/core/components/license/index.ts +++ b/apps/web/core/components/license/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./modal"; diff --git a/apps/web/core/components/license/modal/card/base-paid-plan-card.tsx b/apps/web/core/components/license/modal/card/base-paid-plan-card.tsx index 092e2119a1..296f4b2314 100644 --- a/apps/web/core/components/license/modal/card/base-paid-plan-card.tsx +++ b/apps/web/core/components/license/modal/card/base-paid-plan-card.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { CheckCircle } from "lucide-react"; diff --git a/apps/web/core/components/license/modal/card/checkout-button.tsx b/apps/web/core/components/license/modal/card/checkout-button.tsx index 0aa45e38d4..85a03080db 100644 --- a/apps/web/core/components/license/modal/card/checkout-button.tsx +++ b/apps/web/core/components/license/modal/card/checkout-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/license/modal/card/discount-info.tsx b/apps/web/core/components/license/modal/card/discount-info.tsx index a98935eb23..b1a596a53e 100644 --- a/apps/web/core/components/license/modal/card/discount-info.tsx +++ b/apps/web/core/components/license/modal/card/discount-info.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTheme } from "next-themes"; // plane imports import type { TBillingFrequency } from "@plane/types"; diff --git a/apps/web/core/components/license/modal/card/free-plan.tsx b/apps/web/core/components/license/modal/card/free-plan.tsx index 005c4df56a..6cb8d0e0af 100644 --- a/apps/web/core/components/license/modal/card/free-plan.tsx +++ b/apps/web/core/components/license/modal/card/free-plan.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { CircleX } from "lucide-react"; // plane constants diff --git a/apps/web/core/components/license/modal/card/index.ts b/apps/web/core/components/license/modal/card/index.ts index 0333c15dbd..3ce3953884 100644 --- a/apps/web/core/components/license/modal/card/index.ts +++ b/apps/web/core/components/license/modal/card/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./base-paid-plan-card"; export * from "./free-plan"; export * from "./talk-to-sales"; diff --git a/apps/web/core/components/license/modal/card/plan-upgrade.tsx b/apps/web/core/components/license/modal/card/plan-upgrade.tsx index 218e19d23f..a3338eb13d 100644 --- a/apps/web/core/components/license/modal/card/plan-upgrade.tsx +++ b/apps/web/core/components/license/modal/card/plan-upgrade.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { TALK_TO_SALES_URL } from "@plane/constants"; diff --git a/apps/web/core/components/license/modal/card/talk-to-sales.tsx b/apps/web/core/components/license/modal/card/talk-to-sales.tsx index 45b85ca8a5..4973a475d3 100644 --- a/apps/web/core/components/license/modal/card/talk-to-sales.tsx +++ b/apps/web/core/components/license/modal/card/talk-to-sales.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // types // plane imports diff --git a/apps/web/core/components/license/modal/index.ts b/apps/web/core/components/license/modal/index.ts index 1d243e763f..4260f8508d 100644 --- a/apps/web/core/components/license/modal/index.ts +++ b/apps/web/core/components/license/modal/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./card"; diff --git a/apps/web/core/components/modules/analytics-sidebar/index.ts b/apps/web/core/components/modules/analytics-sidebar/index.ts index c509152a2b..b329fd847c 100644 --- a/apps/web/core/components/modules/analytics-sidebar/index.ts +++ b/apps/web/core/components/modules/analytics-sidebar/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; export * from "./issue-progress"; export * from "./progress-stats"; diff --git a/apps/web/core/components/modules/analytics-sidebar/issue-progress.tsx b/apps/web/core/components/modules/analytics-sidebar/issue-progress.tsx index 7802aa84c2..400ffab607 100644 --- a/apps/web/core/components/modules/analytics-sidebar/issue-progress.tsx +++ b/apps/web/core/components/modules/analytics-sidebar/issue-progress.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { Fragment, useMemo, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/modules/analytics-sidebar/progress-stats.tsx b/apps/web/core/components/modules/analytics-sidebar/progress-stats.tsx index f3baa4d295..2abb3871c0 100644 --- a/apps/web/core/components/modules/analytics-sidebar/progress-stats.tsx +++ b/apps/web/core/components/modules/analytics-sidebar/progress-stats.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Tab } from "@headlessui/react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/modules/analytics-sidebar/root.tsx b/apps/web/core/components/modules/analytics-sidebar/root.tsx index aa768730bb..5381342600 100644 --- a/apps/web/core/components/modules/analytics-sidebar/root.tsx +++ b/apps/web/core/components/modules/analytics-sidebar/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/modules/applied-filters/date.tsx b/apps/web/core/components/modules/applied-filters/date.tsx index f9d5c21065..1169f2aeaf 100644 --- a/apps/web/core/components/modules/applied-filters/date.tsx +++ b/apps/web/core/components/modules/applied-filters/date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // icons import { DATE_AFTER_FILTER_OPTIONS } from "@plane/constants"; diff --git a/apps/web/core/components/modules/applied-filters/index.ts b/apps/web/core/components/modules/applied-filters/index.ts index cf34b6e69e..4631563d94 100644 --- a/apps/web/core/components/modules/applied-filters/index.ts +++ b/apps/web/core/components/modules/applied-filters/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./date"; export * from "./members"; export * from "./root"; diff --git a/apps/web/core/components/modules/applied-filters/members.tsx b/apps/web/core/components/modules/applied-filters/members.tsx index c57fdbc18c..e280b1c206 100644 --- a/apps/web/core/components/modules/applied-filters/members.tsx +++ b/apps/web/core/components/modules/applied-filters/members.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { CloseIcon } from "@plane/propel/icons"; // plane ui diff --git a/apps/web/core/components/modules/applied-filters/root.tsx b/apps/web/core/components/modules/applied-filters/root.tsx index cfac0f26cc..a4eedbb8c2 100644 --- a/apps/web/core/components/modules/applied-filters/root.tsx +++ b/apps/web/core/components/modules/applied-filters/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTranslation } from "@plane/i18n"; import { CloseIcon } from "@plane/propel/icons"; import type { TModuleDisplayFilters, TModuleFilters } from "@plane/types"; diff --git a/apps/web/core/components/modules/applied-filters/status.tsx b/apps/web/core/components/modules/applied-filters/status.tsx index e13627b0e7..582119fcc1 100644 --- a/apps/web/core/components/modules/applied-filters/status.tsx +++ b/apps/web/core/components/modules/applied-filters/status.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // ui import { MODULE_STATUS } from "@plane/constants"; diff --git a/apps/web/core/components/modules/archived-modules/header.tsx b/apps/web/core/components/modules/archived-modules/header.tsx index c96f8721d7..b00be1e449 100644 --- a/apps/web/core/components/modules/archived-modules/header.tsx +++ b/apps/web/core/components/modules/archived-modules/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useCallback, useRef, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/modules/archived-modules/index.ts b/apps/web/core/components/modules/archived-modules/index.ts index f59f0954ef..d6b767c614 100644 --- a/apps/web/core/components/modules/archived-modules/index.ts +++ b/apps/web/core/components/modules/archived-modules/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; export * from "./view"; export * from "./header"; diff --git a/apps/web/core/components/modules/archived-modules/modal.tsx b/apps/web/core/components/modules/archived-modules/modal.tsx index 65aa7933b4..58067d62c6 100644 --- a/apps/web/core/components/modules/archived-modules/modal.tsx +++ b/apps/web/core/components/modules/archived-modules/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; // ui import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/modules/archived-modules/root.tsx b/apps/web/core/components/modules/archived-modules/root.tsx index 26f3737e42..716ccbcdf1 100644 --- a/apps/web/core/components/modules/archived-modules/root.tsx +++ b/apps/web/core/components/modules/archived-modules/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/modules/archived-modules/view.tsx b/apps/web/core/components/modules/archived-modules/view.tsx index 332617a079..cd09d423b6 100644 --- a/apps/web/core/components/modules/archived-modules/view.tsx +++ b/apps/web/core/components/modules/archived-modules/view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // assets diff --git a/apps/web/core/components/modules/delete-module-modal.tsx b/apps/web/core/components/modules/delete-module-modal.tsx index a803ebe658..5c75065b4f 100644 --- a/apps/web/core/components/modules/delete-module-modal.tsx +++ b/apps/web/core/components/modules/delete-module-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/modules/dropdowns/filters/index.ts b/apps/web/core/components/modules/dropdowns/filters/index.ts index 786fc5cec8..8280ae9c64 100644 --- a/apps/web/core/components/modules/dropdowns/filters/index.ts +++ b/apps/web/core/components/modules/dropdowns/filters/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./lead"; export * from "./members"; export * from "./root"; diff --git a/apps/web/core/components/modules/dropdowns/filters/lead.tsx b/apps/web/core/components/modules/dropdowns/filters/lead.tsx index 5a1fef606e..fa4ee6124f 100644 --- a/apps/web/core/components/modules/dropdowns/filters/lead.tsx +++ b/apps/web/core/components/modules/dropdowns/filters/lead.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/modules/dropdowns/filters/members.tsx b/apps/web/core/components/modules/dropdowns/filters/members.tsx index 72f0d9bff4..1af34e16ce 100644 --- a/apps/web/core/components/modules/dropdowns/filters/members.tsx +++ b/apps/web/core/components/modules/dropdowns/filters/members.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/modules/dropdowns/filters/root.tsx b/apps/web/core/components/modules/dropdowns/filters/root.tsx index 09a81925f4..264494593e 100644 --- a/apps/web/core/components/modules/dropdowns/filters/root.tsx +++ b/apps/web/core/components/modules/dropdowns/filters/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import type { TModuleStatus } from "@plane/propel/icons"; diff --git a/apps/web/core/components/modules/dropdowns/filters/start-date.tsx b/apps/web/core/components/modules/dropdowns/filters/start-date.tsx index 8ae64109bf..57458cc740 100644 --- a/apps/web/core/components/modules/dropdowns/filters/start-date.tsx +++ b/apps/web/core/components/modules/dropdowns/filters/start-date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // constants diff --git a/apps/web/core/components/modules/dropdowns/filters/status.tsx b/apps/web/core/components/modules/dropdowns/filters/status.tsx index 6fcaf1c713..5957924e60 100644 --- a/apps/web/core/components/modules/dropdowns/filters/status.tsx +++ b/apps/web/core/components/modules/dropdowns/filters/status.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; import { MODULE_STATUS } from "@plane/constants"; diff --git a/apps/web/core/components/modules/dropdowns/filters/target-date.tsx b/apps/web/core/components/modules/dropdowns/filters/target-date.tsx index ad134d7500..39338d9129 100644 --- a/apps/web/core/components/modules/dropdowns/filters/target-date.tsx +++ b/apps/web/core/components/modules/dropdowns/filters/target-date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // plane constants diff --git a/apps/web/core/components/modules/dropdowns/index.ts b/apps/web/core/components/modules/dropdowns/index.ts index f6c42552f6..41a21b5cb7 100644 --- a/apps/web/core/components/modules/dropdowns/index.ts +++ b/apps/web/core/components/modules/dropdowns/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./filters"; export * from "./order-by"; diff --git a/apps/web/core/components/modules/dropdowns/order-by.tsx b/apps/web/core/components/modules/dropdowns/order-by.tsx index c91f0180f4..b33cf62cd3 100644 --- a/apps/web/core/components/modules/dropdowns/order-by.tsx +++ b/apps/web/core/components/modules/dropdowns/order-by.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { ArrowDownWideNarrow, ArrowUpWideNarrow } from "lucide-react"; import { MODULE_ORDER_BY_OPTIONS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/modules/form.tsx b/apps/web/core/components/modules/form.tsx index 4f9f8b12cb..3cc901289e 100644 --- a/apps/web/core/components/modules/form.tsx +++ b/apps/web/core/components/modules/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; // plane imports diff --git a/apps/web/core/components/modules/gantt-chart/blocks.tsx b/apps/web/core/components/modules/gantt-chart/blocks.tsx index 72bd890cba..d40d1bb619 100644 --- a/apps/web/core/components/modules/gantt-chart/blocks.tsx +++ b/apps/web/core/components/modules/gantt-chart/blocks.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import Link from "next/link"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/modules/gantt-chart/index.ts b/apps/web/core/components/modules/gantt-chart/index.ts index 72eb6bfc54..1b44f4a0ed 100644 --- a/apps/web/core/components/modules/gantt-chart/index.ts +++ b/apps/web/core/components/modules/gantt-chart/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./blocks"; export * from "./modules-list-layout"; diff --git a/apps/web/core/components/modules/gantt-chart/modules-list-layout.tsx b/apps/web/core/components/modules/gantt-chart/modules-list-layout.tsx index 4683852398..8f5df8df28 100644 --- a/apps/web/core/components/modules/gantt-chart/modules-list-layout.tsx +++ b/apps/web/core/components/modules/gantt-chart/modules-list-layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // PLane diff --git a/apps/web/core/components/modules/index.ts b/apps/web/core/components/modules/index.ts index a9a4e65e45..96ef55393a 100644 --- a/apps/web/core/components/modules/index.ts +++ b/apps/web/core/components/modules/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./applied-filters"; export * from "./dropdowns"; export * from "./select"; diff --git a/apps/web/core/components/modules/links/create-update-modal.tsx b/apps/web/core/components/modules/links/create-update-modal.tsx index 35eac054b3..48085d3650 100644 --- a/apps/web/core/components/modules/links/create-update-modal.tsx +++ b/apps/web/core/components/modules/links/create-update-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; diff --git a/apps/web/core/components/modules/links/index.ts b/apps/web/core/components/modules/links/index.ts index 1141121906..80472cdd71 100644 --- a/apps/web/core/components/modules/links/index.ts +++ b/apps/web/core/components/modules/links/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./create-update-modal"; export * from "./list-item"; export * from "./list"; diff --git a/apps/web/core/components/modules/links/list-item.tsx b/apps/web/core/components/modules/links/list-item.tsx index bb34c56992..79298e0aca 100644 --- a/apps/web/core/components/modules/links/list-item.tsx +++ b/apps/web/core/components/modules/links/list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { MODULE_TRACKER_ELEMENTS } from "@plane/constants"; diff --git a/apps/web/core/components/modules/links/list.tsx b/apps/web/core/components/modules/links/list.tsx index cd0a3c93a2..4497ae6c71 100644 --- a/apps/web/core/components/modules/links/list.tsx +++ b/apps/web/core/components/modules/links/list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { observer } from "mobx-react"; // plane types diff --git a/apps/web/core/components/modules/modal.tsx b/apps/web/core/components/modules/modal.tsx index c71bc5f9f5..b85d9b4890 100644 --- a/apps/web/core/components/modules/modal.tsx +++ b/apps/web/core/components/modules/modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { useForm } from "react-hook-form"; diff --git a/apps/web/core/components/modules/module-card-item.tsx b/apps/web/core/components/modules/module-card-item.tsx index 69a8b5dbf1..26f426883c 100644 --- a/apps/web/core/components/modules/module-card-item.tsx +++ b/apps/web/core/components/modules/module-card-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { SyntheticEvent } from "react"; import React, { useRef } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/modules/module-layout-icon.tsx b/apps/web/core/components/modules/module-layout-icon.tsx index e59dd65c21..cab7e1d1ad 100644 --- a/apps/web/core/components/modules/module-layout-icon.tsx +++ b/apps/web/core/components/modules/module-layout-icon.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import * as React from "react"; import { TimelineLayoutIcon, GridLayoutIcon, ListLayoutIcon } from "@plane/propel/icons"; import type { TModuleLayoutOptions } from "@plane/types"; diff --git a/apps/web/core/components/modules/module-list-item-action.tsx b/apps/web/core/components/modules/module-list-item-action.tsx index 999cc5a938..73746d0535 100644 --- a/apps/web/core/components/modules/module-list-item-action.tsx +++ b/apps/web/core/components/modules/module-list-item-action.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/modules/module-list-item.tsx b/apps/web/core/components/modules/module-list-item.tsx index 0d2701613b..ac942244a8 100644 --- a/apps/web/core/components/modules/module-list-item.tsx +++ b/apps/web/core/components/modules/module-list-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useRef } from "react"; import { observer } from "mobx-react"; import { useParams, usePathname, useSearchParams } from "next/navigation"; diff --git a/apps/web/core/components/modules/module-peek-overview.tsx b/apps/web/core/components/modules/module-peek-overview.tsx index 8aa0f21771..612c0b2afe 100644 --- a/apps/web/core/components/modules/module-peek-overview.tsx +++ b/apps/web/core/components/modules/module-peek-overview.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect } from "react"; import { observer } from "mobx-react"; import { usePathname, useSearchParams } from "next/navigation"; diff --git a/apps/web/core/components/modules/module-status-dropdown.tsx b/apps/web/core/components/modules/module-status-dropdown.tsx index 6aa27c15e8..b0bf9b8cb6 100644 --- a/apps/web/core/components/modules/module-status-dropdown.tsx +++ b/apps/web/core/components/modules/module-status-dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/modules/module-view-header.tsx b/apps/web/core/components/modules/module-view-header.tsx index f2ec043a64..c55779a563 100644 --- a/apps/web/core/components/modules/module-view-header.tsx +++ b/apps/web/core/components/modules/module-view-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useCallback, useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/modules/modules-list-view.tsx b/apps/web/core/components/modules/modules-list-view.tsx index 3da71dcc71..7495f17f69 100644 --- a/apps/web/core/components/modules/modules-list-view.tsx +++ b/apps/web/core/components/modules/modules-list-view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams, useSearchParams } from "next/navigation"; // components diff --git a/apps/web/core/components/modules/quick-actions.tsx b/apps/web/core/components/modules/quick-actions.tsx index 4638cd2603..0612b4a2cc 100644 --- a/apps/web/core/components/modules/quick-actions.tsx +++ b/apps/web/core/components/modules/quick-actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { MoreHorizontal } from "lucide-react"; diff --git a/apps/web/core/components/modules/select/index.ts b/apps/web/core/components/modules/select/index.ts index ed1ec7efa7..1e350bd8ab 100644 --- a/apps/web/core/components/modules/select/index.ts +++ b/apps/web/core/components/modules/select/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./status"; diff --git a/apps/web/core/components/modules/select/status.tsx b/apps/web/core/components/modules/select/status.tsx index fc265e5876..3b48570c3c 100644 --- a/apps/web/core/components/modules/select/status.tsx +++ b/apps/web/core/components/modules/select/status.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // react hook form diff --git a/apps/web/core/components/modules/sidebar-select/index.ts b/apps/web/core/components/modules/sidebar-select/index.ts index 2d2ba0d912..81b8792862 100644 --- a/apps/web/core/components/modules/sidebar-select/index.ts +++ b/apps/web/core/components/modules/sidebar-select/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./select-status"; diff --git a/apps/web/core/components/modules/sidebar-select/select-status.tsx b/apps/web/core/components/modules/sidebar-select/select-status.tsx index 58ca853b81..541e31592a 100644 --- a/apps/web/core/components/modules/sidebar-select/select-status.tsx +++ b/apps/web/core/components/modules/sidebar-select/select-status.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // react import React from "react"; // react-hook-form diff --git a/apps/web/core/components/navigation/app-rail-root.tsx b/apps/web/core/components/navigation/app-rail-root.tsx index bf096b59d3..0a79d11372 100644 --- a/apps/web/core/components/navigation/app-rail-root.tsx +++ b/apps/web/core/components/navigation/app-rail-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + "use client"; import { observer } from "mobx-react"; import { useParams, usePathname } from "next/navigation"; @@ -17,13 +23,13 @@ import { AppSidebarItemsRoot } from "./items-root"; export const AppRailRoot = observer(() => { // router - const { workspaceSlug } = useParams(); + const { workspaceSlug, projectId } = useParams(); const pathname = usePathname(); // preferences const { preferences, updateDisplayMode } = useAppRailPreferences(); const { isCollapsed, toggleAppRail } = useAppRailVisibility(); - - const isSettingsPath = pathname.includes(`/${workspaceSlug}/settings`); + // derived values + const isWorkspaceSettingsPath = pathname.includes(`/${workspaceSlug}/settings`) && !projectId; const showLabel = preferences.displayMode === "icon_with_label"; const railWidth = showLabel ? "3.75rem" : "3rem"; @@ -52,7 +58,7 @@ export const AppRailRoot = observer(() => { label: "Settings", icon: , href: `/${workspaceSlug}/settings`, - isActive: isSettingsPath, + isActive: isWorkspaceSettingsPath, showLabel, }} /> diff --git a/apps/web/core/components/navigation/customize-navigation-dialog.tsx b/apps/web/core/components/navigation/customize-navigation-dialog.tsx index 63edd309b6..d38a8a6a78 100644 --- a/apps/web/core/components/navigation/customize-navigation-dialog.tsx +++ b/apps/web/core/components/navigation/customize-navigation-dialog.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useCallback, useMemo, useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/navigation/index.ts b/apps/web/core/components/navigation/index.ts index 2494d65578..db9f557cf7 100644 --- a/apps/web/core/components/navigation/index.ts +++ b/apps/web/core/components/navigation/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./app-rail-root"; export * from "./tab-navigation-root"; export * from "./top-nav-power-k"; diff --git a/apps/web/core/components/navigation/items-root.tsx b/apps/web/core/components/navigation/items-root.tsx index da36dca5d8..5ba8e1e33f 100644 --- a/apps/web/core/components/navigation/items-root.tsx +++ b/apps/web/core/components/navigation/items-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components/AppSidebarItemsRoot.tsx import React from "react"; diff --git a/apps/web/core/components/navigation/project-actions-menu.tsx b/apps/web/core/components/navigation/project-actions-menu.tsx index 0637e9b9cb..f5fdc6f92c 100644 --- a/apps/web/core/components/navigation/project-actions-menu.tsx +++ b/apps/web/core/components/navigation/project-actions-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useRef } from "react"; import { useNavigate } from "react-router"; import { LogOut, MoreHorizontal, Settings, Share2, ArchiveIcon } from "lucide-react"; diff --git a/apps/web/core/components/navigation/project-header-button.tsx b/apps/web/core/components/navigation/project-header-button.tsx index 6da1b2d461..87b742fa1d 100644 --- a/apps/web/core/components/navigation/project-header-button.tsx +++ b/apps/web/core/components/navigation/project-header-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TPartialProject } from "@/plane-web/types"; // plane propel imports import { Logo } from "@plane/propel/emoji-icon-picker"; diff --git a/apps/web/core/components/navigation/project-header.tsx b/apps/web/core/components/navigation/project-header.tsx index ea87a87ac8..134c8d3031 100644 --- a/apps/web/core/components/navigation/project-header.tsx +++ b/apps/web/core/components/navigation/project-header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx b/apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx index efeed1d4df..4f3d13cb86 100644 --- a/apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx +++ b/apps/web/core/components/navigation/tab-navigation-overflow-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Link } from "react-router"; import { MoreHorizontal, Pin } from "lucide-react"; diff --git a/apps/web/core/components/navigation/tab-navigation-root.tsx b/apps/web/core/components/navigation/tab-navigation-root.tsx index 1959f8684c..d4d974ee66 100644 --- a/apps/web/core/components/navigation/tab-navigation-root.tsx +++ b/apps/web/core/components/navigation/tab-navigation-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import React, { useEffect } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/navigation/tab-navigation-utils.ts b/apps/web/core/components/navigation/tab-navigation-utils.ts index a3cffe01d8..de8fa1423b 100644 --- a/apps/web/core/components/navigation/tab-navigation-utils.ts +++ b/apps/web/core/components/navigation/tab-navigation-utils.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // Tab preferences type export type TTabPreferences = { defaultTab: string; diff --git a/apps/web/core/components/navigation/tab-navigation-visible-item.tsx b/apps/web/core/components/navigation/tab-navigation-visible-item.tsx index 4a533e2772..8210663c3a 100644 --- a/apps/web/core/components/navigation/tab-navigation-visible-item.tsx +++ b/apps/web/core/components/navigation/tab-navigation-visible-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Link } from "react-router"; import { PinOff } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/navigation/top-nav-power-k.tsx b/apps/web/core/components/navigation/top-nav-power-k.tsx index b4e9bacb0c..7d454515fe 100644 --- a/apps/web/core/components/navigation/top-nav-power-k.tsx +++ b/apps/web/core/components/navigation/top-nav-power-k.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useMemo, useCallback, useEffect } from "react"; import { Command } from "cmdk"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/navigation/use-active-tab.ts b/apps/web/core/components/navigation/use-active-tab.ts index f014289255..50ca1c6ba0 100644 --- a/apps/web/core/components/navigation/use-active-tab.ts +++ b/apps/web/core/components/navigation/use-active-tab.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useMemo } from "react"; import type { TIssue } from "@plane/types"; import type { TNavigationItem } from "@/components/navigation/tab-navigation-root"; diff --git a/apps/web/core/components/navigation/use-project-actions.ts b/apps/web/core/components/navigation/use-project-actions.ts index 24e3fc9fa7..1b881278db 100644 --- a/apps/web/core/components/navigation/use-project-actions.ts +++ b/apps/web/core/components/navigation/use-project-actions.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useState } from "react"; import { setToast, TOAST_TYPE } from "@plane/propel/toast"; import { copyUrlToClipboard } from "@plane/utils"; diff --git a/apps/web/core/components/navigation/use-responsive-tab-layout.ts b/apps/web/core/components/navigation/use-responsive-tab-layout.ts index c76724a067..cde061524c 100644 --- a/apps/web/core/components/navigation/use-responsive-tab-layout.ts +++ b/apps/web/core/components/navigation/use-responsive-tab-layout.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import type { TNavigationItem } from "./tab-navigation-root"; diff --git a/apps/web/core/components/navigation/use-tab-preferences.ts b/apps/web/core/components/navigation/use-tab-preferences.ts index 57a6100943..a29829eea9 100644 --- a/apps/web/core/components/navigation/use-tab-preferences.ts +++ b/apps/web/core/components/navigation/use-tab-preferences.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { setToast, TOAST_TYPE } from "@plane/propel/toast"; import { useMember } from "@/hooks/store/use-member"; @@ -23,7 +29,7 @@ export type TTabPreferencesHook = { */ export const useTabPreferences = (workspaceSlug: string, projectId: string): TTabPreferencesHook => { const { - project: { getProjectMemberPreferences, updateProjectMemberPreferences }, + project: { getProjectUserProperties, updateProjectUserProperties }, } = useMember(); // const { projectUserInfo } = useUserPermissions(); const { data } = useUser(); @@ -33,21 +39,17 @@ export const useTabPreferences = (workspaceSlug: string, projectId: string): TTa const memberId = data?.id || null; // Get preferences from store - const storePreferences = getProjectMemberPreferences(projectId); + const storePreferences = getProjectUserProperties(projectId); + const defaultTab = storePreferences?.preferences?.navigation?.default_tab || DEFAULT_TAB_KEY; + const hideInMoreMenu = storePreferences?.preferences?.navigation?.hide_in_more_menu || []; // Convert store preferences to component format const tabPreferences: TTabPreferences = useMemo(() => { - if (storePreferences) { - return { - defaultTab: storePreferences.default_tab || DEFAULT_TAB_KEY, - hiddenTabs: storePreferences.hide_in_more_menu || [], - }; - } return { - defaultTab: DEFAULT_TAB_KEY, - hiddenTabs: [], + defaultTab, + hiddenTabs: hideInMoreMenu, }; - }, [storePreferences]); + }, [defaultTab, hideInMoreMenu]); const isLoading = !storePreferences && memberId !== null; @@ -55,11 +57,14 @@ export const useTabPreferences = (workspaceSlug: string, projectId: string): TTa * Update preferences via store */ const updatePreferences = async (newPreferences: TTabPreferences) => { - if (!memberId) return; - - await updateProjectMemberPreferences(workspaceSlug, projectId, memberId, { - default_tab: newPreferences.defaultTab, - hide_in_more_menu: newPreferences.hiddenTabs, + await updateProjectUserProperties(workspaceSlug, projectId, { + preferences: { + pages: storePreferences?.preferences?.pages || { block_display: false }, + navigation: { + default_tab: newPreferences.defaultTab, + hide_in_more_menu: newPreferences.hiddenTabs, + }, + }, }); }; @@ -77,6 +82,7 @@ export const useTabPreferences = (workspaceSlug: string, projectId: string): TTa title: "Success!", message: "Default tab updated successfully.", }); + return; }) .catch(() => { setToast({ diff --git a/apps/web/core/components/onboarding/create-or-join-workspaces.tsx b/apps/web/core/components/onboarding/create-or-join-workspaces.tsx index 4b6e45f726..7a5728a3c5 100644 --- a/apps/web/core/components/onboarding/create-or-join-workspaces.tsx +++ b/apps/web/core/components/onboarding/create-or-join-workspaces.tsx @@ -1,4 +1,10 @@ -import React, { useEffect, useState } from "react"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { useEffect, useState } from "react"; import { observer } from "mobx-react"; import { OctagonAlert } from "lucide-react"; // plane imports @@ -7,8 +13,7 @@ import type { IWorkspaceMemberInvitation, TOnboardingSteps } from "@plane/types" import { LogoSpinner } from "@/components/common/logo-spinner"; // hooks import { useUser } from "@/hooks/store/user"; -// plane web helpers -import { getIsWorkspaceCreationDisabled } from "@/plane-web/helpers/instance.helper"; +import { useInstance } from "@/hooks/store/use-instance"; // local imports import { CreateWorkspace } from "./create-workspace"; import { Invitations } from "./invitations"; @@ -27,13 +32,14 @@ type Props = { }; export const CreateOrJoinWorkspaces = observer(function CreateOrJoinWorkspaces(props: Props) { - const { invitations, totalSteps, stepChange, finishOnboarding } = props; + const { invitations, stepChange, finishOnboarding } = props; // states const [currentView, setCurrentView] = useState(null); // store hooks const { data: user } = useUser(); + const { config } = useInstance(); // derived values - const isWorkspaceCreationEnabled = getIsWorkspaceCreationDisabled() === false; + const isWorkspaceCreationDisabled = config?.is_workspace_creation_disabled ?? false; useEffect(() => { if (invitations.length > 0) { @@ -60,7 +66,7 @@ export const CreateOrJoinWorkspaces = observer(function CreateOrJoinWorkspaces(p handleCurrentViewChange={() => setCurrentView(ECreateOrJoinWorkspaceViews.WORKSPACE_CREATE)} /> ) : currentView === ECreateOrJoinWorkspaceViews.WORKSPACE_CREATE ? ( - isWorkspaceCreationEnabled ? ( + !isWorkspaceCreationDisabled ? ( ) => Promise; @@ -132,8 +139,7 @@ export const CreateWorkspace = observer(function CreateWorkspace(props: Props) { name="name" rules={{ required: t("common.errors.required"), - validate: (value) => - /^[\w\s-]*$/.test(value) || t("workspace_creation.errors.validation.name_alphanumeric"), + validate: (value) => validateWorkspaceName(value, true), maxLength: { value: 80, message: t("workspace_creation.errors.validation.name_length"), @@ -194,7 +200,8 @@ export const CreateWorkspace = observer(function CreateWorkspace(props: Props) { type="text" value={value.toLocaleLowerCase().trim().replace(/ /g, "-")} onChange={(e) => { - if (/^[a-zA-Z0-9_-]+$/.test(e.target.value)) setInvalidSlug(false); + const validation = validateSlug(e.target.value); + if (validation === true) setInvalidSlug(false); else setInvalidSlug(true); onChange(e.target.value.toLowerCase()); }} diff --git a/apps/web/core/components/onboarding/header.tsx b/apps/web/core/components/onboarding/header.tsx index 9f8f621ed8..0320f00b28 100644 --- a/apps/web/core/components/onboarding/header.tsx +++ b/apps/web/core/components/onboarding/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/onboarding/index.ts b/apps/web/core/components/onboarding/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/onboarding/index.ts +++ b/apps/web/core/components/onboarding/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/onboarding/invitations.tsx b/apps/web/core/components/onboarding/invitations.tsx index 457fb32650..e293b8851b 100644 --- a/apps/web/core/components/onboarding/invitations.tsx +++ b/apps/web/core/components/onboarding/invitations.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; // plane imports import { ROLE } from "@plane/constants"; @@ -14,7 +20,7 @@ import { WorkspaceLogo } from "@/components/workspace/logo"; import { useWorkspace } from "@/hooks/store/use-workspace"; import { useUserSettings } from "@/hooks/store/user"; // services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; type Props = { invitations: IWorkspaceMemberInvitation[]; diff --git a/apps/web/core/components/onboarding/invite-members.tsx b/apps/web/core/components/onboarding/invite-members.tsx index 9f2464f4f4..bf13c67e91 100644 --- a/apps/web/core/components/onboarding/invite-members.tsx +++ b/apps/web/core/components/onboarding/invite-members.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState } from "react"; import { observer } from "mobx-react"; import type { @@ -25,7 +31,7 @@ import type { IUser, IWorkspace } from "@plane/types"; // ui import { Input, Spinner } from "@plane/ui"; // services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; // components import { SwitchAccountDropdown } from "./switch-account-dropdown"; diff --git a/apps/web/core/components/onboarding/profile-setup.tsx b/apps/web/core/components/onboarding/profile-setup.tsx index 0374a8ee05..8fdb9973f3 100644 --- a/apps/web/core/components/onboarding/profile-setup.tsx +++ b/apps/web/core/components/onboarding/profile-setup.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; @@ -11,7 +17,7 @@ import type { IUser, TUserProfile, TOnboardingSteps } from "@plane/types"; // ui import { Input, PasswordStrengthIndicator, Spinner } from "@plane/ui"; // components -import { cn, getFileURL, getPasswordStrength } from "@plane/utils"; +import { cn, getFileURL, getPasswordStrength, validatePersonName } from "@plane/utils"; import { UserImageUploadModal } from "@/components/core/modals/user-image-upload-modal"; // hooks import { useUser, useUserProfile } from "@/hooks/store/user"; @@ -297,9 +303,10 @@ export const ProfileSetup = observer(function ProfileSetup(props: Props) { name="first_name" rules={{ required: "First name is required", + validate: validatePersonName, maxLength: { - value: 24, - message: "First name must be within 24 characters.", + value: 50, + message: "First name must be within 50 characters.", }, }} render={({ field: { value, onChange, ref } }) => ( @@ -334,9 +341,10 @@ export const ProfileSetup = observer(function ProfileSetup(props: Props) { name="last_name" rules={{ required: "Last name is required", + validate: validatePersonName, maxLength: { - value: 24, - message: "Last name must be within 24 characters.", + value: 50, + message: "Last name must be within 50 characters.", }, }} render={({ field: { value, onChange, ref } }) => ( @@ -384,7 +392,7 @@ export const ProfileSetup = observer(function ProfileSetup(props: Props) { className="w-full border-[0.5px] border-subtle pr-12 placeholder:text-placeholder" onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} - autoComplete="on" + autoComplete="new-password" /> {showPassword.password ? ( {showPassword.retypePassword ? ( ( diff --git a/apps/web/core/components/onboarding/steps/profile/set-password.tsx b/apps/web/core/components/onboarding/steps/profile/set-password.tsx index 614cb32581..8736fd9814 100644 --- a/apps/web/core/components/onboarding/steps/profile/set-password.tsx +++ b/apps/web/core/components/onboarding/steps/profile/set-password.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState, useCallback, useMemo } from "react"; import { LockIcon, ChevronDownIcon } from "@plane/propel/icons"; import { PasswordInput, PasswordStrengthIndicator } from "@plane/ui"; diff --git a/apps/web/core/components/onboarding/steps/role/index.ts b/apps/web/core/components/onboarding/steps/role/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/onboarding/steps/role/index.ts +++ b/apps/web/core/components/onboarding/steps/role/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/onboarding/steps/role/root.tsx b/apps/web/core/components/onboarding/steps/role/root.tsx index 824f5763bf..8aa07ed7ab 100644 --- a/apps/web/core/components/onboarding/steps/role/root.tsx +++ b/apps/web/core/components/onboarding/steps/role/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; import { Box, PenTool, Rocket, Monitor, RefreshCw } from "lucide-react"; diff --git a/apps/web/core/components/onboarding/steps/root.tsx b/apps/web/core/components/onboarding/steps/root.tsx index f4941eafa9..0ef9440118 100644 --- a/apps/web/core/components/onboarding/steps/root.tsx +++ b/apps/web/core/components/onboarding/steps/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef } from "react"; // plane imports import type { IWorkspaceMemberInvitation } from "@plane/types"; diff --git a/apps/web/core/components/onboarding/steps/team/index.ts b/apps/web/core/components/onboarding/steps/team/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/onboarding/steps/team/index.ts +++ b/apps/web/core/components/onboarding/steps/team/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/onboarding/steps/team/root.tsx b/apps/web/core/components/onboarding/steps/team/root.tsx index b088e7c144..8ba63eb28a 100644 --- a/apps/web/core/components/onboarding/steps/team/root.tsx +++ b/apps/web/core/components/onboarding/steps/team/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState } from "react"; import { observer } from "mobx-react"; import type { @@ -24,7 +30,7 @@ import { Input, Spinner } from "@plane/ui"; // hooks import { useWorkspace } from "@/hooks/store/use-workspace"; // services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; // components import { CommonOnboardingHeader } from "../common"; diff --git a/apps/web/core/components/onboarding/steps/usecase/index.ts b/apps/web/core/components/onboarding/steps/usecase/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/onboarding/steps/usecase/index.ts +++ b/apps/web/core/components/onboarding/steps/usecase/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/onboarding/steps/usecase/root.tsx b/apps/web/core/components/onboarding/steps/usecase/root.tsx index 63a3401497..2fb3954487 100644 --- a/apps/web/core/components/onboarding/steps/usecase/root.tsx +++ b/apps/web/core/components/onboarding/steps/usecase/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; // plane imports diff --git a/apps/web/core/components/onboarding/steps/workspace/create.tsx b/apps/web/core/components/onboarding/steps/workspace/create.tsx index 6100f75c1a..371c4532ab 100644 --- a/apps/web/core/components/onboarding/steps/workspace/create.tsx +++ b/apps/web/core/components/onboarding/steps/workspace/create.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; @@ -9,13 +15,13 @@ import { Button } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import type { IUser, IWorkspace } from "@plane/types"; import { Spinner } from "@plane/ui"; -import { cn } from "@plane/utils"; +import { cn, validateWorkspaceName, validateSlug } from "@plane/utils"; // hooks +import { useInstance } from "@/hooks/store/use-instance"; import { useWorkspace } from "@/hooks/store/use-workspace"; import { useUserProfile, useUserSettings } from "@/hooks/store/user"; -// plane-web imports -import { getIsWorkspaceCreationDisabled } from "@/plane-web/helpers/instance.helper"; -import { WorkspaceService } from "@/plane-web/services"; +// services +import { WorkspaceService } from "@/services/workspace.service"; // local components import { CommonOnboardingHeader } from "../common"; @@ -40,11 +46,12 @@ export const WorkspaceCreateStep = observer(function WorkspaceCreateStep({ // plane hooks const { t } = useTranslation(); // store hooks + const { config } = useInstance(); const { updateUserProfile } = useUserProfile(); const { fetchCurrentUserSettings } = useUserSettings(); const { createWorkspace, fetchWorkspaces } = useWorkspace(); - const isWorkspaceCreationEnabled = getIsWorkspaceCreationDisabled() === false; + const isWorkspaceCreationDisabled = config?.is_workspace_creation_disabled ?? false; // form info const { @@ -107,7 +114,7 @@ export const WorkspaceCreateStep = observer(function WorkspaceCreateStep({ const isButtonDisabled = !isValid || invalidSlug || isSubmitting; - if (!isWorkspaceCreationEnabled) { + if (isWorkspaceCreationDisabled) { return (
@@ -139,8 +146,7 @@ export const WorkspaceCreateStep = observer(function WorkspaceCreateStep({ name="name" rules={{ required: t("common.errors.required"), - validate: (value) => - /^[\w\s-]*$/.test(value) || t("workspace_creation.errors.validation.name_alphanumeric"), + validate: (value) => validateWorkspaceName(value, true), maxLength: { value: 80, message: t("workspace_creation.errors.validation.name_length"), @@ -213,7 +219,8 @@ export const WorkspaceCreateStep = observer(function WorkspaceCreateStep({ type="text" value={value.toLocaleLowerCase().trim().replace(/ /g, "-")} onChange={(e) => { - if (/^[a-zA-Z0-9_-]+$/.test(e.target.value)) setInvalidSlug(false); + const validation = validateSlug(e.target.value); + if (validation === true) setInvalidSlug(false); else setInvalidSlug(true); onChange(e.target.value.toLowerCase()); }} diff --git a/apps/web/core/components/onboarding/steps/workspace/index.ts b/apps/web/core/components/onboarding/steps/workspace/index.ts index 2cce58b07f..fb5bdd9b49 100644 --- a/apps/web/core/components/onboarding/steps/workspace/index.ts +++ b/apps/web/core/components/onboarding/steps/workspace/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./create"; export * from "./join-invites"; export * from "./root"; diff --git a/apps/web/core/components/onboarding/steps/workspace/join-invites.tsx b/apps/web/core/components/onboarding/steps/workspace/join-invites.tsx index 98511293c0..ec50bb97ca 100644 --- a/apps/web/core/components/onboarding/steps/workspace/join-invites.tsx +++ b/apps/web/core/components/onboarding/steps/workspace/join-invites.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; // plane imports import { ROLE } from "@plane/constants"; @@ -11,7 +17,7 @@ import { WorkspaceLogo } from "@/components/workspace/logo"; import { useWorkspace } from "@/hooks/store/use-workspace"; import { useUserSettings } from "@/hooks/store/user"; // services -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; // local components import { CommonOnboardingHeader } from "../common"; diff --git a/apps/web/core/components/onboarding/steps/workspace/root.tsx b/apps/web/core/components/onboarding/steps/workspace/root.tsx index f5cfef3eca..f123487935 100644 --- a/apps/web/core/components/onboarding/steps/workspace/root.tsx +++ b/apps/web/core/components/onboarding/steps/workspace/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/onboarding/switch-account-dropdown.tsx b/apps/web/core/components/onboarding/switch-account-dropdown.tsx index a909efb45e..f66219976f 100644 --- a/apps/web/core/components/onboarding/switch-account-dropdown.tsx +++ b/apps/web/core/components/onboarding/switch-account-dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useState } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/onboarding/switch-account-modal.tsx b/apps/web/core/components/onboarding/switch-account-modal.tsx index 8f94cdfb15..c41ec0a901 100644 --- a/apps/web/core/components/onboarding/switch-account-modal.tsx +++ b/apps/web/core/components/onboarding/switch-account-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { useTheme } from "next-themes"; diff --git a/apps/web/core/components/pages/dropdowns/actions.tsx b/apps/web/core/components/pages/dropdowns/actions.tsx index 0b300a757e..aec992c403 100644 --- a/apps/web/core/components/pages/dropdowns/actions.tsx +++ b/apps/web/core/components/pages/dropdowns/actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/pages/dropdowns/index.ts b/apps/web/core/components/pages/dropdowns/index.ts index 8ff5a89aff..8f46fb467f 100644 --- a/apps/web/core/components/pages/dropdowns/index.ts +++ b/apps/web/core/components/pages/dropdowns/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./actions"; diff --git a/apps/web/core/components/pages/editor/content-limit-banner.tsx b/apps/web/core/components/pages/editor/content-limit-banner.tsx index 13f453d086..0a6e487fd6 100644 --- a/apps/web/core/components/pages/editor/content-limit-banner.tsx +++ b/apps/web/core/components/pages/editor/content-limit-banner.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { TriangleAlert } from "lucide-react"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/pages/editor/editor-body.tsx b/apps/web/core/components/pages/editor/editor-body.tsx index 53b61e0a5d..2175a5c755 100644 --- a/apps/web/core/components/pages/editor/editor-body.tsx +++ b/apps/web/core/components/pages/editor/editor-body.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useEffect, useMemo, useRef } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/pages/editor/header/index.ts b/apps/web/core/components/pages/editor/header/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/pages/editor/header/index.ts +++ b/apps/web/core/components/pages/editor/header/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/pages/editor/header/logo-picker.tsx b/apps/web/core/components/pages/editor/header/logo-picker.tsx index df6eac425d..9102be8a82 100644 --- a/apps/web/core/components/pages/editor/header/logo-picker.tsx +++ b/apps/web/core/components/pages/editor/header/logo-picker.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/pages/editor/header/root.tsx b/apps/web/core/components/pages/editor/header/root.tsx index 136e7c5912..3b754fb13a 100644 --- a/apps/web/core/components/pages/editor/header/root.tsx +++ b/apps/web/core/components/pages/editor/header/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { SmilePlus } from "lucide-react"; diff --git a/apps/web/core/components/pages/editor/page-root.tsx b/apps/web/core/components/pages/editor/page-root.tsx index 533e0ea9fe..eec8e3c264 100644 --- a/apps/web/core/components/pages/editor/page-root.tsx +++ b/apps/web/core/components/pages/editor/page-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useEffect, useRef, useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/pages/editor/summary/content-browser.tsx b/apps/web/core/components/pages/editor/summary/content-browser.tsx index dda98d3061..1d301940ad 100644 --- a/apps/web/core/components/pages/editor/summary/content-browser.tsx +++ b/apps/web/core/components/pages/editor/summary/content-browser.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useEffect, useCallback } from "react"; // plane imports import type { EditorRefApi, IMarking } from "@plane/editor"; diff --git a/apps/web/core/components/pages/editor/summary/heading-components.tsx b/apps/web/core/components/pages/editor/summary/heading-components.tsx index c5d3d3b250..8f1e82e87c 100644 --- a/apps/web/core/components/pages/editor/summary/heading-components.tsx +++ b/apps/web/core/components/pages/editor/summary/heading-components.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import type { IMarking } from "@plane/editor"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/pages/editor/summary/index.ts b/apps/web/core/components/pages/editor/summary/index.ts index 779b785483..17a5415e18 100644 --- a/apps/web/core/components/pages/editor/summary/index.ts +++ b/apps/web/core/components/pages/editor/summary/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./content-browser"; diff --git a/apps/web/core/components/pages/editor/title.tsx b/apps/web/core/components/pages/editor/title.tsx index 73c398d49b..5272afbb2a 100644 --- a/apps/web/core/components/pages/editor/title.tsx +++ b/apps/web/core/components/pages/editor/title.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // editor diff --git a/apps/web/core/components/pages/editor/toolbar/color-dropdown.tsx b/apps/web/core/components/pages/editor/toolbar/color-dropdown.tsx index 591f8f3142..116dc8135c 100644 --- a/apps/web/core/components/pages/editor/toolbar/color-dropdown.tsx +++ b/apps/web/core/components/pages/editor/toolbar/color-dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { memo } from "react"; import { ALargeSmall, Ban } from "lucide-react"; import { Popover } from "@headlessui/react"; diff --git a/apps/web/core/components/pages/editor/toolbar/index.ts b/apps/web/core/components/pages/editor/toolbar/index.ts index 2c36785bd3..bd1654ccdb 100644 --- a/apps/web/core/components/pages/editor/toolbar/index.ts +++ b/apps/web/core/components/pages/editor/toolbar/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./color-dropdown"; export * from "./options-dropdown"; export * from "./root"; diff --git a/apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx b/apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx index 5655469ccd..291f3cb47c 100644 --- a/apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx +++ b/apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { observer } from "mobx-react"; import { ArrowUpToLine, Clipboard, History } from "lucide-react"; @@ -132,12 +138,12 @@ export const PageOptionsDropdown = observer(function PageOptionsDropdown(props: optionsOrder={[ "full-screen", "sticky-toolbar", + "copy-markdown", + "version-history", "make-a-copy", - "toggle-access", "archive-restore", "delete", - "version-history", - "copy-markdown", + "toggle-access", "export", ]} page={page} diff --git a/apps/web/core/components/pages/editor/toolbar/root.tsx b/apps/web/core/components/pages/editor/toolbar/root.tsx index c4ea3eeec7..862831d2aa 100644 --- a/apps/web/core/components/pages/editor/toolbar/root.tsx +++ b/apps/web/core/components/pages/editor/toolbar/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { PanelRight } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/pages/editor/toolbar/toolbar.tsx b/apps/web/core/components/pages/editor/toolbar/toolbar.tsx index b5dd1cc2b3..3f71ba5fc7 100644 --- a/apps/web/core/components/pages/editor/toolbar/toolbar.tsx +++ b/apps/web/core/components/pages/editor/toolbar/toolbar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState, useCallback } from "react"; import type { EditorRefApi } from "@plane/editor"; // plane imports diff --git a/apps/web/core/components/pages/header/actions.tsx b/apps/web/core/components/pages/header/actions.tsx index f381ef5d06..7ebad8adce 100644 --- a/apps/web/core/components/pages/header/actions.tsx +++ b/apps/web/core/components/pages/header/actions.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane web components import { PageLockControl } from "@/plane-web/components/pages/header/lock-control"; diff --git a/apps/web/core/components/pages/header/archived-badge.tsx b/apps/web/core/components/pages/header/archived-badge.tsx index 2bd7e17423..c7bb607e66 100644 --- a/apps/web/core/components/pages/header/archived-badge.tsx +++ b/apps/web/core/components/pages/header/archived-badge.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { ArchiveIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/pages/header/copy-link-control.tsx b/apps/web/core/components/pages/header/copy-link-control.tsx index aa502f7123..40ad4a75a1 100644 --- a/apps/web/core/components/pages/header/copy-link-control.tsx +++ b/apps/web/core/components/pages/header/copy-link-control.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useRef, useEffect, useCallback } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/pages/header/favorite-control.tsx b/apps/web/core/components/pages/header/favorite-control.tsx index 7e74abba72..38c982d487 100644 --- a/apps/web/core/components/pages/header/favorite-control.tsx +++ b/apps/web/core/components/pages/header/favorite-control.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Star } from "lucide-react"; // ui diff --git a/apps/web/core/components/pages/header/index.ts b/apps/web/core/components/pages/header/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/pages/header/index.ts +++ b/apps/web/core/components/pages/header/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/pages/header/offline-badge.tsx b/apps/web/core/components/pages/header/offline-badge.tsx index fcb6adea1d..460d071d73 100644 --- a/apps/web/core/components/pages/header/offline-badge.tsx +++ b/apps/web/core/components/pages/header/offline-badge.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/pages/header/root.tsx b/apps/web/core/components/pages/header/root.tsx index 1dc01cc9b7..1223b97dbb 100644 --- a/apps/web/core/components/pages/header/root.tsx +++ b/apps/web/core/components/pages/header/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { observer } from "mobx-react"; import { ListFilter } from "lucide-react"; diff --git a/apps/web/core/components/pages/header/syncing-badge.tsx b/apps/web/core/components/pages/header/syncing-badge.tsx index 4aac9f1818..e0aaab3f60 100644 --- a/apps/web/core/components/pages/header/syncing-badge.tsx +++ b/apps/web/core/components/pages/header/syncing-badge.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useEffect } from "react"; import { CloudOff, Dot } from "lucide-react"; import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/pages/list/applied-filters/index.ts b/apps/web/core/components/pages/list/applied-filters/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/pages/list/applied-filters/index.ts +++ b/apps/web/core/components/pages/list/applied-filters/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/pages/list/applied-filters/root.tsx b/apps/web/core/components/pages/list/applied-filters/root.tsx index e911ea01df..3329de2b3c 100644 --- a/apps/web/core/components/pages/list/applied-filters/root.tsx +++ b/apps/web/core/components/pages/list/applied-filters/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTranslation } from "@plane/i18n"; import { CloseIcon } from "@plane/propel/icons"; // plane imports diff --git a/apps/web/core/components/pages/list/block-item-action.tsx b/apps/web/core/components/pages/list/block-item-action.tsx index c8034e7bfe..3e7629597d 100644 --- a/apps/web/core/components/pages/list/block-item-action.tsx +++ b/apps/web/core/components/pages/list/block-item-action.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { Earth, Info, Minus } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/pages/list/block.tsx b/apps/web/core/components/pages/list/block.tsx index 7433234343..5d658a42e2 100644 --- a/apps/web/core/components/pages/list/block.tsx +++ b/apps/web/core/components/pages/list/block.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef } from "react"; import { observer } from "mobx-react"; import { Logo } from "@plane/propel/emoji-icon-picker"; diff --git a/apps/web/core/components/pages/list/filters/index.ts b/apps/web/core/components/pages/list/filters/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/pages/list/filters/index.ts +++ b/apps/web/core/components/pages/list/filters/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/pages/list/filters/root.tsx b/apps/web/core/components/pages/list/filters/root.tsx index 52ec6a8acb..e60462cfba 100644 --- a/apps/web/core/components/pages/list/filters/root.tsx +++ b/apps/web/core/components/pages/list/filters/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useRef, useEffect } from "react"; import { observer } from "mobx-react"; import { SearchIcon, CloseIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/pages/list/index.ts b/apps/web/core/components/pages/list/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/pages/list/index.ts +++ b/apps/web/core/components/pages/list/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/pages/list/order-by.tsx b/apps/web/core/components/pages/list/order-by.tsx index 867247a0be..8bdf960fa1 100644 --- a/apps/web/core/components/pages/list/order-by.tsx +++ b/apps/web/core/components/pages/list/order-by.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { ArrowDownWideNarrow, ArrowUpWideNarrow, Check } from "lucide-react"; // plane imports import { getButtonStyling } from "@plane/propel/button"; diff --git a/apps/web/core/components/pages/list/root.tsx b/apps/web/core/components/pages/list/root.tsx index 0d477745fe..3764e5bc19 100644 --- a/apps/web/core/components/pages/list/root.tsx +++ b/apps/web/core/components/pages/list/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // types import type { TPageNavigationTabs } from "@plane/types"; diff --git a/apps/web/core/components/pages/list/search-input.tsx b/apps/web/core/components/pages/list/search-input.tsx index fc8492f71a..200957b44a 100644 --- a/apps/web/core/components/pages/list/search-input.tsx +++ b/apps/web/core/components/pages/list/search-input.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef, useState } from "react"; // plane imports import { useOutsideClickDetector } from "@plane/hooks"; diff --git a/apps/web/core/components/pages/list/tab-navigation.tsx b/apps/web/core/components/pages/list/tab-navigation.tsx index 5ed0ee1b86..3fe4bc5647 100644 --- a/apps/web/core/components/pages/list/tab-navigation.tsx +++ b/apps/web/core/components/pages/list/tab-navigation.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import Link from "next/link"; // types import type { TPageNavigationTabs } from "@plane/types"; diff --git a/apps/web/core/components/pages/loaders/page-content-loader.tsx b/apps/web/core/components/pages/loaders/page-content-loader.tsx index a910f8b60f..3bc57163ec 100644 --- a/apps/web/core/components/pages/loaders/page-content-loader.tsx +++ b/apps/web/core/components/pages/loaders/page-content-loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { Loader } from "@plane/ui"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/pages/loaders/page-loader.tsx b/apps/web/core/components/pages/loaders/page-loader.tsx index c07ac6b04b..a217229ad1 100644 --- a/apps/web/core/components/pages/loaders/page-loader.tsx +++ b/apps/web/core/components/pages/loaders/page-loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { range } from "lodash-es"; import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/pages/modals/create-page-modal.tsx b/apps/web/core/components/pages/modals/create-page-modal.tsx index 927c0f268f..493cb84e3e 100644 --- a/apps/web/core/components/pages/modals/create-page-modal.tsx +++ b/apps/web/core/components/pages/modals/create-page-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; // constants import type { EPageAccess } from "@plane/constants"; diff --git a/apps/web/core/components/pages/modals/delete-page-modal.tsx b/apps/web/core/components/pages/modals/delete-page-modal.tsx index 701431c18e..8a99b98b9d 100644 --- a/apps/web/core/components/pages/modals/delete-page-modal.tsx +++ b/apps/web/core/components/pages/modals/delete-page-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // ui diff --git a/apps/web/core/components/pages/modals/export-page-modal.tsx b/apps/web/core/components/pages/modals/export-page-modal.tsx index 861e5c1526..531fecc26b 100644 --- a/apps/web/core/components/pages/modals/export-page-modal.tsx +++ b/apps/web/core/components/pages/modals/export-page-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import type { PageProps } from "@react-pdf/renderer"; import { pdf } from "@react-pdf/renderer"; diff --git a/apps/web/core/components/pages/modals/page-form.tsx b/apps/web/core/components/pages/modals/page-form.tsx index 05dcc95ba4..9aad37280f 100644 --- a/apps/web/core/components/pages/modals/page-form.tsx +++ b/apps/web/core/components/pages/modals/page-form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FormEvent } from "react"; import { useState } from "react"; import type { LucideIcon } from "lucide-react"; diff --git a/apps/web/core/components/pages/navigation-pane/index.ts b/apps/web/core/components/pages/navigation-pane/index.ts index cbb4ee7b45..20f042aa57 100644 --- a/apps/web/core/components/pages/navigation-pane/index.ts +++ b/apps/web/core/components/pages/navigation-pane/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane web imports import { ORDERED_PAGE_NAVIGATION_TABS_LIST } from "@/plane-web/components/pages/navigation-pane"; diff --git a/apps/web/core/components/pages/navigation-pane/root.tsx b/apps/web/core/components/pages/navigation-pane/root.tsx index 75ee8fbe2d..a4091300fd 100644 --- a/apps/web/core/components/pages/navigation-pane/root.tsx +++ b/apps/web/core/components/pages/navigation-pane/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useCallback } from "react"; import { observer } from "mobx-react"; import { useRouter, useSearchParams } from "next/navigation"; diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/assets.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/assets.tsx index 1b1b09df81..02be601891 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/assets.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/assets.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/info/actors-info.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/info/actors-info.tsx index fe71741350..8757dec73c 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/info/actors-info.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/info/actors-info.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import Link from "next/link"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/info/document-info.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/info/document-info.tsx index 80828fbb32..479f77fee8 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/info/document-info.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/info/document-info.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback, useEffect, useMemo, useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/info/root.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/info/root.tsx index fda6b8aef3..2aa67586b4 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/info/root.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/info/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // components import type { TPageRootHandlers } from "@/components/pages/editor/page-root"; diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/info/version-history.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/info/version-history.tsx index 3057693fe9..2f3f76d0ae 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/info/version-history.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/info/version-history.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/outline.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/outline.tsx index adae3ab5df..5ce3f9b188 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/outline.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/outline.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane web imports import { PageNavigationPaneOutlineTabEmptyState } from "@/plane-web/components/pages/navigation-pane/tab-panels/empty-states/outline"; // store diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx index aba1a04444..3e12d09238 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Tab } from "@headlessui/react"; // components diff --git a/apps/web/core/components/pages/navigation-pane/tabs-list.tsx b/apps/web/core/components/pages/navigation-pane/tabs-list.tsx index 57f639ec9e..9661bbf88a 100644 --- a/apps/web/core/components/pages/navigation-pane/tabs-list.tsx +++ b/apps/web/core/components/pages/navigation-pane/tabs-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Tab } from "@headlessui/react"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/pages/navigation-pane/types/extensions.ts b/apps/web/core/components/pages/navigation-pane/types/extensions.ts index 6d9fa8efb5..e24a049577 100644 --- a/apps/web/core/components/pages/navigation-pane/types/extensions.ts +++ b/apps/web/core/components/pages/navigation-pane/types/extensions.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ReactNode } from "react"; import type { EPageStoreType } from "@/plane-web/hooks/store"; import type { TPageInstance } from "@/store/pages/base-page"; diff --git a/apps/web/core/components/pages/navigation-pane/types/index.ts b/apps/web/core/components/pages/navigation-pane/types/index.ts index fd10e53821..f833485a0b 100644 --- a/apps/web/core/components/pages/navigation-pane/types/index.ts +++ b/apps/web/core/components/pages/navigation-pane/types/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // Export generic extension system interfaces export type { INavigationPaneExtensionProps, diff --git a/apps/web/core/components/pages/pages-list-main-content.tsx b/apps/web/core/components/pages/pages-list-main-content.tsx index e41d0f8858..adfce6b910 100644 --- a/apps/web/core/components/pages/pages-list-main-content.tsx +++ b/apps/web/core/components/pages/pages-list-main-content.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/pages/pages-list-view.tsx b/apps/web/core/components/pages/pages-list-view.tsx index 15f114f46e..5cd4c794f6 100644 --- a/apps/web/core/components/pages/pages-list-view.tsx +++ b/apps/web/core/components/pages/pages-list-view.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import useSWR from "swr"; import type { TPageNavigationTabs } from "@plane/types"; diff --git a/apps/web/core/components/pages/version/editor.tsx b/apps/web/core/components/pages/version/editor.tsx index 27a5945666..4543af5b02 100644 --- a/apps/web/core/components/pages/version/editor.tsx +++ b/apps/web/core/components/pages/version/editor.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/pages/version/index.ts b/apps/web/core/components/pages/version/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/pages/version/index.ts +++ b/apps/web/core/components/pages/version/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/pages/version/main-content.tsx b/apps/web/core/components/pages/version/main-content.tsx index 38a9dbcaaa..907519be7e 100644 --- a/apps/web/core/components/pages/version/main-content.tsx +++ b/apps/web/core/components/pages/version/main-content.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; diff --git a/apps/web/core/components/pages/version/root.tsx b/apps/web/core/components/pages/version/root.tsx index 81e2c816bd..1e75c76f5e 100644 --- a/apps/web/core/components/pages/version/root.tsx +++ b/apps/web/core/components/pages/version/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { observer } from "mobx-react"; import { useRouter, useSearchParams } from "next/navigation"; diff --git a/apps/web/core/components/power-k/actions/helper.ts b/apps/web/core/components/power-k/actions/helper.ts index 5156cadf73..a72f9d4413 100644 --- a/apps/web/core/components/power-k/actions/helper.ts +++ b/apps/web/core/components/power-k/actions/helper.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { store } from "@/lib/store-context"; export const openProjectAndScrollToSidebar = (itemProjectId: string | undefined) => { diff --git a/apps/web/core/components/power-k/config/account-commands.ts b/apps/web/core/components/power-k/config/account-commands.ts index 8adce5e6de..e412ed8d29 100644 --- a/apps/web/core/components/power-k/config/account-commands.ts +++ b/apps/web/core/components/power-k/config/account-commands.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { LogOut, Mails } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/power-k/config/commands.ts b/apps/web/core/components/power-k/config/commands.ts index 055257403f..eef139ae81 100644 --- a/apps/web/core/components/power-k/config/commands.ts +++ b/apps/web/core/components/power-k/config/commands.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // local imports import type { TPowerKCommandConfig } from "../core/types"; import { usePowerKContextBasedActions } from "../ui/pages/context-based"; diff --git a/apps/web/core/components/power-k/config/creation/command.ts b/apps/web/core/components/power-k/config/creation/command.ts index ca75f4d91a..f63baa929a 100644 --- a/apps/web/core/components/power-k/config/creation/command.ts +++ b/apps/web/core/components/power-k/config/creation/command.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { FileText, FolderPlus, Layers, SquarePlus } from "lucide-react"; // plane imports import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; @@ -9,8 +15,7 @@ import type { TPowerKCommandConfig, TPowerKContext } from "@/components/power-k/ import { useCommandPalette } from "@/hooks/store/use-command-palette"; import { useProject } from "@/hooks/store/use-project"; import { useUser } from "@/hooks/store/user"; -// plane web imports -import { getIsWorkspaceCreationDisabled } from "@/plane-web/helpers/instance.helper"; +import { useInstance } from "@/hooks/store/use-instance"; export type TPowerKCreationCommandKeys = | "create_work_item" @@ -26,6 +31,7 @@ export type TPowerKCreationCommandKeys = */ export const usePowerKCreationCommandsRecord = (): Record => { // store + const { config } = useInstance(); const { canPerformAnyCreateAction, permission: { allowPermissions }, @@ -52,7 +58,7 @@ export const usePowerKCreationCommandsRecord = (): Record ctx.params.projectId ? getPartialProjectById(ctx.params.projectId.toString()) : undefined; diff --git a/apps/web/core/components/power-k/config/creation/root.ts b/apps/web/core/components/power-k/config/creation/root.ts index 59402c3a68..10bc9434ec 100644 --- a/apps/web/core/components/power-k/config/creation/root.ts +++ b/apps/web/core/components/power-k/config/creation/root.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // types import type { TPowerKCommandConfig } from "@/components/power-k/core/types"; // local imports diff --git a/apps/web/core/components/power-k/config/help-commands.ts b/apps/web/core/components/power-k/config/help-commands.ts index 9f61a5ceb4..77e18de362 100644 --- a/apps/web/core/components/power-k/config/help-commands.ts +++ b/apps/web/core/components/power-k/config/help-commands.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { FileText, GithubIcon, MessageSquare, Rocket } from "lucide-react"; // plane imports import { DiscordIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/power-k/config/miscellaneous-commands.ts b/apps/web/core/components/power-k/config/miscellaneous-commands.ts index 562f4dea50..de1d617cf0 100644 --- a/apps/web/core/components/power-k/config/miscellaneous-commands.ts +++ b/apps/web/core/components/power-k/config/miscellaneous-commands.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { PanelLeft } from "lucide-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/power-k/config/navigation/commands.ts b/apps/web/core/components/power-k/config/navigation/commands.ts index 94e424adf8..aecd31b786 100644 --- a/apps/web/core/components/power-k/config/navigation/commands.ts +++ b/apps/web/core/components/power-k/config/navigation/commands.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { BarChart2, Briefcase, FileText, Home, Inbox, Layers, PenSquare, Settings } from "lucide-react"; // plane imports import { EUserPermissionsLevel } from "@plane/constants"; diff --git a/apps/web/core/components/power-k/config/navigation/root.ts b/apps/web/core/components/power-k/config/navigation/root.ts index 529fd1662e..b2f8cb2945 100644 --- a/apps/web/core/components/power-k/config/navigation/root.ts +++ b/apps/web/core/components/power-k/config/navigation/root.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import type { TPowerKCommandConfig } from "@/components/power-k/core/types"; // local imports diff --git a/apps/web/core/components/power-k/config/preferences-commands.ts b/apps/web/core/components/power-k/config/preferences-commands.ts index 6e6ad8e864..b1a9e97188 100644 --- a/apps/web/core/components/power-k/config/preferences-commands.ts +++ b/apps/web/core/components/power-k/config/preferences-commands.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { useTheme } from "next-themes"; import { Calendar, Earth, Languages, Palette } from "lucide-react"; diff --git a/apps/web/core/components/power-k/core/context-detector.ts b/apps/web/core/components/power-k/core/context-detector.ts index 929b62c635..eb3093b6d1 100644 --- a/apps/web/core/components/power-k/core/context-detector.ts +++ b/apps/web/core/components/power-k/core/context-detector.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Params } from "react-router"; // plane web imports import { detectExtendedContextFromURL } from "@/plane-web/components/command-palette/power-k/context-detector"; diff --git a/apps/web/core/components/power-k/core/registry.ts b/apps/web/core/components/power-k/core/registry.ts index 83c0ecba6e..08ed75a9f2 100644 --- a/apps/web/core/components/power-k/core/registry.ts +++ b/apps/web/core/components/power-k/core/registry.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { action, observable, makeObservable } from "mobx"; import { computedFn } from "mobx-utils"; import type { TPowerKCommandConfig, TPowerKContext, TPowerKCommandGroup } from "./types"; diff --git a/apps/web/core/components/power-k/core/shortcut-handler.ts b/apps/web/core/components/power-k/core/shortcut-handler.ts index ed95421a2f..85bcb27a10 100644 --- a/apps/web/core/components/power-k/core/shortcut-handler.ts +++ b/apps/web/core/components/power-k/core/shortcut-handler.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { IPowerKCommandRegistry } from "./registry"; import type { TPowerKCommandConfig, TPowerKContext } from "./types"; diff --git a/apps/web/core/components/power-k/core/types.ts b/apps/web/core/components/power-k/core/types.ts index 0ced81e28f..c10b29709a 100644 --- a/apps/web/core/components/power-k/core/types.ts +++ b/apps/web/core/components/power-k/core/types.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { useRouter } from "next/navigation"; // plane web imports import type { diff --git a/apps/web/core/components/power-k/global-shortcuts.tsx b/apps/web/core/components/power-k/global-shortcuts.tsx index 606d6d7057..fe4fe8e2ea 100644 --- a/apps/web/core/components/power-k/global-shortcuts.tsx +++ b/apps/web/core/components/power-k/global-shortcuts.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/power-k/hooks/use-context-indicator.ts b/apps/web/core/components/power-k/hooks/use-context-indicator.ts index 52699135a5..047d2fb4a0 100644 --- a/apps/web/core/components/power-k/hooks/use-context-indicator.ts +++ b/apps/web/core/components/power-k/hooks/use-context-indicator.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useParams } from "next/navigation"; // plane imports import { getPageName } from "@plane/utils"; diff --git a/apps/web/core/components/power-k/menus/builder.tsx b/apps/web/core/components/power-k/menus/builder.tsx index e7b0b82589..5a6565cc3f 100644 --- a/apps/web/core/components/power-k/menus/builder.tsx +++ b/apps/web/core/components/power-k/menus/builder.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Command } from "cmdk"; // local imports diff --git a/apps/web/core/components/power-k/menus/cycles.tsx b/apps/web/core/components/power-k/menus/cycles.tsx index b6af888e46..4714b26f26 100644 --- a/apps/web/core/components/power-k/menus/cycles.tsx +++ b/apps/web/core/components/power-k/menus/cycles.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/power-k/menus/empty-state.tsx b/apps/web/core/components/power-k/menus/empty-state.tsx index 9958d68fcd..89496a327a 100644 --- a/apps/web/core/components/power-k/menus/empty-state.tsx +++ b/apps/web/core/components/power-k/menus/empty-state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; type Props = { diff --git a/apps/web/core/components/power-k/menus/labels.tsx b/apps/web/core/components/power-k/menus/labels.tsx index 61e87d7d44..1fc6dc6da6 100644 --- a/apps/web/core/components/power-k/menus/labels.tsx +++ b/apps/web/core/components/power-k/menus/labels.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/power-k/menus/members.tsx b/apps/web/core/components/power-k/menus/members.tsx index ab0e549046..4c9174da50 100644 --- a/apps/web/core/components/power-k/menus/members.tsx +++ b/apps/web/core/components/power-k/menus/members.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Command } from "cmdk"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/power-k/menus/modules.tsx b/apps/web/core/components/power-k/menus/modules.tsx index 8684cfdd0f..dd8c4e0206 100644 --- a/apps/web/core/components/power-k/menus/modules.tsx +++ b/apps/web/core/components/power-k/menus/modules.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/power-k/menus/projects.tsx b/apps/web/core/components/power-k/menus/projects.tsx index c65f902e5c..559b586598 100644 --- a/apps/web/core/components/power-k/menus/projects.tsx +++ b/apps/web/core/components/power-k/menus/projects.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // components import { Logo } from "@plane/propel/emoji-icon-picker"; diff --git a/apps/web/core/components/power-k/menus/settings.tsx b/apps/web/core/components/power-k/menus/settings.tsx index ed594f3b13..da08b08dac 100644 --- a/apps/web/core/components/power-k/menus/settings.tsx +++ b/apps/web/core/components/power-k/menus/settings.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // local imports diff --git a/apps/web/core/components/power-k/menus/views.tsx b/apps/web/core/components/power-k/menus/views.tsx index fdd8ec8d9d..4404d85138 100644 --- a/apps/web/core/components/power-k/menus/views.tsx +++ b/apps/web/core/components/power-k/menus/views.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { Layers } from "lucide-react"; diff --git a/apps/web/core/components/power-k/menus/workspaces.tsx b/apps/web/core/components/power-k/menus/workspaces.tsx index a8c494628b..e5b5cda6a9 100644 --- a/apps/web/core/components/power-k/menus/workspaces.tsx +++ b/apps/web/core/components/power-k/menus/workspaces.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // plane imports import type { IWorkspace } from "@plane/types"; diff --git a/apps/web/core/components/power-k/projects-app-provider.tsx b/apps/web/core/components/power-k/projects-app-provider.tsx index 8b0caffa7d..624bb708fc 100644 --- a/apps/web/core/components/power-k/projects-app-provider.tsx +++ b/apps/web/core/components/power-k/projects-app-provider.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/power-k/ui/modal/command-item-shortcut-badge.tsx b/apps/web/core/components/power-k/ui/modal/command-item-shortcut-badge.tsx index fb00412539..32d700aa18 100644 --- a/apps/web/core/components/power-k/ui/modal/command-item-shortcut-badge.tsx +++ b/apps/web/core/components/power-k/ui/modal/command-item-shortcut-badge.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; /** diff --git a/apps/web/core/components/power-k/ui/modal/command-item.tsx b/apps/web/core/components/power-k/ui/modal/command-item.tsx index 669b53abcf..60be8f5e1f 100644 --- a/apps/web/core/components/power-k/ui/modal/command-item.tsx +++ b/apps/web/core/components/power-k/ui/modal/command-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Command } from "cmdk"; diff --git a/apps/web/core/components/power-k/ui/modal/commands-list.tsx b/apps/web/core/components/power-k/ui/modal/commands-list.tsx index 2c805eba6d..69e7ce1d0a 100644 --- a/apps/web/core/components/power-k/ui/modal/commands-list.tsx +++ b/apps/web/core/components/power-k/ui/modal/commands-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TPowerKCommandConfig, TPowerKContext, TPowerKPageType } from "../../core/types"; import { PowerKModalPagesList } from "../pages"; import { PowerKContextBasedPagesList } from "../pages/context-based"; diff --git a/apps/web/core/components/power-k/ui/modal/constants.ts b/apps/web/core/components/power-k/ui/modal/constants.ts index 361151ae64..5cdf5495aa 100644 --- a/apps/web/core/components/power-k/ui/modal/constants.ts +++ b/apps/web/core/components/power-k/ui/modal/constants.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane web imports import { POWER_K_MODAL_PAGE_DETAILS_EXTENDED } from "@/plane-web/components/command-palette/power-k/constants"; // local imports diff --git a/apps/web/core/components/power-k/ui/modal/context-indicator.tsx b/apps/web/core/components/power-k/ui/modal/context-indicator.tsx index 0cf65341a8..cd21bdd9c8 100644 --- a/apps/web/core/components/power-k/ui/modal/context-indicator.tsx +++ b/apps/web/core/components/power-k/ui/modal/context-indicator.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { X } from "lucide-react"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/power-k/ui/modal/footer.tsx b/apps/web/core/components/power-k/ui/modal/footer.tsx index 3814f023d3..1ed7051ece 100644 --- a/apps/web/core/components/power-k/ui/modal/footer.tsx +++ b/apps/web/core/components/power-k/ui/modal/footer.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/power-k/ui/modal/header.tsx b/apps/web/core/components/power-k/ui/modal/header.tsx index 5fb45526ae..adcf80b5fc 100644 --- a/apps/web/core/components/power-k/ui/modal/header.tsx +++ b/apps/web/core/components/power-k/ui/modal/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Command } from "cmdk"; import { X } from "lucide-react"; diff --git a/apps/web/core/components/power-k/ui/modal/search-menu.tsx b/apps/web/core/components/power-k/ui/modal/search-menu.tsx index 8c1daffdf6..b24f29b85f 100644 --- a/apps/web/core/components/power-k/ui/modal/search-menu.tsx +++ b/apps/web/core/components/power-k/ui/modal/search-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useEffect } from "react"; import { useParams } from "next/navigation"; // plane imports @@ -9,7 +15,7 @@ import { usePowerK } from "@/hooks/store/use-power-k"; import useDebounce from "@/hooks/use-debounce"; // plane web imports import { PowerKModalNoSearchResultsCommand } from "@/plane-web/components/command-palette/power-k/search/no-results-command"; -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; // local imports import type { TPowerKContext, TPowerKPageType } from "../../core/types"; import { PowerKModalSearchResults } from "./search-results"; diff --git a/apps/web/core/components/power-k/ui/modal/search-results-map.tsx b/apps/web/core/components/power-k/ui/modal/search-results-map.tsx index 8233e2f503..574a40d813 100644 --- a/apps/web/core/components/power-k/ui/modal/search-results-map.tsx +++ b/apps/web/core/components/power-k/ui/modal/search-results-map.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Briefcase, FileText, Layers, LayoutGrid } from "lucide-react"; // plane imports import { ContrastIcon, DiceIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/power-k/ui/modal/search-results.tsx b/apps/web/core/components/power-k/ui/modal/search-results.tsx index efe942ed46..12c49304f9 100644 --- a/apps/web/core/components/power-k/ui/modal/search-results.tsx +++ b/apps/web/core/components/power-k/ui/modal/search-results.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Command } from "cmdk"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/power-k/ui/modal/shortcuts-root.tsx b/apps/web/core/components/power-k/ui/modal/shortcuts-root.tsx index 202c772f5e..cd0cbd3f5d 100644 --- a/apps/web/core/components/power-k/ui/modal/shortcuts-root.tsx +++ b/apps/web/core/components/power-k/ui/modal/shortcuts-root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, Fragment } from "react"; import { Dialog, Transition } from "@headlessui/react"; // plane imports diff --git a/apps/web/core/components/power-k/ui/modal/wrapper.tsx b/apps/web/core/components/power-k/ui/modal/wrapper.tsx index 8a0b5723f9..310d56b982 100644 --- a/apps/web/core/components/power-k/ui/modal/wrapper.tsx +++ b/apps/web/core/components/power-k/ui/modal/wrapper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState, useEffect, useCallback } from "react"; import { Command } from "cmdk"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/cycle/commands.ts b/apps/web/core/components/power-k/ui/pages/context-based/cycle/commands.ts index 4b277f03e9..26dce16558 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/cycle/commands.ts +++ b/apps/web/core/components/power-k/ui/pages/context-based/cycle/commands.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { useParams } from "next/navigation"; import { Star, StarOff } from "lucide-react"; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/index.ts b/apps/web/core/components/power-k/ui/pages/context-based/index.ts index 01709be4dd..e0dd4dfa40 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/index.ts +++ b/apps/web/core/components/power-k/ui/pages/context-based/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; // components diff --git a/apps/web/core/components/power-k/ui/pages/context-based/module/commands.tsx b/apps/web/core/components/power-k/ui/pages/context-based/module/commands.tsx index ad280b3a35..d624f6f586 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/module/commands.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/module/commands.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { useParams } from "next/navigation"; import { Star, StarOff, Users } from "lucide-react"; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/module/index.ts b/apps/web/core/components/power-k/ui/pages/context-based/module/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/module/index.ts +++ b/apps/web/core/components/power-k/ui/pages/context-based/module/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/module/root.tsx b/apps/web/core/components/power-k/ui/pages/context-based/module/root.tsx index 8aefda0ca2..86b7e7754f 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/module/root.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/module/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // components diff --git a/apps/web/core/components/power-k/ui/pages/context-based/module/status-menu.tsx b/apps/web/core/components/power-k/ui/pages/context-based/module/status-menu.tsx index 0635217518..30a85ebfe4 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/module/status-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/module/status-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Command } from "cmdk"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/power-k/ui/pages/context-based/page/commands.ts b/apps/web/core/components/power-k/ui/pages/context-based/page/commands.ts index f22dc49b16..162ab5406a 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/page/commands.ts +++ b/apps/web/core/components/power-k/ui/pages/context-based/page/commands.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { useParams } from "next/navigation"; import { ArchiveIcon, ArchiveRestoreIcon, LockKeyhole, LockKeyholeOpen, Star, StarOff } from "lucide-react"; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/root.tsx b/apps/web/core/components/power-k/ui/pages/context-based/root.tsx index 0e264de1e6..a87344c98f 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/root.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import type { TPowerKCommandConfig, TPowerKContextType, TPowerKPageType } from "@/components/power-k/core/types"; // plane web imports diff --git a/apps/web/core/components/power-k/ui/pages/context-based/work-item/commands.ts b/apps/web/core/components/power-k/ui/pages/context-based/work-item/commands.ts index 5baf85f281..888260c9a2 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/work-item/commands.ts +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/commands.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { useParams } from "next/navigation"; import { diff --git a/apps/web/core/components/power-k/ui/pages/context-based/work-item/cycles-menu.tsx b/apps/web/core/components/power-k/ui/pages/context-based/work-item/cycles-menu.tsx index 1fbc7befe7..a43374b1fc 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/work-item/cycles-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/cycles-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import type { ICycle, TIssue } from "@plane/types"; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/work-item/estimates-menu.tsx b/apps/web/core/components/power-k/ui/pages/context-based/work-item/estimates-menu.tsx index 30b7f4ac4f..fa9cd018da 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/work-item/estimates-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/estimates-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Command } from "cmdk"; import { observer } from "mobx-react"; import { Triangle } from "lucide-react"; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/work-item/index.ts b/apps/web/core/components/power-k/ui/pages/context-based/work-item/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/work-item/index.ts +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/work-item/labels-menu.tsx b/apps/web/core/components/power-k/ui/pages/context-based/work-item/labels-menu.tsx index 03d974506f..42a5f61f5b 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/work-item/labels-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/labels-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import type { IIssueLabel, TIssue } from "@plane/types"; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/work-item/modules-menu.tsx b/apps/web/core/components/power-k/ui/pages/context-based/work-item/modules-menu.tsx index bda75dc734..d780f8c5a3 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/work-item/modules-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/modules-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import type { IModule, TIssue } from "@plane/types"; diff --git a/apps/web/core/components/power-k/ui/pages/context-based/work-item/priorities-menu.tsx b/apps/web/core/components/power-k/ui/pages/context-based/work-item/priorities-menu.tsx index 881604447a..1ea30ebd19 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/work-item/priorities-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/priorities-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Command } from "cmdk"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/power-k/ui/pages/context-based/work-item/root.tsx b/apps/web/core/components/power-k/ui/pages/context-based/work-item/root.tsx index efe2f978d2..70dc4392cf 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/work-item/root.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // plane imports diff --git a/apps/web/core/components/power-k/ui/pages/context-based/work-item/states-menu.tsx b/apps/web/core/components/power-k/ui/pages/context-based/work-item/states-menu.tsx index 6afc459f03..96f1538307 100644 --- a/apps/web/core/components/power-k/ui/pages/context-based/work-item/states-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/context-based/work-item/states-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Command } from "cmdk"; import { observer } from "mobx-react"; // plane types diff --git a/apps/web/core/components/power-k/ui/pages/default.tsx b/apps/web/core/components/power-k/ui/pages/default.tsx index 72e905c052..6d3f6ddf7f 100644 --- a/apps/web/core/components/power-k/ui/pages/default.tsx +++ b/apps/web/core/components/power-k/ui/pages/default.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // hooks import { usePowerK } from "@/hooks/store/use-power-k"; diff --git a/apps/web/core/components/power-k/ui/pages/index.ts b/apps/web/core/components/power-k/ui/pages/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/power-k/ui/pages/index.ts +++ b/apps/web/core/components/power-k/ui/pages/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/power-k/ui/pages/open-entity/project-cycles-menu.tsx b/apps/web/core/components/power-k/ui/pages/open-entity/project-cycles-menu.tsx index 448aa8fbe7..0b2b7fdb76 100644 --- a/apps/web/core/components/power-k/ui/pages/open-entity/project-cycles-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/open-entity/project-cycles-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import type { ICycle } from "@plane/types"; diff --git a/apps/web/core/components/power-k/ui/pages/open-entity/project-modules-menu.tsx b/apps/web/core/components/power-k/ui/pages/open-entity/project-modules-menu.tsx index a175014605..b359501d56 100644 --- a/apps/web/core/components/power-k/ui/pages/open-entity/project-modules-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/open-entity/project-modules-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import type { IModule } from "@plane/types"; diff --git a/apps/web/core/components/power-k/ui/pages/open-entity/project-settings-menu.tsx b/apps/web/core/components/power-k/ui/pages/open-entity/project-settings-menu.tsx index 109bb67ef8..5a1be462b4 100644 --- a/apps/web/core/components/power-k/ui/pages/open-entity/project-settings-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/open-entity/project-settings-menu.tsx @@ -1,13 +1,19 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; -// plane types -import { EUserPermissionsLevel } from "@plane/constants"; -// components +// plane imports +import { EUserPermissionsLevel, PROJECT_SETTINGS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; +// components import type { TPowerKContext } from "@/components/power-k/core/types"; import { PowerKSettingsMenu } from "@/components/power-k/menus/settings"; +import { PROJECT_SETTINGS_ICONS } from "@/components/settings/project/sidebar/item-icon"; // hooks import { useUserPermissions } from "@/hooks/store/user"; -import { PROJECT_SETTINGS } from "@/plane-web/constants/project"; type Props = { context: TPowerKContext; @@ -35,7 +41,7 @@ export const PowerKOpenProjectSettingsMenu = observer(function PowerKOpenProject const settingsListWithIcons = settingsList.map((setting) => ({ ...setting, label: t(setting.i18n_label), - icon: setting.Icon, + icon: PROJECT_SETTINGS_ICONS[setting.key], })); return handleSelect(setting.href)} />; diff --git a/apps/web/core/components/power-k/ui/pages/open-entity/project-views-menu.tsx b/apps/web/core/components/power-k/ui/pages/open-entity/project-views-menu.tsx index 6d59efa94a..16a04530f8 100644 --- a/apps/web/core/components/power-k/ui/pages/open-entity/project-views-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/open-entity/project-views-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import type { IProjectView } from "@plane/types"; diff --git a/apps/web/core/components/power-k/ui/pages/open-entity/projects-menu.tsx b/apps/web/core/components/power-k/ui/pages/open-entity/projects-menu.tsx index 2c3913ffe6..a1d48b5d9a 100644 --- a/apps/web/core/components/power-k/ui/pages/open-entity/projects-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/open-entity/projects-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import type { IPartialProject } from "@plane/types"; diff --git a/apps/web/core/components/power-k/ui/pages/open-entity/root.tsx b/apps/web/core/components/power-k/ui/pages/open-entity/root.tsx index 23967d7c88..c6de0cc538 100644 --- a/apps/web/core/components/power-k/ui/pages/open-entity/root.tsx +++ b/apps/web/core/components/power-k/ui/pages/open-entity/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // local imports import { PowerKOpenProjectCyclesMenu } from "./project-cycles-menu"; import { PowerKOpenProjectModulesMenu } from "./project-modules-menu"; diff --git a/apps/web/core/components/power-k/ui/pages/open-entity/shared.ts b/apps/web/core/components/power-k/ui/pages/open-entity/shared.ts index 93fb406148..c399a6cc37 100644 --- a/apps/web/core/components/power-k/ui/pages/open-entity/shared.ts +++ b/apps/web/core/components/power-k/ui/pages/open-entity/shared.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // local imports import type { TPowerKContext, TPowerKPageType } from "@/components/power-k/core/types"; diff --git a/apps/web/core/components/power-k/ui/pages/open-entity/workspace-settings-menu.tsx b/apps/web/core/components/power-k/ui/pages/open-entity/workspace-settings-menu.tsx index 8fd3a50389..7dc8805b95 100644 --- a/apps/web/core/components/power-k/ui/pages/open-entity/workspace-settings-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/open-entity/workspace-settings-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import { EUserPermissionsLevel, WORKSPACE_SETTINGS } from "@plane/constants"; @@ -5,10 +11,9 @@ import { EUserPermissionsLevel, WORKSPACE_SETTINGS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import type { TPowerKContext } from "@/components/power-k/core/types"; import { PowerKSettingsMenu } from "@/components/power-k/menus/settings"; +import { WORKSPACE_SETTINGS_ICONS } from "@/components/settings/workspace/sidebar/item-icon"; // hooks import { useUserPermissions } from "@/hooks/store/user"; -import { shouldRenderSettingLink } from "@/plane-web/helpers/workspace.helper"; -import { WORKSPACE_SETTINGS_ICONS } from "app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/sidebar"; type Props = { context: TPowerKContext; @@ -25,13 +30,12 @@ export const PowerKOpenWorkspaceSettingsMenu = observer(function PowerKOpenWorks const settingsList = Object.values(WORKSPACE_SETTINGS).filter( (setting) => context.params.workspaceSlug && - shouldRenderSettingLink(context.params.workspaceSlug?.toString(), setting.key) && allowPermissions(setting.access, EUserPermissionsLevel.WORKSPACE, context.params.workspaceSlug?.toString()) ); const settingsListWithIcons = settingsList.map((setting) => ({ ...setting, label: t(setting.i18n_label), - icon: WORKSPACE_SETTINGS_ICONS[setting.key as keyof typeof WORKSPACE_SETTINGS_ICONS], + icon: WORKSPACE_SETTINGS_ICONS[setting.key], })); return handleSelect(setting.href)} />; diff --git a/apps/web/core/components/power-k/ui/pages/open-entity/workspaces-menu.tsx b/apps/web/core/components/power-k/ui/pages/open-entity/workspaces-menu.tsx index 755a783765..70df60e4b0 100644 --- a/apps/web/core/components/power-k/ui/pages/open-entity/workspaces-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/open-entity/workspaces-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane types import type { IWorkspace } from "@plane/types"; diff --git a/apps/web/core/components/power-k/ui/pages/preferences/index.ts b/apps/web/core/components/power-k/ui/pages/preferences/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/power-k/ui/pages/preferences/index.ts +++ b/apps/web/core/components/power-k/ui/pages/preferences/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/power-k/ui/pages/preferences/languages-menu.tsx b/apps/web/core/components/power-k/ui/pages/preferences/languages-menu.tsx index 63039ae899..1a2632077b 100644 --- a/apps/web/core/components/power-k/ui/pages/preferences/languages-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/preferences/languages-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Command } from "cmdk"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/power-k/ui/pages/preferences/root.tsx b/apps/web/core/components/power-k/ui/pages/preferences/root.tsx index a40ca22a5f..32d21df4b6 100644 --- a/apps/web/core/components/power-k/ui/pages/preferences/root.tsx +++ b/apps/web/core/components/power-k/ui/pages/preferences/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // components diff --git a/apps/web/core/components/power-k/ui/pages/preferences/start-of-week-menu.tsx b/apps/web/core/components/power-k/ui/pages/preferences/start-of-week-menu.tsx index d16dcb75e6..2d9c8b699b 100644 --- a/apps/web/core/components/power-k/ui/pages/preferences/start-of-week-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/preferences/start-of-week-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Command } from "cmdk"; // plane imports diff --git a/apps/web/core/components/power-k/ui/pages/preferences/themes-menu.tsx b/apps/web/core/components/power-k/ui/pages/preferences/themes-menu.tsx index ca64085b7a..6018fe2563 100644 --- a/apps/web/core/components/power-k/ui/pages/preferences/themes-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/preferences/themes-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect, useState } from "react"; import { Command } from "cmdk"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/power-k/ui/pages/preferences/timezone-menu.tsx b/apps/web/core/components/power-k/ui/pages/preferences/timezone-menu.tsx index 088ca359aa..3d309bd4dc 100644 --- a/apps/web/core/components/power-k/ui/pages/preferences/timezone-menu.tsx +++ b/apps/web/core/components/power-k/ui/pages/preferences/timezone-menu.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Command } from "cmdk"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/power-k/ui/pages/root.tsx b/apps/web/core/components/power-k/ui/pages/root.tsx index 8286b32d2a..21524bea4d 100644 --- a/apps/web/core/components/power-k/ui/pages/root.tsx +++ b/apps/web/core/components/power-k/ui/pages/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // local imports diff --git a/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx b/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx index d27a6ccbac..543c262364 100644 --- a/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx +++ b/apps/web/core/components/power-k/ui/pages/work-item-selection-page.tsx @@ -1,4 +1,10 @@ -import React, { useState, useEffect } from "react"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { useState, useEffect } from "react"; // plane imports // import { useTranslation } from "@plane/i18n"; import type { TIssueEntityData, TIssueSearchResponse, TActivityEntityData } from "@plane/types"; @@ -12,7 +18,7 @@ import type { TIssueEntityData, TIssueSearchResponse, TActivityEntityData } from // import { useAppRouter } from "@/hooks/use-app-router"; // plane web imports // import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier"; -import { WorkspaceService } from "@/plane-web/services"; +import { WorkspaceService } from "@/services/workspace.service"; const workspaceService = new WorkspaceService(); diff --git a/apps/web/core/components/power-k/ui/renderer/command.tsx b/apps/web/core/components/power-k/ui/renderer/command.tsx index 4422a31617..408a454700 100644 --- a/apps/web/core/components/power-k/ui/renderer/command.tsx +++ b/apps/web/core/components/power-k/ui/renderer/command.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Command } from "cmdk"; // plane imports diff --git a/apps/web/core/components/power-k/ui/renderer/shared.ts b/apps/web/core/components/power-k/ui/renderer/shared.ts index 782752c433..bf65ab84d0 100644 --- a/apps/web/core/components/power-k/ui/renderer/shared.ts +++ b/apps/web/core/components/power-k/ui/renderer/shared.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { TPowerKCommandGroup } from "../../core/types"; export const POWER_K_GROUP_PRIORITY: Record = { diff --git a/apps/web/core/components/power-k/ui/renderer/shortcut.tsx b/apps/web/core/components/power-k/ui/renderer/shortcut.tsx index 07fda48edc..3cd9b0cd49 100644 --- a/apps/web/core/components/power-k/ui/renderer/shortcut.tsx +++ b/apps/web/core/components/power-k/ui/renderer/shortcut.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { useTranslation } from "@plane/i18n"; import { substringMatch } from "@plane/utils"; diff --git a/apps/web/core/components/power-k/utils/navigation.ts b/apps/web/core/components/power-k/utils/navigation.ts index 2c88823e34..f5b3323911 100644 --- a/apps/web/core/components/power-k/utils/navigation.ts +++ b/apps/web/core/components/power-k/utils/navigation.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { joinUrlPath } from "@plane/utils"; // local imports diff --git a/apps/web/core/components/preferences/list.tsx b/apps/web/core/components/preferences/list.tsx deleted file mode 100644 index 291eebf01e..0000000000 --- a/apps/web/core/components/preferences/list.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { PREFERENCE_OPTIONS } from "@plane/constants"; -import { PREFERENCE_COMPONENTS } from "@/plane-web/components/preferences/config"; - -export function PreferencesList() { - return ( -
- {PREFERENCE_OPTIONS.map((option) => { - const Component = PREFERENCE_COMPONENTS[option.id as keyof typeof PREFERENCE_COMPONENTS]; - return ; - })} -
- ); -} diff --git a/apps/web/core/components/preferences/section.tsx b/apps/web/core/components/preferences/section.tsx deleted file mode 100644 index f69c600bd2..0000000000 --- a/apps/web/core/components/preferences/section.tsx +++ /dev/null @@ -1,17 +0,0 @@ -interface SettingsSectionProps { - title: string; - description: string; - control: React.ReactNode; -} - -export function PreferencesSection({ title, description, control }: SettingsSectionProps) { - return ( -
-
-

{title}

-

{description}

-
-
{control}
-
- ); -} diff --git a/apps/web/core/components/profile/activity/activity-list.tsx b/apps/web/core/components/profile/activity/activity-list.tsx index e2a292640c..54941086e2 100644 --- a/apps/web/core/components/profile/activity/activity-list.tsx +++ b/apps/web/core/components/profile/activity/activity-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import Link from "next/link"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/profile/activity/download-button.tsx b/apps/web/core/components/profile/activity/download-button.tsx index 9eb5ccd83e..d162dbd245 100644 --- a/apps/web/core/components/profile/activity/download-button.tsx +++ b/apps/web/core/components/profile/activity/download-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { useParams } from "next/navigation"; // services diff --git a/apps/web/core/components/profile/activity/profile-activity-list.tsx b/apps/web/core/components/profile/activity/profile-activity-list.tsx index 872118d1cd..3702796b9d 100644 --- a/apps/web/core/components/profile/activity/profile-activity-list.tsx +++ b/apps/web/core/components/profile/activity/profile-activity-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; diff --git a/apps/web/core/components/profile/activity/workspace-activity-list.tsx b/apps/web/core/components/profile/activity/workspace-activity-list.tsx index 1f9e140d37..c1e0a32d9c 100644 --- a/apps/web/core/components/profile/activity/workspace-activity-list.tsx +++ b/apps/web/core/components/profile/activity/workspace-activity-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { useParams } from "next/navigation"; import useSWR from "swr"; diff --git a/apps/web/core/components/profile/notification/email-notification-form.tsx b/apps/web/core/components/profile/notification/email-notification-form.tsx deleted file mode 100644 index 8ab4fac880..0000000000 --- a/apps/web/core/components/profile/notification/email-notification-form.tsx +++ /dev/null @@ -1,168 +0,0 @@ -import { useEffect } from "react"; -import { Controller, useForm } from "react-hook-form"; -import { useTranslation } from "@plane/i18n"; -import { TOAST_TYPE, setToast } from "@plane/propel/toast"; -import type { IUserEmailNotificationSettings } from "@plane/types"; -// ui -import { ToggleSwitch } from "@plane/ui"; -// services -import { UserService } from "@/services/user.service"; -// types -interface IEmailNotificationFormProps { - data: IUserEmailNotificationSettings; -} - -// services -const userService = new UserService(); - -export function EmailNotificationForm(props: IEmailNotificationFormProps) { - const { data } = props; - const { t } = useTranslation(); - // form data - const { control, reset } = useForm({ - defaultValues: { - ...data, - }, - }); - - const handleSettingChange = async (key: keyof IUserEmailNotificationSettings, value: boolean) => { - try { - await userService.updateCurrentUserEmailNotificationSettings({ - [key]: value, - }); - setToast({ - title: t("success"), - type: TOAST_TYPE.SUCCESS, - message: t("email_notification_setting_updated_successfully"), - }); - } catch (_error) { - setToast({ - title: t("error"), - type: TOAST_TYPE.ERROR, - message: t("failed_to_update_email_notification_setting"), - }); - } - }; - - useEffect(() => { - reset(data); - }, [reset, data]); - - return ( - <> - {/* Notification Settings */} -
-
-
-
{t("property_changes")}
-
{t("property_changes_description")}
-
-
- ( - { - onChange(newValue); - handleSettingChange("property_change", newValue); - }} - size="sm" - /> - )} - /> -
-
-
-
-
{t("state_change")}
-
{t("state_change_description")}
-
-
- ( - { - onChange(newValue); - handleSettingChange("state_change", newValue); - }} - size="sm" - /> - )} - /> -
-
-
-
-
{t("issue_completed")}
-
{t("issue_completed_description")}
-
-
- ( - { - onChange(newValue); - handleSettingChange("issue_completed", newValue); - }} - size="sm" - /> - )} - /> -
-
-
-
-
{t("comments")}
-
{t("comments_description")}
-
-
- ( - { - onChange(newValue); - handleSettingChange("comment", newValue); - }} - size="sm" - /> - )} - /> -
-
-
-
-
{t("mentions")}
-
{t("mentions_description")}
-
-
- ( - { - onChange(newValue); - handleSettingChange("mention", newValue); - }} - size="sm" - /> - )} - /> -
-
-
- - ); -} diff --git a/apps/web/core/components/profile/overview/activity.tsx b/apps/web/core/components/profile/overview/activity.tsx index a532e3c50f..d1a0627983 100644 --- a/apps/web/core/components/profile/overview/activity.tsx +++ b/apps/web/core/components/profile/overview/activity.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useParams } from "next/navigation"; import useSWR from "swr"; diff --git a/apps/web/core/components/profile/overview/priority-distribution.tsx b/apps/web/core/components/profile/overview/priority-distribution.tsx index cefcfed9df..5de6d3e872 100644 --- a/apps/web/core/components/profile/overview/priority-distribution.tsx +++ b/apps/web/core/components/profile/overview/priority-distribution.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { useTranslation } from "@plane/i18n"; import { BarChart } from "@plane/propel/charts/bar-chart"; diff --git a/apps/web/core/components/profile/overview/state-distribution.tsx b/apps/web/core/components/profile/overview/state-distribution.tsx index e7403142a2..b1de4995a3 100644 --- a/apps/web/core/components/profile/overview/state-distribution.tsx +++ b/apps/web/core/components/profile/overview/state-distribution.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { STATE_GROUPS } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/profile/overview/stats.tsx b/apps/web/core/components/profile/overview/stats.tsx index f4950b8eea..9431cc8115 100644 --- a/apps/web/core/components/profile/overview/stats.tsx +++ b/apps/web/core/components/profile/overview/stats.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import Link from "next/link"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/profile/overview/workload.tsx b/apps/web/core/components/profile/overview/workload.tsx index 9a40cbefaa..0cadee4c0f 100644 --- a/apps/web/core/components/profile/overview/workload.tsx +++ b/apps/web/core/components/profile/overview/workload.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import { STATE_GROUPS } from "@plane/constants"; // types diff --git a/apps/web/core/components/profile/preferences/language-timezone.tsx b/apps/web/core/components/profile/preferences/language-timezone.tsx deleted file mode 100644 index ef2de25298..0000000000 --- a/apps/web/core/components/profile/preferences/language-timezone.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import { observer } from "mobx-react"; -import { SUPPORTED_LANGUAGES, useTranslation } from "@plane/i18n"; -import { TOAST_TYPE, setToast } from "@plane/propel/toast"; -import { CustomSelect } from "@plane/ui"; -import { TimezoneSelect } from "@/components/global"; -import { useUser, useUserProfile } from "@/hooks/store/user"; - -export const LanguageTimezone = observer(function LanguageTimezone() { - // store hooks - const { - data: user, - updateCurrentUser, - userProfile: { data: profile }, - } = useUser(); - const { updateUserProfile } = useUserProfile(); - const { t } = useTranslation(); - - const handleTimezoneChange = async (value: string) => { - try { - await updateCurrentUser({ user_timezone: value }); - setToast({ - title: "Success!", - message: "Timezone updated successfully", - type: TOAST_TYPE.SUCCESS, - }); - } catch (_error) { - setToast({ - title: "Error!", - message: "Failed to update timezone", - type: TOAST_TYPE.ERROR, - }); - } - }; - - const handleLanguageChange = async (value: string) => { - try { - await updateUserProfile({ language: value }); - setToast({ - title: "Success!", - message: "Language updated successfully", - type: TOAST_TYPE.SUCCESS, - }); - } catch (_error) { - setToast({ - title: "Error!", - message: "Failed to update language", - type: TOAST_TYPE.ERROR, - }); - } - }; - - const getLanguageLabel = (value: string) => { - const selectedLanguage = SUPPORTED_LANGUAGES.find((l) => l.value === value); - if (!selectedLanguage) return value; - return selectedLanguage.label; - }; - - return ( -
-
-
-
-
-

{t("timezone")} 

-

{t("timezone_setting")}

-
-
- -
-
-
-
-
-
-

{t("language")} 

-

{t("language_setting")}

-
-
- - {SUPPORTED_LANGUAGES.map((item) => ( - - {item.label} - - ))} - -
-
-
-
-
- ); -}); diff --git a/apps/web/core/components/profile/profile-issues-filter.tsx b/apps/web/core/components/profile/profile-issues-filter.tsx index 865bc63465..73a40667e9 100644 --- a/apps/web/core/components/profile/profile-issues-filter.tsx +++ b/apps/web/core/components/profile/profile-issues-filter.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/profile/profile-issues.tsx b/apps/web/core/components/profile/profile-issues.tsx index 6022418674..d4cefe9007 100644 --- a/apps/web/core/components/profile/profile-issues.tsx +++ b/apps/web/core/components/profile/profile-issues.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useEffect } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/profile/profile-setting-content-header.tsx b/apps/web/core/components/profile/profile-setting-content-header.tsx deleted file mode 100644 index 16e233a66f..0000000000 --- a/apps/web/core/components/profile/profile-setting-content-header.tsx +++ /dev/null @@ -1,14 +0,0 @@ -type Props = { - title: string; - description?: string; -}; - -export function ProfileSettingContentHeader(props: Props) { - const { title, description } = props; - return ( -
-
{title}
- {description &&
{description}
} -
- ); -} diff --git a/apps/web/core/components/profile/profile-setting-content-wrapper.tsx b/apps/web/core/components/profile/profile-setting-content-wrapper.tsx index 6672dd574d..b2d743396e 100644 --- a/apps/web/core/components/profile/profile-setting-content-wrapper.tsx +++ b/apps/web/core/components/profile/profile-setting-content-wrapper.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { cn } from "@plane/utils"; import { SidebarHamburgerToggle } from "@/components/core/sidebar/sidebar-menu-hamburger-toggle"; diff --git a/apps/web/core/components/profile/sidebar.tsx b/apps/web/core/components/profile/sidebar.tsx index 611fd6e53e..4b37234b58 100644 --- a/apps/web/core/components/profile/sidebar.tsx +++ b/apps/web/core/components/profile/sidebar.tsx @@ -1,26 +1,28 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef } from "react"; import { observer } from "mobx-react"; -import Link from "next/link"; import { useParams } from "next/navigation"; -// icons - -// headless ui import { Disclosure, Transition } from "@headlessui/react"; -// plane helpers +// plane imports import { useOutsideClickDetector } from "@plane/hooks"; -// types import { useTranslation } from "@plane/i18n"; import { Logo } from "@plane/propel/emoji-icon-picker"; +import { IconButton } from "@plane/propel/icon-button"; import { EditIcon, ChevronDownIcon } from "@plane/propel/icons"; import { Tooltip } from "@plane/propel/tooltip"; import type { IUserProfileProjectSegregation } from "@plane/types"; -// plane ui import { Loader } from "@plane/ui"; import { cn, renderFormattedDate, getFileURL } from "@plane/utils"; // components import { CoverImage } from "@/components/common/cover-image"; // hooks import { useAppTheme } from "@/hooks/store/use-app-theme"; +import { useCommandPalette } from "@/hooks/store/use-command-palette"; import { useProject } from "@/hooks/store/use-project"; import { useUser } from "@/hooks/store/user"; import { usePlatformOS } from "@/hooks/use-platform-os"; @@ -37,11 +39,12 @@ export const ProfileSidebar = observer(function ProfileSidebar(props: TProfileSi // refs const ref = useRef(null); // router - const { userId, workspaceSlug } = useParams(); + const { userId } = useParams(); // store hooks const { data: currentUser } = useUser(); const { profileSidebarCollapsed, toggleProfileSidebar } = useAppTheme(); const { getProjectById } = useProject(); + const { toggleProfileSettingsModal } = useCommandPalette(); const { isMobile } = usePlatformOS(); const { t } = useTranslation(); // derived values @@ -84,7 +87,7 @@ export const ProfileSidebar = observer(function ProfileSidebar(props: TProfileSi return (
{currentUser?.id === userId && ( -
- - - - - +
+ + toggleProfileSettingsModal({ + activeTab: "general", + isOpen: true, + }) + } + />
)} START_OF_THE_WEEK_OPTIONS.find((option) => option.value === startOfWeek)?.label; @@ -27,27 +34,27 @@ export const StartOfWeekPreference = observer(function StartOfWeekPreference(pro }; return ( - - - <> - {START_OF_THE_WEEK_OPTIONS.map((day) => ( - - {day.label} - - ))} - - -
+ + <> + {START_OF_THE_WEEK_OPTIONS.map((day) => ( + + {day.label} + + ))} + + } /> ); diff --git a/apps/web/core/components/profile/time.tsx b/apps/web/core/components/profile/time.tsx index 1fc47cc62f..5265e2b2e3 100644 --- a/apps/web/core/components/profile/time.tsx +++ b/apps/web/core/components/profile/time.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // hooks import { useCurrentTime } from "@/hooks/use-current-time"; diff --git a/apps/web/core/components/project-states/create-update/create.tsx b/apps/web/core/components/project-states/create-update/create.tsx index a47eaed264..0505fcb587 100644 --- a/apps/web/core/components/project-states/create-update/create.tsx +++ b/apps/web/core/components/project-states/create-update/create.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { STATE_GROUPS } from "@plane/constants"; diff --git a/apps/web/core/components/project-states/create-update/form.tsx b/apps/web/core/components/project-states/create-update/form.tsx index 0b41377dc3..cd41e28dda 100644 --- a/apps/web/core/components/project-states/create-update/form.tsx +++ b/apps/web/core/components/project-states/create-update/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { TwitterPicker } from "react-color"; import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/project-states/create-update/index.ts b/apps/web/core/components/project-states/create-update/index.ts index a295e4a83e..8afd9ccebb 100644 --- a/apps/web/core/components/project-states/create-update/index.ts +++ b/apps/web/core/components/project-states/create-update/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./create"; export * from "./update"; export * from "./form"; diff --git a/apps/web/core/components/project-states/create-update/update.tsx b/apps/web/core/components/project-states/create-update/update.tsx index beeec8ef25..9b91a1b2fb 100644 --- a/apps/web/core/components/project-states/create-update/update.tsx +++ b/apps/web/core/components/project-states/create-update/update.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; diff --git a/apps/web/core/components/project-states/group-item.tsx b/apps/web/core/components/project-states/group-item.tsx index 485e35037c..92ec33d653 100644 --- a/apps/web/core/components/project-states/group-item.tsx +++ b/apps/web/core/components/project-states/group-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState, useRef } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/project-states/group-list.tsx b/apps/web/core/components/project-states/group-list.tsx index 6490340ab0..eec413d79b 100644 --- a/apps/web/core/components/project-states/group-list.tsx +++ b/apps/web/core/components/project-states/group-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/project-states/index.ts b/apps/web/core/components/project-states/index.ts index 22e130d6ef..58dbbc48b6 100644 --- a/apps/web/core/components/project-states/index.ts +++ b/apps/web/core/components/project-states/index.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; export * from "./group-list"; diff --git a/apps/web/core/components/project-states/loader.tsx b/apps/web/core/components/project-states/loader.tsx index 2cb7b3f82f..876110c8e3 100644 --- a/apps/web/core/components/project-states/loader.tsx +++ b/apps/web/core/components/project-states/loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Loader } from "@plane/ui"; export function ProjectStateLoader() { diff --git a/apps/web/core/components/project-states/options/delete.tsx b/apps/web/core/components/project-states/options/delete.tsx index 7048bf4b1e..235b4433d5 100644 --- a/apps/web/core/components/project-states/options/delete.tsx +++ b/apps/web/core/components/project-states/options/delete.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { Loader } from "lucide-react"; diff --git a/apps/web/core/components/project-states/options/index.ts b/apps/web/core/components/project-states/options/index.ts index 6aad9566cb..77e6d70f01 100644 --- a/apps/web/core/components/project-states/options/index.ts +++ b/apps/web/core/components/project-states/options/index.ts @@ -1,2 +1,8 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./mark-as-default"; export * from "./delete"; diff --git a/apps/web/core/components/project-states/options/mark-as-default.tsx b/apps/web/core/components/project-states/options/mark-as-default.tsx index 38e857a82c..de3e0b143d 100644 --- a/apps/web/core/components/project-states/options/mark-as-default.tsx +++ b/apps/web/core/components/project-states/options/mark-as-default.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/project-states/root.tsx b/apps/web/core/components/project-states/root.tsx index d9dbfc9761..8aac7f4d8b 100644 --- a/apps/web/core/components/project-states/root.tsx +++ b/apps/web/core/components/project-states/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { FC } from "react"; import { useMemo } from "react"; import { observer } from "mobx-react"; @@ -62,13 +68,11 @@ export const ProjectStateRoot = observer(function ProjectStateRoot(props: TProje if (!groupedProjectStates) return ; return ( -
- -
+ ); }); diff --git a/apps/web/core/components/project-states/state-delete-modal.tsx b/apps/web/core/components/project-states/state-delete-modal.tsx index 831950365a..c1b04d4553 100644 --- a/apps/web/core/components/project-states/state-delete-modal.tsx +++ b/apps/web/core/components/project-states/state-delete-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/project-states/state-item-title.tsx b/apps/web/core/components/project-states/state-item-title.tsx index db6eb7ca0e..920efa8341 100644 --- a/apps/web/core/components/project-states/state-item-title.tsx +++ b/apps/web/core/components/project-states/state-item-title.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { SetStateAction } from "react"; import { observer } from "mobx-react"; import { GripVertical } from "lucide-react"; diff --git a/apps/web/core/components/project-states/state-item.tsx b/apps/web/core/components/project-states/state-item.tsx index 84407cbb90..49c8752454 100644 --- a/apps/web/core/components/project-states/state-item.tsx +++ b/apps/web/core/components/project-states/state-item.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Fragment, useCallback, useEffect, useRef, useState } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter"; diff --git a/apps/web/core/components/project-states/state-list.tsx b/apps/web/core/components/project-states/state-list.tsx index e379eaf646..0035b5d296 100644 --- a/apps/web/core/components/project-states/state-list.tsx +++ b/apps/web/core/components/project-states/state-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import type { IState, TStateGroups, TStateOperationsCallbacks } from "@plane/types"; // components diff --git a/apps/web/core/components/project/applied-filters/access.tsx b/apps/web/core/components/project/applied-filters/access.tsx index 1c7e1b4a1b..4919d5a46b 100644 --- a/apps/web/core/components/project/applied-filters/access.tsx +++ b/apps/web/core/components/project/applied-filters/access.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // constants import { NETWORK_CHOICES } from "@plane/constants"; diff --git a/apps/web/core/components/project/applied-filters/date.tsx b/apps/web/core/components/project/applied-filters/date.tsx index 443201acac..ec7610548f 100644 --- a/apps/web/core/components/project/applied-filters/date.tsx +++ b/apps/web/core/components/project/applied-filters/date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { PROJECT_CREATED_AT_FILTER_OPTIONS } from "@plane/constants"; import { CloseIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/project/applied-filters/index.ts b/apps/web/core/components/project/applied-filters/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/project/applied-filters/index.ts +++ b/apps/web/core/components/project/applied-filters/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/project/applied-filters/members.tsx b/apps/web/core/components/project/applied-filters/members.tsx index fc6242bc24..6e7a8b92c0 100644 --- a/apps/web/core/components/project/applied-filters/members.tsx +++ b/apps/web/core/components/project/applied-filters/members.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { CloseIcon } from "@plane/propel/icons"; // ui diff --git a/apps/web/core/components/project/applied-filters/project-display-filters.tsx b/apps/web/core/components/project/applied-filters/project-display-filters.tsx index 93106a9156..177830cdec 100644 --- a/apps/web/core/components/project/applied-filters/project-display-filters.tsx +++ b/apps/web/core/components/project/applied-filters/project-display-filters.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // icons // types diff --git a/apps/web/core/components/project/applied-filters/root.tsx b/apps/web/core/components/project/applied-filters/root.tsx index 70f5a94c26..979a524da2 100644 --- a/apps/web/core/components/project/applied-filters/root.tsx +++ b/apps/web/core/components/project/applied-filters/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useTranslation } from "@plane/i18n"; import { CloseIcon } from "@plane/propel/icons"; // plane imports diff --git a/apps/web/core/components/project/settings/archive-project/archive-restore-modal.tsx b/apps/web/core/components/project/archive-restore-modal.tsx similarity index 95% rename from apps/web/core/components/project/settings/archive-project/archive-restore-modal.tsx rename to apps/web/core/components/project/archive-restore-modal.tsx index 8a7699fe8d..0f17ce90f7 100644 --- a/apps/web/core/components/project/settings/archive-project/archive-restore-modal.tsx +++ b/apps/web/core/components/project/archive-restore-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; // ui import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/project/card-list.tsx b/apps/web/core/components/project/card-list.tsx index 01e7842379..961045d648 100644 --- a/apps/web/core/components/project/card-list.tsx +++ b/apps/web/core/components/project/card-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { EUserPermissionsLevel, EUserPermissions } from "@plane/constants"; diff --git a/apps/web/core/components/project/card.tsx b/apps/web/core/components/project/card.tsx index d4ee4bc905..cf15562420 100644 --- a/apps/web/core/components/project/card.tsx +++ b/apps/web/core/components/project/card.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useRef, useState } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; @@ -26,7 +32,7 @@ import { usePlatformOS } from "@/hooks/use-platform-os"; import { CoverImage } from "@/components/common/cover-image"; import { DeleteProjectModal } from "./delete-project-modal"; import { JoinProjectModal } from "./join-project-modal"; -import { ArchiveRestoreProjectModal } from "./settings/archive-project/archive-restore-modal"; +import { ArchiveRestoreProjectModal } from "./archive-restore-modal"; type Props = { project: IProject; diff --git a/apps/web/core/components/project/confirm-project-member-remove.tsx b/apps/web/core/components/project/confirm-project-member-remove.tsx index d8f2b56488..6f606e52bd 100644 --- a/apps/web/core/components/project/confirm-project-member-remove.tsx +++ b/apps/web/core/components/project/confirm-project-member-remove.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/project/create-project-modal.tsx b/apps/web/core/components/project/create-project-modal.tsx index ca6d0a2a66..c1c9a31e7d 100644 --- a/apps/web/core/components/project/create-project-modal.tsx +++ b/apps/web/core/components/project/create-project-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui"; import { getAssetIdFromUrl, checkURLValidity } from "@plane/utils"; diff --git a/apps/web/core/components/project/create/common-attributes.tsx b/apps/web/core/components/project/create/common-attributes.tsx index c0f4320253..56907c3c2c 100644 --- a/apps/web/core/components/project/create/common-attributes.tsx +++ b/apps/web/core/components/project/create/common-attributes.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { ChangeEvent } from "react"; import type { UseFormSetValue } from "react-hook-form"; import { Controller, useFormContext } from "react-hook-form"; diff --git a/apps/web/core/components/project/create/header.tsx b/apps/web/core/components/project/create/header.tsx index 3e6c1384cc..149bc675f1 100644 --- a/apps/web/core/components/project/create/header.tsx +++ b/apps/web/core/components/project/create/header.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { Controller, useFormContext } from "react-hook-form"; // plane imports diff --git a/apps/web/core/components/project/create/project-create-buttons.tsx b/apps/web/core/components/project/create/project-create-buttons.tsx index db77a8fadf..f268c6734f 100644 --- a/apps/web/core/components/project/create/project-create-buttons.tsx +++ b/apps/web/core/components/project/create/project-create-buttons.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useFormContext } from "react-hook-form"; // plane imports import { ETabIndices } from "@plane/constants"; diff --git a/apps/web/core/components/project/delete-project-modal.tsx b/apps/web/core/components/project/delete-project-modal.tsx index 3a0276fee9..dd9ac01a90 100644 --- a/apps/web/core/components/project/delete-project-modal.tsx +++ b/apps/web/core/components/project/delete-project-modal.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useParams } from "next/navigation"; import { Controller, useForm } from "react-hook-form"; import { AlertTriangle } from "lucide-react"; diff --git a/apps/web/core/components/project/dropdowns/filters/access.tsx b/apps/web/core/components/project/dropdowns/filters/access.tsx index 6b3d0032e8..5b850f29c0 100644 --- a/apps/web/core/components/project/dropdowns/filters/access.tsx +++ b/apps/web/core/components/project/dropdowns/filters/access.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/project/dropdowns/filters/created-at.tsx b/apps/web/core/components/project/dropdowns/filters/created-at.tsx index 0c1034a3ce..ac0a6f2adc 100644 --- a/apps/web/core/components/project/dropdowns/filters/created-at.tsx +++ b/apps/web/core/components/project/dropdowns/filters/created-at.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState } from "react"; import { observer } from "mobx-react"; // plane constants diff --git a/apps/web/core/components/project/dropdowns/filters/index.ts b/apps/web/core/components/project/dropdowns/filters/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/project/dropdowns/filters/index.ts +++ b/apps/web/core/components/project/dropdowns/filters/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/project/dropdowns/filters/lead.tsx b/apps/web/core/components/project/dropdowns/filters/lead.tsx index 5a1fef606e..fa4ee6124f 100644 --- a/apps/web/core/components/project/dropdowns/filters/lead.tsx +++ b/apps/web/core/components/project/dropdowns/filters/lead.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/project/dropdowns/filters/member-list.tsx b/apps/web/core/components/project/dropdowns/filters/member-list.tsx index 35c2bac2ca..bb8acd15ec 100644 --- a/apps/web/core/components/project/dropdowns/filters/member-list.tsx +++ b/apps/web/core/components/project/dropdowns/filters/member-list.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/project/dropdowns/filters/members.tsx b/apps/web/core/components/project/dropdowns/filters/members.tsx index 72f0d9bff4..1af34e16ce 100644 --- a/apps/web/core/components/project/dropdowns/filters/members.tsx +++ b/apps/web/core/components/project/dropdowns/filters/members.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useMemo, useState } from "react"; import { sortBy } from "lodash-es"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/project/dropdowns/filters/root.tsx b/apps/web/core/components/project/dropdowns/filters/root.tsx index c4d56f6b1d..e24bf45615 100644 --- a/apps/web/core/components/project/dropdowns/filters/root.tsx +++ b/apps/web/core/components/project/dropdowns/filters/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { SearchIcon, CloseIcon } from "@plane/propel/icons"; diff --git a/apps/web/core/components/project/dropdowns/order-by.tsx b/apps/web/core/components/project/dropdowns/order-by.tsx index b780f80a52..02d9c2c90c 100644 --- a/apps/web/core/components/project/dropdowns/order-by.tsx +++ b/apps/web/core/components/project/dropdowns/order-by.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { ArrowDownWideNarrow } from "lucide-react"; // plane imports import { PROJECT_ORDER_BY_OPTIONS } from "@plane/constants"; diff --git a/apps/web/core/components/project/empty-state.tsx b/apps/web/core/components/project/empty-state.tsx index 942fba8151..2e70a30e14 100644 --- a/apps/web/core/components/project/empty-state.tsx +++ b/apps/web/core/components/project/empty-state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; // ui import { Button } from "@plane/propel/button"; diff --git a/apps/web/core/components/project/filters.tsx b/apps/web/core/components/project/filters.tsx index 09620729ee..5f7215bc4a 100644 --- a/apps/web/core/components/project/filters.tsx +++ b/apps/web/core/components/project/filters.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useCallback } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; diff --git a/apps/web/core/components/project/form-loader.tsx b/apps/web/core/components/project/form-loader.tsx index ef2c913fca..a78d4d134c 100644 --- a/apps/web/core/components/project/form-loader.tsx +++ b/apps/web/core/components/project/form-loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // components import { Loader } from "@plane/ui"; diff --git a/apps/web/core/components/project/form.tsx b/apps/web/core/components/project/form.tsx index 634275c40f..60d917cadf 100644 --- a/apps/web/core/components/project/form.tsx +++ b/apps/web/core/components/project/form.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { Controller, useForm } from "react-hook-form"; import { Info } from "lucide-react"; @@ -258,7 +264,7 @@ export function ProjectDetailsForm(props: IProjectDetailsForm) {
-
+

{t("common.project_name")}

void; -} - -export function ArchiveProjectSelection(props: IArchiveProject) { - const { projectDetails, handleArchive } = props; - - return ( - - {({ open }) => ( -
- - Archive project - {open ? : } - - - -
- - Archiving a project will unlist your project from your side navigation although you will still be able - to access it from your projects page. You can restore the project or delete it whenever you want. - -
- {projectDetails ? ( -
- -
- ) : ( - - - - )} -
-
-
-
-
- )} -
- ); -} diff --git a/apps/web/core/components/project/settings/control-section.tsx b/apps/web/core/components/project/settings/control-section.tsx new file mode 100644 index 0000000000..c7764ec714 --- /dev/null +++ b/apps/web/core/components/project/settings/control-section.tsx @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { useState } from "react"; +import { observer } from "mobx-react"; +import { useParams } from "react-router"; +// plane imports +import { PROJECT_TRACKER_ELEMENTS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Button } from "@plane/propel/button"; +// components +import { SettingsBoxedControlItem } from "@/components/settings/boxed-control-item"; +// hooks +import { useProject } from "@/hooks/store/use-project"; +// local imports +import { ArchiveRestoreProjectModal } from "../archive-restore-modal"; +import { DeleteProjectModal } from "../delete-project-modal"; + +type Props = { + projectId: string; +}; + +export const GeneralProjectSettingsControlSection = observer(function GeneralProjectSettingsControlSection( + props: Props +) { + const { projectId } = props; + // states + const [selectProject, setSelectedProject] = useState(null); + const [archiveProject, setArchiveProject] = useState(false); + // params + const { workspaceSlug } = useParams(); + // store hooks + const { currentProjectDetails } = useProject(); + // translation + const { t } = useTranslation(); + + if (!currentProjectDetails) return null; + + return ( +
+ {workspaceSlug && ( + setArchiveProject(false)} + archive + /> + )} + setSelectedProject(null)} + /> +
+ {/* Project Selector */} + setArchiveProject(true)}> + {t("archive")} + + } + /> + {/* Format Selector */} + setSelectedProject(currentProjectDetails.id ?? null)} + data-ph-element={PROJECT_TRACKER_ELEMENTS.DELETE_PROJECT_BUTTON} + > + {t("delete")} + + } + /> +
+
+ ); +}); diff --git a/apps/web/core/components/project/settings/delete-project-section.tsx b/apps/web/core/components/project/settings/delete-project-section.tsx deleted file mode 100644 index 1d81304301..0000000000 --- a/apps/web/core/components/project/settings/delete-project-section.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import React from "react"; -import { Disclosure, Transition } from "@headlessui/react"; -// types -import { PROJECT_TRACKER_ELEMENTS } from "@plane/constants"; -import { Button } from "@plane/propel/button"; -import { ChevronRightIcon, ChevronUpIcon } from "@plane/propel/icons"; -import type { IProject } from "@plane/types"; -// ui -import { Loader } from "@plane/ui"; - -export interface IDeleteProjectSection { - projectDetails: IProject; - handleDelete: () => void; -} - -export function DeleteProjectSection(props: IDeleteProjectSection) { - const { projectDetails, handleDelete } = props; - - return ( - - {({ open }) => ( -
- - Delete project - {open ? : } - - - - -
- - When deleting a project, all of the data and resources within that project will be permanently removed - and cannot be recovered. - -
- {projectDetails ? ( -
- -
- ) : ( - - - - )} -
-
-
-
-
- )} -
- ); -} diff --git a/apps/web/core/components/project/settings/features-list.tsx b/apps/web/core/components/project/settings/features-list.tsx index fcfab32ae0..8605bf5080 100644 --- a/apps/web/core/components/project/settings/features-list.tsx +++ b/apps/web/core/components/project/settings/features-list.tsx @@ -1,17 +1,24 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { useTranslation } from "@plane/i18n"; import { setPromiseToast } from "@plane/propel/toast"; import { Tooltip } from "@plane/propel/tooltip"; import type { IProject } from "@plane/types"; +import { CycleIcon, IntakeIcon, ModuleIcon, PageIcon, ViewsIcon } from "@plane/propel/icons"; // components +import { SettingsBoxedControlItem } from "@/components/settings/boxed-control-item"; import { SettingsHeading } from "@/components/settings/heading"; // hooks import { useProject } from "@/hooks/store/use-project"; -import { useUser } from "@/hooks/store/user"; // plane web imports import { UpgradeBadge } from "@/plane-web/components/workspace/upgrade-badge"; -import { PROJECT_FEATURES_LIST } from "@/plane-web/constants/project/settings"; +// local imports import { ProjectFeatureToggle } from "./helper"; type Props = { @@ -20,16 +27,63 @@ type Props = { isAdmin: boolean; }; +const PROJECT_FEATURES_LIST = { + cycles: { + key: "cycles", + property: "cycle_view", + title: "Cycles", + description: "Timebox work as you see fit per project and change frequency from one period to the next.", + icon: , + isPro: false, + isEnabled: true, + }, + modules: { + key: "modules", + property: "module_view", + title: "Modules", + description: "Group work into sub-project-like set-ups with their own leads and assignees.", + icon: , + isPro: false, + isEnabled: true, + }, + views: { + key: "views", + property: "issue_views_view", + title: "Views", + description: "Save sorts, filters, and display options for later or share them.", + icon: , + isPro: false, + isEnabled: true, + }, + pages: { + key: "pages", + property: "page_view", + title: "Pages", + description: "Write anything like you write anything.", + icon: , + isPro: false, + isEnabled: true, + }, + inbox: { + key: "intake", + property: "inbox_view", + title: "Intake", + description: "Consider and discuss work items before you add them to your project.", + icon: , + isPro: false, + isEnabled: true, + }, +}; + export const ProjectFeaturesList = observer(function ProjectFeaturesList(props: Props) { const { workspaceSlug, projectId, isAdmin } = props; // store hooks const { t } = useTranslation(); - const { data: currentUser } = useUser(); const { getProjectById, updateProject } = useProject(); // derived values const currentProjectDetails = getProjectById(projectId); - const handleSubmit = (featureKey: string, featureProperty: string) => { + const handleSubmit = (_featureKey: string, featureProperty: string) => { if (!workspaceSlug || !projectId || !currentProjectDetails) return; // making the request to update the project feature @@ -54,49 +108,43 @@ export const ProjectFeaturesList = observer(function ProjectFeaturesList(props: }); }; - if (!currentUser) return <>; - return ( -
- {Object.entries(PROJECT_FEATURES_LIST).map(([featureSectionKey, feature]) => ( -
- - {Object.entries(feature.featureList).map(([featureItemKey, featureItem]) => ( -
-
-
-
{featureItem.icon}
-
-
-

{t(featureItem.key)}

- {featureItem.isPro && ( - - - - )} -
-

- {t(`${featureItem.key}_description`)} -

-
-
- -
-
- {currentProjectDetails?.[featureItem.property as keyof IProject] && - featureItem.renderChildren?.(currentProjectDetails, workspaceSlug)} -
+ <> +
+ +
+ {Object.entries(PROJECT_FEATURES_LIST).map(([featureItemKey, featureItem]) => ( +
+ + {t(featureItem.key)} + {featureItem.isPro && ( + + + + )} + + } + description={t(`${featureItem.key}_description`)} + control={ + + } + /> + {/* {currentProjectDetails?.[featureItem.property as keyof IProject] && ( +
{featureItem.renderChildren?.(currentProjectDetails, workspaceSlug)}
+ )} */}
))}
- ))} -
+
+ ); }); diff --git a/apps/web/core/components/project/settings/helper.tsx b/apps/web/core/components/project/settings/helper.tsx index ec667b557d..8911cc8c1a 100644 --- a/apps/web/core/components/project/settings/helper.tsx +++ b/apps/web/core/components/project/settings/helper.tsx @@ -1,15 +1,20 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import Link from "next/link"; import { PROJECT_TRACKER_ELEMENTS } from "@plane/constants"; import { ChevronRightIcon } from "@plane/propel/icons"; import { EPillVariant, Pill, EPillSize } from "@plane/propel/pill"; import { ToggleSwitch } from "@plane/ui"; import { joinUrlPath } from "@plane/utils"; -import type { TProperties } from "@/plane-web/constants/project/settings/features"; type Props = { workspaceSlug: string; projectId: string; - featureItem: TProperties; + featureItem: any; value: boolean; handleSubmit: (featureKey: string, featureProperty: string) => void; disabled?: boolean; @@ -17,8 +22,8 @@ type Props = { export function ProjectFeatureToggle(props: Props) { const { workspaceSlug, projectId, featureItem, value, handleSubmit, disabled } = props; - return featureItem.href ? ( - + return featureItem?.href ? ( +
handleSubmit(featureItem.key, featureItem.property)} + onChange={() => handleSubmit(featureItem?.key, featureItem?.property)} disabled={disabled} size="sm" data-ph-element={PROJECT_TRACKER_ELEMENTS.TOGGLE_FEATURE} diff --git a/apps/web/core/components/project/settings/member-columns.tsx b/apps/web/core/components/project/settings/member-columns.tsx index d304a005f9..b3554efc0b 100644 --- a/apps/web/core/components/project/settings/member-columns.tsx +++ b/apps/web/core/components/project/settings/member-columns.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import Link from "next/link"; import { Controller, useForm } from "react-hook-form"; @@ -45,7 +51,7 @@ export function NameColumn(props: NameProps) {
{avatar_url && avatar_url.trim() !== "" ? ( - + ) : ( - + {(email ?? display_name ?? "?")[0]} diff --git a/apps/web/core/components/readonly/cycle.tsx b/apps/web/core/components/readonly/cycle.tsx index 0b0abffb6b..c5fc9753d1 100644 --- a/apps/web/core/components/readonly/cycle.tsx +++ b/apps/web/core/components/readonly/cycle.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/readonly/date.tsx b/apps/web/core/components/readonly/date.tsx index 5e2c71af44..b09650d351 100644 --- a/apps/web/core/components/readonly/date.tsx +++ b/apps/web/core/components/readonly/date.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/readonly/estimate.tsx b/apps/web/core/components/readonly/estimate.tsx index 8863e4765d..1573681191 100644 --- a/apps/web/core/components/readonly/estimate.tsx +++ b/apps/web/core/components/readonly/estimate.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; diff --git a/apps/web/core/components/readonly/index.tsx b/apps/web/core/components/readonly/index.tsx index 66e7a06b77..dea820817b 100644 --- a/apps/web/core/components/readonly/index.tsx +++ b/apps/web/core/components/readonly/index.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // Readonly components for displaying single values instead of interactive dropdowns // These components handle their own data fetching using internal hooks export { ReadonlyState, type TReadonlyStateProps } from "./state"; diff --git a/apps/web/core/components/readonly/labels.tsx b/apps/web/core/components/readonly/labels.tsx index c9773259cf..420bb87d08 100644 --- a/apps/web/core/components/readonly/labels.tsx +++ b/apps/web/core/components/readonly/labels.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/readonly/member.tsx b/apps/web/core/components/readonly/member.tsx index 556b764d58..14fae53be3 100644 --- a/apps/web/core/components/readonly/member.tsx +++ b/apps/web/core/components/readonly/member.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import type { LucideIcon } from "lucide-react"; // plane imports diff --git a/apps/web/core/components/readonly/module.tsx b/apps/web/core/components/readonly/module.tsx index d74fd23075..30a1dc32b0 100644 --- a/apps/web/core/components/readonly/module.tsx +++ b/apps/web/core/components/readonly/module.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect } from "react"; import { observer } from "mobx-react"; import { Layers } from "lucide-react"; diff --git a/apps/web/core/components/readonly/priority.tsx b/apps/web/core/components/readonly/priority.tsx index e059b93676..c3343ace4e 100644 --- a/apps/web/core/components/readonly/priority.tsx +++ b/apps/web/core/components/readonly/priority.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { ISSUE_PRIORITIES } from "@plane/constants"; diff --git a/apps/web/core/components/readonly/state.tsx b/apps/web/core/components/readonly/state.tsx index 7e7105ec9f..f041dcbfaf 100644 --- a/apps/web/core/components/readonly/state.tsx +++ b/apps/web/core/components/readonly/state.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useState } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/rich-filters/add-filters/button.tsx b/apps/web/core/components/rich-filters/add-filters/button.tsx index f47a0aac20..51f58c3750 100644 --- a/apps/web/core/components/rich-filters/add-filters/button.tsx +++ b/apps/web/core/components/rich-filters/add-filters/button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { ListFilter } from "lucide-react"; diff --git a/apps/web/core/components/rich-filters/add-filters/dropdown.tsx b/apps/web/core/components/rich-filters/add-filters/dropdown.tsx index 459a4e498a..505162b349 100644 --- a/apps/web/core/components/rich-filters/add-filters/dropdown.tsx +++ b/apps/web/core/components/rich-filters/add-filters/dropdown.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/rich-filters/filter-item/close-button.tsx b/apps/web/core/components/rich-filters/filter-item/close-button.tsx index 737e724888..82d83cf771 100644 --- a/apps/web/core/components/rich-filters/filter-item/close-button.tsx +++ b/apps/web/core/components/rich-filters/filter-item/close-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/rich-filters/filter-item/container.tsx b/apps/web/core/components/rich-filters/filter-item/container.tsx index f9a4db55a9..d711b5a681 100644 --- a/apps/web/core/components/rich-filters/filter-item/container.tsx +++ b/apps/web/core/components/rich-filters/filter-item/container.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useEffect, useRef } from "react"; // plane imports import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/rich-filters/filter-item/invalid.tsx b/apps/web/core/components/rich-filters/filter-item/invalid.tsx index f042607358..931f3d8e8e 100644 --- a/apps/web/core/components/rich-filters/filter-item/invalid.tsx +++ b/apps/web/core/components/rich-filters/filter-item/invalid.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; import { CircleAlert } from "lucide-react"; diff --git a/apps/web/core/components/rich-filters/filter-item/loader.tsx b/apps/web/core/components/rich-filters/filter-item/loader.tsx index de81d2b762..508d7546c3 100644 --- a/apps/web/core/components/rich-filters/filter-item/loader.tsx +++ b/apps/web/core/components/rich-filters/filter-item/loader.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Loader } from "@plane/ui"; export function FilterItemLoader() { diff --git a/apps/web/core/components/rich-filters/filter-item/property.tsx b/apps/web/core/components/rich-filters/filter-item/property.tsx index a3e36266e7..46c9d9f7ef 100644 --- a/apps/web/core/components/rich-filters/filter-item/property.tsx +++ b/apps/web/core/components/rich-filters/filter-item/property.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { Tooltip } from "@plane/propel/tooltip"; diff --git a/apps/web/core/components/rich-filters/filter-item/root.tsx b/apps/web/core/components/rich-filters/filter-item/root.tsx index e70cca28a8..1440f46546 100644 --- a/apps/web/core/components/rich-filters/filter-item/root.tsx +++ b/apps/web/core/components/rich-filters/filter-item/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/rich-filters/filter-value-input/date/range.tsx b/apps/web/core/components/rich-filters/filter-value-input/date/range.tsx index 818f4565cf..8a96acf37e 100644 --- a/apps/web/core/components/rich-filters/filter-value-input/date/range.tsx +++ b/apps/web/core/components/rich-filters/filter-value-input/date/range.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/rich-filters/filter-value-input/date/single.tsx b/apps/web/core/components/rich-filters/filter-value-input/date/single.tsx index 6fc667740f..0eb70df03f 100644 --- a/apps/web/core/components/rich-filters/filter-value-input/date/single.tsx +++ b/apps/web/core/components/rich-filters/filter-value-input/date/single.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/rich-filters/filter-value-input/root.tsx b/apps/web/core/components/rich-filters/filter-value-input/root.tsx index a9717b09ca..b1e996ed1a 100644 --- a/apps/web/core/components/rich-filters/filter-value-input/root.tsx +++ b/apps/web/core/components/rich-filters/filter-value-input/root.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/rich-filters/filter-value-input/select/multi.tsx b/apps/web/core/components/rich-filters/filter-value-input/select/multi.tsx index 222faa2f4a..2c5fb409fa 100644 --- a/apps/web/core/components/rich-filters/filter-value-input/select/multi.tsx +++ b/apps/web/core/components/rich-filters/filter-value-input/select/multi.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState, useEffect, useMemo } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/rich-filters/filter-value-input/select/selected-options-display.tsx b/apps/web/core/components/rich-filters/filter-value-input/select/selected-options-display.tsx index 5e269570ff..54d9fcee4f 100644 --- a/apps/web/core/components/rich-filters/filter-value-input/select/selected-options-display.tsx +++ b/apps/web/core/components/rich-filters/filter-value-input/select/selected-options-display.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React from "react"; import { Transition } from "@headlessui/react"; // plane imports diff --git a/apps/web/core/components/rich-filters/filter-value-input/select/shared.tsx b/apps/web/core/components/rich-filters/filter-value-input/select/shared.tsx index 35e0cf26b1..a948b26804 100644 --- a/apps/web/core/components/rich-filters/filter-value-input/select/shared.tsx +++ b/apps/web/core/components/rich-filters/filter-value-input/select/shared.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + // plane imports import type { TSupportedFilterFieldConfigs, IFilterOption, TFilterValue } from "@plane/types"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/rich-filters/filter-value-input/select/single.tsx b/apps/web/core/components/rich-filters/filter-value-input/select/single.tsx index 20c6d52967..2e525b5d6e 100644 --- a/apps/web/core/components/rich-filters/filter-value-input/select/single.tsx +++ b/apps/web/core/components/rich-filters/filter-value-input/select/single.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useState, useEffect, useMemo } from "react"; import { observer } from "mobx-react"; // plane imports diff --git a/apps/web/core/components/rich-filters/filters-row.tsx b/apps/web/core/components/rich-filters/filters-row.tsx index 30316890f6..423cb33620 100644 --- a/apps/web/core/components/rich-filters/filters-row.tsx +++ b/apps/web/core/components/rich-filters/filters-row.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import React, { useCallback, useState } from "react"; import { observer } from "mobx-react"; import { ListFilterPlus } from "lucide-react"; diff --git a/apps/web/core/components/rich-filters/filters-toggle.tsx b/apps/web/core/components/rich-filters/filters-toggle.tsx index 76f8445320..27479216fb 100644 --- a/apps/web/core/components/rich-filters/filters-toggle.tsx +++ b/apps/web/core/components/rich-filters/filters-toggle.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; // plane imports import { IconButton } from "@plane/propel/icon-button"; diff --git a/apps/web/core/components/rich-filters/shared.ts b/apps/web/core/components/rich-filters/shared.ts index 763128503e..498ac4258f 100644 --- a/apps/web/core/components/rich-filters/shared.ts +++ b/apps/web/core/components/rich-filters/shared.ts @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { SingleOrArray, TFilterConditionNodeForDisplay, diff --git a/apps/web/core/components/settings/boxed-control-item.tsx b/apps/web/core/components/settings/boxed-control-item.tsx new file mode 100644 index 0000000000..3126dfac9a --- /dev/null +++ b/apps/web/core/components/settings/boxed-control-item.tsx @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +// plane imports +import { cn } from "@plane/utils"; + +type Props = { + className?: string; + control?: React.ReactNode; + description?: React.ReactNode; + title: React.ReactNode; +}; + +export function SettingsBoxedControlItem(props: Props) { + const { className, control, description, title } = props; + + return ( +
+
+

{title}

+ {description &&

{description}

} +
+ {control &&
{control}
} +
+ ); +} diff --git a/apps/web/core/components/settings/content-wrapper.tsx b/apps/web/core/components/settings/content-wrapper.tsx index a15566d666..d51f0fa9fa 100644 --- a/apps/web/core/components/settings/content-wrapper.tsx +++ b/apps/web/core/components/settings/content-wrapper.tsx @@ -1,22 +1,41 @@ -import type { ReactNode } from "react"; -import { observer } from "mobx-react"; -import { cn } from "@plane/utils"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ -type TProps = { - children: ReactNode; - size?: "lg" | "md"; +// plane imports +import { ScrollArea } from "@plane/propel/scrollarea"; +import { cn } from "@plane/utils"; +// components +import { AppHeader } from "@/components/core/app-header"; + +type Props = { + children: React.ReactNode; + header?: React.ReactNode; + hugging?: boolean; }; -export const SettingsContentWrapper = observer(function SettingsContentWrapper(props: TProps) { - const { children, size = "md" } = props; + +export function SettingsContentWrapper(props: Props) { + const { children, header, hugging = false } = props; return ( -
-
{children}
+
+ {header && ( +
+ +
+ )} + +
+ {children} +
+
); -}); +} diff --git a/apps/web/core/components/settings/control-item.tsx b/apps/web/core/components/settings/control-item.tsx new file mode 100644 index 0000000000..966f4313b1 --- /dev/null +++ b/apps/web/core/components/settings/control-item.tsx @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +type Props = { + control: React.ReactNode; + description: string; + title: React.ReactNode; +}; + +export function SettingsControlItem(props: Props) { + const { control, description, title } = props; + + return ( +
+
+

{title}

+

{description}

+
+
{control}
+
+ ); +} diff --git a/apps/web/core/components/settings/header.tsx b/apps/web/core/components/settings/header.tsx deleted file mode 100644 index b62ad4d4b1..0000000000 --- a/apps/web/core/components/settings/header.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import { observer } from "mobx-react"; -import Link from "next/link"; -import { ChevronLeftIcon } from "lucide-react"; -// plane imports -import { useTranslation } from "@plane/i18n"; -import { getButtonStyling } from "@plane/propel/button"; -import { cn } from "@plane/utils"; -// hooks -import { useWorkspace } from "@/hooks/store/use-workspace"; -import { useUserSettings } from "@/hooks/store/user"; -// local imports -import { WorkspaceLogo } from "../workspace/logo"; -import SettingsTabs from "./tabs"; - -export const SettingsHeader = observer(function SettingsHeader() { - // hooks - const { t } = useTranslation(); - const { currentWorkspace } = useWorkspace(); - const { isScrolled } = useUserSettings(); - - return ( -
- - - - {/* Breadcrumb */} - - -
-
{t("back_to_workspace")}
- {/* Last workspace */} -
- -
{currentWorkspace?.name}
-
-
- -
- {/* Description */} -
{t("settings")}
- {/* Actions */} - -
-
- ); -}); diff --git a/apps/web/core/components/settings/heading.tsx b/apps/web/core/components/settings/heading.tsx index 9f8949ee5a..213e71bdcf 100644 --- a/apps/web/core/components/settings/heading.tsx +++ b/apps/web/core/components/settings/heading.tsx @@ -1,48 +1,38 @@ -import { Button } from "@plane/propel/button"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +// plane imports import { cn } from "@plane/ui"; type Props = { - title: string | React.ReactNode; - description?: string; - appendToRight?: React.ReactNode; - showButton?: boolean; - customButton?: React.ReactNode; - button?: { - label: string; - onClick: () => void; - }; className?: string; + control?: React.ReactNode; + description?: React.ReactNode; + title?: React.ReactNode; + variant?: "h3" | "h4" | "h6"; }; -export function SettingsHeading({ - title, - description, - button, - appendToRight, - customButton, - showButton = true, - className, -}: Props) { +export function SettingsHeading({ className, control, description, title, variant = "h3" }: Props) { return ( -
+
- {typeof title === "string" ?

{title}

: title} - {description &&
{description}
} + {title && ( +

+ {title} +

+ )} + {description &&

{description}

}
- {showButton && customButton} - {button && showButton && ( - - )} - {appendToRight} + {control}
); } - -export default SettingsHeading; diff --git a/apps/web/core/components/settings/helper.ts b/apps/web/core/components/settings/helper.ts index e621fcdbd6..85b1fe1328 100644 --- a/apps/web/core/components/settings/helper.ts +++ b/apps/web/core/components/settings/helper.ts @@ -1,5 +1,10 @@ -import { GROUPED_PROFILE_SETTINGS, GROUPED_WORKSPACE_SETTINGS } from "@plane/constants"; -import { PROJECT_SETTINGS_LINKS } from "@/plane-web/constants/project"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { GROUPED_WORKSPACE_SETTINGS, PROJECT_SETTINGS_FLAT_MAP } from "@plane/constants"; const hrefToLabelMap = (options: Record>) => Object.values(options) @@ -14,9 +19,7 @@ const hrefToLabelMap = (options: Record { acc[setting.href] = setting.i18n_label; return acc; @@ -39,14 +42,6 @@ export const getWorkspaceActivePath = (pathname: string) => { return workspaceHrefToLabelMap[subPath]; }; -export const getProfileActivePath = (pathname: string) => { - const parts = pathname.split("/").filter(Boolean); - const settingsIndex = parts.indexOf("settings"); - if (settingsIndex === -1) return null; - const subPath = "/" + parts.slice(settingsIndex, settingsIndex + 3).join("/"); - return profiletHrefToLabelMap[subPath]; -}; - export const getProjectActivePath = (pathname: string) => { const parts = pathname.split("/").filter(Boolean); const settingsIndex = parts.indexOf("settings"); diff --git a/apps/web/core/components/settings/layout.tsx b/apps/web/core/components/settings/layout.tsx index 43923e0dfd..4b04e2a680 100644 --- a/apps/web/core/components/settings/layout.tsx +++ b/apps/web/core/components/settings/layout.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef } from "react"; import { observer } from "mobx-react"; diff --git a/apps/web/core/components/settings/mobile/index.ts b/apps/web/core/components/settings/mobile/index.ts deleted file mode 100644 index 870d3745cd..0000000000 --- a/apps/web/core/components/settings/mobile/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./nav"; diff --git a/apps/web/core/components/settings/mobile/nav.tsx b/apps/web/core/components/settings/mobile/nav.tsx index ea5871eca3..2f70c55538 100644 --- a/apps/web/core/components/settings/mobile/nav.tsx +++ b/apps/web/core/components/settings/mobile/nav.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useRef } from "react"; import { observer } from "mobx-react"; import { Menu } from "lucide-react"; @@ -5,9 +11,10 @@ import { useOutsideClickDetector } from "@plane/hooks"; import { useTranslation } from "@plane/i18n"; import { ChevronRightIcon } from "@plane/propel/icons"; import { useUserSettings } from "@/hooks/store/user"; +import { IconButton } from "@plane/propel/icon-button"; type Props = { - hamburgerContent: React.ComponentType<{ isMobile: boolean }>; + hamburgerContent: React.ComponentType<{ className?: string; isMobile?: boolean }>; activePath: string; }; @@ -24,23 +31,19 @@ export const SettingsMobileNav = observer(function SettingsMobileNav(props: Prop }); return ( -
-
-
- {!sidebarCollapsed && } - -
- {/* path */} -
- - {t(activePath)} -
+
+
+ {!sidebarCollapsed && ( +
+ +
+ )} + toggleSidebar()} /> +
+ {/* path */} +
+ + {t(activePath)}
); diff --git a/apps/web/core/components/settings/page-header.tsx b/apps/web/core/components/settings/page-header.tsx new file mode 100644 index 0000000000..2b3328a78b --- /dev/null +++ b/apps/web/core/components/settings/page-header.tsx @@ -0,0 +1,23 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { Header } from "@plane/ui"; + +type Props = { + leftItem?: React.ReactNode; + rightItem?: React.ReactNode; +}; + +export function SettingsPageHeader(props: Props) { + const { leftItem, rightItem } = props; + + return ( +
+ {leftItem && {leftItem}} + {rightItem && {rightItem}} +
+ ); +} diff --git a/apps/web/core/components/settings/profile/content/index.ts b/apps/web/core/components/settings/profile/content/index.ts new file mode 100644 index 0000000000..d980334597 --- /dev/null +++ b/apps/web/core/components/settings/profile/content/index.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +export * from "./root"; diff --git a/apps/web/core/components/settings/profile/content/pages/activity/activity-list.tsx b/apps/web/core/components/settings/profile/content/pages/activity/activity-list.tsx new file mode 100644 index 0000000000..a5c01086ae --- /dev/null +++ b/apps/web/core/components/settings/profile/content/pages/activity/activity-list.tsx @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { useEffect } from "react"; +import { observer } from "mobx-react"; +import Link from "next/link"; +import useSWR from "swr"; +// icons +import { History, MessageSquare } from "lucide-react"; +import { calculateTimeAgo, getFileURL } from "@plane/utils"; +// hooks +import { ActivityIcon, ActivityMessage } from "@/components/core/activity"; +import { RichTextEditor } from "@/components/editor/rich-text"; +import { ActivitySettingsLoader } from "@/components/ui/loader/settings/activity"; +// constants +import { USER_ACTIVITY } from "@/constants/fetch-keys"; +// hooks +import { useUserProfile } from "@/hooks/store/user/user-user-profile"; +// services +import { UserService } from "@/services/user.service"; +const userService = new UserService(); + +type Props = { + cursor: string; + perPage: number; + updateResultsCount: (count: number) => void; + updateTotalPages: (count: number) => void; + updateEmptyState: (state: boolean) => void; +}; + +export const ActivityProfileSettingsList = observer(function ProfileActivityListPage(props: Props) { + const { cursor, perPage, updateResultsCount, updateTotalPages, updateEmptyState } = props; + // store hooks + const { data: currentUser } = useUserProfile(); + + const { data: userProfileActivity } = useSWR( + USER_ACTIVITY({ + cursor, + }), + () => + userService.getUserActivity({ + cursor, + per_page: perPage, + }) + ); + + useEffect(() => { + if (!userProfileActivity) return; + + // if no results found then show empty state + if (userProfileActivity.total_results === 0) updateEmptyState(true); + + updateTotalPages(userProfileActivity.total_pages); + updateResultsCount(userProfileActivity.results.length); + }, [updateResultsCount, updateTotalPages, userProfileActivity, updateEmptyState]); + + // TODO: refactor this component + return ( + <> + {userProfileActivity ? ( +
    + {userProfileActivity.results.map((activityItem: any) => { + if (activityItem.field === "comment") + return ( +
    +
    +
    + {activityItem.field ? ( + activityItem.new_value === "restore" && + ) : activityItem.actor_detail.avatar_url && activityItem.actor_detail.avatar_url !== "" ? ( + {activityItem.actor_detail.display_name} + ) : ( +
    + {activityItem.actor_detail.display_name?.[0]} +
    + )} + + + +
    +
    +
    +
    + {activityItem.actor_detail.is_bot + ? activityItem.actor_detail.first_name + " Bot" + : activityItem.actor_detail.display_name} +
    +

    + Commented {calculateTimeAgo(activityItem.created_at)} +

    +
    +
    + +
    +
    +
    +
    + ); + + const message = ; + + if ("field" in activityItem && activityItem.field !== "updated_by") + return ( +
  • +
    +
    + <> +
    +
    +
    +
    + {activityItem.field ? ( + activityItem.new_value === "restore" ? ( + + ) : ( + + ) + ) : activityItem.actor_detail.avatar_url && + activityItem.actor_detail.avatar_url !== "" ? ( + {activityItem.actor_detail.display_name} + ) : ( +
    + {activityItem.actor_detail.display_name?.[0]} +
    + )} +
    +
    +
    +
    +
    +
    + {activityItem.field === "archived_at" && activityItem.new_value !== "restore" ? ( + Plane + ) : activityItem.actor_detail.is_bot ? ( + {activityItem.actor_detail.first_name} Bot + ) : ( + + + {currentUser?.id === activityItem.actor_detail.id + ? "You" + : activityItem.actor_detail.display_name} + + + )}{" "} +
    + {message}{" "} + + {calculateTimeAgo(activityItem.created_at)} + +
    +
    +
    + +
    +
    +
  • + ); + })} +
+ ) : ( + + )} + + ); +}); diff --git a/apps/web/core/components/settings/profile/content/pages/activity/index.ts b/apps/web/core/components/settings/profile/content/pages/activity/index.ts new file mode 100644 index 0000000000..d980334597 --- /dev/null +++ b/apps/web/core/components/settings/profile/content/pages/activity/index.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +export * from "./root"; diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/activity/page.tsx b/apps/web/core/components/settings/profile/content/pages/activity/root.tsx similarity index 78% rename from apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/activity/page.tsx rename to apps/web/core/components/settings/profile/content/pages/activity/root.tsx index 00b795dfdc..b09cf5d429 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/activity/page.tsx +++ b/apps/web/core/components/settings/profile/content/pages/activity/root.tsx @@ -1,23 +1,28 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; +import { ChevronDown } from "lucide-react"; import { observer } from "mobx-react"; import { useTheme } from "next-themes"; +// plane imports import { useTranslation } from "@plane/i18n"; -// ui import { Button } from "@plane/propel/button"; // assets import darkActivityAsset from "@/app/assets/empty-state/profile/activity-dark.webp?url"; import lightActivityAsset from "@/app/assets/empty-state/profile/activity-light.webp?url"; // components -import { PageHead } from "@/components/core/page-title"; import { DetailedEmptyState } from "@/components/empty-state/detailed-empty-state-root"; -import { ProfileActivityListPage } from "@/components/profile/activity/profile-activity-list"; -// hooks -import { SettingsHeading } from "@/components/settings/heading"; -import { ChevronDown } from "lucide-react"; +import { ProfileSettingsHeading } from "@/components/settings/profile/heading"; +// local imports +import { ActivityProfileSettingsList } from "./activity-list"; const PER_PAGE = 100; -function ProfileActivityPage() { +export const ActivityProfileSettings = observer(function ActivityProfileSettings() { // states const [pageCount, setPageCount] = useState(1); const [totalPages, setTotalPages] = useState(0); @@ -41,7 +46,7 @@ function ProfileActivityPage() { const activityPages: React.ReactNode[] = []; for (let i = 0; i < pageCount; i++) activityPages.push( - - + @@ -72,13 +77,12 @@ function ProfileActivityPage() { } return ( - <> - - + -
{activityPages}
+
{activityPages}
{isLoadMoreVisible && (
)} - +
); -} - -export default observer(ProfileActivityPage); +}); diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/api-tokens/page.tsx b/apps/web/core/components/settings/profile/content/pages/api-tokens.tsx similarity index 57% rename from apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/api-tokens/page.tsx rename to apps/web/core/components/settings/profile/content/pages/api-tokens.tsx index d7cfb122f1..3205e25b2e 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/api-tokens/page.tsx +++ b/apps/web/core/components/settings/profile/content/pages/api-tokens.tsx @@ -1,61 +1,59 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; -import type { FC } from "react"; import { observer } from "mobx-react"; import useSWR from "swr"; // plane imports import { useTranslation } from "@plane/i18n"; -// component +import { Button } from "@plane/propel/button"; import { EmptyStateCompact } from "@plane/propel/empty-state"; import { APITokenService } from "@plane/services"; +// components import { CreateApiTokenModal } from "@/components/api-token/modal/create-token-modal"; import { ApiTokenListItem } from "@/components/api-token/token-list-item"; -import { PageHead } from "@/components/core/page-title"; -import { SettingsHeading } from "@/components/settings/heading"; +import { ProfileSettingsHeading } from "@/components/settings/profile/heading"; import { APITokenSettingsLoader } from "@/components/ui/loader/settings/api-token"; +// constants import { API_TOKENS_LIST } from "@/constants/fetch-keys"; -// store hooks -import { useWorkspace } from "@/hooks/store/use-workspace"; const apiTokenService = new APITokenService(); -const ApiTokensPage: FC = observer(function ApiTokensPage() { +export const APITokensProfileSettings = observer(function APITokensProfileSettings() { // states const [isCreateTokenModalOpen, setIsCreateTokenModalOpen] = useState(false); - // plane hooks - const { t } = useTranslation(); // store hooks - const { currentWorkspace } = useWorkspace(); - const { data: tokens } = useSWR(API_TOKENS_LIST, () => apiTokenService.list()); - - const pageTitle = currentWorkspace?.name - ? `${currentWorkspace.name} - ${t("account_settings.api_tokens.title")}` - : undefined; + // translation + const { t } = useTranslation(); if (!tokens) { - return ; + return ; } return ( -
- +
setIsCreateTokenModalOpen(false)} /> -
- { - setIsCreateTokenModalOpen(true); - }, - }} - /> + setIsCreateTokenModalOpen(true)}> + {t("workspace_settings.settings.api_tokens.add_token")} + + } + /> +
{tokens.length > 0 ? ( <> - {tokens.map((token) => ( - - ))} +
+ {tokens.map((token) => ( + + ))} +
) : ( )} -
+
); }); - -export default ApiTokensPage; diff --git a/apps/web/core/components/profile/form.tsx b/apps/web/core/components/settings/profile/content/pages/general/form.tsx similarity index 83% rename from apps/web/core/components/profile/form.tsx rename to apps/web/core/components/settings/profile/content/pages/general/form.tsx index ec9d52bb29..f4f67e5b3a 100644 --- a/apps/web/core/components/profile/form.tsx +++ b/apps/web/core/components/settings/profile/content/pages/general/form.tsx @@ -1,12 +1,16 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; import { CircleUserRound } from "lucide-react"; -import { Disclosure, Transition } from "@headlessui/react"; // plane imports import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; -import { ChevronDownIcon } from "@plane/propel/icons"; import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/propel/toast"; import { EFileAssetType } from "@plane/types"; import type { IUser, TUserProfile } from "@plane/types"; @@ -18,11 +22,14 @@ import { ImagePickerPopover } from "@/components/core/image-picker-popover"; import { ChangeEmailModal } from "@/components/core/modals/change-email-modal"; import { UserImageUploadModal } from "@/components/core/modals/user-image-upload-modal"; import { CoverImage } from "@/components/common/cover-image"; +import { SettingsBoxedControlItem } from "@/components/settings/boxed-control-item"; // helpers import { handleCoverImageChange } from "@/helpers/cover-image.helper"; // hooks import { useInstance } from "@/hooks/store/use-instance"; import { useUser, useUserProfile } from "@/hooks/store/user"; +// utils +import { validatePersonName, validateDisplayName } from "@plane/utils"; type TUserProfileForm = { avatar_url: string; @@ -38,12 +45,12 @@ type TUserProfileForm = { user_timezone: string; }; -export type TProfileFormProps = { +type Props = { user: IUser; profile: TUserProfile; }; -export const ProfileForm = observer(function ProfileForm(props: TProfileFormProps) { +export const GeneralProfileSettingsForm = observer(function GeneralProfileSettingsForm(props: Props) { const { user, profile } = props; // states const [isLoading, setIsLoading] = useState(false); @@ -189,7 +196,7 @@ export const ProfileForm = observer(function ProfileForm(props: TProfileFormProp )} />
-
+
( )} @@ -279,6 +287,9 @@ export const ProfileForm = observer(function ProfileForm(props: TProfileFormProp ( )} /> + {errors.last_name && {errors.last_name.message}}

@@ -306,14 +318,7 @@ export const ProfileForm = observer(function ProfileForm(props: TProfileFormProp name="display_name" rules={{ required: "Display name is required.", - validate: (value) => { - if (value.trim().length < 1) return "Display name can't be empty."; - if (value.split(" ").length > 1) return "Display name can't have two consecutive spaces."; - if (value.replace(/\s/g, "").length < 1) return "Display name must be at least 1 character long."; - if (value.replace(/\s/g, "").length > 20) - return "Display name must be less than 20 characters long."; - return true; - }, + validate: validateDisplayName, }} render={({ field: { value, onChange, ref } }) => ( )} /> @@ -374,45 +379,24 @@ export const ProfileForm = observer(function ProfileForm(props: TProfileFormProp

-
-
- -
+
+
- - {({ open }) => ( - <> - - {t("deactivate_account")} - - - - -
- {t("deactivate_account_description")} -
- -
-
-
-
- - )} -
+
+ setDeactivateAccountModal(true)}> + {t("deactivate_account")} + + } + /> +
); }); diff --git a/apps/web/core/components/settings/profile/content/pages/general/index.ts b/apps/web/core/components/settings/profile/content/pages/general/index.ts new file mode 100644 index 0000000000..d980334597 --- /dev/null +++ b/apps/web/core/components/settings/profile/content/pages/general/index.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +export * from "./root"; diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/page.tsx b/apps/web/core/components/settings/profile/content/pages/general/root.tsx similarity index 50% rename from apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/page.tsx rename to apps/web/core/components/settings/profile/content/pages/general/root.tsx index 7e52686778..2abf499860 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/page.tsx +++ b/apps/web/core/components/settings/profile/content/pages/general/root.tsx @@ -1,23 +1,29 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; // components import { PageHead } from "@/components/core/page-title"; -import { ProfileForm } from "@/components/profile/form"; // hooks import { useUser } from "@/hooks/store/user"; +// local imports +import { GeneralProfileSettingsForm } from "./form"; -function ProfileSettingsPage() { +export const GeneralProfileSettings = observer(function GeneralProfileSettings() { const { t } = useTranslation(); // store hooks const { data: currentUser, userProfile } = useUser(); - if (!currentUser) return <>; + if (!currentUser) return null; + return ( <> - + ); -} - -export default observer(ProfileSettingsPage); +}); diff --git a/apps/web/core/components/settings/profile/content/pages/index.ts b/apps/web/core/components/settings/profile/content/pages/index.ts new file mode 100644 index 0000000000..c9e4179c12 --- /dev/null +++ b/apps/web/core/components/settings/profile/content/pages/index.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { lazy } from "react"; +// plane imports +import type { TProfileSettingsTabs } from "@plane/types"; + +export const PROFILE_SETTINGS_PAGES_MAP: Record> = { + general: lazy(() => import("./general").then((m) => ({ default: m.GeneralProfileSettings }))), + preferences: lazy(() => import("./preferences").then((m) => ({ default: m.PreferencesProfileSettings }))), + notifications: lazy(() => import("./notifications").then((m) => ({ default: m.NotificationsProfileSettings }))), + security: lazy(() => import("./security").then((m) => ({ default: m.SecurityProfileSettings }))), + activity: lazy(() => import("./activity").then((m) => ({ default: m.ActivityProfileSettings }))), + "api-tokens": lazy(() => import("./api-tokens").then((m) => ({ default: m.APITokensProfileSettings }))), +}; diff --git a/apps/web/core/components/settings/profile/content/pages/notifications/email-notification-form.tsx b/apps/web/core/components/settings/profile/content/pages/notifications/email-notification-form.tsx new file mode 100644 index 0000000000..e0add312b3 --- /dev/null +++ b/apps/web/core/components/settings/profile/content/pages/notifications/email-notification-form.tsx @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { useEffect } from "react"; +import { observer } from "mobx-react"; +import { Controller, useForm } from "react-hook-form"; +// plane imports +import { useTranslation } from "@plane/i18n"; +import { TOAST_TYPE, setToast } from "@plane/propel/toast"; +import type { IUserEmailNotificationSettings } from "@plane/types"; +import { ToggleSwitch } from "@plane/ui"; +// components +import { SettingsControlItem } from "@/components/settings/control-item"; +// services +import { UserService } from "@/services/user.service"; + +type Props = { + data: IUserEmailNotificationSettings; +}; + +// services +const userService = new UserService(); + +export const NotificationsProfileSettingsForm = observer(function NotificationsProfileSettingsForm(props: Props) { + const { data } = props; + // translation + const { t } = useTranslation(); + // form data + const { control, reset } = useForm({ + defaultValues: { + ...data, + }, + }); + + const handleSettingChange = async (key: keyof IUserEmailNotificationSettings, value: boolean) => { + try { + await userService.updateCurrentUserEmailNotificationSettings({ + [key]: value, + }); + setToast({ + title: t("success"), + type: TOAST_TYPE.SUCCESS, + message: t("email_notification_setting_updated_successfully"), + }); + } catch (_error) { + setToast({ + title: t("error"), + type: TOAST_TYPE.ERROR, + message: t("failed_to_update_email_notification_setting"), + }); + } + }; + + useEffect(() => { + reset(data); + }, [reset, data]); + + return ( +
+ ( + { + onChange(newValue); + handleSettingChange("property_change", newValue); + }} + size="sm" + /> + )} + /> + } + /> + ( + { + onChange(newValue); + handleSettingChange("state_change", newValue); + }} + size="sm" + /> + )} + /> + } + /> +
+ ( + { + onChange(newValue); + handleSettingChange("issue_completed", newValue); + }} + size="sm" + /> + )} + /> + } + /> +
+ ( + { + onChange(newValue); + handleSettingChange("comment", newValue); + }} + size="sm" + /> + )} + /> + } + /> + ( + { + onChange(newValue); + handleSettingChange("mention", newValue); + }} + size="sm" + /> + )} + /> + } + /> +
+ ); +}); diff --git a/apps/web/core/components/settings/profile/content/pages/notifications/index.ts b/apps/web/core/components/settings/profile/content/pages/notifications/index.ts new file mode 100644 index 0000000000..d980334597 --- /dev/null +++ b/apps/web/core/components/settings/profile/content/pages/notifications/index.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +export * from "./root"; diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/notifications/page.tsx b/apps/web/core/components/settings/profile/content/pages/notifications/root.tsx similarity index 53% rename from apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/notifications/page.tsx rename to apps/web/core/components/settings/profile/content/pages/notifications/root.tsx index c4d05e1f88..d28ef0fb7a 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/account/notifications/page.tsx +++ b/apps/web/core/components/settings/profile/content/pages/notifications/root.tsx @@ -1,17 +1,24 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import useSWR from "swr"; +import { observer } from "mobx-react"; // plane imports import { useTranslation } from "@plane/i18n"; // components -import { PageHead } from "@/components/core/page-title"; -import { EmailNotificationForm } from "@/components/profile/notification/email-notification-form"; -import { SettingsHeading } from "@/components/settings/heading"; +import { ProfileSettingsHeading } from "@/components/settings/profile/heading"; import { EmailSettingsLoader } from "@/components/ui/loader/settings/email"; // services import { UserService } from "@/services/user.service"; +// local imports +import { NotificationsProfileSettingsForm } from "./email-notification-form"; const userService = new UserService(); -export default function ProfileNotificationPage() { +export const NotificationsProfileSettings = observer(function NotificationsProfileSettings() { const { t } = useTranslation(); // fetching user email notification settings const { data, isLoading } = useSWR("CURRENT_USER_EMAIL_NOTIFICATION_SETTINGS", () => @@ -23,14 +30,14 @@ export default function ProfileNotificationPage() { } return ( - <> - - - + - - +
+ +
+
); -} +}); diff --git a/apps/web/core/components/settings/profile/content/pages/preferences/default-list.tsx b/apps/web/core/components/settings/profile/content/pages/preferences/default-list.tsx new file mode 100644 index 0000000000..8b3b010fca --- /dev/null +++ b/apps/web/core/components/settings/profile/content/pages/preferences/default-list.tsx @@ -0,0 +1,23 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// components +import { ThemeSwitcher } from "@/plane-web/components/preferences/theme-switcher"; + +export const ProfileSettingsDefaultPreferencesList = observer(function ProfileSettingsDefaultPreferencesList() { + return ( +
+ +
+ ); +}); diff --git a/apps/web/core/components/settings/profile/content/pages/preferences/index.ts b/apps/web/core/components/settings/profile/content/pages/preferences/index.ts new file mode 100644 index 0000000000..d980334597 --- /dev/null +++ b/apps/web/core/components/settings/profile/content/pages/preferences/index.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +export * from "./root"; diff --git a/apps/web/core/components/settings/profile/content/pages/preferences/language-and-timezone-list.tsx b/apps/web/core/components/settings/profile/content/pages/preferences/language-and-timezone-list.tsx new file mode 100644 index 0000000000..5ec822a95c --- /dev/null +++ b/apps/web/core/components/settings/profile/content/pages/preferences/language-and-timezone-list.tsx @@ -0,0 +1,108 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { SUPPORTED_LANGUAGES, useTranslation } from "@plane/i18n"; +import { TOAST_TYPE, setToast } from "@plane/propel/toast"; +import { CustomSelect } from "@plane/ui"; +// components +import { TimezoneSelect } from "@/components/global"; +import { StartOfWeekPreference } from "@/components/profile/start-of-week-preference"; +import { SettingsControlItem } from "@/components/settings/control-item"; +// hooks +import { useUser, useUserProfile } from "@/hooks/store/user"; + +export const ProfileSettingsLanguageAndTimezonePreferencesList = observer( + function ProfileSettingsLanguageAndTimezonePreferencesList() { + // store hooks + const { + data: user, + updateCurrentUser, + userProfile: { data: profile }, + } = useUser(); + const { updateUserProfile } = useUserProfile(); + // translation + const { t } = useTranslation(); + + const handleTimezoneChange = async (value: string) => { + try { + await updateCurrentUser({ user_timezone: value }); + setToast({ + title: "Success!", + message: "Timezone updated successfully", + type: TOAST_TYPE.SUCCESS, + }); + } catch (_error) { + setToast({ + title: "Error!", + message: "Failed to update timezone", + type: TOAST_TYPE.ERROR, + }); + } + }; + + const handleLanguageChange = async (value: string) => { + try { + await updateUserProfile({ language: value }); + setToast({ + title: "Success!", + message: "Language updated successfully", + type: TOAST_TYPE.SUCCESS, + }); + } catch (_error) { + setToast({ + title: "Error!", + message: "Failed to update language", + type: TOAST_TYPE.ERROR, + }); + } + }; + + const getLanguageLabel = (value: string) => { + const selectedLanguage = SUPPORTED_LANGUAGES.find((l) => l.value === value); + if (!selectedLanguage) return value; + return selectedLanguage.label; + }; + + return ( +
+ } + /> + + {SUPPORTED_LANGUAGES.map((item) => ( + + {item.label} + + ))} + + } + /> + +
+ ); + } +); diff --git a/apps/web/core/components/settings/profile/content/pages/preferences/root.tsx b/apps/web/core/components/settings/profile/content/pages/preferences/root.tsx new file mode 100644 index 0000000000..cabf93680c --- /dev/null +++ b/apps/web/core/components/settings/profile/content/pages/preferences/root.tsx @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { useTranslation } from "@plane/i18n"; +// components +import { ProfileSettingsHeading } from "@/components/settings/profile/heading"; +// hooks +import { useUserProfile } from "@/hooks/store/user"; +// local imports +import { ProfileSettingsDefaultPreferencesList } from "./default-list"; +import { ProfileSettingsLanguageAndTimezonePreferencesList } from "./language-and-timezone-list"; + +export const PreferencesProfileSettings = observer(function PreferencesProfileSettings() { + const { t } = useTranslation(); + // hooks + const { data: userProfile } = useUserProfile(); + + if (!userProfile) return null; + + return ( +
+ +
+
+ +
+
+
{t("language_and_time")}
+ +
+
+
+ ); +}); diff --git a/apps/web/app/(all)/profile/security/page.tsx b/apps/web/core/components/settings/profile/content/pages/security.tsx similarity index 71% rename from apps/web/app/(all)/profile/security/page.tsx rename to apps/web/core/components/settings/profile/content/pages/security.tsx index aad3001fa6..4c16637bfc 100644 --- a/apps/web/app/(all)/profile/security/page.tsx +++ b/apps/web/core/components/settings/profile/content/pages/security.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { useState } from "react"; import { observer } from "mobx-react"; import { Controller, useForm } from "react-hook-form"; @@ -8,14 +14,11 @@ import { useTranslation } from "@plane/i18n"; import { Button } from "@plane/propel/button"; import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import { Input, PasswordStrengthIndicator } from "@plane/ui"; -// components import { getPasswordStrength } from "@plane/utils"; -import { PageHead } from "@/components/core/page-title"; -import { ProfileSettingContentHeader } from "@/components/profile/profile-setting-content-header"; -import { ProfileSettingContentWrapper } from "@/components/profile/profile-setting-content-wrapper"; +// components +import { ProfileSettingsHeading } from "@/components/settings/profile/heading"; // helpers -import { authErrorHandler } from "@/helpers/authentication.helper"; -import type { EAuthenticationErrorCodes } from "@/helpers/authentication.helper"; +import { authErrorHandler, EAuthenticationErrorCodes, passwordErrors } from "@/helpers/authentication.helper"; // hooks import { useUser } from "@/hooks/store/user"; // services @@ -41,7 +44,7 @@ const defaultShowPassword = { confirmPassword: false, }; -function SecurityPage() { +export const SecurityProfileSettings = observer(function SecurityProfileSettings() { // store const { data: currentUser, changePassword } = useUser(); // states @@ -54,6 +57,7 @@ function SecurityPage() { control, handleSubmit, watch, + setError, formState: { errors, isSubmitting }, reset, } = useForm({ defaultValues }); @@ -92,12 +96,20 @@ function SecurityPage() { const err = error as Error & { error_code?: string }; const code = err.error_code?.toString(); const errorInfo = code ? authErrorHandler(code as EAuthenticationErrorCodes) : undefined; + setToast({ type: TOAST_TYPE.ERROR, title: errorInfo?.title ?? t("auth.common.password.toast.error.title"), message: typeof errorInfo?.message === "string" ? errorInfo.message : t("auth.common.password.toast.error.message"), }); + + if (code && passwordErrors.includes(code as EAuthenticationErrorCodes)) { + setError("new_password", { + type: "manual", + message: errorInfo?.message?.toString() || t("auth.common.password.toast.error.message"), + }); + } } }; @@ -117,52 +129,52 @@ function SecurityPage() { const renderPasswordMatchError = !isRetryPasswordInputFocused || confirmPassword.length >= password.length; return ( - <> - - - -
-
- {oldPasswordRequired && ( -
-

{t("auth.common.password.current_password.label")}

-
- ( - - )} - /> - {showPassword?.oldPassword ? ( - handleShowPassword("oldPassword")} - /> - ) : ( - handleShowPassword("oldPassword")} +
+ + +
+ {oldPasswordRequired && ( +
+

{t("auth.common.password.current_password.label")}

+
+ ( + )} -
- {errors.old_password && ( - {errors.old_password.message} + /> + {showPassword?.oldPassword ? ( + handleShowPassword("oldPassword")} + /> + ) : ( + handleShowPassword("oldPassword")} + /> )}
- )} -
+ {errors.old_password && ( + {errors.old_password.message} + )} +
+ )} +
+

{t("auth.common.password.new_password.label")}

setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} + autoComplete="new-password" /> )} /> @@ -198,13 +211,16 @@ function SecurityPage() { )}
{passwordSupport} + {errors.new_password && ( + {errors.new_password.message} + )} {isNewPasswordSameAsOldPassword && !isPasswordInputFocused && ( {t("new_password_must_be_different_from_old_password")} )}
-
+

{t("auth.common.password.confirm_password.label")}

setIsRetryPasswordInputFocused(true)} onBlur={() => setIsRetryPasswordInputFocused(false)} + autoComplete="new-password" /> )} /> @@ -244,18 +261,15 @@ function SecurityPage() { )}
- -
-
- - - +
+ +
); -} - -export default observer(SecurityPage); +}); diff --git a/apps/web/core/components/settings/profile/content/root.tsx b/apps/web/core/components/settings/profile/content/root.tsx new file mode 100644 index 0000000000..24db7015c0 --- /dev/null +++ b/apps/web/core/components/settings/profile/content/root.tsx @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { Suspense } from "react"; +import { observer } from "mobx-react"; +// plane imports +import { ScrollArea } from "@plane/propel/scrollarea"; +import type { TProfileSettingsTabs } from "@plane/types"; +import { cn } from "@plane/utils"; +// local imports +import { PROFILE_SETTINGS_PAGES_MAP } from "./pages"; + +type Props = { + activeTab: TProfileSettingsTabs; + className?: string; +}; + +export const ProfileSettingsContent = observer(function ProfileSettingsContent(props: Props) { + const { activeTab, className } = props; + const PageComponent = PROFILE_SETTINGS_PAGES_MAP[activeTab]; + + return ( + + + + + + ); +}); diff --git a/apps/web/core/components/settings/profile/heading.tsx b/apps/web/core/components/settings/profile/heading.tsx new file mode 100644 index 0000000000..9107fc09ad --- /dev/null +++ b/apps/web/core/components/settings/profile/heading.tsx @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +// plane imports +import { cn } from "@plane/ui"; + +type Props = { + className?: string; + control?: React.ReactNode; + description?: React.ReactNode; + title?: React.ReactNode; +}; + +export function ProfileSettingsHeading({ className, control, description, title }: Props) { + return ( +
+
+ {title &&
{title}
} + {description &&

{description}

} +
+ {control} +
+ ); +} diff --git a/apps/web/core/components/settings/profile/modal.tsx b/apps/web/core/components/settings/profile/modal.tsx new file mode 100644 index 0000000000..43abd90afb --- /dev/null +++ b/apps/web/core/components/settings/profile/modal.tsx @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { useCallback } from "react"; +import { X } from "lucide-react"; +import { observer } from "mobx-react"; +// plane imports +import { IconButton } from "@plane/propel/icon-button"; +import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui"; +// hooks +import { useCommandPalette } from "@/hooks/store/use-command-palette"; +// local imports +import { ProfileSettingsContent } from "./content"; +import { ProfileSettingsSidebarRoot } from "./sidebar"; + +export const ProfileSettingsModal = observer(function ProfileSettingsModal() { + // store hooks + const { profileSettingsModal, toggleProfileSettingsModal } = useCommandPalette(); + // derived values + const activeTab = profileSettingsModal.activeTab ?? "general"; + + const handleClose = useCallback(() => { + toggleProfileSettingsModal({ + isOpen: false, + }); + setTimeout(() => { + toggleProfileSettingsModal({ + activeTab: null, + }); + }, 300); + }, [toggleProfileSettingsModal]); + + return ( + +
+
+ toggleProfileSettingsModal({ activeTab: tab })} + /> + +
+
+ +
+
+
+ ); +}); diff --git a/apps/web/core/components/settings/profile/sidebar/header.tsx b/apps/web/core/components/settings/profile/sidebar/header.tsx new file mode 100644 index 0000000000..bdc0f189da --- /dev/null +++ b/apps/web/core/components/settings/profile/sidebar/header.tsx @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { Avatar } from "@plane/ui"; +// hooks +import { useUser } from "@/hooks/store/user"; +import { getFileURL } from "@plane/utils"; + +export const ProfileSettingsSidebarHeader = observer(function ProfileSettingsSidebarHeader() { + // store hooks + const { data: currentUser } = useUser(); + + return ( +
+
+ +
+
+

+ {currentUser?.first_name} {currentUser?.last_name} +

+

{currentUser?.email}

+
+
+ ); +}); diff --git a/apps/web/core/components/settings/profile/sidebar/index.ts b/apps/web/core/components/settings/profile/sidebar/index.ts new file mode 100644 index 0000000000..d980334597 --- /dev/null +++ b/apps/web/core/components/settings/profile/sidebar/index.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +export * from "./root"; diff --git a/apps/web/core/components/settings/profile/sidebar/item-categories.tsx b/apps/web/core/components/settings/profile/sidebar/item-categories.tsx new file mode 100644 index 0000000000..d1ee973f3e --- /dev/null +++ b/apps/web/core/components/settings/profile/sidebar/item-categories.tsx @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import type React from "react"; +import type { LucideIcon } from "lucide-react"; +import { Activity, Bell, CircleUser, KeyRound, LockIcon, Settings2 } from "lucide-react"; +import { observer } from "mobx-react"; +import { useParams } from "react-router"; +// plane imports +import { GROUPED_PROFILE_SETTINGS, PROFILE_SETTINGS_CATEGORIES } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import type { ISvgIcons } from "@plane/propel/icons"; +import type { TProfileSettingsTabs } from "@plane/types"; +// local imports +import { SettingsSidebarItem } from "../../sidebar/item"; +import { ProfileSettingsSidebarWorkspaceOptions } from "./workspace-options"; + +const ICONS: Record> = { + general: CircleUser, + security: LockIcon, + activity: Activity, + preferences: Settings2, + notifications: Bell, + "api-tokens": KeyRound, +}; + +type Props = { + activeTab: TProfileSettingsTabs; + updateActiveTab: (tab: TProfileSettingsTabs) => void; +}; + +export const ProfileSettingsSidebarItemCategories = observer(function ProfileSettingsSidebarItemCategories( + props: Props +) { + const { activeTab, updateActiveTab } = props; + // params + const { profileTabId } = useParams(); + // translation + const { t } = useTranslation(); + + return ( +
+ {PROFILE_SETTINGS_CATEGORIES.map((category) => { + const categoryItems = GROUPED_PROFILE_SETTINGS[category]; + + if (categoryItems.length === 0) return null; + + return ( +
+
{t(category)}
+
+ {categoryItems.map((item) => ( + updateActiveTab(item.key)} + isActive={activeTab === item.key} + icon={ICONS[item.key]} + label={t(item.i18n_label)} + /> + ))} +
+
+ ); + })} + {profileTabId && } +
+ ); +}); diff --git a/apps/web/core/components/settings/profile/sidebar/root.tsx b/apps/web/core/components/settings/profile/sidebar/root.tsx new file mode 100644 index 0000000000..36a097f44a --- /dev/null +++ b/apps/web/core/components/settings/profile/sidebar/root.tsx @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +// plane imports +import { ScrollArea } from "@plane/propel/scrollarea"; +import type { TProfileSettingsTabs } from "@plane/types"; +import { cn } from "@plane/utils"; +// local imports +import { ProfileSettingsSidebarHeader } from "./header"; +import { ProfileSettingsSidebarItemCategories } from "./item-categories"; + +type Props = { + activeTab: TProfileSettingsTabs; + className?: string; + updateActiveTab: (tab: TProfileSettingsTabs) => void; +}; + +export function ProfileSettingsSidebarRoot(props: Props) { + const { activeTab, className, updateActiveTab } = props; + + return ( + + + + + ); +} diff --git a/apps/web/core/components/settings/profile/sidebar/workspace-options.tsx b/apps/web/core/components/settings/profile/sidebar/workspace-options.tsx new file mode 100644 index 0000000000..c2bb1c8cf1 --- /dev/null +++ b/apps/web/core/components/settings/profile/sidebar/workspace-options.tsx @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { CirclePlus, Mails } from "lucide-react"; +import { observer } from "mobx-react"; +// plane imports +import { useTranslation } from "@plane/i18n"; +// components +import { SettingsSidebarItem } from "@/components/settings/sidebar/item"; +import { WorkspaceLogo } from "@/components/workspace/logo"; +// hooks +import { useWorkspace } from "@/hooks/store/use-workspace"; + +export const ProfileSettingsSidebarWorkspaceOptions = observer(function ProfileSettingsSidebarWorkspaceOptions() { + // store hooks + const { workspaces } = useWorkspace(); + // translation + const { t } = useTranslation(); + + return ( +
+
{t("workspace")}
+
+ {Object.values(workspaces).map((workspace) => ( + } + label={workspace.name} + isActive={false} + /> + ))} +
+ + +
+
+
+ ); +}); diff --git a/apps/web/core/components/settings/project/content/feature-control-item.tsx b/apps/web/core/components/settings/project/content/feature-control-item.tsx new file mode 100644 index 0000000000..4db4298ec6 --- /dev/null +++ b/apps/web/core/components/settings/project/content/feature-control-item.tsx @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +// plane imports +import { setPromiseToast } from "@plane/propel/toast"; +import type { IProject } from "@plane/types"; +import { ToggleSwitch } from "@plane/ui"; +// components +import { SettingsBoxedControlItem } from "@/components/settings/boxed-control-item"; +// hooks +import { useProject } from "@/hooks/store/use-project"; + +type Props = { + description?: React.ReactNode; + disabled?: boolean; + projectId: string; + featureProperty: keyof IProject; + title: React.ReactNode; + value: boolean; + workspaceSlug: string; +}; + +export const ProjectSettingsFeatureControlItem = observer(function ProjectSettingsFeatureControlItem(props: Props) { + const { description, disabled, featureProperty, projectId, title, value, workspaceSlug } = props; + // store hooks + const { getProjectById, updateProject } = useProject(); + // derived values + const currentProjectDetails = getProjectById(projectId); + + const handleSubmit = () => { + if (!workspaceSlug || !projectId || !currentProjectDetails) return; + + // making the request to update the project feature + const settingsPayload = { + [featureProperty]: !currentProjectDetails?.[featureProperty], + }; + const updateProjectPromise = updateProject(workspaceSlug, projectId, settingsPayload); + + setPromiseToast(updateProjectPromise, { + loading: "Updating project feature...", + success: { + title: "Success!", + message: () => "Project feature updated successfully.", + }, + error: { + title: "Error!", + message: () => "Something went wrong while updating project feature. Please try again.", + }, + }); + void updateProjectPromise.then(() => { + return undefined; + }); + }; + + return ( + } + /> + ); +}); diff --git a/apps/web/core/components/settings/project/sidebar/header.tsx b/apps/web/core/components/settings/project/sidebar/header.tsx new file mode 100644 index 0000000000..541b5ec8e0 --- /dev/null +++ b/apps/web/core/components/settings/project/sidebar/header.tsx @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { ArrowLeft } from "lucide-react"; +import { observer } from "mobx-react"; +// plane imports +import { ROLE_DETAILS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { Logo } from "@plane/propel/emoji-icon-picker"; +import { IconButton } from "@plane/propel/icon-button"; +// hooks +import { useUserPermissions } from "@/hooks/store/user"; +import { useAppRouter } from "@/hooks/use-app-router"; +import { useProject } from "@/hooks/store/use-project"; +import { useWorkspace } from "@/hooks/store/use-workspace"; + +type Props = { + projectId: string; +}; + +export const ProjectSettingsSidebarHeader = observer(function ProjectSettingsSidebarHeader(props: Props) { + const { projectId } = props; + // router + const router = useAppRouter(); + // store hooks + const { getProjectRoleByWorkspaceSlugAndProjectId } = useUserPermissions(); + const { currentWorkspace } = useWorkspace(); + const { getPartialProjectById } = useProject(); + // derived values + const projectDetails = getPartialProjectById(projectId); + const currentProjectRole = currentWorkspace?.slug + ? getProjectRoleByWorkspaceSlugAndProjectId(currentWorkspace.slug, projectId) + : undefined; + // translation + const { t } = useTranslation(); + + if (!currentProjectRole) return null; + + return ( +
+
+ router.push(`/${currentWorkspace?.slug}/projects/${projectId}/issues/`)} + /> +

Project settings

+
+
+
+ +
+
+

{projectDetails?.name}

+

{t(ROLE_DETAILS[currentProjectRole].i18n_title)}

+
+
+
+ ); +}); diff --git a/apps/web/core/components/settings/project/sidebar/index.ts b/apps/web/core/components/settings/project/sidebar/index.ts index 1efe34c51e..d980334597 100644 --- a/apps/web/core/components/settings/project/sidebar/index.ts +++ b/apps/web/core/components/settings/project/sidebar/index.ts @@ -1 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + export * from "./root"; diff --git a/apps/web/core/components/settings/project/sidebar/item-categories.tsx b/apps/web/core/components/settings/project/sidebar/item-categories.tsx new file mode 100644 index 0000000000..f94141c19d --- /dev/null +++ b/apps/web/core/components/settings/project/sidebar/item-categories.tsx @@ -0,0 +1,73 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +import { usePathname } from "next/navigation"; +import { useParams } from "react-router"; +// plane imports +import { EUserPermissionsLevel, GROUPED_PROJECT_SETTINGS, PROJECT_SETTINGS_CATEGORIES } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +// components +import { SettingsSidebarItem } from "@/components/settings/sidebar/item"; +// hooks +import { useUserPermissions } from "@/hooks/store/user"; +// local imports +import { PROJECT_SETTINGS_ICONS } from "./item-icon"; + +type Props = { + projectId: string; +}; + +export const ProjectSettingsSidebarItemCategories = observer(function ProjectSettingsSidebarItemCategories( + props: Props +) { + const { projectId } = props; + // params + const { workspaceSlug } = useParams(); + const pathname = usePathname(); + // store hooks + const { allowPermissions } = useUserPermissions(); + // translation + const { t } = useTranslation(); + + return ( +
+ {PROJECT_SETTINGS_CATEGORIES.map((category) => { + const categoryItems = GROUPED_PROJECT_SETTINGS[category]; + const accessibleItems = categoryItems.filter((item) => + allowPermissions(item.access, EUserPermissionsLevel.PROJECT, workspaceSlug, projectId) + ); + + if (accessibleItems.length === 0) return null; + + return ( +
+
{t(category)}
+
+ {accessibleItems.map((item) => { + const isItemActive = + item.href === "" + ? pathname === `/${workspaceSlug}/settings/projects/${projectId}${item.href}/` + : new RegExp(`^/${workspaceSlug}/settings/projects/${projectId}${item.href}/`).test(pathname); + + return ( + + ); + })} +
+
+ ); + })} +
+ ); +}); diff --git a/apps/web/core/components/settings/project/sidebar/item-icon.tsx b/apps/web/core/components/settings/project/sidebar/item-icon.tsx new file mode 100644 index 0000000000..80d324b668 --- /dev/null +++ b/apps/web/core/components/settings/project/sidebar/item-icon.tsx @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import type { LucideIcon } from "lucide-react"; +import { Users, Zap } from "lucide-react"; +// plane imports +import type { ISvgIcons } from "@plane/propel/icons"; +import { + CycleIcon, + EstimatePropertyIcon, + IntakeIcon, + LabelPropertyIcon, + ModuleIcon, + PageIcon, + StatePropertyIcon, + ViewsIcon, +} from "@plane/propel/icons"; +import type { TProjectSettingsTabs } from "@plane/types"; +// components +import { SettingIcon } from "@/components/icons/attachment"; + +export const PROJECT_SETTINGS_ICONS: Record> = { + general: SettingIcon, + members: Users, + features_cycles: CycleIcon, + features_modules: ModuleIcon, + features_views: ViewsIcon, + features_pages: PageIcon, + features_intake: IntakeIcon, + states: StatePropertyIcon, + labels: LabelPropertyIcon, + estimates: EstimatePropertyIcon, + automations: Zap, +}; diff --git a/apps/web/core/components/settings/project/sidebar/nav-item-children.tsx b/apps/web/core/components/settings/project/sidebar/nav-item-children.tsx deleted file mode 100644 index 5c79d9241d..0000000000 --- a/apps/web/core/components/settings/project/sidebar/nav-item-children.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { range } from "lodash-es"; -import { observer } from "mobx-react"; -import Link from "next/link"; -import { usePathname, useParams } from "next/navigation"; -import { EUserPermissionsLevel } from "@plane/constants"; -import { useTranslation } from "@plane/i18n"; -import { Loader } from "@plane/ui"; -import { cn } from "@plane/utils"; -import { useProject } from "@/hooks/store/use-project"; -import { useUserPermissions, useUserSettings } from "@/hooks/store/user"; -import { PROJECT_SETTINGS_LINKS } from "@/plane-web/constants/project"; -import { getProjectSettingsPageLabelI18nKey } from "@/plane-web/helpers/project-settings"; - -export const NavItemChildren = observer(function NavItemChildren(props: { projectId: string }) { - const { projectId } = props; - const { workspaceSlug } = useParams(); - const pathname = usePathname(); - // mobx store - const { getProjectById } = useProject(); - const { allowPermissions } = useUserPermissions(); - const { t } = useTranslation(); - const { toggleSidebar } = useUserSettings(); - - // derived values - const currentProject = getProjectById(projectId); - - if (!currentProject) { - return ( -
-
- - {range(8).map((index) => ( - - ))} - -
-
- ); - } - - return ( -
-
-
- {PROJECT_SETTINGS_LINKS.map((link) => { - const isActive = link.highlight(pathname, `/${workspaceSlug}/settings/projects/${projectId}`); - return ( - allowPermissions( - link.access, - EUserPermissionsLevel.PROJECT, - workspaceSlug?.toString() ?? "", - projectId?.toString() ?? "" - ) && ( - toggleSidebar(true)} - > -
- {t(getProjectSettingsPageLabelI18nKey(link.key, link.i18n_label))} -
- - ) - ); - })} -
-
-
- ); -}); diff --git a/apps/web/core/components/settings/project/sidebar/root.tsx b/apps/web/core/components/settings/project/sidebar/root.tsx index 4a51f55baa..1352b0fd9b 100644 --- a/apps/web/core/components/settings/project/sidebar/root.tsx +++ b/apps/web/core/components/settings/project/sidebar/root.tsx @@ -1,52 +1,32 @@ -import { observer } from "mobx-react"; -import { useParams } from "next/navigation"; -// plane imports -import { PROJECT_SETTINGS_CATEGORIES, PROJECT_SETTINGS_CATEGORY } from "@plane/constants"; -import { Logo } from "@plane/propel/emoji-icon-picker"; -import { getUserRole } from "@plane/utils"; -// components -// hooks -import { useProject } from "@/hooks/store/use-project"; -// local imports -import { SettingsSidebar } from "../../sidebar"; -import { NavItemChildren } from "./nav-item-children"; +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ -type TProjectSettingsSidebarProps = { - isMobile?: boolean; +// plane imports +import { ScrollArea } from "@plane/propel/scrollarea"; +// local imports +import { ProjectSettingsSidebarHeader } from "./header"; +import { ProjectSettingsSidebarItemCategories } from "./item-categories"; + +type Props = { + projectId: string; }; -export const ProjectSettingsSidebar = observer(function ProjectSettingsSidebar(props: TProjectSettingsSidebarProps) { - const { isMobile = false } = props; - const { workspaceSlug } = useParams(); - // store hooks - const { joinedProjectIds, projectMap } = useProject(); - - const groupedProject = joinedProjectIds.map((projectId) => ({ - key: projectId, - i18n_label: projectMap[projectId].name, - href: `/settings/projects/${projectId}`, - icon: , - })); +export function ProjectSettingsSidebarRoot(props: Props) { + const { projectId } = props; return ( - { - const role = projectMap[key].member_role; - return ( -
- {role ? getUserRole(role)?.toLowerCase() : "Guest"} -
- ); - }} - shouldRender - renderChildren={(key: string) => } - /> + + + + ); -}); +} diff --git a/apps/web/core/components/settings/sidebar/header.tsx b/apps/web/core/components/settings/sidebar/header.tsx deleted file mode 100644 index ca5881f6fa..0000000000 --- a/apps/web/core/components/settings/sidebar/header.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { observer } from "mobx-react"; -// plane imports -import { getUserRole } from "@plane/utils"; -// components -import { WorkspaceLogo } from "@/components/workspace/logo"; -// hooks -import { useWorkspace } from "@/hooks/store/use-workspace"; -// plane web imports -import { SubscriptionPill } from "@/plane-web/components/common/subscription/subscription-pill"; - -export const SettingsSidebarHeader = observer(function SettingsSidebarHeader(props: { - customHeader?: React.ReactNode; -}) { - const { customHeader } = props; - const { currentWorkspace } = useWorkspace(); - return customHeader - ? customHeader - : currentWorkspace && ( -
-
- -
-
- {currentWorkspace.name ?? "Workspace"} -
-
- {getUserRole(currentWorkspace.role)?.toLowerCase() || "guest"} -
-
-
-
- -
-
- ); -}); diff --git a/apps/web/core/components/settings/sidebar/index.ts b/apps/web/core/components/settings/sidebar/index.ts deleted file mode 100644 index 1efe34c51e..0000000000 --- a/apps/web/core/components/settings/sidebar/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./root"; diff --git a/apps/web/core/components/settings/sidebar/item.tsx b/apps/web/core/components/settings/sidebar/item.tsx new file mode 100644 index 0000000000..9adb1455d1 --- /dev/null +++ b/apps/web/core/components/settings/sidebar/item.tsx @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import React from "react"; +import Link from "next/link"; +// plane imports +import { cn } from "@plane/utils"; +import type { LucideIcon } from "lucide-react"; +import type { ISvgIcons } from "@plane/propel/icons"; + +type Props = { + isActive: boolean; + label: string; +} & ({ as: "button"; onClick: () => void } | { as: "link"; href: string }) & + ( + | { + icon: LucideIcon | React.FC; + } + | { iconNode: React.ReactElement } + ); + +export function SettingsSidebarItem(props: Props) { + const { as, isActive, label } = props; + // common class + const className = cn( + "flex items-center gap-2 py-1.5 px-2 rounded-lg text-body-sm-medium text-secondary text-left transition-colors", + { + "bg-layer-transparent-selected text-primary": isActive, + "hover:bg-layer-transparent-hover": !isActive, + } + ); + // common content + const content = ( + <> + {"icon" in props ? ( + {} + ) : ( + props.iconNode + )} + {label} + + ); + + if (as === "button") { + return ( + + ); + } + + return ( + + {content} + + ); +} diff --git a/apps/web/core/components/settings/sidebar/nav-item.tsx b/apps/web/core/components/settings/sidebar/nav-item.tsx deleted file mode 100644 index 0bdf797dcb..0000000000 --- a/apps/web/core/components/settings/sidebar/nav-item.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import React, { useState } from "react"; -import { observer } from "mobx-react"; -import Link from "next/link"; -import { useParams } from "next/navigation"; -import { Disclosure } from "@headlessui/react"; -// plane imports -import { useTranslation } from "@plane/i18n"; -import type { EUserWorkspaceRoles } from "@plane/types"; -import { cn, joinUrlPath } from "@plane/utils"; -// hooks -import { useUserSettings } from "@/hooks/store/user"; - -export type TSettingItem = { - key: string; - i18n_label: string; - href: string; - access?: EUserWorkspaceRoles[]; - icon?: React.ReactNode; -}; -export type TSettingsSidebarNavItemProps = { - workspaceSlug: string; - setting: TSettingItem; - isActive: boolean | ((data: { href: string }) => boolean); - actionIcons?: (props: { type: string; size?: number; className?: string }) => React.ReactNode; - appendItemsToTitle?: (key: string) => React.ReactNode; - renderChildren?: (key: string) => React.ReactNode; -}; - -const SettingsSidebarNavItem = observer(function SettingsSidebarNavItem(props: TSettingsSidebarNavItemProps) { - const { workspaceSlug, setting, isActive, actionIcons, appendItemsToTitle, renderChildren } = props; - // router - const { projectId } = useParams(); - // i18n - const { t } = useTranslation(); - // state - const [isExpanded, setIsExpanded] = useState(projectId === setting.key); - // hooks - const { toggleSidebar } = useUserSettings(); - // derived - const isItemActive = typeof isActive === "function" ? isActive(setting) : isActive; - const buttonClass = cn("flex w-full items-center px-2 py-1.5 rounded-sm text-secondary justify-between", { - "bg-layer-transparent-active hover:bg-layer-transparent-active": isItemActive, - "hover:bg-layer-transparent-hover": !isItemActive, - }); - - const titleElement = ( - <> -
- {setting.icon - ? setting.icon - : actionIcons && actionIcons({ type: setting.key, size: 16, className: "w-4 h-4" })} -
{t(setting.i18n_label)}
-
- {appendItemsToTitle?.(setting.key)} - - ); - - return ( - - setIsExpanded(!isExpanded)} - > - {renderChildren ? ( -
{titleElement}
- ) : ( - toggleSidebar(true)} - > - {titleElement} - - )} -
- {/* Nested Navigation */} - {isExpanded && ( - -
- {renderChildren?.(setting.key)} - - )} - - ); -}); - -export default SettingsSidebarNavItem; diff --git a/apps/web/core/components/settings/sidebar/root.tsx b/apps/web/core/components/settings/sidebar/root.tsx deleted file mode 100644 index 74433a69cb..0000000000 --- a/apps/web/core/components/settings/sidebar/root.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import { observer } from "mobx-react"; -import { useTranslation } from "@plane/i18n"; -import { cn } from "@plane/utils"; -import { SettingsSidebarHeader } from "./header"; -import type { TSettingItem } from "./nav-item"; -import SettingsSidebarNavItem from "./nav-item"; - -interface SettingsSidebarProps { - isMobile?: boolean; - customHeader?: React.ReactNode; - categories: string[]; - groupedSettings: { - [key: string]: TSettingItem[]; - }; - workspaceSlug: string; - isActive: boolean | ((data: { href: string }) => boolean); - shouldRender: boolean | ((setting: TSettingItem) => boolean); - actionIcons?: (props: { type: string; size?: number; className?: string }) => React.ReactNode; - appendItemsToTitle?: (key: string) => React.ReactNode; - renderChildren?: (key: string) => React.ReactNode; -} - -export const SettingsSidebar = observer(function SettingsSidebar(props: SettingsSidebarProps) { - const { - isMobile = false, - customHeader, - categories, - groupedSettings, - workspaceSlug, - isActive, - shouldRender, - actionIcons, - appendItemsToTitle, - renderChildren, - } = props; - // hooks - const { t } = useTranslation(); - - return ( -
- {/* Header */} - - {/* Navigation */} -
- {categories.map((category) => { - if (groupedSettings[category].length === 0) return null; - return ( -
- {t(category)} -
- {groupedSettings[category].map( - (setting) => - (typeof shouldRender === "function" ? shouldRender(setting) : shouldRender) && ( - - ) - )} -
-
- ); - })} -
-
- ); -}); diff --git a/apps/web/core/components/settings/tabs.tsx b/apps/web/core/components/settings/tabs.tsx deleted file mode 100644 index eac70d34af..0000000000 --- a/apps/web/core/components/settings/tabs.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { observer } from "mobx-react"; -import Link from "next/link"; -import { useParams, usePathname } from "next/navigation"; -import { cn } from "@plane/utils"; -import { useProject } from "@/hooks/store/use-project"; - -const TABS = { - account: { - key: "account", - label: "Account", - href: `/settings/account/`, - }, - workspace: { - key: "workspace", - label: "Workspace", - href: `/settings/`, - }, - projects: { - key: "projects", - label: "Projects", - href: `/settings/projects/`, - }, -}; - -const SettingsTabs = observer(function SettingsTabs() { - // router - const pathname = usePathname(); - const { workspaceSlug } = useParams(); - // store hooks - const { joinedProjectIds } = useProject(); - - const currentTab = pathname.includes(TABS.projects.href) - ? TABS.projects - : pathname.includes(TABS.account.href) - ? TABS.account - : TABS.workspace; - - return ( -
- {Object.values(TABS).map((tab) => { - const isActive = currentTab?.key === tab.key; - const href = tab.key === TABS.projects.key ? `${tab.href}${joinedProjectIds[0] || ""}` : tab.href; - return ( - -
{tab.label}
- - ); - })} -
- ); -}); - -export default SettingsTabs; diff --git a/apps/web/core/components/settings/workspace/sidebar/header.tsx b/apps/web/core/components/settings/workspace/sidebar/header.tsx new file mode 100644 index 0000000000..40a8d2017b --- /dev/null +++ b/apps/web/core/components/settings/workspace/sidebar/header.tsx @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { ArrowLeft } from "lucide-react"; +import { observer } from "mobx-react"; +// plane imports +import { ROLE_DETAILS } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { IconButton } from "@plane/propel/icon-button"; +// components +import { WorkspaceLogo } from "@/components/workspace/logo"; +// hooks +import { useUserPermissions } from "@/hooks/store/user"; +import { useAppRouter } from "@/hooks/use-app-router"; +import { useWorkspace } from "@/hooks/store/use-workspace"; +// plane web imports +import { SubscriptionPill } from "@/plane-web/components/common/subscription/subscription-pill"; + +export const WorkspaceSettingsSidebarHeader = observer(function WorkspaceSettingsSidebarHeader() { + // router + const router = useAppRouter(); + // store hooks + const { getWorkspaceRoleByWorkspaceSlug } = useUserPermissions(); + const { currentWorkspace } = useWorkspace(); + // derived values + const currentWorkspaceRole = currentWorkspace?.slug + ? getWorkspaceRoleByWorkspaceSlug(currentWorkspace.slug) + : undefined; + // translation + const { t } = useTranslation(); + + if (!currentWorkspaceRole) return null; + + return ( +
+
+ router.push(`/${currentWorkspace?.slug}/`)} + /> +

Workspace settings

+
+
+
+ +
+

{currentWorkspace?.name}

+

{t(ROLE_DETAILS[currentWorkspaceRole].i18n_title)}

+
+
+
+ +
+
+
+ ); +}); diff --git a/apps/web/core/components/settings/workspace/sidebar/index.ts b/apps/web/core/components/settings/workspace/sidebar/index.ts new file mode 100644 index 0000000000..d980334597 --- /dev/null +++ b/apps/web/core/components/settings/workspace/sidebar/index.ts @@ -0,0 +1,7 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +export * from "./root"; diff --git a/apps/web/core/components/settings/workspace/sidebar/item-categories.tsx b/apps/web/core/components/settings/workspace/sidebar/item-categories.tsx new file mode 100644 index 0000000000..8243063723 --- /dev/null +++ b/apps/web/core/components/settings/workspace/sidebar/item-categories.tsx @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import { observer } from "mobx-react"; +import { usePathname } from "next/navigation"; +import { useParams } from "react-router"; +// plane imports +import { EUserPermissionsLevel, GROUPED_WORKSPACE_SETTINGS, WORKSPACE_SETTINGS_CATEGORIES } from "@plane/constants"; +import { useTranslation } from "@plane/i18n"; +import { joinUrlPath } from "@plane/utils"; +// components +import { SettingsSidebarItem } from "@/components/settings/sidebar/item"; +// hooks +import { useUserPermissions } from "@/hooks/store/user"; +// local imports +import { WORKSPACE_SETTINGS_ICONS } from "./item-icon"; + +export const WorkspaceSettingsSidebarItemCategories = observer(function WorkspaceSettingsSidebarItemCategories() { + // params + const { workspaceSlug } = useParams(); + const pathname = usePathname(); + // store hooks + const { allowPermissions } = useUserPermissions(); + // translation + const { t } = useTranslation(); + + return ( +
+ {WORKSPACE_SETTINGS_CATEGORIES.map((category) => { + const categoryItems = GROUPED_WORKSPACE_SETTINGS[category]; + const accessibleItems = categoryItems.filter((item) => + allowPermissions(item.access, EUserPermissionsLevel.WORKSPACE, workspaceSlug) + ); + + if (accessibleItems.length === 0) return null; + + return ( +
+
{t(category)}
+
+ {accessibleItems.map((item) => { + const isItemActive = + item.href === "/settings" + ? pathname === `/${workspaceSlug}${item.href}/` + : new RegExp(`^/${workspaceSlug}${item.href}/`).test(pathname); + + return ( + + ); + })} +
+
+ ); + })} +
+ ); +}); diff --git a/apps/web/core/components/settings/workspace/sidebar/item-icon.tsx b/apps/web/core/components/settings/workspace/sidebar/item-icon.tsx new file mode 100644 index 0000000000..b89c11fd22 --- /dev/null +++ b/apps/web/core/components/settings/workspace/sidebar/item-icon.tsx @@ -0,0 +1,19 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +import type { LucideIcon } from "lucide-react"; +import { ArrowUpToLine, Building, CreditCard, Users, Webhook } from "lucide-react"; +// plane imports +import type { ISvgIcons } from "@plane/propel/icons"; +import type { TWorkspaceSettingsTabs } from "@plane/types"; + +export const WORKSPACE_SETTINGS_ICONS: Record> = { + general: Building, + members: Users, + export: ArrowUpToLine, + "billing-and-plans": CreditCard, + webhooks: Webhook, +}; diff --git a/apps/web/core/components/settings/workspace/sidebar/root.tsx b/apps/web/core/components/settings/workspace/sidebar/root.tsx new file mode 100644 index 0000000000..0d6390ad79 --- /dev/null +++ b/apps/web/core/components/settings/workspace/sidebar/root.tsx @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + +// plane imports +import { ScrollArea } from "@plane/propel/scrollarea"; +import { cn } from "@plane/utils"; +// local imports +import { WorkspaceSettingsSidebarHeader } from "./header"; +import { WorkspaceSettingsSidebarItemCategories } from "./item-categories"; + +type Props = { + className?: string; +}; + +export function WorkspaceSettingsSidebarRoot(props: Props) { + const { className } = props; + + return ( + + + + + ); +} diff --git a/apps/web/core/components/sidebar/add-button.tsx b/apps/web/core/components/sidebar/add-button.tsx index 1e092ff182..1e41f5192f 100644 --- a/apps/web/core/components/sidebar/add-button.tsx +++ b/apps/web/core/components/sidebar/add-button.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import { Button } from "@plane/propel/button"; import { cn } from "@plane/utils"; diff --git a/apps/web/core/components/sidebar/resizable-sidebar.tsx b/apps/web/core/components/sidebar/resizable-sidebar.tsx index fac0a1107f..ba2f123bd8 100644 --- a/apps/web/core/components/sidebar/resizable-sidebar.tsx +++ b/apps/web/core/components/sidebar/resizable-sidebar.tsx @@ -1,3 +1,9 @@ +/** + * Copyright (c) 2023-present Plane Software, Inc. and contributors + * SPDX-License-Identifier: AGPL-3.0-only + * See the LICENSE file for details. + */ + import type { Dispatch, ReactElement, SetStateAction } from "react"; import React, { useCallback, useEffect, useState, useRef } from "react"; // helpers @@ -172,6 +178,7 @@ export function ResizableSidebar({ <> {/* Main Sidebar */}