feat: phase 5 of tailwind migration
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div id={"chat-editor-#{@chat_editor.id}"} class="chat-panel flex h-full min-h-0 flex-col" data-testid="chat-editor" phx-hook="ChatSurface">
|
||||
<div class="chat-panel-header flex shrink-0 items-center justify-between gap-3">
|
||||
<div id={"chat-editor-#{@chat_editor.id}"} class="chat-panel ui-editor-shell flex h-full min-h-0 flex-col" data-testid="chat-editor" phx-hook="ChatSurface">
|
||||
<div class="chat-panel-header flex shrink-0 items-center justify-between gap-3 px-4 py-3">
|
||||
<div class="chat-panel-title flex min-w-0 flex-1 items-center justify-between gap-3">
|
||||
<span class="chat-panel-title-main">
|
||||
<%= if @chat_editor.needs_api_key? do %>
|
||||
@@ -23,7 +23,7 @@
|
||||
</button>
|
||||
|
||||
<%= if @chat_editor.model_selector_open? and @chat_editor.available_models != [] do %>
|
||||
<div class="chat-model-selector-menu absolute right-0 top-full z-10 mt-2 flex min-w-56 flex-col">
|
||||
<div class="chat-model-selector-menu ui-dropdown-menu absolute right-0 top-full z-10 mt-2 flex min-w-56 flex-col">
|
||||
<%= for group <- @chat_editor.available_model_groups do %>
|
||||
<section class="chat-model-provider-group" data-testid="chat-model-provider-group" data-provider={group.provider}>
|
||||
<%= if length(@chat_editor.available_model_groups) > 1 do %>
|
||||
@@ -33,7 +33,7 @@
|
||||
<%= for model <- group.models do %>
|
||||
<button
|
||||
class={[
|
||||
"chat-model-selector-option flex items-center justify-between gap-2 text-left",
|
||||
"chat-model-selector-option ui-dropdown-item flex items-center justify-between gap-2 text-left",
|
||||
if(model.id == @chat_editor.effective_model, do: "active")
|
||||
]}
|
||||
type="button"
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
<div class="chat-messages chat-surface-scroll min-h-0 flex-1 overflow-auto">
|
||||
<%= if @chat_editor.needs_api_key? do %>
|
||||
<div class="chat-welcome chat-api-key-state flex flex-col items-start gap-3" data-testid="chat-api-key-required">
|
||||
<div class="chat-welcome chat-api-key-state ui-section-card flex flex-col items-start gap-3 p-4" data-testid="chat-api-key-required">
|
||||
<div class="chat-welcome-icon">🔑</div>
|
||||
<h2><%= dgettext("ui", "API Key Required") %></h2>
|
||||
<p><%= dgettext("ui", "Configure an API key in Settings to enable AI chat.") %></p>
|
||||
@@ -67,7 +67,7 @@
|
||||
</div>
|
||||
<% else %>
|
||||
<%= if Enum.empty?(@chat_editor.messages) and not @chat_editor.is_streaming do %>
|
||||
<div class="chat-welcome flex flex-col items-start gap-3">
|
||||
<div class="chat-welcome ui-section-card flex flex-col items-start gap-3 p-4">
|
||||
<div class="chat-welcome-icon">🤖</div>
|
||||
<h2><%= dgettext("ui", "Welcome to the AI Assistant") %></h2>
|
||||
<p><%= dgettext("ui", "I can help you manage your blog with rich visualizations. Try asking me to:") %></p>
|
||||
@@ -83,7 +83,7 @@
|
||||
<%= for message <- @chat_editor.messages do %>
|
||||
<div class={["chat-message flex items-start gap-3", to_string(message.role || "assistant")]}>
|
||||
<div class="chat-message-avatar"><%= if message.role == :user, do: "👤", else: "🤖" %></div>
|
||||
<div class="chat-message-content">
|
||||
<div class="chat-message-content ui-section-card">
|
||||
<div class="chat-message-header"><span class="chat-message-role"><%= message_role_label(message.role) %></span></div>
|
||||
<.chat_tool_markers markers={message.tool_markers} />
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<%= if @chat_editor.pending_user_message do %>
|
||||
<div class="chat-message user pending flex items-start gap-3" data-testid="chat-pending-user-message">
|
||||
<div class="chat-message-avatar">👤</div>
|
||||
<div class="chat-message-content">
|
||||
<div class="chat-message-content ui-section-card">
|
||||
<div class="chat-message-header">
|
||||
<span class="chat-message-role"><%= message_role_label(:user) %></span>
|
||||
</div>
|
||||
@@ -115,7 +115,7 @@
|
||||
<%= if @chat_editor.is_streaming and (@chat_editor.streaming_content != "" or @chat_editor.streaming_tool_markers != []) do %>
|
||||
<div class="chat-message assistant streaming flex items-start gap-3" data-testid="chat-streaming-message">
|
||||
<div class="chat-message-avatar">🤖</div>
|
||||
<div class="chat-message-content">
|
||||
<div class="chat-message-content ui-section-card">
|
||||
<div class="chat-message-header">
|
||||
<span class="chat-message-role"><%= message_role_label(:assistant) %></span>
|
||||
<span class="streaming-indicator">●</span>
|
||||
@@ -147,7 +147,7 @@
|
||||
</div>
|
||||
|
||||
<%= unless @chat_editor.needs_api_key? do %>
|
||||
<div class="chat-input-container flex shrink-0 flex-col gap-3" data-testid="chat-input-container">
|
||||
<div class="chat-input-container ui-field-stack flex shrink-0 flex-col gap-3" data-testid="chat-input-container">
|
||||
<%= if @chat_editor.is_streaming do %>
|
||||
<button class="chat-abort-button ui-button ui-button-secondary" data-testid="chat-abort-button" type="button" phx-click="abort_chat_editor_message" phx-target={@myself}>◼ <%= dgettext("ui", "Stop") %></button>
|
||||
<% end %>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="media-editor editor flex h-full min-h-0 flex-col" data-testid="media-editor">
|
||||
<div class="editor-header flex shrink-0 items-start justify-between gap-3">
|
||||
<div class="media-editor editor ui-editor-shell flex h-full min-h-0 flex-col" data-testid="media-editor">
|
||||
<div class="editor-header ui-editor-header flex shrink-0 items-start justify-between gap-3">
|
||||
<div class="editor-tabs flex min-w-0 flex-1 overflow-hidden">
|
||||
<div class={[
|
||||
"editor-tab ui-tab ui-tab-active active inline-flex max-w-full items-center gap-2 overflow-hidden px-3 py-2",
|
||||
"editor-tab ui-tab ui-tab-active ui-editor-tab-current active inline-flex max-w-full items-center gap-2 overflow-hidden px-3 py-2",
|
||||
if(@media_editor.dirty?, do: "dirty")
|
||||
]}>
|
||||
<span class="editor-tab-title truncate" data-testid="editor-title"><%= @media_editor.display_title %></span>
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-actions flex flex-wrap items-center justify-end gap-2">
|
||||
<div class="editor-actions ui-editor-actions flex flex-wrap items-center justify-end gap-2">
|
||||
<%= if @media_editor.save_state in [:dirty, :saved] do %>
|
||||
<span class="auto-save-indicator"><%= media_editor_save_state_label(@media_editor.save_state) %></span>
|
||||
<% end %>
|
||||
@@ -29,10 +29,10 @@
|
||||
</button>
|
||||
|
||||
<%= if @media_editor.quick_actions_open? do %>
|
||||
<div class="quick-actions-menu absolute right-0 top-full z-10 mt-2 flex min-w-72 flex-col">
|
||||
<div class="quick-actions-menu ui-dropdown-menu absolute right-0 top-full z-10 mt-2 flex min-w-72 flex-col">
|
||||
<%= if @media_editor.is_image do %>
|
||||
<button
|
||||
class="quick-action-item flex items-start gap-3 text-left"
|
||||
class="quick-action-item ui-dropdown-item flex items-start gap-3 text-left"
|
||||
data-testid="editor-toolbar-overlay-button"
|
||||
type="button"
|
||||
phx-click="open_overlay"
|
||||
@@ -49,7 +49,7 @@
|
||||
<% end %>
|
||||
|
||||
<button
|
||||
class="quick-action-item flex items-start gap-3 text-left"
|
||||
class="quick-action-item ui-dropdown-item flex items-start gap-3 text-left"
|
||||
type="button"
|
||||
phx-click="detect_media_editor_language"
|
||||
phx-target={@myself}
|
||||
@@ -65,7 +65,7 @@
|
||||
<div class="quick-actions-divider"></div>
|
||||
|
||||
<button
|
||||
class="quick-action-item flex items-start gap-3 text-left"
|
||||
class="quick-action-item ui-dropdown-item flex items-start gap-3 text-left"
|
||||
data-testid="editor-toolbar-overlay-button"
|
||||
type="button"
|
||||
phx-click="open_overlay"
|
||||
@@ -100,7 +100,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-content media-editor grid min-h-0 flex-1 gap-4 overflow-auto xl:grid-cols-[minmax(320px,1fr)_minmax(0,1.2fr)]">
|
||||
<div class="editor-content media-editor grid min-h-0 flex-1 gap-4 overflow-auto p-4 xl:grid-cols-[minmax(320px,1fr)_minmax(0,1.2fr)]">
|
||||
<div class="media-preview flex min-h-[16rem] items-center justify-center">
|
||||
<%= if @media_editor.is_image and @media_editor.preview_url do %>
|
||||
<div class="media-preview-image">
|
||||
@@ -118,56 +118,56 @@
|
||||
|
||||
<div class="media-details min-w-0">
|
||||
<form class="media-editor-details-form flex flex-col gap-4" data-testid="media-editor-form" phx-change="change_media_editor" phx-target={@myself}>
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "File Name") %></label>
|
||||
<input class="post-editor-input ui-input disabled ui-input-disabled" type="text" value={@media_editor.original_name} disabled />
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "MIME Type") %></label>
|
||||
<input class="post-editor-input ui-input disabled ui-input-disabled" type="text" value={@media_editor.mime_type} disabled />
|
||||
</div>
|
||||
|
||||
<div class="editor-field-row grid gap-4 md:grid-cols-2">
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field-row ui-field-grid-2 grid gap-4 md:grid-cols-2">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Size") %></label>
|
||||
<input class="post-editor-input ui-input disabled ui-input-disabled" type="text" value={@media_editor.file_size} disabled />
|
||||
</div>
|
||||
|
||||
<%= if @media_editor.dimensions do %>
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Dimensions") %></label>
|
||||
<input class="post-editor-input ui-input disabled ui-input-disabled" type="text" value={@media_editor.dimensions} disabled />
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Title") %></label>
|
||||
<input class="post-editor-input ui-input" type="text" name="media_editor[title]" value={@media_editor.form["title"]} />
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Alt Text") %></label>
|
||||
<input class="post-editor-input ui-input" type="text" name="media_editor[alt]" value={@media_editor.form["alt"]} />
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Caption") %></label>
|
||||
<textarea class="post-editor-textarea ui-textarea" name="media_editor[caption]" rows="3"><%= @media_editor.form["caption"] %></textarea>
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Tags") %></label>
|
||||
<input class="post-editor-input ui-input" type="text" name="media_editor[tags]" value={@media_editor.form["tags"]} />
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Author") %></label>
|
||||
<input class="post-editor-input ui-input" type="text" name="media_editor[author]" value={@media_editor.form["author"]} />
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Language") %></label>
|
||||
<select class="post-editor-input ui-input" name="media_editor[language]">
|
||||
<option value=""><%= dgettext("ui", "None") %></option>
|
||||
@@ -281,15 +281,15 @@
|
||||
</div>
|
||||
<form class="translation-modal-body flex flex-col gap-4 overflow-auto" phx-change="change_media_translation" phx-target={@myself}>
|
||||
<input type="hidden" name="media_translation[language]" value={@media_editor.editing_translation["language"]} />
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Title") %></label>
|
||||
<input class="post-editor-input ui-input" type="text" name="media_translation[title]" value={@media_editor.editing_translation["title"]} />
|
||||
</div>
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Alt Text") %></label>
|
||||
<input class="post-editor-input ui-input" type="text" name="media_translation[alt]" value={@media_editor.editing_translation["alt"]} />
|
||||
</div>
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Caption") %></label>
|
||||
<textarea class="post-editor-textarea ui-textarea" name="media_translation[caption]" rows="3"><%= @media_editor.editing_translation["caption"] %></textarea>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<div class="menu-editor-view flex h-full min-h-0 flex-col" data-testid="menu-editor" phx-window-keydown={if(@menu_editor.draft, do: "menu_editor_keydown")} phx-target={@myself}>
|
||||
<div class="menu-editor-view ui-editor-shell flex h-full min-h-0 flex-col p-4" data-testid="menu-editor" phx-window-keydown={if(@menu_editor.draft, do: "menu_editor_keydown")} phx-target={@myself}>
|
||||
<div class="menu-editor-header flex shrink-0 items-start justify-between gap-3">
|
||||
<div>
|
||||
<div class="ui-field-stack">
|
||||
<h2><%= @menu_editor.title %></h2>
|
||||
<p><%= @menu_editor.description %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="menu-editor-main min-h-0 flex-1 overflow-hidden">
|
||||
<div class="menu-editor-tree-wrap flex h-full min-h-0 flex-col">
|
||||
<div class="menu-editor-toolbar flex flex-wrap items-center gap-2" data-testid="menu-editor-toolbar" role="toolbar" aria-label={@menu_editor.title}>
|
||||
<div class="menu-editor-tree-wrap ui-section-card flex h-full min-h-0 flex-col">
|
||||
<div class="menu-editor-toolbar ui-toolbar flex flex-wrap items-center gap-2" data-testid="menu-editor-toolbar" role="toolbar" aria-label={@menu_editor.title}>
|
||||
<button class="menu-editor-tool inline-flex h-9 min-w-9 items-center justify-center" data-testid="menu-editor-toolbar-button" data-action="add-entry" type="button" phx-click="menu_editor_toolbar_action" phx-value-action="add-entry" phx-target={@myself} title={dgettext("ui", "menuEditor.addEntry")}>
|
||||
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M7 2h2v5h5v2H9v5H7V9H2V7h5V2z" /></svg>
|
||||
</button>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="post-editor editor flex h-full min-h-0 flex-col" data-testid="post-editor">
|
||||
<div class="editor-header flex shrink-0 items-start justify-between gap-3">
|
||||
<div class="post-editor editor ui-editor-shell flex h-full min-h-0 flex-col" data-testid="post-editor">
|
||||
<div class="editor-header ui-editor-header flex shrink-0 items-start justify-between gap-3">
|
||||
<div class="editor-tabs flex min-w-0 flex-1 overflow-hidden">
|
||||
<div class={["editor-tab ui-tab ui-tab-active active inline-flex max-w-full items-center gap-2 overflow-hidden px-3 py-2", if(@post_editor.dirty?, do: "dirty")]}>
|
||||
<div class={["editor-tab ui-tab ui-tab-active ui-editor-tab-current active inline-flex max-w-full items-center gap-2 overflow-hidden px-3 py-2", if(@post_editor.dirty?, do: "dirty")]}>
|
||||
<span class="editor-tab-title truncate" data-testid="editor-title"><%= @post_editor.display_title %></span>
|
||||
<%= if @post_editor.dirty? do %>
|
||||
<span class="editor-tab-dirty" title={dgettext("ui", "Unsaved")}>●</span>
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-actions flex flex-wrap items-center justify-end gap-2">
|
||||
<div class="editor-actions ui-editor-actions flex flex-wrap items-center justify-end gap-2">
|
||||
<span class={["status-badge", "ui-badge", "status-#{@post_editor.status}"]} data-testid="post-status-badge">
|
||||
<%= post_status_label(@post_editor.status) %>
|
||||
</span>
|
||||
@@ -29,9 +29,9 @@
|
||||
</button>
|
||||
|
||||
<%= if @post_editor.quick_actions_open? do %>
|
||||
<div class="quick-actions-menu absolute right-0 top-full z-10 mt-2 flex min-w-72 flex-col">
|
||||
<div class="quick-actions-menu ui-dropdown-menu absolute right-0 top-full z-10 mt-2 flex min-w-72 flex-col">
|
||||
<button
|
||||
class="quick-action-item flex items-start gap-3 text-left"
|
||||
class="quick-action-item ui-dropdown-item flex items-start gap-3 text-left"
|
||||
data-testid="editor-toolbar-overlay-button"
|
||||
type="button"
|
||||
phx-click="open_overlay"
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="quick-actions-divider"></div>
|
||||
|
||||
<button
|
||||
class="quick-action-item flex items-start gap-3 text-left"
|
||||
class="quick-action-item ui-dropdown-item flex items-start gap-3 text-left"
|
||||
data-testid="editor-toolbar-overlay-button"
|
||||
type="button"
|
||||
phx-click="open_overlay"
|
||||
@@ -83,7 +83,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="post-editor-form editor-content flex min-h-0 flex-1 flex-col gap-4 overflow-auto" data-testid="post-editor-form" phx-change="change_post_editor" phx-target={@myself}>
|
||||
<form class="post-editor-form editor-content flex min-h-0 flex-1 flex-col gap-4 overflow-auto p-4" data-testid="post-editor-form" phx-change="change_post_editor" phx-target={@myself}>
|
||||
<div class="metadata-toggle-header flex items-center justify-between gap-3">
|
||||
<button class={["metadata-toggle", if(@post_editor.metadata_expanded, do: "expanded")]} type="button" phx-click="toggle_post_metadata" phx-target={@myself}>
|
||||
<span class="metadata-toggle-chevron"><%= if @post_editor.metadata_expanded, do: "▼", else: "▶" %></span>
|
||||
@@ -113,12 +113,12 @@
|
||||
|
||||
<div class={["editor-header-row grid gap-4 xl:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]", if(not @post_editor.metadata_expanded, do: "is-collapsed")]}>
|
||||
<div class="editor-meta flex min-w-0 flex-col gap-4">
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Title") %></label>
|
||||
<input class="post-editor-input ui-input" type="text" name="post_editor[title]" value={@post_editor.form["title"]} />
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Tags") %></label>
|
||||
<div class="tag-input-container relative">
|
||||
<input type="hidden" name="post_editor[tags]" value={@post_editor.form["tags"]} />
|
||||
@@ -162,12 +162,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Author") %></label>
|
||||
<input class="post-editor-input ui-input" type="text" name="post_editor[author]" value={@post_editor.form["author"]} />
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Language") %></label>
|
||||
<div class="editor-language-row flex items-center gap-2">
|
||||
<select class="post-editor-input ui-input" name="post_editor[language]">
|
||||
@@ -189,7 +189,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label class="editor-checkbox-label">
|
||||
<input type="hidden" name="post_editor[do_not_translate]" value="false" />
|
||||
<input type="checkbox" name="post_editor[do_not_translate]" value="true" checked={@post_editor.form["do_not_translate"]} />
|
||||
@@ -197,13 +197,13 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="editor-field-row grid gap-4 md:grid-cols-2">
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field-row ui-field-grid-2 grid gap-4 md:grid-cols-2">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Slug") %></label>
|
||||
<input class="post-editor-input ui-input is-readonly ui-input-readonly" type="text" readonly value={@post_editor.slug} />
|
||||
</div>
|
||||
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Categories") %></label>
|
||||
<div class="tag-input-container relative">
|
||||
<input type="hidden" name="post_editor[categories]" value={@post_editor.form["categories"]} />
|
||||
@@ -246,7 +246,7 @@
|
||||
</div>
|
||||
|
||||
<%= if @post_editor.show_template_selector? do %>
|
||||
<div class="editor-field flex flex-col gap-1.5">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5">
|
||||
<label><%= dgettext("ui", "Template") %></label>
|
||||
<select class="post-editor-input ui-input" name="post_editor[template_slug]">
|
||||
<option value=""><%= dgettext("ui", "Default") %></option>
|
||||
@@ -321,12 +321,12 @@
|
||||
</div>
|
||||
|
||||
<div class="editor-body flex min-h-0 flex-1 flex-col overflow-hidden">
|
||||
<div class="editor-toolbar flex items-center gap-3">
|
||||
<div class="editor-toolbar-left flex items-center gap-2">
|
||||
<div class="editor-toolbar ui-toolbar flex items-center gap-3">
|
||||
<div class="editor-toolbar-left ui-toolbar-group flex items-center gap-2">
|
||||
<label><%= dgettext("ui", "Content") %></label>
|
||||
</div>
|
||||
|
||||
<div class="editor-toolbar-center flex flex-1 justify-center">
|
||||
<div class="editor-toolbar-center ui-toolbar-group flex flex-1 justify-center">
|
||||
<div class="editor-mode-toggle">
|
||||
<%= for mode <- [:markdown, :preview] do %>
|
||||
<button
|
||||
@@ -342,7 +342,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="editor-toolbar-right flex items-center gap-2">
|
||||
<div class="editor-toolbar-right ui-toolbar-group flex items-center gap-2">
|
||||
<%= if @post_editor.mode == :markdown do %>
|
||||
<button
|
||||
class="insert-post-link-button"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="scripts-view-shell editor flex h-full min-h-0 flex-col" data-testid="script-editor">
|
||||
<div class="editor-header scripts-header flex shrink-0 items-start justify-between gap-3">
|
||||
<div class="editor-tabs flex min-w-0 flex-1 overflow-hidden"><div class="editor-tab ui-tab ui-tab-active active inline-flex max-w-full items-center overflow-hidden px-3 py-2"><span class="editor-tab-title truncate"><%= @script_editor.title %></span></div></div>
|
||||
<div class="editor-actions flex flex-wrap items-center justify-end gap-2">
|
||||
<div class="scripts-view-shell editor ui-editor-shell flex h-full min-h-0 flex-col" data-testid="script-editor">
|
||||
<div class="editor-header scripts-header ui-editor-header flex shrink-0 items-start justify-between gap-3">
|
||||
<div class="editor-tabs flex min-w-0 flex-1 overflow-hidden"><div class="editor-tab ui-tab ui-tab-active ui-editor-tab-current active inline-flex max-w-full items-center overflow-hidden px-3 py-2"><span class="editor-tab-title truncate"><%= @script_editor.title %></span></div></div>
|
||||
<div class="editor-actions ui-editor-actions flex flex-wrap items-center justify-end gap-2">
|
||||
<span class={[
|
||||
"status-badge",
|
||||
"ui-badge",
|
||||
@@ -16,22 +16,22 @@
|
||||
<button class="secondary danger ui-button ui-button-secondary ui-button-danger" type="button" phx-click="delete_script_editor" phx-target={@myself}><%= dgettext("ui", "Delete") %></button>
|
||||
</div>
|
||||
</div>
|
||||
<form class="editor-content scripts-view flex min-h-0 flex-1 flex-col gap-4 overflow-hidden" phx-change="change_script_editor" phx-target={@myself}>
|
||||
<form class="editor-content scripts-view flex min-h-0 flex-1 flex-col gap-4 overflow-hidden p-4" phx-change="change_script_editor" phx-target={@myself}>
|
||||
<div class="editor-header-row scripts-meta-row grid gap-4">
|
||||
<div class="editor-meta flex min-w-0 flex-col gap-4">
|
||||
<div class="editor-field-row grid gap-4 md:grid-cols-2">
|
||||
<div class="editor-field flex flex-col gap-1.5"><label><%= dgettext("ui", "Title") %></label><input class="ui-input" type="text" name="script_editor[title]" value={@script_editor.title} /></div>
|
||||
<div class="editor-field flex flex-col gap-1.5"><label><%= dgettext("ui", "Slug") %></label><input class="ui-input" type="text" name="script_editor[slug]" value={@script_editor.slug} /></div>
|
||||
<div class="editor-field-row ui-field-grid-2 grid gap-4 md:grid-cols-2">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5"><label><%= dgettext("ui", "Title") %></label><input class="ui-input" type="text" name="script_editor[title]" value={@script_editor.title} /></div>
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5"><label><%= dgettext("ui", "Slug") %></label><input class="ui-input" type="text" name="script_editor[slug]" value={@script_editor.slug} /></div>
|
||||
</div>
|
||||
<div class="editor-field-row grid gap-4 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]">
|
||||
<div class="editor-field flex flex-col gap-1.5"><label><%= dgettext("ui", "Kind") %></label><select class="ui-input" name="script_editor[kind]"><option value="utility" selected={@script_editor.kind == "utility"}>utility</option><option value="macro" selected={@script_editor.kind == "macro"}>macro</option><option value="transform" selected={@script_editor.kind == "transform"}>transform</option></select></div>
|
||||
<div class="editor-field flex flex-col gap-1.5"><label><%= dgettext("ui", "Entrypoint") %></label><select class="ui-input" name="script_editor[entrypoint]"><%= for entrypoint <- @script_editor.entrypoints do %><option value={entrypoint} selected={entrypoint == @script_editor.entrypoint}><%= entrypoint %></option><% end %></select></div>
|
||||
<div class="editor-field-row ui-field-grid-3 grid gap-4 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5"><label><%= dgettext("ui", "Kind") %></label><select class="ui-input" name="script_editor[kind]"><option value="utility" selected={@script_editor.kind == "utility"}>utility</option><option value="macro" selected={@script_editor.kind == "macro"}>macro</option><option value="transform" selected={@script_editor.kind == "transform"}>transform</option></select></div>
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5"><label><%= dgettext("ui", "Entrypoint") %></label><select class="ui-input" name="script_editor[entrypoint]"><%= for entrypoint <- @script_editor.entrypoints do %><option value={entrypoint} selected={entrypoint == @script_editor.entrypoint}><%= entrypoint %></option><% end %></select></div>
|
||||
<div class="editor-field scripts-enabled-field flex flex-col justify-end gap-1.5"><label><input type="checkbox" name="script_editor[enabled]" checked={@script_editor.enabled} /> <%= dgettext("ui", "Enabled") %></label></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="editor-body scripts-editor flex min-h-0 flex-1 flex-col overflow-hidden">
|
||||
<div class="editor-toolbar scripts-toolbar flex items-center gap-3"><div class="editor-toolbar-left flex items-center gap-2"><label><%= dgettext("ui", "Content") %></label></div></div>
|
||||
<div class="editor-toolbar scripts-toolbar ui-toolbar flex items-center gap-3"><div class="editor-toolbar-left ui-toolbar-group flex items-center gap-2"><label><%= dgettext("ui", "Content") %></label></div></div>
|
||||
<div
|
||||
id={"script-editor-monaco-shell-#{@script_editor.id}"}
|
||||
class="scripts-monaco monaco-editor-shell min-h-0 flex-1 overflow-hidden"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div
|
||||
id="settings-editor-shell"
|
||||
class="settings-view-shell flex h-full min-h-0 flex-col overflow-hidden"
|
||||
class="settings-view-shell ui-editor-shell flex h-full min-h-0 flex-col overflow-hidden"
|
||||
data-testid="settings-editor"
|
||||
phx-hook="SettingsSectionScroll"
|
||||
data-selected-settings-section={@settings_editor.selected_section}
|
||||
@@ -22,8 +22,8 @@
|
||||
<% end %>
|
||||
|
||||
<%= if @settings_editor.project_visible? do %>
|
||||
<div class="setting-section" id="settings-section-project">
|
||||
<div class="setting-section-header">
|
||||
<div class="setting-section ui-section-card" id="settings-section-project">
|
||||
<div class="setting-section-header ui-field-stack">
|
||||
<h3><%= dgettext("ui", "Project") %></h3>
|
||||
<p class="setting-section-description"><%= dgettext("ui", "Blog identity, URLs, authoring defaults, and bookmarklet setup") %></p>
|
||||
</div>
|
||||
@@ -102,8 +102,8 @@
|
||||
<% end %>
|
||||
|
||||
<%= if @settings_editor.editor_visible? do %>
|
||||
<div class="setting-section" id="settings-section-editor">
|
||||
<div class="setting-section-header">
|
||||
<div class="setting-section ui-section-card" id="settings-section-editor">
|
||||
<div class="setting-section-header ui-field-stack">
|
||||
<h3><%= dgettext("ui", "Editor") %></h3>
|
||||
<p class="setting-section-description"><%= dgettext("ui", "Default editing mode and diff presentation") %></p>
|
||||
</div>
|
||||
@@ -141,8 +141,8 @@
|
||||
<% end %>
|
||||
|
||||
<%= if @settings_editor.content_visible? do %>
|
||||
<div class="setting-section" id="settings-section-content">
|
||||
<div class="setting-section-header"><h3><%= dgettext("ui", "Content Categories") %></h3><p class="setting-section-description"><%= dgettext("ui", "Category defaults, rendering flags, and template wiring") %></p></div>
|
||||
<div class="setting-section ui-section-card" id="settings-section-content">
|
||||
<div class="setting-section-header ui-field-stack"><h3><%= dgettext("ui", "Content Categories") %></h3><p class="setting-section-description"><%= dgettext("ui", "Category defaults, rendering flags, and template wiring") %></p></div>
|
||||
<div class="setting-section-content">
|
||||
<table class="categories-table">
|
||||
<thead>
|
||||
@@ -209,8 +209,8 @@
|
||||
<% end %>
|
||||
|
||||
<%= if @settings_editor.ai_visible? do %>
|
||||
<div class="setting-section" id="settings-section-ai">
|
||||
<div class="setting-section-header"><h3><%= dgettext("ui", "AI") %></h3><p class="setting-section-description"><%= dgettext("ui", "OpenAI-compatible endpoints, model routing, airplane mode, and system prompt") %></p></div>
|
||||
<div class="setting-section ui-section-card" id="settings-section-ai">
|
||||
<div class="setting-section-header ui-field-stack"><h3><%= dgettext("ui", "AI") %></h3><p class="setting-section-description"><%= dgettext("ui", "OpenAI-compatible endpoints, model routing, airplane mode, and system prompt") %></p></div>
|
||||
<form class="setting-section-content" phx-change="change_settings_ai" phx-target={@myself}>
|
||||
<div class="setting-row">
|
||||
<div class="setting-info"><label class="setting-label"><%= dgettext("ui", "Online Endpoint URL") %></label></div>
|
||||
@@ -310,8 +310,8 @@
|
||||
<% end %>
|
||||
|
||||
<%= if @settings_editor.technology_visible? do %>
|
||||
<div class="setting-section" id="settings-section-technology">
|
||||
<div class="setting-section-header"><h3><%= dgettext("ui", "Technology") %></h3><p class="setting-section-description"><%= dgettext("ui", "Application-level runtime behavior and semantic indexing") %></p></div>
|
||||
<div class="setting-section ui-section-card" id="settings-section-technology">
|
||||
<div class="setting-section-header ui-field-stack"><h3><%= dgettext("ui", "Technology") %></h3><p class="setting-section-description"><%= dgettext("ui", "Application-level runtime behavior and semantic indexing") %></p></div>
|
||||
<form class="setting-section-content" phx-change="change_settings_project" phx-target={@myself}>
|
||||
<div class="setting-row">
|
||||
<div class="setting-info"><label class="setting-label"><%= dgettext("ui", "Semantic Similarity") %></label></div>
|
||||
@@ -327,8 +327,8 @@
|
||||
<% end %>
|
||||
|
||||
<%= if @settings_editor.publishing_visible? do %>
|
||||
<div class="setting-section" id="settings-section-publishing">
|
||||
<div class="setting-section-header"><h3><%= dgettext("ui", "Publishing") %></h3><p class="setting-section-description"><%= dgettext("ui", "Deployment credentials for upload tasks") %></p></div>
|
||||
<div class="setting-section ui-section-card" id="settings-section-publishing">
|
||||
<div class="setting-section-header ui-field-stack"><h3><%= dgettext("ui", "Publishing") %></h3><p class="setting-section-description"><%= dgettext("ui", "Deployment credentials for upload tasks") %></p></div>
|
||||
<form class="setting-section-content" phx-change="change_settings_publishing" phx-target={@myself}>
|
||||
<div class="setting-row"><div class="setting-info"><label class="setting-label"><%= dgettext("ui", "SSH Mode") %></label></div><div class="setting-control"><select class="ui-input" name="settings_publishing[ssh_mode]"><option value="scp" selected={@settings_editor.publishing["ssh_mode"] == "scp"}>scp</option><option value="rsync" selected={@settings_editor.publishing["ssh_mode"] == "rsync"}>rsync</option></select></div></div>
|
||||
<div class="setting-row"><div class="setting-info"><label class="setting-label"><%= dgettext("ui", "Host") %></label></div><div class="setting-control"><input class="ui-input" type="text" name="settings_publishing[ssh_host]" value={@settings_editor.publishing["ssh_host"]} /></div></div>
|
||||
@@ -340,8 +340,8 @@
|
||||
<% end %>
|
||||
|
||||
<%= if @settings_editor.mcp_visible? do %>
|
||||
<div class="setting-section" id="settings-section-mcp">
|
||||
<div class="setting-section-header"><h3><%= dgettext("ui", "MCP") %></h3><p class="setting-section-description"><%= dgettext("ui", "Agent configuration files for the built-in bDS MCP server") %></p></div>
|
||||
<div class="setting-section ui-section-card" id="settings-section-mcp">
|
||||
<div class="setting-section-header ui-field-stack"><h3><%= dgettext("ui", "MCP") %></h3><p class="setting-section-description"><%= dgettext("ui", "Agent configuration files for the built-in bDS MCP server") %></p></div>
|
||||
<div class="setting-section-content">
|
||||
<%= for agent <- @settings_editor.mcp do %>
|
||||
<div class="setting-row">
|
||||
@@ -361,8 +361,8 @@
|
||||
<% end %>
|
||||
|
||||
<%= if @settings_editor.data_visible? do %>
|
||||
<div class="setting-section" id="settings-section-data">
|
||||
<div class="setting-section-header"><h3><%= dgettext("ui", "Data Maintenance") %></h3><p class="setting-section-description"><%= dgettext("ui", "Rebuild filesystem-backed records and thumbnails") %></p></div>
|
||||
<div class="setting-section ui-section-card" id="settings-section-data">
|
||||
<div class="setting-section-header ui-field-stack"><h3><%= dgettext("ui", "Data Maintenance") %></h3><p class="setting-section-description"><%= dgettext("ui", "Rebuild filesystem-backed records and thumbnails") %></p></div>
|
||||
<div class="setting-actions">
|
||||
<button class="secondary ui-button ui-button-secondary" type="button" phx-click="settings_shell_command" phx-value-action="rebuild_posts_from_files"><%= dgettext("ui", "Rebuild Posts From Files") %></button>
|
||||
<button class="secondary ui-button ui-button-secondary" type="button" phx-click="settings_shell_command" phx-value-action="rebuild_media_from_files"><%= dgettext("ui", "Rebuild Media From Files") %></button>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="templates-view-shell editor flex h-full min-h-0 flex-col" data-testid="template-editor">
|
||||
<div class="editor-header templates-header flex shrink-0 items-start justify-between gap-3">
|
||||
<div class="editor-tabs flex min-w-0 flex-1 overflow-hidden"><div class="editor-tab ui-tab ui-tab-active active inline-flex max-w-full items-center overflow-hidden px-3 py-2"><span class="editor-tab-title truncate"><%= @template_editor.title %></span></div></div>
|
||||
<div class="editor-actions flex flex-wrap items-center justify-end gap-2">
|
||||
<div class="templates-view-shell editor ui-editor-shell flex h-full min-h-0 flex-col" data-testid="template-editor">
|
||||
<div class="editor-header templates-header ui-editor-header flex shrink-0 items-start justify-between gap-3">
|
||||
<div class="editor-tabs flex min-w-0 flex-1 overflow-hidden"><div class="editor-tab ui-tab ui-tab-active ui-editor-tab-current active inline-flex max-w-full items-center overflow-hidden px-3 py-2"><span class="editor-tab-title truncate"><%= @template_editor.title %></span></div></div>
|
||||
<div class="editor-actions ui-editor-actions flex flex-wrap items-center justify-end gap-2">
|
||||
<span class={[
|
||||
"status-badge",
|
||||
"ui-badge",
|
||||
@@ -15,21 +15,21 @@
|
||||
<button class="secondary danger ui-button ui-button-secondary ui-button-danger" type="button" phx-click="delete_template_editor" phx-target={@myself}><%= dgettext("ui", "Delete") %></button>
|
||||
</div>
|
||||
</div>
|
||||
<form class="editor-content templates-view flex min-h-0 flex-1 flex-col gap-4 overflow-hidden" phx-change="change_template_editor" phx-target={@myself}>
|
||||
<form class="editor-content templates-view flex min-h-0 flex-1 flex-col gap-4 overflow-hidden p-4" phx-change="change_template_editor" phx-target={@myself}>
|
||||
<div class="editor-header-row templates-meta-row grid gap-4">
|
||||
<div class="editor-meta flex min-w-0 flex-col gap-4">
|
||||
<div class="editor-field-row grid gap-4 md:grid-cols-2">
|
||||
<div class="editor-field flex flex-col gap-1.5"><label><%= dgettext("ui", "Title") %></label><input class="ui-input" type="text" name="template_editor[title]" value={@template_editor.title} /></div>
|
||||
<div class="editor-field flex flex-col gap-1.5"><label><%= dgettext("ui", "Slug") %></label><input class="ui-input" type="text" name="template_editor[slug]" value={@template_editor.slug} /></div>
|
||||
<div class="editor-field-row ui-field-grid-2 grid gap-4 md:grid-cols-2">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5"><label><%= dgettext("ui", "Title") %></label><input class="ui-input" type="text" name="template_editor[title]" value={@template_editor.title} /></div>
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5"><label><%= dgettext("ui", "Slug") %></label><input class="ui-input" type="text" name="template_editor[slug]" value={@template_editor.slug} /></div>
|
||||
</div>
|
||||
<div class="editor-field-row grid gap-4 md:grid-cols-[minmax(0,1fr)_auto]">
|
||||
<div class="editor-field flex flex-col gap-1.5"><label><%= dgettext("ui", "Kind") %></label><select class="ui-input" name="template_editor[kind]"><option value="post" selected={@template_editor.kind == :post or @template_editor.kind == "post"}>post</option><option value="list" selected={@template_editor.kind == :list or @template_editor.kind == "list"}>list</option><option value="not-found" selected={@template_editor.kind == :"not-found" or @template_editor.kind == "not-found"}>not-found</option><option value="partial" selected={@template_editor.kind == :partial or @template_editor.kind == "partial"}>partial</option></select></div>
|
||||
<div class="editor-field-row ui-field-grid-3 grid gap-4 md:grid-cols-[minmax(0,1fr)_auto]">
|
||||
<div class="editor-field ui-field-stack flex flex-col gap-1.5"><label><%= dgettext("ui", "Kind") %></label><select class="ui-input" name="template_editor[kind]"><option value="post" selected={@template_editor.kind == :post or @template_editor.kind == "post"}>post</option><option value="list" selected={@template_editor.kind == :list or @template_editor.kind == "list"}>list</option><option value="not-found" selected={@template_editor.kind == :"not-found" or @template_editor.kind == "not-found"}>not-found</option><option value="partial" selected={@template_editor.kind == :partial or @template_editor.kind == "partial"}>partial</option></select></div>
|
||||
<div class="editor-field templates-enabled-field flex flex-col justify-end gap-1.5"><label><input type="checkbox" name="template_editor[enabled]" checked={@template_editor.enabled} /> <%= dgettext("ui", "Enabled") %></label></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="editor-body templates-editor flex min-h-0 flex-1 flex-col overflow-hidden">
|
||||
<div class="editor-toolbar templates-toolbar flex items-center gap-3"><div class="editor-toolbar-left flex items-center gap-2"><label><%= dgettext("ui", "Content") %></label></div></div>
|
||||
<div class="editor-toolbar templates-toolbar ui-toolbar flex items-center gap-3"><div class="editor-toolbar-left ui-toolbar-group flex items-center gap-2"><label><%= dgettext("ui", "Content") %></label></div></div>
|
||||
<div
|
||||
id={"template-editor-monaco-shell-#{@template_editor.id}"}
|
||||
class="templates-monaco monaco-editor-shell min-h-0 flex-1 overflow-hidden"
|
||||
|
||||
Reference in New Issue
Block a user