PageSourceSearch

https://mobilisons.ch/assets/GroupSettings-DT8GWngz.js

js mobilisons.ch collected 2026-10-04 07:02:51 UTC 10,552 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TextEditor-l4NoBZwq.js","assets/TextEditor.vue_vue_type_style_index_1_lang-BYv221JB.js","assets/main-C5kmeqIZ.js","assets/main-MxJO6U0N.css","assets/search-rSHr9WK5.js","assets/ActorInline-C8ueabjn.js","assets/ActorInline-D1Mx0X0R.css","assets/FormatBold-DFUnfQuj.js","assets/FormatItalic-B69ntTzC.js","assets/FormatUnderline-DjBsKOgg.js","assets/FormatHeader1-DwAEqk-T.js","assets/FormatHeader2-D5Ucs7k9.js","assets/FormatHeader3-DCjcRgyX.js","assets/Link-CBNTcTfQ.js","assets/LinkOff-rlvENtcd.js","assets/Image-a5sI-UFn.js","assets/FormatListBulleted-BvvxxDP_.js","assets/FormatListNumbered-CDwF_WXP.js","assets/FormatQuoteClose-B9HPbpUA.js","assets/Undo-D3QA14hL.js","assets/Redo-pAhHCbhK.js","assets/TextEditor-DRawCaE7.css","assets/FullAddressAutoComplete-CMTsny1V.js","assets/FullAddressAutoComplete.vue_vue_type_style_index_0_lang-Bc4gMj3-.js","assets/leaflet-src-pf1hv2aY.js","assets/AddressInfo-CJ3QiXCE.js","assets/AddressInfo-Dhzh5TVu.css","assets/Loading-CLeq3Mw6.js","assets/FullAddressAutoComplete-CyH3mo_7.css"])))=>i.map(i=>d[i]);
2import{e as ye,a8 as ge,f as _e,bm as we,Y as Ve,bn as Ae,R as x,j as h,k as e,h as V,l as Ue,m as E,o as A,s as r,al as xe,w as i,i as s,t as u,v as m,bo as L,a6 as he,bp as T,a4 as Se,av as Ge,bq as z,br as B,an as 
2j,a7 as U,c as f,aw as ke,F as b,x as c,aa as Ee}from"./main-C5kmeqIZ.js";import{_ as Y}from"./PictureUpload.vue_vue_type_script_setup_true_lang-KaB13DVP.js";import{b as $}from"./image-14KDAsPR.js";import{u as Te,a as Ie}from"./config-YqwnzTW7.js";import{u as Me,a as Oe}from"./group-Bgxh5BFw.js";import{u as Ce}from"./head-DQLykLxL.js";import"./Upload-D6ZbfAda.js";const Pe={key:1,class:"container mx-auto mb-6"},Re={class:"label"},De={class:"field"},Fe={class:"field"},Ne={class:"pl-6 flex items-center gap-2"},Le={class:"label"},ze={class:"field"},Be={class:"field"},je={class:"field"},Ye={class:"flex flex-wrap gap-2 my-2"},Xe=ye({__name:"GroupSettings",props:{preferredUsername:{}},setup(q){const K=z(()=>B(()=>import("./TextEditor-l4NoBZwq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),H=z(()=>B(()=>import("./FullAddressAutoComplete-CMTsny1V.js"),__vite__mapDeps([22,23,2,3,24,25,26,27,28]))),Q=q,I=f(()=>Q.preferredUsername),{currentActor:M}=ge(),{group:d,loading:O,onResult:W}=Me(I),{t:l}=_e({useScope:"global"});Ce({title:f(()=>l("Group settings"))});const J=j("notifier"),y=U(null),g=U(null),S=U([]),G=U(!1),o=U(),{onDone:X,onError:Z,mutate:ee,loading:ae}=Oe();X(()=>{J?.success(l("Group settings saved"))}),Z(n=>{re(n)});const C=async()=>{await window.navigator.clipboard.writeText(d.value?.url??""),G.value=!0,setTimeout(()=>{G.value=!1},2e3)};W(async({data:n})=>{if(n){o.value={...n.group};try{y.value=await $(o.value?.avatar),g.value=await $(o.value?.banner)}catch(a){console.error(a)}}});const le=f(()=>{let n={},a={};const p={...o.value};let v;return p.physicalAddress?v={...p.physicalAddress}:v=p.physicalAddress,p.__typename&&delete p.__typename,v&&v.__typename&&delete v.__typename,delete v?.pictureInfo,delete p.avatar,delete p.banner,y.value&&(n={avatar:{media:{name:y.value?.name,alt:`${o.value?.preferredUsername}'s avatar`,file:y.value}}}),g.value&&(a={banner:{media:{name:g.value?.name,alt:`${o.value?.preferredUsername}'s banner`,file:g.value}}}),{id:d.value?.id??"",name:o.value?.name,summary:o.value?.summary,visibility:o.value?.visibility,openness:o.value?.openness,manuallyApprovesFollowers:o.value?.manuallyApprovesFollowers,allowSeeParticipants:o.value?.allowSeeParticipants,physicalAddress:v,...n,...a}}),oe=f(()=>window.isSecureContext),P=f({get(){return o.value?.physicalAddress??null},set(n){o.value&&n&&(n.id||n.geom)&&(o.value={...o.value,physicalAddress:n})}}),te=Te(),ne=Ie(),re=n=>{n?.networkError?.name==="ServerParseError"&&n?.networkError?.response?.status===4
213&&S.value.push(l("Unable to create the group. One of the pictures may be too heavy.")),S.value.push(...(n.graphQLErrors||[]).map(({message:a})=>a))},se=f(()=>ue(Ee.ADMINISTRATOR)),ue=n=>{const a=Array.isArray(n)?n:[n];return R.value?.total>0&&a.includes(R.value?.elements[0].role)},R=f(()=>ie.value?.memberships??{total:0,elements:[]}),{person:ie}=we(I),D=j("dialog"),de=()=>{console.debug("confirm delete group",D),D?.confirm({title:l("Delete group"),message:l("Are you sure you want to <b>completely delete</b> this group? All members - including remote ones - will be notified and removed from the group, and <b>all of the group data (events, posts, discussions, todos…) will be irretrievably destroyed</b>."),confirmText:l("Delete group"),cancelText:l("Cancel"),variant:"danger",hasIcon:!0,onConfirm:()=>me({groupId:d.value?.id})})},{mutate:me,onDone:pe}=Ve(Ae),ve=ke();return pe(()=>{ve.push({name:x.MY_GROUPS})}),(n,a)=>{const p=b("breadcrumbs-nav"),v=b("o-loading"),be=b("o-input"),_=b("o-field"),w=b("o-radio"),ce=b("o-tooltip"),k=b("o-button"),F=b("o-checkbox"),N=b("o-notification");return c(),h("div",null,[e(d)?(c(),V(p,{key:0,links:[{name:e(x).GROUP,params:{preferredUsername:e(E)(e(d))},text:e(Ue)(e(d))},{name:e(x).GROUP_SETTINGS,params:{preferredUsername:e(E)(e(d))},text:e(l)("Settings")},{name:e(x).GROUP_PUBLIC_SETTINGS,params:{preferredUsername:e(E)(e(d))},text:e(l)("Group settings")}]},null,8,["links"])):A("",!0),r(v,{active:e(O)},null,8,["active"]),e(d)&&se.value?(c(),h("section",Pe,[o.value?(c(),h("form",{key:0,onSubmit:a[12]||(a[12]=xe(t=>e(ee)(le.value),["prevent"]))},[r(_,{label:e(l)("Group name"),"label-for":"group-settings-name"},{default:i(()=>[r(be,{modelValue:o.value.name,"onUpdate:modelValue":a[0]||(a[0]=t=>o.value.name=t),id:"group-settings-name",expanded:""},null,8,["modelValue"])]),_:1},8,["label"]),r(_,{label:e(l)("Group short description")},{default:i(()=>[e(M)?(c(),V(e(K),{key:0,mode:"basic",modelValue:o.value.summary,"onUpdate:modelValue":a[1]||(a[1]=t=>o.value.summary=t),maxSize:500,"aria-label":e(l)("Group description body"),currentActor:e(M),placeholder:e(l)("A few lines about your group")},null,8,["modelValue","aria-label","currentActor","placeholder"])):A("",!0)]),_:1},8,["label"]),r(_,{label:e(l)("Avatar")},{default:i(()=>[r(Y,{textFallback:e(l)("Avatar"),modelValue:y.value,"onUpdate:modelValue":a[2]||(a[2]=t=>y.value=t),defaultImage:e(d).avatar,maxSize:e(te)},null,8,["textFallback","modelValue","defaultImage","maxSize"])]),_:1},8,["label"]),r(_,{label:e(l)("Banner")},{default:i(()=>[r(Y,{textFallback:e(l)("Banner"),modelValue:g.value,"onUpdate:modelValue":a[3]||(a[3]=t=>g.value=t),defaultImage:e(d).banner,maxSize:e(ne)},null,8,["textFallback","modelValue","defaultImage","maxSize"])]),_:1},8,["label"]),s("p",Re,u(e(l)("Group visibility")),1),s("div",De,[r(w,{modelValue:o.value.visibility,"onUpdate:modelValue":a[4]||(a[4]=t=>o.value.visibility=t),name:"groupVisibility","native-value":e(L).PUBLIC},{default:i(()=>[m(u(e(l)("Visible everywhere on the web")),1),a[13]||(a[13]=s("br",null,null,-1)),s("small",null,u(e(l)("The group will be publicly listed in search results and may be suggested in the explore section. Only public informations will be shown on it's page.")),1)]),_:1},8,["modelValue","native-value"])]),s("div",Fe,[r(w,{modelValue:o.value.visibility,"onUpdate:modelValue":a[5]||(a[5]=t=>o.value.visibility=t),name:"groupVisibility","native-value":e(L).UNLISTED},{default:i(()=>[m(u(e(l)("Only accessible through link")),1),a[14]||(a[14]=s("br",null,null,-1)),s("small",null,u(e(l)("You'll need to transmit the group URL so people may access the group's profile. The group won't be findable in Mobilizon's search or regular search engines.")),1)]),_:1},8,["modelValue","native-value"]),s("p",Ne,[s("code",null,u(e(d).url),1),oe.value?(c(),V(ce,{key:0,label:e(l)("URL copied to clipboard"),active:G.value,variant:"success",position:"left"},null,8,["label","active"])):A("",!0),r(k,{variant:"primary","icon-right":"content-paste","native-type":"button",onClick:C,onKeyup:he(C,["enter"])})])]),s("p",Le,u(e(l)("New members")),1),s("div",ze,[r(w,{modelValue:o.value.openness,"onUpdate:modelValue":a[6]||(a[6]=t=>o.value.openness=t),name:"groupOpenness","native-value":e(T).OPEN},{default:i(()=>[m(u(e(l)("Anyone can join freely")),1),a[15]||(a[15]=s("br",null,null,-1)),s("small",null,u(e(l)("Anyone wanting to be a member from your group will be able to from your group page.")),1)]),_:1},8,["modelValue","native-value"])]),s("div",Be,[r(w,{modelValue:o.value.openness,"onUpdate:modelValue":a[7]||(a[7]=t=>o.value.openness=t),name:"groupOpenness","native-value":e(T).MODERATED},{default:i(()=>[m(u(e(l)("Moderate new members")),1),a[16]||(a[16]=s("br",null,null,-1)),s("small",null,u(e(l)("Anyone can request being a member, but an administrator needs to approve the membership.")),1)]),_:1},8,["modelValue","native-value"])]),s("div",je,[r(w,{modelValue:o.value.openness,"onUpdate:modelValue":a[8]||(a[8]=t=>o.value.openness=t),name:"groupOpenness","native-value":e(T).INVITE_ONLY},{default:i(()=>[m(u(e(l)("Manually invite new members")),1),a[17]||(a[17]=s("br",null,null,-1)),s("small",null,u(e(l)("The only way for your group to get new members is if an admininistrator invites them.")),1)]),_:1},8,["modelValue","native-value"])]),r(_,{label:e(l)("Followers"),message:e(l)("Followers will receive new public events and posts.")},{default:i(()=>[r(F,{modelValue:o.value.manuallyApprovesFollowers,"onUpdate:modelValue":a[9]||(a[9]=t=>o.value.manuallyApprovesFollowers=t)},{default:i(()=>[m(u(e(l)("Manually approve new followers")),1)]),_:1},8,["modelValue"])]),_:1},8,["label","message"]),r(_,{label:e(l)("Permission")},{default:i(()=>[r(F,{modelValue:o.value.allowSeeParticipants,"onUpdate:modelValue":a[10]||(a[10]=t=>o.value.allowSeeParticipants=t)},{default:i(()=>[m(u(e(l)("Members can see events' participants")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),r(e(H),{label:e(l)("Group address"),modelValue:P.value,"onUpdate:modelValue":a[11]||(a[11]=t=>P.value=t),allowManualDetails:!0,hideMap:!0},null,8,["label","modelValue"]),s("div",Ye,[r(k,{loading:e(ae),type:"submit",variant:"primary"},{default:i(()=>[m(u(e(l)("Update group")),1)]),_:1},8,["loading"]),r(k,{onClick:de,variant:"danger"},{default:i(()=>[m(u(e(l)("Delete group")),1)]),_:1})])],32)):A("",!0),(c(!0),h(Se,null,Ge(S.value,(t,fe)=>(c(),V(N,{variant:"danger",key:fe},{default:i(()=>[m(u(t),1)]),_:2},1024))),128))])):e(O)?A("",!0):(c(),V(N,{key:2},{default:i(()=>[m(u(e(l)("You are not an administrator for this group.")),1)]),_:1}))])}}});
2export{Xe as default};
3//# sourceMappingURL=GroupSettings-DT8GWngz.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.