Skip to content

Commit 72c15ac

Browse files
authored
Merge pull request #3716 from imran-vz/feat/quick-service-switcher
feat(ui): Add Vercel-style breadcrumb navigation with project and service switchers
2 parents 7c55eba + 51d744b commit 72c15ac

File tree

23 files changed

+672
-145
lines changed

23 files changed

+672
-145
lines changed

apps/dokploy/components/dashboard/project/add-compose.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const AddCompose = ({ environmentId, projectName }: Props) => {
7979
api.compose.create.useMutation();
8080

8181
// Get environment data to extract projectId
82-
const { data: environment } = api.environment.one.useQuery({ environmentId });
82+
// const { data: environment } = api.environment.one.useQuery({ environmentId });
8383

8484
const hasServers = servers && servers.length > 0;
8585
// Show dropdown logic based on cloud environment
@@ -117,6 +117,8 @@ export const AddCompose = ({ environmentId, projectName }: Props) => {
117117
await utils.environment.one.invalidate({
118118
environmentId,
119119
});
120+
// Invalidate the project query to refresh the project data for the advance-breadcrumb
121+
await utils.project.all.invalidate();
120122
})
121123
.catch(() => {
122124
toast.error("Error creating the compose");

apps/dokploy/components/dashboard/project/add-template.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ export const AddTemplate = ({ environmentId, baseUrl }: Props) => {
332332
viewMode === "detailed" && "border-b",
333333
)}
334334
>
335+
{/** biome-ignore lint/performance/noImgElement: this is a valid use for img tag */}
335336
<img
336337
src={`${customBaseUrl || "https://templates.dokploy.com/"}/blueprints/${template?.id}/${template?.logo}`}
337338
className={cn(

apps/dokploy/components/dashboard/project/advanced-environment-selector.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ export const AdvancedEnvironmentSelector = ({
9292

9393
toast.success("Environment created successfully");
9494
utils.environment.byProjectId.invalidate({ projectId });
95+
// Invalidate the project query to refresh the project data for the advance-breadcrumb
96+
utils.project.all.invalidate();
9597
setIsCreateDialogOpen(false);
9698
setName("");
9799
setDescription("");

apps/dokploy/components/dashboard/projects/show.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ export const ShowProjects = () => {
166166

167167
return (
168168
<>
169+
{!isCloud && (
170+
<div className="absolute top-4 right-4">
171+
<TimeBadge />
172+
</div>
173+
)}
169174
<BreadcrumbSidebar
170175
list={[{ name: "Projects", href: "/dashboard/projects" }]}
171176
/>
@@ -429,7 +434,7 @@ export const ShowProjects = () => {
429434
</CardTitle>
430435
</CardHeader>
431436
<CardFooter className="pt-4">
432-
<div className="space-y-1 text-sm flex flex-row justify-between max-sm:flex-wrap w-full gap-2 sm:gap-4">
437+
<div className="space-y-1 text-xs flex flex-row justify-between max-sm:flex-wrap w-full gap-2 sm:gap-4">
433438
<DateTooltip date={project.createdAt}>
434439
Created
435440
</DateTooltip>

apps/dokploy/components/dashboard/settings/certificates/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ export const extractExpirationDate = (certData: string): Date | null => {
1414

1515
// Helper: read ASN.1 length field
1616
function readLength(pos: number): { length: number; offset: number } {
17-
// biome-ignore lint/style/noParameterAssign: <explanation>
17+
// biome-ignore lint/style/noParameterAssign: this is for dynamic length calculation
1818
let len = der[pos++];
1919
if (len & 0x80) {
2020
const bytes = len & 0x7f;
2121
len = 0;
2222
for (let i = 0; i < bytes; i++) {
23-
// biome-ignore lint/style/noParameterAssign: <explanation>
23+
// biome-ignore lint/style/noParameterAssign: this is for dynamic length calculation
2424
len = (len << 8) + der[pos++];
2525
}
2626
}

apps/dokploy/components/layouts/side.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,7 @@ export default function Page({ children }: Props) {
908908
onOpenChange={(open) => {
909909
setDefaultOpen(open);
910910

911+
// biome-ignore lint/suspicious/noDocumentCookie: this sets the cookie to keep the sidebar state.
911912
document.cookie = `${SIDEBAR_COOKIE_NAME}=${open}`;
912913
}}
913914
style={

0 commit comments

Comments
 (0)