<%= 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 %>
<%= dgettext("ui", "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 %>

<%= dgettext("ui", "Dashboard") %>

<%= dgettext("ui", "Overview of your blog database") %>

<%= @dashboard.post_stats.total_posts || 0 %>
<%= dgettext("ui", "Total Posts") %>
<%= dgettext("ui", "dashboard.stats.published", count: @dashboard.post_stats.published_count || 0) %> <%= dgettext("ui", "dashboard.stats.drafts", count: @dashboard.post_stats.draft_count || 0) %> <%= if (@dashboard.post_stats.archived_count || 0) > 0 do %> <%= dgettext("ui", "dashboard.stats.archived", count: @dashboard.post_stats.archived_count || 0) %> <% end %>
<%= @dashboard.media_stats.media_count || 0 %>
<%= dgettext("ui", "Media Files") %>
<%= dgettext("ui", "dashboard.stats.images", count: @dashboard.media_stats.image_count || 0) %> <%= ShellData.format_bytes(@dashboard.media_stats.total_bytes || 0) %>
<%= length(@dashboard_tag_cloud_items) %>
<%= dgettext("ui", "Tags") %>
<%= dgettext("ui", "dashboard.stats.categories", count: length(@dashboard_category_counts)) %>
<%= if Enum.any?(@dashboard_timeline_entries) do %>

<%= dgettext("ui", "Posts Over Time") %>

<%= 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 %>

<%= dgettext("ui", "Tags") %>

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

<%= dgettext("ui", "Categories") %>

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

<%= dgettext("ui", "Recently Updated") %>

<%= for post <- @dashboard_recent_posts do %> <% end %>
<% end %>
<% else %> <%= cond do %> <% @current_tab.type == :post -> %> <.live_component module={PostEditor} id={"post-editor-#{@current_tab.id}"} current_tab={@current_tab} offline_mode={@offline_mode} /> <% @current_tab.type == :media -> %> <.live_component module={MediaEditor} id={"media-editor-#{@current_tab.id}"} current_tab={@current_tab} offline_mode={@offline_mode} /> <% @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 @current_project -> %> <.live_component module={MenuEditor} id="menu-editor" project_id={@current_project.id} current_tab={@current_tab} tab_meta={@tab_meta} /> <% @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 -> %> <.live_component module={ScriptEditor} id={"script-editor-#{@current_tab.id}"} current_tab={@current_tab} /> <% @current_tab.type == :templates -> %> <.live_component module={TemplateEditor} id={"template-editor-#{@current_tab.id}"} current_tab={@current_tab} /> <% @current_tab.type == :chat -> %> <.live_component module={ChatEditor} id={"chat-editor-#{@current_tab.id}"} current_tab={@current_tab} offline_mode={@offline_mode} project_id={@projects.active_project_id} /> <% @current_tab.type == :import -> %> <.live_component module={ImportEditor} id={"import-editor-#{@current_tab.id}"} current_tab={@current_tab} offline_mode={@offline_mode} project_id={@projects.active_project_id} /> <% @current_tab.type in [:site_validation, :metadata_diff, :translation_validation, :find_duplicates, :git_diff, :documentation, :api_documentation] -> %> <.live_component module={MiscEditor} id={"misc-editor-#{@current_tab.type}-#{@current_tab.id}"} current_tab={@current_tab} tab_meta={@tab_meta} project_id={@projects.active_project_id} /> <% 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) %>