Skip to content

Commit

Permalink
Improve user detail view and edit view breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Apr 11, 2024
1 parent 4c116fa commit c76127a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@
crumbs = tokens.map((t) => {
tokenPath += '/' + t;
if (t === $breadcrumbObject.id) {
if ($breadcrumbObject.name) t = $breadcrumbObject.name;
else t = $breadcrumbObject.email;
if ($breadcrumbObject.name) {
t = $breadcrumbObject.name;
} else if ($breadcrumbObject.first_name) {
t = $breadcrumbObject.first_name;
if ($breadcrumbObject.last_name) {
t = `${t} ${$breadcrumbObject.last_name}`;
}
} else {
t = $breadcrumbObject.email;
}
} else if (t === 'folders') {
t = 'domains';
}
Expand Down

0 comments on commit c76127a

Please sign in to comment.