Loheide-eu-mitarbeiterplatt.../public/build/assets/Editor-BO1IKONS.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
12 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{Dt as e,Et as t,H as n,M as r,Nt as i,Ot as ee,P as a,W as te,j as ne}from"./ui-DTELwomD.js";import{C as o,O as s,Q as c,S as l,T as u,Y as d,a as f,f as p,g as m,i as re,k as h,kt as g,o as ie,ot as _,q as v,rt as y,s as b,st as x,v as S,w as C,wt as w,x as T}from"./framework-CFqPLBV8.js";import{n as ae,t as oe}from"./arrow-up-BnBnj32x.js";import{t as se}from"./circle-dot-CjxK7TSx.js";import{t as ce}from"./plus-DBUMooLa.js";import{t as le}from"./save-BNWbmxLs.js";import{t as E}from"./trash-SluDS89H.js";import{N as D,d as O,l as k,rt as A,s as j,t as M,u as N}from"./app-DPANCdgI.js";var P=i({name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]}),F=i({name:`type`,size:24,node:[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]}),I={class:`grid min-w-0 gap-6`},L={class:`grid gap-5`},R={key:0,class:`flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 p-3 text-[13px]`},z={key:1,class:`text-[13px] text-destructive`},B={class:`grid gap-4`},V={class:`flex items-center gap-2`},H={class:`inline-flex items-center gap-1.5 rounded bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground`},U={key:0,class:`grid gap-2`},W={class:`w-5 text-right text-xs text-muted-foreground tabular-nums`},ue={key:1,class:`grid gap-3 sm:grid-cols-3`},de=[`id`,`onUpdate:modelValue`],fe={class:`flex flex-wrap items-center gap-x-6 gap-y-3 border-t pt-3 text-sm`},pe={class:`flex items-center gap-2`},me={key:0,class:`flex items-center gap-2`},he={class:`flex flex-wrap gap-2`},ge={class:`grid gap-6`},_e={class:`grid gap-4`},ve={class:`flex items-center justify-between gap-3 text-sm`},ye={class:`flex items-center justify-between gap-3 text-sm`},be={class:`block text-xs text-muted-foreground`},xe={class:`grid gap-4`},Se=[`value`],Ce={class:`flex items-center justify-between gap-3 text-sm`},we={key:0,class:`text-[13px] text-destructive`},Te={class:`-mt-1 mb-3 flex items-start gap-2 text-[13px] text-muted-foreground`},G={__name:`Editor`,props:{poll:{type:Object,default:null},visibilityOptions:{type:Object,required:!0},audienceOptions:{type:Object,required:!0}},setup(i){let G=i,Ee=ie();y(()=>Ee.props.flash.status,e=>e&&te.success(e),{immediate:!0});let K=()=>Math.random().toString(36).slice(2,10),q={single:{label:`Eine Antwort`,icon:se},multiple:{label:`Mehrere Antworten`,icon:A},scale:{label:`Skala`,icon:P},text:{label:`Freitext`,icon:F}},J=G.poll,Y=f({title:J?.title??``,description:J?.description??``,questions:J?.questions?.map(e=>({...e,options:e.options?.map(e=>({...e}))}))??[{id:K(),type:`single`,label:``,required:!0,options:[{id:K(),label:``},{id:K(),label:``}]}],anonymous:J?.anonymous??!1,results_visibility:J?.results_visibility??`after_vote`,published:J?.published??!1,published_at:J?.published_at??``,closes_at:J?.closes_at??``,announce:J?.announce??!1,audience:J?.audience??{}});function X(e){let t={id:K(),type:e,label:``,required:!0};(e===`single`||e===`multiple`)&&(t.options=[{id:K(),label:``},{id:K(),label:``}]),e===`multiple`&&(t.max=null),e===`scale`&&Object.assign(t,{scale:5,min_label:`gar nicht`,max_label:`sehr`}),e===`text`&&(t.required=!1),Y.questions.push(t)}function Z(e,t){let n=Y.questions,[r]=n.splice(e,1);n.splice(e+t,0,r)}let De=T(()=>Object.values(Y.audience??{}).some(e=>e?.length)),Q=T(()=>(J?.responses??0)>0);function $(){let e={preserveScroll:!0};J?Y.put(`/redaktion/umfragen/${J.id}`,e):Y.post(`/redaktion/umfragen`,e)}function Oe(){window.confirm(`Umfrage „${J.title}“ samt ${J.responses} Teilnahmen löschen?`)&&b.delete(`/redaktion/umfragen/${J.id}`)}return(te,f)=>(v(),o(O,{title:w(J)?`Bearbeiten: ${w(J).title}`:`Neue Umfrage`},{default:_(()=>[h(N,{title:w(J)?`Umfrage bearbeiten`:`Neue Umfrage`,breadcrumbs:[{label:`Umfragen`,href:`/umfragen`}]},{actions:_(()=>[w(J)?(v(),o(w(a),{key:0,variant:`ghost`,class:`text-destructive hover:text-destructive`,onClick:Oe},{default:_(()=>[h(w(E)),f[9]||=s(` Löschen`,-1)]),_:1})):C(``,!0),w(J)?(v(),o(w(a),{key:1,variant:`outline`,"as-child":``},{default:_(()=>[h(w(re),{href:w(J).url},{default:_(()=>[s(g(w(J).published?`Ansehen & Ergebnisse`:`Vorschau`),1)]),_:1},8,[`href`])]),_:1})):C(``,!0),h(w(a),{disabled:w(Y).processing,onClick:$},{default:_(()=>[w(Y).processing?(v(),o(w(ee),{key:0,class:`animate-spin`})):(v(),o(w(le),{key:1})),f[10]||=s(` Speichern`,-1)]),_:1},8,[`disabled`])]),_:1},8,[`title`]),l(`form`,{class:`grid grid-cols-1 items-start gap-6 lg:grid-cols-[minmax(0,1fr)_20rem]`,onSubmit:m($,[`prevent`])},[l(`div`,I,[h(k,null,{default:_(()=>[l(`div`,L,[h(j,{id:`poll-title`,label:`Titel bzw. Frage`,error:w(Y).errors.title},{default:_(()=>[h(w(r),{id:`poll-title`,modelValue:w(Y).title,"onUpdate:modelValue":f[0]||=e=>w(Y).title=e,maxlength:`200`,placeholder:`z. B. Wie gefällt Ihnen das neue Kantinenangebot?`,class:`text-base`},null,8,[`modelValue`])]),_:1},8,[`error`]),h(j,{id:`poll-description`,label:`Einleitung (optional)`,error:w(Y).errors.description},{default:_(()=>[h(w(ne),{id:`poll-description`,modelValue:w(Y).description,"onUpdate:modelValue":f[1]||=e=>w(Y).description=e,rows:`3`,maxlength:`5000`},null,8,[`modelValue`])]),_:1},8,[`error`])])]),_:1}),Q.value?(v(),u(`p`,R,[h(w(e),{class:`mt-0.5 size-4 shrink-0 text-destructive`}),s(` Es gibt bereits `+g(w(J).responses)+` `+g(w(J).responses===1?`Teilnahme`:`Teilnahmen`)+`. Tippfehler lassen sich korrigieren – neue oder entfernte Antworten verfälschen aber die Ergebnisse. `,1)])):C(``,!0),w(Y).errors.questions?(v(),u(`p`,z,g(w(Y).errors.questions),1)):C(``,!0),(v(!0),u(S,null,d(w(Y).questions,(e,i)=>(v(),o(k,{key:e.id},{default:_(()=>[l(`div`,B,[l(`div`,V,[l(`span`,H,[(v(),o(c(q[e.type].icon),{class:`size-3.5`})),s(` Frage `+g(i+1)+` · `+g(q[e.type].label),1)]),f[11]||=l(`span`,{class:`flex-1`},null,-1),h(w(a),{type:`button`,variant:`ghost`,size:`icon`,class:`size-8`,disabled:i===0,"aria-label":`Nach oben`,onClick:e=>Z(i,-1)},{default:_(()=>[h(w(oe))]),_:1},8,[`disabled`,`onClick`]),h(w(a),{type:`button`,variant:`ghost`,size:`icon`,class:`size-8`,disabled:i===w(Y).questions.length-1,"aria-label":`Nach unten`,onClick:e=>Z(i,1)},{default:_(()=>[h(w(ae))]),_:1},8,[`disabled`,`onClick`]),h(w(a),{type:`button`,variant:`ghost`,size:`icon`,class:`size-8 text-muted-foreground hover:text-destructive`,disabled:w(Y).questions.length===1,"aria-label":`Frage entfernen`,onClick:e=>w(Y).questions.splice(i,1)},{default:_(()=>[h(w(E))]),_:1},8,[`disabled`,`onClick`])]),h(w(r),{modelValue:e.label,"onUpdate:modelValue":t=>e.label=t,maxlength:`300`,placeholder:w(Y).questions.length===1?`Frage (z. B. wie der Titel)`:`Frage`,"aria-label":`Frage ${i+1}`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`,`aria-label`]),e.options?(v(),u(`div`,U,[(v(!0),u(S,null,d(e.options,(n,i)=>(v(),u(`div`,{key:n.id,class:`flex items-center gap-2`},[l(`span`,W,g(i+1)+`.`,1),h(w(r),{modelValue:n.label,"onUpdate:modelValue":e=>n.label=e,maxlength:`200`,placeholder:`Antwort ${i+1}`,class:`h-9`,"aria-label":`Antwort ${i+1}`},null,8,[`modelValue`,`onUpdate:modelValue`,`placeholder`,`aria-label`]),h(w(a),{type:`button`,variant:`ghost`,size:`icon`,class:`size-8 shrink-0 text-muted-foreground`,disabled:e.options.length<=2,"aria-label":`Antwort entfernen`,onClick:t=>e.options.splice(i,1)},{default:_(()=>[h(w(t))]),_:1},8,[`disabled`,`onClick`])]))),128)),e.options.length<20?(v(),o(w(a),{key:0,type:`button`,variant:`ghost`,size:`sm`,class:`justify-self-start`,onClick:t=>e.options.push({id:K(),label:``})},{default:_(()=>[h(w(ce)),f[12]||=s(` Antwort hinzufügen`,-1)]),_:1},8,[`onClick`])):C(``,!0)])):C(``,!0),e.type===`scale`?(v(),u(`div`,ue,[h(j,{id:`scale-${e.id}`,label:`Stufen`},{default:_(()=>[x(l(`select`,{id:`scale-${e.id}`,"onUpdate:modelValue":t=>e.scale=t,class:`h-9 rounded-md border bg-background px-2 text-sm`},[...f[13]||=[l(`option`,{value:5},`1 bis 5`,-1),l(`option`,{value:10},`1 bis 10`,-1)]],8,de),[[p,e.scale,void 0,{number:!0}]])]),_:2},1032,[`id`]),h(j,{id:`min-${e.id}`,label:`1 bedeutet`},{default:_(()=>[h(w(r),{id:`min-${e.id}`,modelValue:e.min_label,"onUpdate:modelValue":t=>e.min_label=t,maxlength:`60`,class:`h-9`},null,8,[`id`,`modelValue`,`onUpdate:modelValue`])]),_:2},1032,[`id`]),h(j,{id:`max-${e.id}`,label:`${e.scale} bedeutet`},{default:_(()=>[h(w(r),{id:`max-${e.id}`,modelValue:e.max_label,"onUpdate:modelValue":t=>e.max_label=t,maxlength:`60`,class:`h-9`},null,8,[`id`,`modelValue`,`onUpdate:modelValue`])]),_:2},1032,[`id`,`label`])])):C(``,!0),l(`div`,fe,[l(`label`,pe,[h(w(n),{modelValue:e.required,"onUpdate:modelValue":t=>e.required=t},null,8,[`modelValue`,`onUpdate:modelValue`]),f[14]||=s(` Pflichtfrage`,-1)]),e.type===`multiple`?(v(),u(`label`,me,[f[15]||=s(` Höchstens `,-1),h(w(r),{modelValue:e.max,"onUpdate:modelValue":t=>e.max=t,modelModifiers:{number:!0},type:`number`,min:`1`,max:e.options.length-1,placeholder:`alle`,class:`h-8 w-20`},null,8,[`modelValue`,`onUpdate:modelValue`,`max`]),f[16]||=s(` Antworten `,-1)])):C(``,!0)])])]),_:2},1024))),128)),l(`div`,he,[f[17]||=l(`span`,{class:`mr-1 self-center text-sm text-muted-foreground`},`Frage hinzufügen:`,-1),(v(),u(S,null,d(q,(e,t)=>h(w(a),{key:t,type:`button`,variant:`outline`,size:`sm`,disabled:w(Y).questions.length>=30,onClick:e=>X(t)},{default:_(()=>[(v(),o(c(e.icon))),s(` `+g(e.label),1)]),_:2},1032,[`disabled`,`onClick`])),64))])]),l(`div`,ge,[h(k,{title:`Veröffentlichung`},{default:_(()=>[l(`div`,_e,[l(`label`,ve,[f[18]||=l(`span`,null,[l(`span`,{class:`font-medium`},`Veröffentlicht`),l(`span`,{class:`block text-xs text-muted-foreground`},`Sonst nur für die Redaktion sichtbar.`)],-1),h(w(n),{modelValue:w(Y).published,"onUpdate:modelValue":f[2]||=e=>w(Y).published=e},null,8,[`modelValue`])]),w(Y).published?(v(),o(j,{key:0,id:`poll-start`,label:`Beginn (optional)`,hint:`Leer = sofort.`,error:w(Y).errors.published_at},{default:_(()=>[h(w(r),{id:`poll-start`,modelValue:w(Y).published_at,"onUpdate:modelValue":f[3]||=e=>w(Y).published_at=e,type:`datetime-local`},null,8,[`modelValue`])]),_:1},8,[`error`])):C(``,!0),h(j,{id:`poll-end`,label:`Ende (optional)`,hint:`Leer = läuft, bis Sie sie beenden.`,error:w(Y).errors.closes_at},{default:_(()=>[h(w(r),{id:`poll-end`,modelValue:w(Y).closes_at,"onUpdate:modelValue":f[4]||=e=>w(Y).closes_at=e,type:`datetime-local`},null,8,[`modelValue`])]),_:1},8,[`error`]),l(`label`,ye,[l(`span`,null,[f[19]||=l(`span`,{class:`font-medium`},`Benachrichtigen`,-1),l(`span`,be,g(w(J)?.announced?`Bereits angekündigt.`:`Die Zielgruppe bekommt zum Start einen Hinweis.`),1)]),h(w(n),{modelValue:w(Y).announce,"onUpdate:modelValue":f[5]||=e=>w(Y).announce=e,disabled:w(J)?.announced},null,8,[`modelValue`,`disabled`])])])]),_:1}),h(k,{title:`Ergebnisse & Datenschutz`},{default:_(()=>[l(`div`,xe,[h(j,{id:`poll-visibility`,label:`Ergebnisse sichtbar`,error:w(Y).errors.results_visibility},{default:_(()=>[x(l(`select`,{id:`poll-visibility`,"onUpdate:modelValue":f[6]||=e=>w(Y).results_visibility=e,class:`h-9 w-full rounded-md border bg-background px-2 text-sm`},[(v(!0),u(S,null,d(i.visibilityOptions,(e,t)=>(v(),u(`option`,{key:t,value:t},g(e),9,Se))),128))],512),[[p,w(Y).results_visibility]])]),_:1},8,[`error`]),l(`label`,Ce,[f[20]||=l(`span`,null,[l(`span`,{class:`font-medium`},`Anonym`),l(`span`,{class:`block text-xs text-muted-foreground`},`Ohne Namen gespeichert – auch die Redaktion sieht nicht, wer wie abgestimmt hat.`)],-1),h(w(n),{modelValue:w(Y).anonymous,"onUpdate:modelValue":f[7]||=e=>w(Y).anonymous=e,disabled:Q.value},null,8,[`modelValue`,`disabled`])]),w(Y).errors.anonymous?(v(),u(`p`,we,g(w(Y).errors.anonymous),1)):C(``,!0),f[21]||=l(`p`,{class:`text-xs text-muted-foreground`},`Freitext-Antworten sieht nur die Redaktion.`,-1)])]),_:1}),h(k,{title:`Wer darf teilnehmen?`},{default:_(()=>[l(`p`,Te,[h(w(D),{class:`mt-0.5 size-4 shrink-0`}),s(` `+g(De.value?`Nur Personen, die mindestens eine Angabe erfüllen.`:`Alle – oder unten eingrenzen.`),1)]),h(M,{modelValue:w(Y).audience,"onUpdate:modelValue":f[8]||=e=>w(Y).audience=e,options:i.audienceOptions,"exclude-hint":`Sehen die Umfrage nie – auch wenn oben etwas passt.`},null,8,[`modelValue`,`options`])]),_:1})])],32)]),_:1},8,[`title`]))}};export{G as default};