Restore media hiding and AI rewrite preview

This commit is contained in:
Your Name
2026-07-29 16:40:32 +05:00
parent 50d9f943db
commit b93b785862
2 changed files with 36 additions and 10 deletions
+8 -1
View File
@@ -98,7 +98,14 @@
--app-error: 239 68 68;
--app-error-bg: rgba(239, 68, 68, 0.1);
}
:root:not(.dark) .text-white { color: rgb(var(--app-text-main)) !important; }
:root:not(.dark) .text-white,
:root:not(.dark) .hover\:text-white:hover {
color: rgb(var(--app-text-main)) !important;
}
:root:not(.dark) .hover\:bg-app-primary:hover.hover\:text-white,
:root:not(.dark) .hover\:bg-app-error:hover.hover\:text-white {
color: #fff !important;
}
</style>
<style type="text/tailwindcss">
+25 -6
View File
@@ -71,13 +71,25 @@
{% for m in p.media_items %}
{% if m.type == "photo" and m.url %}
{% set photo_idx = photo_urls.index(m.url) %}
<div @click="activeIdx = {{ photo_idx }}; galleryOpen = true" class="block w-32 h-32 rounded-lg overflow-hidden border border-app-border hover:border-app-primary transition-colors cursor-pointer">
<img src="{{ m.url }}" class="w-full h-full object-cover" loading="lazy">
</div>
<label class="relative block w-32 h-32 rounded-lg overflow-hidden border border-app-border hover:border-app-primary transition-colors cursor-pointer group/media">
<input type="checkbox" name="delete_media_ids" value="{{ m.id }}" class="peer sr-only">
<img @click.prevent="activeIdx = {{ photo_idx }}; galleryOpen = true" src="{{ m.url }}" class="w-full h-full object-cover peer-checked:opacity-35" loading="lazy">
<span class="absolute top-1.5 right-1.5 w-7 h-7 rounded-full bg-black/70 text-white border border-white/20 flex items-center justify-center opacity-80 group-hover/media:opacity-100 peer-checked:bg-app-error peer-checked:text-white transition-colors" title="Не публиковать это медиа">
<i data-lucide="x" class="w-4 h-4"></i>
</span>
<span class="absolute inset-x-0 bottom-0 hidden peer-checked:block bg-app-error text-white text-[10px] font-bold text-center py-1">Не публиковать</span>
</label>
{% elif m.url %}
<a href="{{ m.url }}" target="_blank" class="w-32 h-32 rounded-lg bg-app-bg border border-app-border flex items-center justify-center hover:text-app-primary transition-colors text-app-textMuted">
<label class="relative w-32 h-32 rounded-lg bg-app-bg border border-app-border flex items-center justify-center hover:text-app-primary transition-colors text-app-textMuted cursor-pointer group/media">
<input type="checkbox" name="delete_media_ids" value="{{ m.id }}" class="peer sr-only">
<a href="{{ m.url }}" target="_blank" class="peer-checked:opacity-35">
<i data-lucide="play-circle" class="w-10 h-10"></i>
</a>
<span class="absolute top-1.5 right-1.5 w-7 h-7 rounded-full bg-black/70 text-white border border-white/20 flex items-center justify-center opacity-80 group-hover/media:opacity-100 peer-checked:bg-app-error peer-checked:text-white transition-colors" title="Не публиковать это медиа">
<i data-lucide="x" class="w-4 h-4"></i>
</span>
<span class="absolute inset-x-0 bottom-0 hidden peer-checked:block bg-app-error text-white text-[10px] font-bold text-center py-1">Не публиковать</span>
</label>
{% endif %}
{% endfor %}
</div>
@@ -176,9 +188,16 @@
AI ЗАМЕТКИ / РЕЗОЛЮЦИЯ
</summary>
<div class="mt-3 bg-app-bg/50 rounded-lg p-4 border border-app-border text-sm">
<div class="text-app-textMain/80 whitespace-pre-wrap italic">{{ p.rewrite_notes or p.qualification_reason or "—" }}</div>
<div class="space-y-4">
<div>
<div class="text-xs text-app-textMuted font-bold mb-2 uppercase tracking-wider">AI заметки / резолюция</div>
<div class="text-app-textMain/80 whitespace-pre-wrap italic">{{ p.rewrite_notes or p.qualification_reason or "—" }}</div>
</div>
<div>
<div class="text-xs text-app-textMuted font-bold mb-2 uppercase tracking-wider">AI рерайт</div>
<div class="whitespace-pre-wrap text-app-textMain/90 font-mono text-xs leading-relaxed max-h-[360px] overflow-y-auto">{{ p.rewritten_text or "—" }}</div>
</div>
<div>
<div class="mt-4">
<label class="block text-xs font-bold text-app-textMuted mb-1 uppercase tracking-wider">Заметка редактора (внутренняя)</label>
<input type="text" name="editor_notes" value="{{ p.editor_notes or '' }}" class="input input-sm w-full text-app-warning placeholder:text-app-warning/50 bg-app-bg">
</div>