chore: admin folder structure (#8632)
* chore: admin folder structure * fix: copy right check and formatting * fix: types
This commit is contained in:
parent
fab84eb058
commit
dfce8c6278
61 changed files with 20 additions and 54 deletions
|
|
@ -11,7 +11,7 @@ import { Outlet } from "react-router";
|
||||||
// components
|
// components
|
||||||
import { AdminHeader } from "@/components/common/header";
|
import { AdminHeader } from "@/components/common/header";
|
||||||
import { LogoSpinner } from "@/components/common/logo-spinner";
|
import { LogoSpinner } from "@/components/common/logo-spinner";
|
||||||
import { NewUserPopup } from "@/components/new-user-popup";
|
import { NewUserPopup } from "@/components/common/new-user-popup";
|
||||||
// hooks
|
// hooks
|
||||||
import { useUser } from "@/hooks/store";
|
import { useUser } from "@/hooks/store";
|
||||||
// local components
|
// local components
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import { Input, Spinner } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
import { Banner } from "@/components/common/banner";
|
import { Banner } from "@/components/common/banner";
|
||||||
// local components
|
// local components
|
||||||
import { FormHeader } from "../../../core/components/instance/form-header";
|
import { FormHeader } from "@/components/instance/form-header";
|
||||||
import { AuthBanner } from "./auth-banner";
|
import { AuthBanner } from "./auth-banner";
|
||||||
import { AuthHeader } from "./auth-header";
|
import { AuthHeader } from "./auth-header";
|
||||||
import { authErrorHandler } from "./auth-helpers";
|
import { authErrorHandler } from "./auth-helpers";
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright (c) 2023-present Plane Software, Inc. and contributors
|
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { enableStaticRendering } from "mobx-react";
|
|
||||||
// stores
|
|
||||||
import { CoreRootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
enableStaticRendering(typeof window === "undefined");
|
|
||||||
|
|
||||||
export class RootStore extends CoreRootStore {
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
hydrate(initialData: any) {
|
|
||||||
super.hydrate(initialData);
|
|
||||||
}
|
|
||||||
|
|
||||||
resetOnSignOut() {
|
|
||||||
super.resetOnSignOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { Menu, Settings } from "lucide-react";
|
||||||
// icons
|
// icons
|
||||||
import { Breadcrumbs } from "@plane/ui";
|
import { Breadcrumbs } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
import { BreadcrumbLink } from "@/components/common/breadcrumb-link";
|
import { BreadcrumbLink } from "../breadcrumb-link";
|
||||||
// hooks
|
// hooks
|
||||||
import { useTheme } from "@/hooks/store";
|
import { useTheme } from "@/hooks/store";
|
||||||
// local imports
|
// local imports
|
||||||
|
|
@ -16,8 +16,8 @@ import { Checkbox, Input, PasswordStrengthIndicator, Spinner } from "@plane/ui";
|
||||||
import { getPasswordStrength } from "@plane/utils";
|
import { getPasswordStrength } from "@plane/utils";
|
||||||
// components
|
// components
|
||||||
import { AuthHeader } from "@/app/(all)/(home)/auth-header";
|
import { AuthHeader } from "@/app/(all)/(home)/auth-header";
|
||||||
import { Banner } from "@/components/common/banner";
|
import { Banner } from "../common/banner";
|
||||||
import { FormHeader } from "@/components/instance/form-header";
|
import { FormHeader } from "./form-header";
|
||||||
|
|
||||||
// service initialization
|
// service initialization
|
||||||
const authService = new AuthService();
|
const authService = new AuthService();
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright (c) 2023-present Plane Software, Inc. and contributors
|
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export * from "ce/store/root.store";
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
import { createContext } from "react";
|
import { createContext } from "react";
|
||||||
// plane admin store
|
// plane admin store
|
||||||
import { RootStore } from "@/plane-admin/store/root.store";
|
import { RootStore } from "../store/root.store";
|
||||||
|
|
||||||
let rootStore = new RootStore();
|
let rootStore = new RootStore();
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@ import type {
|
||||||
IInstanceConfig,
|
IInstanceConfig,
|
||||||
} from "@plane/types";
|
} from "@plane/types";
|
||||||
// root store
|
// root store
|
||||||
import type { CoreRootStore } from "@/store/root.store";
|
import type { RootStore } from "@/store/root.store";
|
||||||
|
|
||||||
export interface IInstanceStore {
|
export interface IInstanceStore {
|
||||||
// issues
|
// issues
|
||||||
|
|
@ -53,7 +53,7 @@ export class InstanceStore implements IInstanceStore {
|
||||||
// service
|
// service
|
||||||
instanceService;
|
instanceService;
|
||||||
|
|
||||||
constructor(private store: CoreRootStore) {
|
constructor(private store: RootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observable
|
// observable
|
||||||
isLoading: observable.ref,
|
isLoading: observable.ref,
|
||||||
|
|
@ -17,7 +17,7 @@ import { WorkspaceStore } from "./workspace.store";
|
||||||
|
|
||||||
enableStaticRendering(typeof window === "undefined");
|
enableStaticRendering(typeof window === "undefined");
|
||||||
|
|
||||||
export abstract class CoreRootStore {
|
export class RootStore {
|
||||||
theme: IThemeStore;
|
theme: IThemeStore;
|
||||||
instance: IInstanceStore;
|
instance: IInstanceStore;
|
||||||
user: IUserStore;
|
user: IUserStore;
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
import { action, observable, makeObservable } from "mobx";
|
import { action, observable, makeObservable } from "mobx";
|
||||||
// root store
|
// root store
|
||||||
import type { CoreRootStore } from "@/store/root.store";
|
import type { RootStore } from "./root.store";
|
||||||
|
|
||||||
type TTheme = "dark" | "light";
|
type TTheme = "dark" | "light";
|
||||||
export interface IThemeStore {
|
export interface IThemeStore {
|
||||||
|
|
@ -27,7 +27,7 @@ export class ThemeStore implements IThemeStore {
|
||||||
isSidebarCollapsed: boolean | undefined = undefined;
|
isSidebarCollapsed: boolean | undefined = undefined;
|
||||||
theme: string | undefined = undefined;
|
theme: string | undefined = undefined;
|
||||||
|
|
||||||
constructor(private store: CoreRootStore) {
|
constructor(private store: RootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
isNewUserPopup: observable.ref,
|
isNewUserPopup: observable.ref,
|
||||||
|
|
@ -11,7 +11,7 @@ import { EUserStatus } from "@plane/constants";
|
||||||
import { AuthService, UserService } from "@plane/services";
|
import { AuthService, UserService } from "@plane/services";
|
||||||
import type { IUser } from "@plane/types";
|
import type { IUser } from "@plane/types";
|
||||||
// root store
|
// root store
|
||||||
import type { CoreRootStore } from "@/store/root.store";
|
import type { RootStore } from "@/store/root.store";
|
||||||
|
|
||||||
export interface IUserStore {
|
export interface IUserStore {
|
||||||
// observables
|
// observables
|
||||||
|
|
@ -36,7 +36,7 @@ export class UserStore implements IUserStore {
|
||||||
userService;
|
userService;
|
||||||
authService;
|
authService;
|
||||||
|
|
||||||
constructor(private store: CoreRootStore) {
|
constructor(private store: RootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
isLoading: observable.ref,
|
isLoading: observable.ref,
|
||||||
|
|
@ -10,7 +10,7 @@ import { action, observable, runInAction, makeObservable, computed } from "mobx"
|
||||||
import { InstanceWorkspaceService } from "@plane/services";
|
import { InstanceWorkspaceService } from "@plane/services";
|
||||||
import type { IWorkspace, TLoader, TPaginationInfo } from "@plane/types";
|
import type { IWorkspace, TLoader, TPaginationInfo } from "@plane/types";
|
||||||
// root store
|
// root store
|
||||||
import type { CoreRootStore } from "@/store/root.store";
|
import type { RootStore } from "@/store/root.store";
|
||||||
|
|
||||||
export interface IWorkspaceStore {
|
export interface IWorkspaceStore {
|
||||||
// observables
|
// observables
|
||||||
|
|
@ -37,7 +37,7 @@ export class WorkspaceStore implements IWorkspaceStore {
|
||||||
// services
|
// services
|
||||||
instanceWorkspaceService;
|
instanceWorkspaceService;
|
||||||
|
|
||||||
constructor(private store: CoreRootStore) {
|
constructor(private store: RootStore) {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
// observables
|
// observables
|
||||||
loader: observable,
|
loader: observable,
|
||||||
|
|
@ -9,12 +9,7 @@
|
||||||
"types": ["vite/client"],
|
"types": ["vite/client"],
|
||||||
"paths": {
|
"paths": {
|
||||||
"package.json": ["./package.json"],
|
"package.json": ["./package.json"],
|
||||||
"ce/*": ["./ce/*"],
|
"@/*": ["./*"]
|
||||||
"@/app/*": ["./app/*"],
|
|
||||||
"@/*": ["./core/*"],
|
|
||||||
"@/plane-admin/*": ["./ce/*"],
|
|
||||||
"@/ce/*": ["./ce/*"],
|
|
||||||
"@/styles/*": ["./styles/*"]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["**/*", "**/.server/**/*", "**/.client/**/*", ".react-router/types/**/*"],
|
"include": ["**/*", "**/.server/**/*", "**/.client/**/*", ".react-router/types/**/*"],
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
# CSV utility functions for safe export
|
# Copyright (c) 2023-present Plane Software, Inc. and contributors
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
# See the LICENSE file for details.
|
||||||
|
|
||||||
|
# CSV utility functions for safe export
|
||||||
# Characters that trigger formula evaluation in spreadsheet applications
|
# Characters that trigger formula evaluation in spreadsheet applications
|
||||||
_CSV_FORMULA_TRIGGERS = frozenset(("=", "+", "-", "@", "\t", "\r", "\n"))
|
_CSV_FORMULA_TRIGGERS = frozenset(("=", "+", "-", "@", "\t", "\r", "\n"))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue