This was recommended by Enes, and is more aligned with the model naming (the model is Account). This was a completely mechanical change, using the following code: ``` sed -i -e 's/current_user/current_account/' `git grep -l 'current_user' clover*.rb routes/clover_base.rb routes views` ``` This makes some naming more consistent, such as `account_ubid: current_account.ubid`. This makes some naming less consistent, such as `user: current_account` We could fix the less consistent naming by changing `Routes::Common::Base#initialize` to use `account` instead of `user` as a keyword argument. This commit doesn't make that change. It's likely Routes::Common will go away when merging CloverWeb and CloverApi, so I'm not sure it's worth it.
55 lines
2.3 KiB
Plaintext
55 lines
2.3 KiB
Plaintext
<% @page_title = "Dashboard" %>
|
|
|
|
<div class="space-y-1">
|
|
<%== render("components/page_header", locals: { title: "Getting Started" }) %>
|
|
</div>
|
|
|
|
<div class="grid gap-6">
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 md:gap-6 lg:gap-10">
|
|
<% [
|
|
if (project = current_account.projects_dataset.order(:created_at).first)
|
|
[
|
|
"hero-server-stack", "bg-teal-50 text-teal-700", "Create Virtual Machine",
|
|
"Linux-based virtual machines that run on top of virtualized hardware. Comprehensive, cost-effective cloud computing.",
|
|
"#{project.path}/vm/create"
|
|
]
|
|
end, [
|
|
"hero-folder-open", "bg-purple-50 text-purple-700", "Create New Project",
|
|
"Projects are the central point for grouping resources and working with others within Ubicloud.",
|
|
"/project/create"
|
|
], [
|
|
"hero-cog-6-tooth", "bg-sky-50 text-sky-700", "My Account",
|
|
"Update your account details such as name, password.",
|
|
"/account"
|
|
], [
|
|
"hero-envelope", "bg-yellow-50 text-yellow-700", "Get Support",
|
|
"If you need any help with Ubicloud, reach out to our support team for help at support@ubicloud.com.",
|
|
"mailto:support@ubicloud.com"
|
|
]
|
|
].reject { !_1 }.each do |icon, color, title, description, link| %>
|
|
<div
|
|
class="rounded-lg shadow group relative bg-white p-6 focus-within:ring-2 focus-within:ring-inset focus-within:ring-orange-600"
|
|
>
|
|
<div>
|
|
<span class="inline-flex rounded-lg p-3 <%= color %> ring-4 ring-white">
|
|
<%== render("components/icon", locals: { name: icon }) %>
|
|
</span>
|
|
</div>
|
|
<div class="mt-8">
|
|
<h3 class="text-base font-semibold leading-6 text-gray-900">
|
|
<a href="<%= link %>" class="focus:outline-none">
|
|
<!-- Extend touch target to entire panel -->
|
|
<span class="absolute inset-0" aria-hidden="true"></span>
|
|
<%= title %>
|
|
</a>
|
|
</h3>
|
|
<p class="mt-2 text-sm text-gray-500"><%= description %></p>
|
|
</div>
|
|
<span class="pointer-events-none absolute right-6 top-6 text-gray-300 group-hover:text-gray-400">
|
|
<%== render("components/icon", locals: { name: "hero-arrow-up-right" }) %>
|
|
</span>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|