Loheide-eu-mitarbeiterplatt.../public/build/assets/SupportButton-D4-4m2ZS.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 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,H as n,M as r,Ot as i,P as a,S as o,T as s,j as c,w as l,x as u}from"./ui-DTELwomD.js";import{C as d,Et as f,O as p,S as m,T as h,_t as g,a as _,g as v,k as y,kt as b,nt as x,ot as S,q as C,rt as w,s as T,w as E,wt as D,z as O}from"./framework-CFqPLBV8.js";import{t as k}from"./thumbs-up-De1ZvtVg.js";import{s as A}from"./app-DPANCdgI.js";var j={key:0,class:`flex items-start justify-between gap-4 rounded-md border p-3 text-sm`},M={__name:`IdeaDialog`,props:O({idea:{type:Object,default:null}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:[`update:open`],setup(f){let g=f,T=x(f,`open`),O=_({title:``,body:``,anonymous:!1});w(T,e=>{e&&(O.clearErrors(),O.defaults({title:g.idea?.title??``,body:g.idea?.body??``,anonymous:!1}),O.reset())});function k(){let e={preserveScroll:!0,onSuccess:()=>T.value=!1};g.idea?O.put(`/ideen/${g.idea.id}`,e):O.post(`/ideen`,e)}return(g,_)=>(C(),d(D(t),{open:T.value,"onUpdate:open":_[4]||=e=>T.value=e},{default:S(()=>[y(D(s),{class:`sm:max-w-xl`},{default:S(()=>[y(D(o),null,{default:S(()=>[y(D(u),null,{default:S(()=>[p(b(f.idea?`Idee bearbeiten`:`Idee einreichen`),1)]),_:1}),y(D(l),null,{default:S(()=>[..._[5]||=[p(`Was ließe sich verbessern? Beschreiben Sie kurz das Problem und Ihren Vorschlag.`,-1)]]),_:1})]),_:1}),m(`form`,{id:`idea-form`,class:`grid gap-5`,onSubmit:v(k,[`prevent`])},[y(A,{id:`idea-title`,label:`Titel`,error:D(O).errors.title},{default:S(()=>[y(D(r),{id:`idea-title`,modelValue:D(O).title,"onUpdate:modelValue":_[0]||=e=>D(O).title=e,maxlength:`160`,placeholder:`z. B. Fahrradständer mit Überdachung`},null,8,[`modelValue`])]),_:1},8,[`error`]),y(A,{id:`idea-body`,label:`Beschreibung`,error:D(O).errors.body},{default:S(()=>[y(D(c),{id:`idea-body`,modelValue:D(O).body,"onUpdate:modelValue":_[1]||=e=>D(O).body=e,rows:`7`,maxlength:`5000`,placeholder:`Was ist heute schwierig? Was schlagen Sie vor? Wem würde es helfen?`},null,8,[`modelValue`])]),_:1},8,[`error`]),f.idea?E(``,!0):(C(),h(`label`,j,[_[6]||=m(`span`,null,[m(`span`,{class:`font-medium`},`Anonym einreichen`),m(`span`,{class:`block text-xs text-muted-foreground`},`Ihr Name wird nicht gespeichert – auch nicht für das Gremium. Dann können Sie die Idee später nicht mehr bearbeiten und bekommen keine Rückmeldung per Benachrichtigung.`)],-1),y(D(n),{modelValue:D(O).anonymous,"onUpdate:modelValue":_[2]||=e=>D(O).anonymous=e},null,8,[`modelValue`])]))],32),y(D(e),null,{default:S(()=>[y(D(a),{variant:`ghost`,onClick:_[3]||=e=>T.value=!1},{default:S(()=>[..._[7]||=[p(`Abbrechen`,-1)]]),_:1}),y(D(a),{type:`submit`,form:`idea-form`,disabled:D(O).processing},{default:S(()=>[D(O).processing?(C(),d(D(i),{key:0,class:`animate-spin`})):E(``,!0),p(` `+b(f.idea?`Speichern`:`Einreichen`),1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]))}},N=[`disabled`,`aria-pressed`,`title`],P={class:`text-sm font-semibold`},F={key:0,class:`text-[11px]`},I={__name:`SupportButton`,props:{idea:{type:Object,required:!0},disabled:{type:Boolean,default:!1},large:{type:Boolean,default:!1}},setup(e){let t=e,n=g(!!t.idea.supported),r=g(t.idea.supports);w(()=>[t.idea.supported,t.idea.supports],([e,t])=>{n.value=!!e,r.value=t});function i(){let e=!n.value;n.value=e,r.value+=e?1:-1,T.visit(`/ideen/${t.idea.id}/unterstuetzen`,{method:e?`post`:`delete`,preserveScroll:!0,preserveState:!0,onError:()=>{n.value=!e,r.value+=e?-1:1}})}return(t,a)=>(C(),h(`button`,{type:`button`,disabled:e.disabled,"aria-pressed":n.value,title:e.disabled?`Ihre eigene Idee`:n.value?`Unterstützung zurücknehmen`:`Idee unterstützen`,class:f([`flex shrink-0 flex-col items-center justify-center rounded-md border tabular-nums transition-colors disabled:cursor-default disabled:opacity-70`,[e.large?`min-w-20 gap-1 px-3 py-2.5`:`size-14 gap-0.5`,n.value?`border-brand bg-brand text-brand-foreground`:`bg-card hover:border-brand/50 hover:bg-brand-soft`]]),onClick:i},[y(D(k),{class:f([e.large?`size-5`:`size-4`,n.value?`fill-current`:``])},null,8,[`class`]),m(`span`,P,b(r.value),1),e.large?(C(),h(`span`,F,b(n.value?`Unterstützt`:`Unterstützen`),1)):E(``,!0)],10,N))}};export{M as n,I as t};