Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dist/pinia-BCiW4L1z.chunk.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import{y as G,k as H,z as K,A as Z,B as tt,C as nt,D as E,E as C,G as L,H as et,I as st,J as ot,K as ct,L as at,n as N,M as rt}from"./NcSettingsSection-BfK7eHNT-Cvwtv3xC.chunk.mjs";let W;const I=t=>W=t,q=Symbol();function A(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var w;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(w||(w={}));function dt(){const t=G(!0),o=t.run(()=>H({}));let e=[],n=[];const a=K({install(i){I(a),a._a=i,i.provide(q,a),i.config.globalProperties.$pinia=a,n.forEach(r=>e.push(r)),n=[]},use(i){return this._a?e.push(i):n.push(i),this},_p:e,_a:null,_e:t,_s:new Map,state:o});return a}const Q=()=>{};function B(t,o,e,n=Q){t.add(o);const a=()=>{t.delete(o)&&n()};return!e&&et()&&st(a),a}function m(t,...o){t.forEach(e=>{e(...o)})}const it=t=>t(),D=Symbol(),x=Symbol();function k(t,o){t instanceof Map&&o instanceof Map?o.forEach((e,n)=>t.set(n,e)):t instanceof Set&&o instanceof Set&&o.forEach(t.add,t);for(const e in o){if(!o.hasOwnProperty(e))continue;const n=o[e],a=t[e];A(a)&&A(n)&&t.hasOwnProperty(e)&&!E(n)&&!C(n)?t[e]=k(a,n):t[e]=n}return t}const ut=Symbol();function ft(t){return!A(t)||!Object.prototype.hasOwnProperty.call(t,ut)}const{assign:p}=Object;function lt(t){return!!(E(t)&&t.effect)}function pt(t,o,e,n){const{state:a,actions:i,getters:r}=o,j=e.state.value[t];let h;function d(){j||(e.state.value[t]=a?a():{});const y=at(e.state.value[t]);return p(y,i,Object.keys(r||{}).reduce((b,_)=>(b[_]=K(N(()=>{I(e);const v=e._s.get(t);return r[_].call(v,v)})),b),{}))}return h=R(t,d,o,e,n,!0),h}function R(t,o,e={},n,a,i){let r;const j=p({actions:{}},e),h={deep:!0};let d,y,b=new Set,_=new Set,v;const S=n.state.value[t];!i&&!S&&(n.state.value[t]={}),H({});let F;function J(s){let c;d=y=!1,typeof s=="function"?(s(n.state.value[t]),c={type:w.patchFunction,storeId:t,events:v}):(k(n.state.value[t],s),c={type:w.patchObject,payload:s,storeId:t,events:v});const u=F=Symbol();ct().then(()=>{F===u&&(d=!0)}),y=!0,m(b,c,n.state.value[t])}const T=i?function(){const{state:s}=e,c=s?s():{};this.$patch(u=>{p(u,c)})}:Q;function U(){r.stop(),b.clear(),_.clear(),n._s.delete(t)}const z=(s,c="")=>{if(D in s)return s[x]=c,s;const u=function(){I(n);const P=Array.from(arguments),$=new Set,M=new Set;function X(f){$.add(f)}function Y(f){M.add(f)}m(_,{args:P,name:u[x],store:l,after:X,onError:Y});let g;try{g=s.apply(this&&this.$id===t?this:l,P)}catch(f){throw m(M,f),f}return g instanceof Promise?g.then(f=>(m($,f),f)).catch(f=>(m(M,f),Promise.reject(f))):(m($,g),g)};return u[D]=!0,u[x]=c,u},V={_p:n,$id:t,$onAction:B.bind(null,_),$patch:J,$reset:T,$subscribe(s,c={}){const u=B(b,s,c.detached,()=>P()),P=r.run(()=>ot(()=>n.state.value[t],$=>{(c.flush==="sync"?y:d)&&s({storeId:t,type:w.direct,events:v},$)},p({},h,c)));return u},$dispose:U},l=nt(V);n._s.set(t,l);const O=(n._a&&n._a.runWithContext||it)(()=>n._e.run(()=>(r=G()).run(()=>o({action:z}))));for(const s in O){const c=O[s];if(E(c)&&!lt(c)||C(c))i||(S&&ft(c)&&(E(c)?c.value=S[s]:k(c,S[s])),n.state.value[t][s]=c);else if(typeof c=="function"){const u=z(c,s);O[s]=u,j.actions[s]=c}}return p(l,O),p(L(l),O),Object.defineProperty(l,"$state",{get:()=>n.state.value[t],set:s=>{J(c=>{p(c,s)})}}),n._p.forEach(s=>{p(l,r.run(()=>s({store:l,app:n._a,pinia:n,options:j})))}),S&&i&&e.hydrate&&e.hydrate(l.$state,S),d=!0,y=!0,l}function yt(t,o,e){let n;const a=typeof o=="function";n=a?e:o;function i(r,j){const h=tt();return r=r||(h?Z(q,null):null),r&&I(r),r=W,r._s.has(t)||(a?R(t,o,n,r):pt(t,n,r)),r._s.get(t)}return i.$id=t,i}function bt(t){const o=L(t),e={};for(const n in o){const a=o[n];a.effect?e[n]=N({get:()=>t[n],set(i){t[n]=i}}):(E(a)||C(a))&&(e[n]=rt(t,n))}return e}export{dt as c,yt as d,bt as s};
//# sourceMappingURL=pinia-BCiW4L1z.chunk.mjs.map
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ SPDX-FileCopyrightText: Eduardo San Martin Morote

This file is generated from multiple sources. Included packages:
- pinia
- version: 3.0.3
- version: 3.0.4
- license: MIT
1 change: 1 addition & 0 deletions dist/pinia-BCiW4L1z.chunk.mjs.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ SPDX-FileCopyrightText: Eduardo San Martin Morote

This file is generated from multiple sources. Included packages:
- pinia
- version: 3.0.3
- version: 3.0.4
- license: MIT
2 changes: 0 additions & 2 deletions dist/pinia-Bs-4aixE.chunk.mjs

This file was deleted.

1 change: 0 additions & 1 deletion dist/pinia-Bs-4aixE.chunk.mjs.map

This file was deleted.

2 changes: 1 addition & 1 deletion dist/twofactor_backupcodes-settings-personal.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import{d as U,c as A}from"./pinia-Bs-4aixE.chunk.mjs";import{f as t,j as I,e as M,l as R,k as m,m as j,n as x,p as i,o as n,c as E,u as a,w as k,d as p,t as u,q as L,s as q,F as _,i as f,v as B,x as g,b as y,_ as F,h as G}from"./NcSettingsSection-BfK7eHNT-Cvwtv3xC.chunk.mjs";import{g as H,a as $,s as P,N as w}from"./Plus-DJQMY9d_.chunk.mjs";import{c as z}from"./index-Df02w-w7.chunk.mjs";const D=H().detectLogLevel().setApp("twofactor_backupcodes").build();function J(d){const c=$().theming.name||"Nextcloud",e=window.open("",t("twofactor_backupcodes","{name} backup codes",{name:c}));if(!e)throw P(t("twofactor_backupcodes","Unable to open a new tab for printing")),new Error("Unable to open a new tab for printing");const o=e.document.createElement("h1");o.textContent=t("twofactor_backupcodes","{name} backup codes",{name:c});const s=e.document.createElement("pre");for(const b of d){const r=e.document.createTextNode(b);s.appendChild(r),s.appendChild(e.document.createElement("br"))}e.document.body.innerHTML="",e.document.body.appendChild(o),e.document.body.appendChild(s),e.print(),e.close()}async function K(){const d=I("/apps/twofactor_backupcodes/settings/create"),{data:c}=await M.post(d);return c}const v=R("twofactor_backupcodes","state"),O=U("twofactor_backupcodes",()=>{const d=m(v.enabled),c=m(v.total),e=m(v.used),o=m([]);async function s(){d.value=!1;const{codes:b,state:r}=await K();d.value=r.enabled,c.value=r.total,e.value=r.used,o.value=b}return{enabled:d,total:c,used:e,codes:o,generate:s}}),Q=["aria-label"],V=j({__name:"PersonalSettings",setup(d){const c=$().theming.name??"Nextcloud",e=O(),o=m(!1),s=x(()=>e.codes&&e.codes.length>0),b=c+"-backup-codes.txt",r=x(()=>s.value?"data:text/plain,"+encodeURIComponent(e.codes.reduce((l,C)=>l+C+`
import{d as U,c as A}from"./pinia-BCiW4L1z.chunk.mjs";import{f as t,j as I,e as M,l as R,k as m,m as j,n as x,p as i,o as n,c as E,u as a,w as k,d as p,t as u,q as L,s as q,F as _,i as f,v as B,x as g,b as y,_ as F,h as G}from"./NcSettingsSection-BfK7eHNT-Cvwtv3xC.chunk.mjs";import{g as H,a as $,s as P,N as w}from"./Plus-DJQMY9d_.chunk.mjs";import{c as z}from"./index-Df02w-w7.chunk.mjs";const D=H().detectLogLevel().setApp("twofactor_backupcodes").build();function J(d){const c=$().theming.name||"Nextcloud",e=window.open("",t("twofactor_backupcodes","{name} backup codes",{name:c}));if(!e)throw P(t("twofactor_backupcodes","Unable to open a new tab for printing")),new Error("Unable to open a new tab for printing");const o=e.document.createElement("h1");o.textContent=t("twofactor_backupcodes","{name} backup codes",{name:c});const s=e.document.createElement("pre");for(const b of d){const r=e.document.createTextNode(b);s.appendChild(r),s.appendChild(e.document.createElement("br"))}e.document.body.innerHTML="",e.document.body.appendChild(o),e.document.body.appendChild(s),e.print(),e.close()}async function K(){const d=I("/apps/twofactor_backupcodes/settings/create"),{data:c}=await M.post(d);return c}const v=R("twofactor_backupcodes","state"),O=U("twofactor_backupcodes",()=>{const d=m(v.enabled),c=m(v.total),e=m(v.used),o=m([]);async function s(){d.value=!1;const{codes:b,state:r}=await K();d.value=r.enabled,c.value=r.total,e.value=r.used,o.value=b}return{enabled:d,total:c,used:e,codes:o,generate:s}}),Q=["aria-label"],V=j({__name:"PersonalSettings",setup(d){const c=$().theming.name??"Nextcloud",e=O(),o=m(!1),s=x(()=>e.codes&&e.codes.length>0),b=c+"-backup-codes.txt",r=x(()=>s.value?"data:text/plain,"+encodeURIComponent(e.codes.reduce((l,C)=>l+C+`
`,"")):"");async function h(){await z(),o.value=!0;try{await e.generate()}catch(l){D.error("Error generating backup codes",{error:l}),P(t("twofactor_backupcodes","An error occurred while generating your backup codes"))}finally{o.value=!1}}function T(){J(!e.codes||e.codes.length===0?[]:e.codes)}return(l,C)=>(n(),i("div",{class:g(l.$style.backupcodesSettings)},[a(e).enabled?(n(),i(_,{key:1},[f("p",null,[s.value?(n(),i(_,{key:1},[p(u(a(t)("twofactor_backupcodes","These are your backup codes. Please save and/or print them as you will not be able to read the codes again later."))+" ",1),f("ul",{"aria-label":a(t)("twofactor_backupcodes","List of backup codes")},[(n(!0),i(_,null,B(a(e).codes,S=>(n(),i("li",{key:S,class:g(l.$style.backupcodesSettings__code)},u(S),3))),128))],8,Q)],64)):(n(),i(_,{key:0},[p(u(a(t)("twofactor_backupcodes","Backup codes have been generated. {used} of {total} codes have been used.",{used:a(e).used,total:a(e).total})),1)],64))]),f("p",{class:g(l.$style.backupcodesSettings__actions)},[y(a(w),{id:"generate-backup-codes",variant:"error",onClick:h},{default:k(()=>[p(u(a(t)("twofactor_backupcodes","Regenerate backup codes")),1)]),_:1}),s.value?(n(),i(_,{key:0},[y(a(w),{onClick:T},{default:k(()=>[p(u(a(t)("twofactor_backupcodes","Print backup codes")),1)]),_:1}),y(a(w),{href:r.value,download:b,variant:"primary"},{default:k(()=>[p(u(a(t)("twofactor_backupcodes","Save backup codes")),1)]),_:1},8,["href"])],64)):L("",!0)],2),f("p",null,[f("em",null,u(a(t)("twofactor_backupcodes","If you regenerate backup codes, you automatically invalidate old codes.")),1)])],64)):(n(),E(a(w),{key:0,disabled:o.value,variant:"primary",onClick:h},{icon:k(()=>[o.value?(n(),E(a(q),{key:0})):L("",!0)]),default:k(()=>[p(" "+u(a(t)("twofactor_backupcodes","Generate backup codes")),1)]),_:1},8,["disabled"]))],2))}}),W="_backupcodesSettings_bnkw8_2",X="_backupcodesSettings__code_bnkw8_7",Y="_backupcodesSettings__actions_bnkw8_13",Z={backupcodesSettings:W,backupcodesSettings__code:X,backupcodesSettings__actions:Y},ee={$style:Z},ae=F(V,[["__cssModules",ee]]),te=A(),N=G(ae);N.use(te),N.mount("#twofactor-backupcodes-settings");
//# sourceMappingURL=twofactor_backupcodes-settings-personal.mjs.map
2 changes: 1 addition & 1 deletion dist/user_ldap-settings-admin.mjs

Large diffs are not rendered by default.

30 changes: 21 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,33 @@
],
"dependencies": {
"@mdi/svg": "^7.4.47",
"@nextcloud/auth": "^2.5.3",
"@nextcloud/axios": "^2.5.2",
"@nextcloud/calendar-availability-vue": "^3.0.0",
"@nextcloud/capabilities": "^1.2.1",
"@nextcloud/dialogs": "^7.1.0",
"@nextcloud/event-bus": "^3.3.3",
"@nextcloud/files": "^3.12.0",
"@nextcloud/initial-state": "^3.0.0",
"@nextcloud/l10n": "^3.4.1",
"@nextcloud/logger": "^3.0.2",
"@nextcloud/moment": "^1.3.5",
"@nextcloud/password-confirmation": "^6.0.2",
"@nextcloud/paths": "^2.3.0",
"@nextcloud/router": "^3.1.0",
"@nextcloud/sharing": "^0.3.0",
"@nextcloud/vue": "^9.3.0",
"pinia": "^3.0.3",
"vue": "^3.5.25"
"debounce": "^3.0.0",
"pinia": "^3.0.4",
"vue": "^3.5.25",
"webdav": "^5.8.0"
},
"devDependencies": {
"@nextcloud/browserslist-config": "^3.1.2",
"@nextcloud/e2e-test-server": "^0.4.0",
"@nextcloud/eslint-config": "^9.0.0-rc.6",
"@nextcloud/stylelint-config": "^3.1.1",
"@nextcloud/typings": "^1.10.0",
"@nextcloud/vite-config": "^2.5.2",
"@testing-library/cypress": "^10.1.0",
"@testing-library/jest-dom": "^6.9.1",
Expand All @@ -74,6 +86,7 @@
"eslint": "^9.39.1",
"eslint-plugin-cypress": "^5.2.0",
"eslint-plugin-no-only-tests": "^3.3.0",
"is-svg": "^6.1.0",
"jsdom": "^27.2.0",
"jsdom-testing-mocks": "^1.16.0",
"sass": "^1.94.2",
Expand Down
Loading