mirror of
https://github.com/andwati/dokploy.git
synced 2026-12-06 01:28:46 +00:00
feat: add self remove accounts
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { GenerateToken } from "@/components/dashboard/settings/profile/generate-token";
|
||||
import { ProfileForm } from "@/components/dashboard/settings/profile/profile-form";
|
||||
import { RemoveSelfAccount } from "@/components/dashboard/settings/profile/remove-self-account";
|
||||
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
|
||||
import { SettingsLayout } from "@/components/layouts/settings-layout";
|
||||
import { appRouter } from "@/server/api/root";
|
||||
@@ -21,10 +22,14 @@ const Page = () => {
|
||||
enabled: !!data?.id && data?.rol === "user",
|
||||
},
|
||||
);
|
||||
|
||||
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||
return (
|
||||
<div className="flex flex-col gap-4 w-full">
|
||||
<ProfileForm />
|
||||
{(user?.canAccessToAPI || data?.rol === "admin") && <GenerateToken />}
|
||||
|
||||
{isCloud && <RemoveSelfAccount />}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -134,7 +134,7 @@ const Register = ({ isCloud }: Props) => {
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
{data && (
|
||||
{data?.type === "cloud" && (
|
||||
<AlertBlock type="success" className="mx-4 my-2">
|
||||
<span>
|
||||
Registration succesfuly, Please check your inbox or spam
|
||||
|
||||
Reference in New Issue
Block a user