Anvil/assets/SettingsSidebar-BkgySUKU.js
André Jaenisch 754ebfe778
Updates
2024-07-27 14:18:38 +02:00

1 line
9.9 KiB
JavaScript

import{S as pe,c as fe,a as ue,d as h,e as d,m as b,b as v,t as w,f as k,h as X,k as D,l as G,o as I,p as $e,n as z}from"./index-CP70Tq58.js";import{r as ge,b as N,k as T,i as _,d as $,a as F,f as R,h as q,l as ce,u as ee,q as _e,v as me,w as he,t as A,j as P,m as M,n as B,x as te}from"./lifecycle-D_bIUHQK.js";import{e as ae}from"./each-C4g42ehH.js";import{a as de,b as K,c as Y}from"./XPro-_Ll7JVYJ.js";import{b as le,c as be,$ as ve}from"./runtime-CZkC8ltm.js";import{P as we,e as ke,K as Se,h as Le,B as Ce}from"./ZoomOut24-450rB1Ps.js";function ne(n,e,a){const t=n.slice();return t[12]=e[a],t}function Ee(n){let e,a=n[3]("settings.profile.label")+"",t;return{c(){e=F("span"),t=A(a)},l(l){e=R(l,"SPAN",{});var r=q(e);t=P(r,a),r.forEach($)},m(l,r){_(l,e,r),M(e,t)},p(l,r){r&8&&a!==(a=l[3]("settings.profile.label")+"")&&B(t,a)},d(l){l&&$(e)}}}function Ae(n){let e,a;return e=new we({props:{fill:"currentColor",class:"inline"}}),{c(){h(e.$$.fragment)},l(t){d(e.$$.fragment,t)},m(t,l){b(e,t,l),a=!0},p:z,i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function Pe(n){let e,a=n[3]("settings.account.label")+"",t;return{c(){e=F("span"),t=A(a)},l(l){e=R(l,"SPAN",{});var r=q(e);t=P(r,a),r.forEach($)},m(l,r){_(l,e,r),M(e,t)},p(l,r){r&8&&a!==(a=l[3]("settings.account.label")+"")&&B(t,a)},d(l){l&&$(e)}}}function Ne(n){let e,a;return e=new ke({props:{fill:"currentColor",class:"inline"}}),{c(){h(e.$$.fragment)},l(t){d(e.$$.fragment,t)},m(t,l){b(e,t,l),a=!0},p:z,i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function Te(n){let e,a=n[3]("settings.ssh_gpg_keys.label")+"",t;return{c(){e=F("span"),t=A(a)},l(l){e=R(l,"SPAN",{});var r=q(e);t=P(r,a),r.forEach($)},m(l,r){_(l,e,r),M(e,t)},p(l,r){r&8&&a!==(a=l[3]("settings.ssh_gpg_keys.label")+"")&&B(t,a)},d(l){l&&$(e)}}}function Fe(n){let e,a;return e=new Se({props:{fill:"currentColor",class:"inline"}}),{c(){h(e.$$.fragment)},l(t){d(e.$$.fragment,t)},m(t,l){b(e,t,l),a=!0},p:z,i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function Re(n){let e,a=n[3]("settings.appearance.label")+"",t;return{c(){e=F("span"),t=A(a)},l(l){e=R(l,"SPAN",{});var r=q(e);t=P(r,a),r.forEach($)},m(l,r){_(l,e,r),M(e,t)},p(l,r){r&8&&a!==(a=l[3]("settings.appearance.label")+"")&&B(t,a)},d(l){l&&$(e)}}}function qe(n){let e,a;return e=new Le({props:{fill:"currentColor",class:"inline"}}),{c(){h(e.$$.fragment)},l(t){d(e.$$.fragment,t)},m(t,l){b(e,t,l),a=!0},p:z,i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function Be(n){let e,a=n[3]("settings.notifications.label")+"",t;return{c(){e=F("span"),t=A(a)},l(l){e=R(l,"SPAN",{});var r=q(e);t=P(r,a),r.forEach($)},m(l,r){_(l,e,r),M(e,t)},p(l,r){r&8&&a!==(a=l[3]("settings.notifications.label")+"")&&B(t,a)},d(l){l&&$(e)}}}function Ke(n){let e,a;return e=new Ce({props:{fill:"currentColor",class:"inline"}}),{c(){h(e.$$.fragment)},l(t){d(e.$$.fragment,t)},m(t,l){b(e,t,l),a=!0},p:z,i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function Me(n){let e,a,t,l,r,f,c,C,E,m,L,g,i,u,o;function H(s){n[6](s)}let O={name:"profile",value:"profile",regionLabel:"float-start ps-2 py-1 text-surface-500",regionLead:"float-start ps-8 text-surface-500",title:n[3]("settings.profile.label"),$$slots:{lead:[Ae],default:[Ee]},$$scope:{ctx:n}};n[0]!==void 0&&(O.group=n[0]),e=new K({props:O}),D.push(()=>G(e,"group",H)),e.$on("change",n[4]);function S(s){n[7](s)}let j={name:"account",value:"account",regionLabel:"float-start ps-2 py-1 text-surface-500",regionLead:"float-start ps-8 text-surface-500",title:n[3]("settings.account.label"),$$slots:{lead:[Ne],default:[Pe]},$$scope:{ctx:n}};n[0]!==void 0&&(j.group=n[0]),l=new K({props:j}),D.push(()=>G(l,"group",S)),l.$on("change",n[4]);function se(s){n[8](s)}let Z={name:"ssh_gpg_keys",value:"ssh_gpg_keys",regionLabel:"float-start ps-2 py-1 text-surface-500",regionLead:"float-start ps-8 text-surface-500",title:n[3]("settings.ssh_gpg_keys.label"),$$slots:{lead:[Fe],default:[Te]},$$scope:{ctx:n}};n[0]!==void 0&&(Z.group=n[0]),c=new K({props:Z}),D.push(()=>G(c,"group",se)),c.$on("change",n[4]);function ie(s){n[9](s)}let y={name:"appearance",value:"appearance",regionLabel:"float-start ps-2 py-1 text-surface-500",regionLead:"float-start ps-8 text-surface-500",title:n[3]("settings.appearance.label"),$$slots:{lead:[qe],default:[Re]},$$scope:{ctx:n}};n[0]!==void 0&&(y.group=n[0]),m=new K({props:y}),D.push(()=>G(m,"group",ie)),m.$on("change",n[4]);function oe(s){n[10](s)}let x={name:"notifications",value:"notifications",regionLabel:"float-start ps-2 py-1 text-surface-500",regionLead:"float-start ps-8 text-surface-500",title:n[3]("settings.notifications.label"),$$slots:{lead:[Ke],default:[Be]},$$scope:{ctx:n}};return n[0]!==void 0&&(x.group=n[0]),i=new K({props:x}),D.push(()=>G(i,"group",oe)),i.$on("change",n[4]),{c(){h(e.$$.fragment),t=N(),h(l.$$.fragment),f=N(),h(c.$$.fragment),E=N(),h(m.$$.fragment),g=N(),h(i.$$.fragment)},l(s){d(e.$$.fragment,s),t=T(s),d(l.$$.fragment,s),f=T(s),d(c.$$.fragment,s),E=T(s),d(m.$$.fragment,s),g=T(s),d(i.$$.fragment,s)},m(s,p){b(e,s,p),_(s,t,p),b(l,s,p),_(s,f,p),b(c,s,p),_(s,E,p),b(m,s,p),_(s,g,p),b(i,s,p),o=!0},p(s,p){const J={};p&8&&(J.title=s[3]("settings.profile.label")),p&32776&&(J.$$scope={dirty:p,ctx:s}),!a&&p&1&&(a=!0,J.group=s[0],I(()=>a=!1)),e.$set(J);const Q={};p&8&&(Q.title=s[3]("settings.account.label")),p&32776&&(Q.$$scope={dirty:p,ctx:s}),!r&&p&1&&(r=!0,Q.group=s[0],I(()=>r=!1)),l.$set(Q);const U={};p&8&&(U.title=s[3]("settings.ssh_gpg_keys.label")),p&32776&&(U.$$scope={dirty:p,ctx:s}),!C&&p&1&&(C=!0,U.group=s[0],I(()=>C=!1)),c.$set(U);const V={};p&8&&(V.title=s[3]("settings.appearance.label")),p&32776&&(V.$$scope={dirty:p,ctx:s}),!L&&p&1&&(L=!0,V.group=s[0],I(()=>L=!1)),m.$set(V);const W={};p&8&&(W.title=s[3]("settings.notifications.label")),p&32776&&(W.$$scope={dirty:p,ctx:s}),!u&&p&1&&(u=!0,W.group=s[0],I(()=>u=!1)),i.$set(W)},i(s){o||(v(e.$$.fragment,s),v(l.$$.fragment,s),v(c.$$.fragment,s),v(m.$$.fragment,s),v(i.$$.fragment,s),o=!0)},o(s){w(e.$$.fragment,s),w(l.$$.fragment,s),w(c.$$.fragment,s),w(m.$$.fragment,s),w(i.$$.fragment,s),o=!1},d(s){s&&($(t),$(f),$(E),$(g)),k(e,s),k(l,s),k(c,s),k(m,s),k(i,s)}}}function Oe(n){let e=n[3]("settings.headline")+"",a;return{c(){a=A(e)},l(t){a=P(t,e)},m(t,l){_(t,a,l)},p(t,l){l&8&&e!==(e=t[3]("settings.headline")+"")&&B(a,e)},d(t){t&&$(a)}}}function je(n){let e,a;return e=new K({props:{regionLabel:"!text-3xl text-surface-500 bg-surface-100 float-start w-full text-start ps-8 pt-8 -my-2",$$slots:{default:[Oe]},$$scope:{ctx:n}}}),{c(){h(e.$$.fragment)},l(t){d(e.$$.fragment,t)},m(t,l){b(e,t,l),a=!0},p(t,l){const r={};l&32776&&(r.$$scope={dirty:l,ctx:t}),e.$set(r)},i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function re(n){let e,a=n[12]+"",t,l;return{c(){e=F("option"),t=A(a),this.h()},l(r){e=R(r,"OPTION",{});var f=q(e);t=P(f,a),f.forEach($),this.h()},h(){e.__value=l=n[12],te(e,e.__value)},m(r,f){_(r,e,f),M(e,t)},p(r,f){f&4&&a!==(a=r[12]+"")&&B(t,a),f&4&&l!==(l=r[12])&&(e.__value=l,te(e,e.__value))},d(r){r&&$(e)}}}function De(n){let e;return{c(){e=A("Matrix")},l(a){e=P(a,"Matrix")},m(a,t){_(a,e,t)},d(a){a&&$(e)}}}function Ge(n){let e;return{c(){e=A("ForgeFed")},l(a){e=P(a,"ForgeFed")},m(a,t){_(a,e,t)},d(a){a&&$(e)}}}function Ie(n){let e;return{c(){e=A("Code")},l(a){e=P(a,"Code")},m(a,t){_(a,e,t)},d(a){a&&$(e)}}}function ze(n){let e,a,t,l,r,f,c,C,E,m,L=ae(n[2]),g=[];for(let i=0;i<L.length;i+=1)g[i]=re(ne(n,L,i));return t=new Y({props:{href:"https://matrix.to/#/#general-forgefed:matrix.batsense.net",target:"_blank",rel:"noreferrer",$$slots:{default:[De]},$$scope:{ctx:n}}}),r=new Y({props:{href:"https://forgefed.org",target:"_blank",rel:"noreferrer",$$slots:{default:[Ge]},$$scope:{ctx:n}}}),c=new Y({props:{href:"https://codeberg.org/anvil/anvil",target:"_blank",rel:"noreferrer",$$slots:{default:[Ie]},$$scope:{ctx:n}}}),{c(){e=F("select");for(let i=0;i<g.length;i+=1)g[i].c();a=N(),h(t.$$.fragment),l=N(),h(r.$$.fragment),f=N(),h(c.$$.fragment),this.h()},l(i){e=R(i,"SELECT",{class:!0});var u=q(e);for(let o=0;o<g.length;o+=1)g[o].l(u);u.forEach($),a=T(i),d(t.$$.fragment,i),l=T(i),d(r.$$.fragment,i),f=T(i),d(c.$$.fragment,i),this.h()},h(){ce(e,"class","select"),n[1]===void 0&&$e(()=>n[5].call(e))},m(i,u){_(i,e,u);for(let o=0;o<g.length;o+=1)g[o]&&g[o].m(e,null);ee(e,n[1],!0),_(i,a,u),b(t,i,u),_(i,l,u),b(r,i,u),_(i,f,u),b(c,i,u),C=!0,E||(m=_e(e,"change",n[5]),E=!0)},p(i,u){if(u&4){L=ae(i[2]);let S;for(S=0;S<L.length;S+=1){const j=ne(i,L,S);g[S]?g[S].p(j,u):(g[S]=re(j),g[S].c(),g[S].m(e,null))}for(;S<g.length;S+=1)g[S].d(1);g.length=L.length}u&6&&ee(e,i[1]);const o={};u&32768&&(o.$$scope={dirty:u,ctx:i}),t.$set(o);const H={};u&32768&&(H.$$scope={dirty:u,ctx:i}),r.$set(H);const O={};u&32768&&(O.$$scope={dirty:u,ctx:i}),c.$set(O)},i(i){C||(v(t.$$.fragment,i),v(r.$$.fragment,i),v(c.$$.fragment,i),C=!0)},o(i){w(t.$$.fragment,i),w(r.$$.fragment,i),w(c.$$.fragment,i),C=!1},d(i){i&&($(e),$(a),$(l),$(f)),me(g,i),k(t,i),k(r,i),k(c,i),E=!1,m()}}}function He(n){let e,a;return e=new de({props:{aspectRatio:"auto",gap:"gap-8",height:"h-auto",width:"w-[230px]",spacing:"my-2",$$slots:{trail:[ze],lead:[je],default:[Me]},$$scope:{ctx:n}}}),{c(){h(e.$$.fragment)},l(t){d(e.$$.fragment,t)},m(t,l){b(e,t,l),a=!0},p(t,[l]){const r={};l&32783&&(r.$$scope={dirty:l,ctx:t}),e.$set(r)},i(t){a||(v(e.$$.fragment,t),a=!0)},o(t){w(e.$$.fragment,t),a=!1},d(t){k(e,t)}}}function Je(n,e,a){let t,l,r;X(n,le,o=>a(1,t=o)),X(n,be,o=>a(2,l=o)),X(n,ve,o=>a(3,r=o));let f=0;const c=ge();function C(o){c("switch-settings",o.target.value)}function E(){t=he(this),le.set(t)}function m(o){f=o,a(0,f)}function L(o){f=o,a(0,f)}function g(o){f=o,a(0,f)}function i(o){f=o,a(0,f)}function u(o){f=o,a(0,f)}return[f,t,l,r,C,E,m,L,g,i,u]}class Qe extends pe{constructor(e){super(),fe(this,e,Je,He,ue,{})}}Qe.__docgen={version:3,name:"SettingsSidebar.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[{visibility:"public",description:null,keywords:[],name:"switch-settings"}],slots:[],refs:[]};export{Qe as S};