mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Moving files and rename some of them.
This commit is contained in:
@@ -7,7 +7,6 @@ import {sendEmail} from "@/utils/email-helper";
|
||||
import TestEmailSettings from "../../../../../../emails/TestEmailSettings";
|
||||
import {render} from "@react-email/render";
|
||||
import {toast} from "sonner";
|
||||
import HelloEmail from "../../../../../../emails/HelloEmail";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import {ButtonWithLoading} from "@/components/wrappers/common/button/ButtonWithL
|
||||
import {useMutation} from "@tanstack/react-query";
|
||||
import {checkConnexionToS3} from "@/features/upload/public/upload.action";
|
||||
import {toast} from "sonner";
|
||||
import {updateUserAction} from "@/components/wrappers/dashboard/Profile/UserForm/user-form.action";
|
||||
import {useRouter} from "next/navigation";
|
||||
import {
|
||||
updateStorageSettingsAction
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {flexRender, Row, RowData} from "@tanstack/react-table";
|
||||
|
||||
import {User} from "@prisma/client";
|
||||
import {DataTableWithPagination} from "@/components/wrappers/table/data-table-with-pagination";
|
||||
import {usersColumns} from "@/components/wrappers/dashboard/Settings/SettingsUsersTab/columns-users";
|
||||
import {DataTableWithPagination} from "@/components/wrappers/common/table/data-table-with-pagination";
|
||||
import {usersColumns} from "@/components/wrappers/dashboard/settings/SettingsUsersTab/columns-users";
|
||||
import {Table, TableBody, TableCell, TableHead, TableHeader, TableRow} from "@/components/ui/table";
|
||||
import {cn} from "@/lib/utils";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import {Card, CardContent, CardHeader} from "@/components/ui/card";
|
||||
import Link from "next/link";
|
||||
import {ValueIcon} from "@radix-ui/react-icons";
|
||||
import {Circle} from "lucide-react";
|
||||
import {ConnectionCircle} from "@/components/wrappers/connection-circle";
|
||||
import {ConnectionCircle} from "@/components/wrappers/common/connection-circle";
|
||||
import {formatDateLastContact} from "@/utils/date-formatting";
|
||||
|
||||
export type agentCardProps = {
|
||||
|
||||
@@ -10,13 +10,13 @@ import {
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog"
|
||||
|
||||
import {CodeSnippet} from "@/components/wrappers/CodeSnippet/CodeSnippet";
|
||||
import {generateEdgeKey} from "@/utils/edge_key";
|
||||
import {Copy} from "lucide-react";
|
||||
import {PropsWithChildren, useState} from "react";
|
||||
import {CopyButton} from "@/components/wrappers/common/button/copy-button";
|
||||
import {Agent} from "@prisma/client";
|
||||
import {getServerUrl} from "@/utils/get-server-url";
|
||||
import {CodeSnippet} from "@/components/wrappers/codeSnippet/CodeSnippet";
|
||||
|
||||
export type agentRegistrationDialogProps = PropsWithChildren<{
|
||||
agent: Agent
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import {useState} from "react";
|
||||
|
||||
import {DateTimePicker} from "@/components/wrappers/daytime-picker";
|
||||
import {DateTimePicker} from "@/components/wrappers/common/daytime-picker";
|
||||
import {Button} from "@/components/ui/button";
|
||||
import {
|
||||
Form,
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
import {Avatar, AvatarFallback, AvatarImage} from "@/components/ui/avatar"
|
||||
import {currentUser} from "@/auth/current-user";
|
||||
import {LoggedInDropdown} from "@/components/wrappers/dashboard/LoggedInDropdown/LoggedInDropdown";
|
||||
import {SidebarMenuButton} from "@/components/ui/sidebar";
|
||||
import {ChevronUp} from "lucide-react";
|
||||
import {LoggedInDropdown} from "@/components/wrappers/dashboard/loggedInDropdown/LoggedInDropdown";
|
||||
|
||||
export const LoggedInButton = async () => {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import {Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTr
|
||||
import {Button} from "@/components/ui/button";
|
||||
import {Form, FormControl, FormField, FormItem, FormLabel, FormMessage, useZodForm} from "@/components/ui/form";
|
||||
import {Input} from "@/components/ui/input";
|
||||
import {OrganizationSchema} from "@/components/wrappers/dashboard/Organization/organization.schema";
|
||||
import {OrganizationSchema} from "@/components/wrappers/dashboard/organization/organization.schema";
|
||||
|
||||
export type createOrganizationModalProps = {
|
||||
children: any
|
||||
-1
@@ -4,7 +4,6 @@ import {useEffect, useState} from "react";
|
||||
|
||||
import {ComboBox} from "@/components/wrappers/common/combobox";
|
||||
import {Organization} from "@prisma/client";
|
||||
import {useStore} from "@/state-management/store";
|
||||
import {getCurrentOrganizationSlug, setCurrentOrganizationSlug} from "@/features/dashboard/organization-cookie";
|
||||
import {useSidebar} from "@/components/ui/sidebar";
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import {toast} from "sonner";
|
||||
import {uploadImageAction} from "@/features/upload/public/upload.action";
|
||||
import {useMutation} from "@tanstack/react-query";
|
||||
import {prisma} from "@/prisma";
|
||||
import {updateImageUserAction} from "@/components/wrappers/dashboard/Profile/Avatar/avatar.action";
|
||||
import {updateImageUserAction} from "@/components/wrappers/dashboard/profile/Avatar/avatar.action";
|
||||
import {useRouter} from "next/navigation";
|
||||
import {useSession} from "next-auth/react";
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
import {useMutation} from "@tanstack/react-query";
|
||||
import {signOutAction} from "@/features/auth/auth.action";
|
||||
import {ButtonWithConfirm} from "@/components/wrappers/common/button/ButtonWithConfirm/ButtonWithConfirm";
|
||||
import {deleteUserAction} from "@/components/wrappers/dashboard/Profile/ButtonDeleteAccount/delete-account.action";
|
||||
import {deleteUserAction} from "@/components/wrappers/dashboard/profile/ButtonDeleteAccount/delete-account.action";
|
||||
import {Trash2} from "lucide-react";
|
||||
|
||||
export type ButtonDeleteAccountProps = {
|
||||
+2
-2
@@ -10,9 +10,9 @@ import {Button} from "@/components/ui/button";
|
||||
import {useRouter} from "next/navigation";
|
||||
import {useMutation} from "@tanstack/react-query";
|
||||
import {TooltipProvider} from "@/components/ui/tooltip";
|
||||
import {UserSchema, UserType} from "@/components/wrappers/dashboard/Profile/UserForm/user-form.schema";
|
||||
import {UserSchema, UserType} from "@/components/wrappers/dashboard/profile/UserForm/user-form.schema";
|
||||
import {toast} from "sonner";
|
||||
import {updateUserAction} from "@/components/wrappers/dashboard/Profile/UserForm/user-form.action";
|
||||
import {updateUserAction} from "@/components/wrappers/dashboard/profile/UserForm/user-form.action";
|
||||
import { useSession } from "next-auth/react";
|
||||
|
||||
export type userFormProps = {
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
import {userAction} from "@/safe-actions";
|
||||
import {z} from "zod";
|
||||
import {prisma} from "@/prisma";
|
||||
import {UserSchema} from "@/components/wrappers/dashboard/Profile/UserForm/user-form.schema";
|
||||
import {UserSchema} from "@/components/wrappers/dashboard/profile/UserForm/user-form.schema";
|
||||
|
||||
export const updateUserAction = userAction
|
||||
.schema(
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import {Tabs, TabsContent, TabsList, TabsTrigger} from "@/components/ui/tabs";
|
||||
import {DataTableWithPagination} from "@/components/wrappers/table/data-table-with-pagination";
|
||||
import {DataTableWithPagination} from "@/components/wrappers/common/table/data-table-with-pagination";
|
||||
import {backupColumns} from "@/features/backup/columns";
|
||||
import {restoreColumns} from "@/features/restore/columns";
|
||||
import {Backup, Database, Restoration} from "@prisma/client";
|
||||
+1
-1
@@ -4,7 +4,7 @@ import Link from "next/link";
|
||||
import Image from "next/image"
|
||||
import {Database} from "@prisma/client";
|
||||
import {Card, CardContent, CardHeader} from "@/components/ui/card";
|
||||
import {ConnectionCircle} from "@/components/wrappers/connection-circle";
|
||||
import {ConnectionCircle} from "@/components/wrappers/common/connection-circle";
|
||||
import {formatDateLastContact} from "@/utils/date-formatting";
|
||||
|
||||
export type projectDatabaseCardProps = {
|
||||
+3
-3
@@ -14,14 +14,14 @@ import {Input} from "@/components/ui/input";
|
||||
import {Form} from "@/components/ui/form"
|
||||
import {Button} from "@/components/ui/button";
|
||||
import {useMutation} from "@tanstack/react-query";
|
||||
import {ProjectSchema, ProjectType} from "@/components/wrappers/dashboard/Projects/ProjectsForm/ProjectForm.schema";
|
||||
import {ProjectSchema, ProjectType} from "@/components/wrappers/dashboard/projects/ProjectsForm/ProjectForm.schema";
|
||||
import {
|
||||
createProjectAction,
|
||||
updateProjectAction
|
||||
} from "@/components/wrappers/dashboard/Projects/ProjectsForm/project-form.action";
|
||||
} from "@/components/wrappers/dashboard/projects/ProjectsForm/project-form.action";
|
||||
import {useRouter} from "next/navigation";
|
||||
import {Database, Organization, Projects} from "@prisma/client"
|
||||
import {MultiSelect} from "@/components/wrappers/MultiSelect/MultiSelect";
|
||||
import {MultiSelect} from "@/components/wrappers/common/multiSelect/MultiSelect";
|
||||
import {toast} from "sonner";
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
import {userAction} from "@/safe-actions";
|
||||
import {prisma} from "@/prisma";
|
||||
import {ProjectSchema} from "@/components/wrappers/dashboard/Projects/ProjectsForm/ProjectForm.schema";
|
||||
import {ProjectSchema} from "@/components/wrappers/dashboard/projects/ProjectsForm/ProjectForm.schema";
|
||||
import {z} from "zod";
|
||||
import {ServerActionResult} from "@/types/action-type";
|
||||
import {Projects} from "@prisma/client";
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
"use client"
|
||||
|
||||
import {Tabs, TabsContent, TabsList, TabsTrigger} from "@/components/ui/tabs";
|
||||
import {DataTableWithPagination} from "@/components/wrappers/table/data-table-with-pagination";
|
||||
import {usersColumns} from "@/components/wrappers/dashboard/Settings/SettingsUsersTab/columns-users";
|
||||
import {DataTableWithPagination} from "@/components/wrappers/common/table/data-table-with-pagination";
|
||||
import {usersColumns} from "@/components/wrappers/dashboard/settings/SettingsUsersTab/columns-users";
|
||||
import {User, Settings} from "@prisma/client";
|
||||
import {backupColumns} from "@/features/backup/columns";
|
||||
import {SettingsEmailTab} from "@/components/wrappers/dashboard/admin/AdminEmailTab/SettingsEmailTab";
|
||||
import {SettingsStorageTab} from "@/components/wrappers/dashboard/admin/AdminStorageTab/SettingsStorageTab";
|
||||
import {SettingsUsersTab} from "@/components/wrappers/dashboard/Settings/SettingsUsersTab/SettingsUsersTab";
|
||||
import {SettingsUsersTab} from "@/components/wrappers/dashboard/settings/SettingsUsersTab/SettingsUsersTab";
|
||||
|
||||
|
||||
export type SettingsTabsProps = {
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import {User} from "@prisma/client";
|
||||
import {DataTableWithPagination} from "@/components/wrappers/table/data-table-with-pagination";
|
||||
import {usersColumns} from "@/components/wrappers/dashboard/Settings/SettingsUsersTab/columns-users";
|
||||
import {DataTableWithPagination} from "@/components/wrappers/common/table/data-table-with-pagination";
|
||||
import {usersColumns} from "@/components/wrappers/dashboard/settings/SettingsUsersTab/columns-users";
|
||||
import {UsersDataTable} from "@/components/wrappers/dashboard/admin/admin-user-table";
|
||||
|
||||
|
||||
+2
-2
@@ -3,13 +3,13 @@
|
||||
import {ColumnDef} from "@tanstack/react-table"
|
||||
import {Badge} from "@/components/ui/badge";
|
||||
import {User} from "@prisma/client";
|
||||
import {updateUserAction} from "@/components/wrappers/dashboard/Profile/UserForm/user-form.action";
|
||||
import {updateUserAction} from "@/components/wrappers/dashboard/profile/UserForm/user-form.action";
|
||||
import {useMutation} from "@tanstack/react-query";
|
||||
import {toast} from "sonner";
|
||||
import {useRouter} from "next/navigation";
|
||||
import {useState} from "react";
|
||||
import {Trash2} from "lucide-react";
|
||||
import {deleteUserAction} from "@/components/wrappers/dashboard/Profile/ButtonDeleteAccount/delete-account.action";
|
||||
import {deleteUserAction} from "@/components/wrappers/dashboard/profile/ButtonDeleteAccount/delete-account.action";
|
||||
import {ButtonWithLoading} from "@/components/wrappers/common/button/ButtonWithLoading/ButtonWithLoading";
|
||||
|
||||
export const usersColumns: ColumnDef<User>[] = [
|
||||
@@ -0,0 +1,18 @@
|
||||
"use client"
|
||||
import {useSidebar} from "@/components/ui/sidebar";
|
||||
|
||||
export type SideBarFooterCreditProps = {}
|
||||
|
||||
export const SideBarFooterCredit = (props: SideBarFooterCreditProps) => {
|
||||
const {state, isMobile} = useSidebar();
|
||||
|
||||
return (
|
||||
<>
|
||||
{state === 'expanded' && (
|
||||
<div className="text-center">
|
||||
<h1 className="text-[10px]">Portabase Community Edition</h1>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
"use client"
|
||||
import {useSidebar} from "@/components/ui/sidebar";
|
||||
|
||||
export type SideBarLogoProps = {}
|
||||
|
||||
export const SideBarLogo = (props: SideBarLogoProps) => {
|
||||
const { state, isMobile } = useSidebar();
|
||||
return (
|
||||
<div className="flex justify-center items-center ">
|
||||
<h1 className="font-bold text-xl">
|
||||
{state === 'collapsed' && !isMobile ? "P" : "Portabase"}
|
||||
</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
+5
-5
@@ -6,13 +6,13 @@ import {
|
||||
SidebarMenu,
|
||||
SidebarMenuItem,
|
||||
} from "@/components/ui/sidebar"
|
||||
import {LoggedInButton} from "@/components/wrappers/dashboard/LoggedInButton/LoggedInButton";
|
||||
import {SidebarMenuCustom} from "@/components/wrappers/dashboard/SideBar/SideBarMenu/SideBarMenu";
|
||||
import {OrganizationCombobox} from "@/components/wrappers/dashboard/Organization/organization-combobox";
|
||||
import {SidebarMenuCustom} from "@/components/wrappers/dashboard/sideBar/SideBarMenu/SideBarMenu";
|
||||
import {OrganizationCombobox} from "@/components/wrappers/dashboard/organization/organization-combobox";
|
||||
import {prisma} from "@/prisma";
|
||||
import {requiredCurrentUser} from "@/auth/current-user";
|
||||
import {SideBarLogo} from "@/components/wrappers/Dashboard/SideBar/SideBarLogo/SideBarLogo";
|
||||
import {SideBarFooterCredit} from "@/components/wrappers/Dashboard/SideBar/SideBarFooterCredit/SideBarFooterCredit";
|
||||
import {SideBarLogo} from "@/components/wrappers/dashboard/sideBar/SideBarLogo/SideBarLogo";
|
||||
import {SideBarFooterCredit} from "@/components/wrappers/dashboard/sideBar/SideBarFooterCredit/SideBarFooterCredit";
|
||||
import {LoggedInButton} from "@/components/wrappers/dashboard/loggedInButton/LoggedInButton";
|
||||
|
||||
export async function AppSidebar() {
|
||||
|
||||
Reference in New Issue
Block a user