Skip to content

Commit

Permalink
fix for issue 166, where you cannot create more than 15 projects. (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
itailiors authored Dec 13, 2024
1 parent 473cfb8 commit 773b821
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions src/Angor/Client/Pages/Founder.razor
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,19 @@

</div>
</div>
<button class="btn btn-border" @onclick="NavigateToCreateProject" disabled="@scanningForProjects">
<i>
<Icon IconName="add"></Icon>
</i>
<span class="nav-link-text ms-1">
@(scanningForProjects ? "Scanning..." : "Create Project")
</span>
</button>
<div class="tooltip-container" data-bs-toggle="tooltip" title="@GetCreateButtonTooltip()">
<button
class="btn btn-border"
@onclick="NavigateToCreateProject"
disabled="@scanningForProjects || @(founderProjects.Count >= 14)">
<i>
<Icon IconName="add"></Icon>
</i>
<span class="nav-link-text ms-1">
@(scanningForProjects ? "Scanning..." : "Create Project")
</span>
</button>
</div>

</div>
<p class="mb-0 font-weight-normal text-sm mt-4">
Expand Down Expand Up @@ -224,5 +229,14 @@

NavigationManager.NavigateTo("/create");
}
private string GetCreateButtonTooltip()
{
if (founderProjects.Count >= 15)
return "You have reached the maximum number of projects. Please manage your existing projects.";
if (scanningForProjects)
return "Scanning in progress...";
return "Create a new project.";
}


}

0 comments on commit 773b821

Please sign in to comment.