<%= if @is_mac_ui do %> <% end %> <%= unless @is_mac_ui do %>
<%= for group <- @menu_groups do %>
<%= if @titlebar_menu_group == Atom.to_string(group.id) do %>
<%= for item <- BDS.Desktop.ShellLive.TitlebarMenu.dropdown_items(group) do %> <%= if item.separator do %> <% else %> <% end %> <% end %>
<% end %>
<% end %>
<%= @page_title %>
<% end %>
<%= if Enum.empty?(@workbench.tabs) do %>
<%= translated("Dashboard") %>
<% else %>
<%= for tab <- @workbench.tabs do %>
<%= if Workbench.dirty?(@workbench, tab.type, tab.id) do %> <% end %>
<% end %>
<% end %>
<%= if is_nil(@current_tab) do %>

<%= translated("dashboard.title") %>

<%= translated("dashboard.subtitle") %>

<%= @dashboard.post_stats.total_posts || 0 %>
<%= translated("dashboard.stats.totalPosts") %>
<%= translated("dashboard.stats.published", %{count: @dashboard.post_stats.published_count || 0}) %> <%= translated("dashboard.stats.drafts", %{count: @dashboard.post_stats.draft_count || 0}) %> <%= if (@dashboard.post_stats.archived_count || 0) > 0 do %> <%= translated("dashboard.stats.archived", %{count: @dashboard.post_stats.archived_count || 0}) %> <% end %>
<%= @dashboard.media_stats.media_count || 0 %>
<%= translated("dashboard.stats.mediaFiles") %>
<%= translated("dashboard.stats.images", %{count: @dashboard.media_stats.image_count || 0}) %> <%= ShellData.format_bytes(@dashboard.media_stats.total_bytes || 0) %>
<%= length(@dashboard_tag_cloud_items) %>
<%= translated("dashboard.stats.tags") %>
<%= translated("dashboard.stats.categories", %{count: length(@dashboard_category_counts)}) %>
<%= if Enum.any?(@dashboard_timeline_entries) do %>

<%= translated("dashboard.section.postsOverTime") %>

<%= for entry <- @dashboard_timeline_entries do %>
<%= entry.count || 0 %>
<%= ShellData.format_dashboard_month(entry.year, entry.month) %> <%= entry.year %>
<% end %>
<% end %> <%= if Enum.any?(@dashboard_tag_cloud_items) do %>

<%= translated("dashboard.section.tags") %>

<%= for item <- @dashboard_tag_cloud_items do %> <%= item.tag %> <% end %>
<% end %> <%= if Enum.any?(@dashboard_category_counts) do %>

<%= translated("dashboard.section.categories") %>

<%= for category <- @dashboard_category_counts do %> <%= category.category || "" %> <%= category.count || 0 %> <% end %>
<% end %> <%= if Enum.any?(@dashboard_recent_posts) do %>

<%= translated("dashboard.section.recentlyUpdated") %>

<%= for post <- @dashboard_recent_posts do %> <% end %>
<% end %>
<% else %> <%= cond do %> <% @current_tab.type == :post and @post_editor -> %> <% @current_tab.type == :media and @media_editor -> %> <% @current_tab.type in [:settings, :style] and @current_project -> %> <.live_component module={SettingsEditor} id="settings-editor" project_id={@current_project.id} current_project={@current_project} projects={@projects} workbench={@workbench} current_tab={@current_tab} tab_meta={@tab_meta} offline_mode={@offline_mode} /> <% @current_tab.type == :menu_editor and @menu_editor -> %> <% @current_tab.type == :tags and @current_project -> %> <.live_component module={TagsEditor} id="tags-editor" project_id={@current_project.id} current_tab={@current_tab} tab_meta={@tab_meta} /> <% @current_tab.type == :scripts and @script_editor -> %> <% @current_tab.type == :templates and @template_editor -> %> <% @current_tab.type == :chat and @chat_editor -> %> <% @current_tab.type == :import and @import_editor -> %> <% @current_tab.type in [:site_validation, :metadata_diff, :translation_validation, :find_duplicates, :git_diff] and @misc_editor -> %> <% true -> %>
<%= BDS.Desktop.ShellLive.TabHelpers.tab_route_label(@current_tab) %>

<%= BDS.Desktop.ShellLive.TabHelpers.tab_title(@current_tab, @tab_meta) %>

<%= BDS.Desktop.ShellLive.TabHelpers.tab_subtitle(@current_tab, @tab_meta) %>

<%= BDS.Desktop.ShellLive.PanelRenderer.render_editor_toolbar(assigns) %>

<%= BDS.Desktop.ShellLive.TabHelpers.tab_title(@current_tab, @tab_meta) %>

Desktop workbench content routed through the Elixir shell.

<% end %> <% end %>
<%= for tab <- @panel_tabs do %> <% end %>
<%= BDS.Desktop.ShellLive.PanelRenderer.render_panel_body(assigns) %>