Loheide-eu-mitarbeiterplatt.../public/build/assets/EditorialSnippets-wI5UIPDJ.js
Friederich Loheide 800e267e1c
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m29s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m31s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 9m3s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 9m36s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 13m33s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 13m56s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 12m35s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 11m58s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 50s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m13s
Neue Seitenköpfe, global wählbar (0.48.0)
- PageHeader: Kopfband (Standard, kompakt), Kopfband mit Symbol, mit Symbol,
  kräftiger Titel – Einstellung page_header im Erscheinungsbild
- Symbol vom passenden Menüpunkt (aktiv oder per Adresse), Prop icon
- In Spalten (z. B. Downloads) schlichte Form statt Band
- Zurück-Links als breadcrumbs (IT-Service), Profil bearbeiten mit PageHeader
- Plugin-Assets: Fingerabdruck berücksichtigt Änderungszeiten der Dateien

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 20:05:37 +00:00

1 line
No EOL
4.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{C as e,D as t,M as n,P as r,S as i,T as a,W as o,w as s,x as c}from"./ui-DTELwomD.js";import{C as l,Et as u,O as d,S as f,T as p,Y as m,_t as h,g,i as _,k as v,kt as y,ot as b,q as x,s as S,v as C,w,wt as T,x as E}from"./framework-CFqPLBV8.js";import{t as D}from"./component-CJ3jlXhc.js";import{t as O}from"./file-stack-BwzGP_ZX.js";import{t as k}from"./plus-DBUMooLa.js";import{t as A}from"./trash-SluDS89H.js";import{E as j,l as M,x as N}from"./app-DPANCdgI.js";var P={class:`-mt-1 mb-3 inline-flex rounded-md border p-0.5 text-[13px]`,role:`tablist`},F=[`aria-selected`],I=[`aria-selected`],L={class:`mb-3 text-[13px] text-muted-foreground`},R={key:0,class:`-mx-5 divide-y border-t`},z={class:`min-w-0 flex-1`},B={class:`truncate text-xs text-muted-foreground`},V={key:1,class:`text-sm text-muted-foreground`},H={__name:`EditorialSnippets`,props:{snippets:{type:Array,required:!0}},setup(H){let U=H,W=h(`block`),G=E(()=>U.snippets.filter(e=>e.kind===W.value)),K=h(!1),q=h(``),J=h(!1);async function Y(){J.value=!0;try{let e=await j.post(`/redaktion/bausteine`,{kind:W.value,name:q.value,content:{blocks:[]}});S.visit(e.edit_url)}catch(e){o.error(e.data?.errors?.name?.[0]??e.message),J.value=!1}}function X(e){let t=e.usages.length?`\n\nAchtung: Der Baustein ist auf ${e.usages.length} Seite(n) eingebunden und verschwindet dort.`:``;window.confirm(`„${e.name}“ löschen?${t}`)&&S.delete(`/redaktion/bausteine/${e.id}`,{preserveScroll:!0,onSuccess:()=>o.success(`Gelöscht`)})}return(o,h)=>(x(),l(M,{title:`Bausteine & Vorlagen`},{actions:b(()=>[v(T(r),{size:`sm`,variant:`outline`,onClick:h[0]||=e=>(q.value=``,K.value=!0)},{default:b(()=>[v(T(k)),d(` `+y(W.value===`block`?`Neuer Baustein`:`Neue Vorlage`),1)]),_:1})]),default:b(()=>[f(`div`,P,[f(`button`,{type:`button`,role:`tab`,"aria-selected":W.value===`block`,class:u([`inline-flex items-center gap-1.5 rounded-sm px-3 py-1`,W.value===`block`?`bg-muted font-medium`:`text-muted-foreground`]),onClick:h[1]||=e=>W.value=`block`},[v(T(D),{class:`size-3.5`}),h[6]||=d(` Bausteine`,-1)],10,F),f(`button`,{type:`button`,role:`tab`,"aria-selected":W.value===`template`,class:u([`inline-flex items-center gap-1.5 rounded-sm px-3 py-1`,W.value===`template`?`bg-muted font-medium`:`text-muted-foreground`]),onClick:h[2]||=e=>W.value=`template`},[v(T(O),{class:`size-3.5`}),h[7]||=d(` Seitenvorlagen`,-1)],10,I)]),f(`p`,L,[W.value===`block`?(x(),p(C,{key:0},[d(`Bausteine erscheinen auf vielen Seiten gleich, z. B. ein Kontaktkasten oder Öffnungszeiten. Eine Änderung wirkt überall.`)],64)):(x(),p(C,{key:1},[d(`Vorlagen sind Ausgangspunkt für neue Seiten – beim Anlegen wird der Inhalt kopiert.`)],64))]),G.value.length?(x(),p(`ul`,R,[(x(!0),p(C,null,m(G.value,e=>(x(),p(`li`,{key:e.id,class:`flex items-center gap-3 px-5 py-2.5`},[f(`div`,z,[v(T(_),{href:e.edit_url,class:`block truncate text-sm font-medium hover:underline`},{default:b(()=>[d(y(e.name),1)]),_:2},1032,[`href`]),f(`p`,B,[e.description?(x(),p(C,{key:0},[d(y(e.description)+` · `,1)],64)):w(``,!0),d(` `+y(e.blocks)+` `+y(e.blocks===1?`Block`:`Blöcke`)+` `,1),e.kind===`block`?(x(),p(C,{key:1},[d(` · `+y(e.usages.length?`auf ${e.usages.length} ${e.usages.length===1?`Seite`:`Seiten`}`:`noch nicht eingebunden`),1)],64)):w(``,!0),e.updated_at?(x(),p(C,{key:2},[d(` · `+y(T(N)(e.updated_at))+y(e.editor?` von ${e.editor}`:``),1)],64)):w(``,!0)])]),v(T(r),{size:`icon`,variant:`ghost`,class:`size-8 text-muted-foreground hover:text-destructive`,"aria-label":`${e.name} löschen`,onClick:t=>X(e)},{default:b(()=>[v(T(A))]),_:1},8,[`aria-label`,`onClick`])]))),128))])):(x(),p(`p`,V,y(W.value===`block`?`Noch keine Bausteine. Tipp: Im Seiteneditor lässt sich jeder Block „Als Baustein speichern“.`:`Noch keine Vorlagen. Tipp: Im Seiteneditor unter ⋮ „Als Vorlage speichern“.`),1)),v(T(t),{open:K.value,"onUpdate:open":h[5]||=e=>K.value=e},{default:b(()=>[v(T(a),{class:`sm:max-w-md`},{default:b(()=>[v(T(i),null,{default:b(()=>[v(T(c),null,{default:b(()=>[d(y(W.value===`block`?`Neuer Baustein`:`Neue Seitenvorlage`),1)]),_:1}),v(T(s),null,{default:b(()=>[...h[8]||=[d(`Danach öffnet sich der Editor.`,-1)]]),_:1})]),_:1}),f(`form`,{class:`grid gap-4`,onSubmit:g(Y,[`prevent`])},[v(T(n),{modelValue:q.value,"onUpdate:modelValue":h[3]||=e=>q.value=e,maxlength:`120`,autofocus:``,placeholder:`Name, z. B. „Kontakt Personalabteilung“`,"aria-label":`Name`},null,8,[`modelValue`]),v(T(e),null,{default:b(()=>[v(T(r),{type:`button`,variant:`outline`,onClick:h[4]||=e=>K.value=!1},{default:b(()=>[...h[9]||=[d(`Abbrechen`,-1)]]),_:1}),v(T(r),{type:`submit`,disabled:J.value||!q.value.trim()},{default:b(()=>[...h[10]||=[d(`Anlegen`,-1)]]),_:1},8,[`disabled`])]),_:1})],32)]),_:1})]),_:1},8,[`open`])]),_:1}))}};export{H as default};