Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,16 @@ async function onSubmit() {
{{ t('encryption', 'If you do not remember your old password you can ask your administrator to recover your files.') }}
</NcNoteCard>

<NcPasswordField :label="t('encryption', 'Old log-in password')" />
<NcPasswordField :label="t('encryption', 'Current log-in password')" />
<NcPasswordField
v-model="oldPrivateKeyPassword"
required
name="oldPassword"
:label="t('encryption', 'Old log-in password')" />
<NcPasswordField
v-model="newPrivateKeyPassword"
required
name="newPassword"
:label="t('encryption', 'Current log-in password')" />

<NcButton
type="submit"
Expand Down
2 changes: 1 addition & 1 deletion dist/encryption-settings_personal.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import{b,p as P,o as p,f as F,k as v,w as u,c as m,u as e,j as f,t as g,h as U,N as x,l,n as j,z,e as I}from"./Web-4aXjob9I.chunk.mjs";import{c as w,i as h}from"./index-C7qAK2mh.chunk.mjs";import{a as S,c as B,b as K}from"./index-DL1yHC1K-C7Mzn6Sf.chunk.mjs";import{l as R}from"./public-C1mLBHT3.chunk.mjs";import{t as r}from"./translation-DoG5ZELJ-CWq5lJfa.chunk.mjs";import{b as k}from"./index-BRcsAfAF.chunk.mjs";import{N as V}from"./mdi-CqCJTJVx.chunk.mjs";import{N as C}from"./ContentCopy-DJQcqK_5.chunk.mjs";import"./PencilOutline-lHxGrdve.chunk.mjs";import"./createElementId-DhjFt1I9-DRuXW_VL.chunk.mjs";import"./NcTextArea-Dxzj4zdb-DvZrWIs0.chunk.mjs";import"./NcBreadcrumbs-5gl8Syfa-BX7fTej5.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-CqC8WnLz.chunk.mjs";import"./NcModal-DUWLRm_F-QkQsKf6T.chunk.mjs";/* empty css */import"./NcAvatar-M3-CbKbq-CGIiXkGL.chunk.mjs";import"./NcContent-BhMoPROW-DTM3ynCr.chunk.mjs";import{N as T}from"./logger-D3RVzcfQ-B4AClKUz.chunk.mjs";import"./TrashCanOutline-B_y8GQFM.chunk.mjs";import{N as q}from"./NcCheckboxRadioSwitch-D8Dfv4iw-VPGmA24O.chunk.mjs";import"./Plus-B9XGmT2_.chunk.mjs";import"./index-tV8pgMgi.chunk.mjs";import"./TrayArrowDown-DZjmYF5a.chunk.mjs";import"./index-jcDbJxy5.chunk.mjs";import"./index-K8P_Ih2p.chunk.mjs";import"./index-BPc0NoY0.chunk.mjs";import"./NcEmojiPicker-Bpw-68QP-Bf2xjztS.chunk.mjs";import"./NcEmptyContent-CGAPqk4S-_iibJX4g.chunk.mjs";import"./index-td7_1PAl.chunk.mjs";import{N as M,I as E,l as O}from"./types-CND2Ee5K.chunk.mjs";/* empty css */import"./NcInputField-B1bGxYHt-BOHBVCPq.chunk.mjs";import{N as _}from"./NcPasswordField-Be5_qcfm-BUSS7p7Y.chunk.mjs";import"./index-DMaY-vze.chunk.mjs";import"./NcTextField.vue_vue_type_script_setup_true_lang-BQHjkK8r-BB2fhdke.chunk.mjs";import"./NcSelectTags-D7qWNjXa-MfgNIWSR.chunk.mjs";import"./NcUserBubble-CDQa0hGy-BxOcH8Do.chunk.mjs";import"./NcUserStatusIcon-DsviB2Cr-C0S9RnqH.chunk.mjs";import"./emoji-C8k9NUlo-C5D-rZyy.chunk.mjs";import"./colors-BDeMBgfq-FBweF9ga.chunk.mjs";import{w as Y}from"./index-BWlXKV4T.chunk.mjs";import"./util-BcZIBtn7.chunk.mjs";import"./ArrowRight-3hdWfV3g.chunk.mjs";const A=b({__name:"SettingsPersonalChangePrivateKey",props:{recoveryEnabledForUser:{type:Boolean}},emits:["updated"],setup(c,{emit:a}){const s=a,n=P("form"),t=l(!1),o=l(!1),i=l(""),y=l("");async function N(){if(!t.value){t.value=!0,o.value=!1;try{await w.post(k("/apps/encryption/ajax/updatePrivateKeyPassword"),{oldPassword:i.value,newPassword:y.value}),i.value=y.value="",n.value?.reset(),s("updated")}catch(d){h(d)&&d.response&&d.response.data?.data?.message&&S(d.response.data.data.message),o.value=!0}finally{t.value=!1}}}return(d,J)=>(p(),F("form",{ref:"form",onSubmit:x(N,["prevent"])},[v(e(M),{label:e(r)("encryption","Update private key password"),description:e(r)("encryption","Your private key password no longer matches your log-in password. Set your old private key password to your current log-in password.")},{default:u(()=>[c.recoveryEnabledForUser?(p(),m(e(V),{key:0},{default:u(()=>[f(g(e(r)("encryption","If you do not remember your old password you can ask your administrator to recover your files.")),1)]),_:1})):U("",!0),v(e(_),{label:e(r)("encryption","Old log-in password")},null,8,["label"]),v(e(_),{label:e(r)("encryption","Current log-in password")},null,8,["label"]),v(e(T),{type:"submit",variant:"primary"},{default:u(()=>[f(g(e(r)("encryption","Update")),1)]),_:1})]),_:1},8,["label","description"])],544))}}),D=b({__name:"SettingsPersonalEnableRecovery",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(c){const a=j(c,"modelValue"),s=l(!1);return z(a,()=>{s.value=!0}),Y([a],async([n],[t])=>{if(n===t){s.value=!1;return}const o=B(r("encryption","Updating recovery keys. This can take some time…"));try{await w.post(k("/apps/encryption/ajax/userSetRecovery"),{userEnableRecovery:a.value})}catch(i){a.value=t,h(i)&&i.response&&i.response.data?.data?.message&&S(i.response.data.data.message)}finally{o.hideToast(),s.value=!1}},{debounce:800}),(n,t)=>(p(),m(e(q),{modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=o=>a.value=o),type:"switch",loading:s.value,description:e(r)("encryption","Enabling this option will allow you to reobtain access to your encrypted files in case of password loss")},{default:u(()=>[f(g(e(r)("encryption","Enable password recovery")),1)]),_:1},8,["modelValue","loading","description"]))}}),G=b({__name:"SettingsPersonal",setup(c){const a=R("encryption","personalSettings"),s=l(a.initialized),n=l(a.recoveryEnabledForUser);async function t(){try{const{data:o}=await w.get(k("/apps/encryption/ajax/getStatus"));s.value=o.initStatus,o.data.message&&K(o.data.message)}catch(o){O.error("Failed to fetch current encryption status",{error:o})}}return(o,i)=>(p(),m(e(C),{name:e(r)("encryption","Basic encryption module")},{default:u(()=>[s.value===e(E).NotInitialized?(p(),m(e(V),{key:0,type:"warning"},{default:u(()=>[f(g(e(r)("encryption","Encryption app is enabled but your keys are not initialized, please log-out and log-in again")),1)]),_:1})):s.value===e(E).InitExecuted?(p(),m(A,{key:1,recoveryEnabledForUser:n.value,onUpdated:t},null,8,["recoveryEnabledForUser"])):e(a).recoveryEnabled&&e(a).privateKeySet?(p(),m(D,{key:2,modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=y=>n.value=y)},null,8,["modelValue"])):U("",!0)]),_:1},8,["name"]))}}),H=I(G);H.mount("#encryption-settings-section");
import{b as V,p as x,o as l,f as j,k as f,w as d,c as u,u as e,j as g,t as w,h,N as z,l as p,n as I,z as q,e as B}from"./Web-4aXjob9I.chunk.mjs";import{c as U,i as P}from"./index-C7qAK2mh.chunk.mjs";import{a as S,c as K,b as R}from"./index-DL1yHC1K-C7Mzn6Sf.chunk.mjs";import{l as C}from"./public-C1mLBHT3.chunk.mjs";import{t as s}from"./translation-DoG5ZELJ-CWq5lJfa.chunk.mjs";import{b as k}from"./index-BRcsAfAF.chunk.mjs";import{N}from"./mdi-CqCJTJVx.chunk.mjs";import{N as T}from"./ContentCopy-DJQcqK_5.chunk.mjs";import"./PencilOutline-lHxGrdve.chunk.mjs";import"./createElementId-DhjFt1I9-DRuXW_VL.chunk.mjs";import"./NcTextArea-Dxzj4zdb-DvZrWIs0.chunk.mjs";import"./NcBreadcrumbs-5gl8Syfa-BX7fTej5.chunk.mjs";import"./NcDateTime.vue_vue_type_script_setup_true_lang-BJuPH7S7-CqC8WnLz.chunk.mjs";import"./NcModal-DUWLRm_F-QkQsKf6T.chunk.mjs";/* empty css */import"./NcAvatar-M3-CbKbq-CGIiXkGL.chunk.mjs";import"./NcContent-BhMoPROW-DTM3ynCr.chunk.mjs";import{N as M}from"./logger-D3RVzcfQ-B4AClKUz.chunk.mjs";import"./TrashCanOutline-B_y8GQFM.chunk.mjs";import{N as O}from"./NcCheckboxRadioSwitch-D8Dfv4iw-VPGmA24O.chunk.mjs";import"./Plus-B9XGmT2_.chunk.mjs";import"./index-tV8pgMgi.chunk.mjs";import"./TrayArrowDown-DZjmYF5a.chunk.mjs";import"./index-jcDbJxy5.chunk.mjs";import"./index-K8P_Ih2p.chunk.mjs";import"./index-BPc0NoY0.chunk.mjs";import"./NcEmojiPicker-Bpw-68QP-Bf2xjztS.chunk.mjs";import"./NcEmptyContent-CGAPqk4S-_iibJX4g.chunk.mjs";import"./index-td7_1PAl.chunk.mjs";import{N as Y,I as E,l as A}from"./types-CND2Ee5K.chunk.mjs";/* empty css */import"./NcInputField-B1bGxYHt-BOHBVCPq.chunk.mjs";import{N as _}from"./NcPasswordField-Be5_qcfm-BUSS7p7Y.chunk.mjs";import"./index-DMaY-vze.chunk.mjs";import"./NcTextField.vue_vue_type_script_setup_true_lang-BQHjkK8r-BB2fhdke.chunk.mjs";import"./NcSelectTags-D7qWNjXa-MfgNIWSR.chunk.mjs";import"./NcUserBubble-CDQa0hGy-BxOcH8Do.chunk.mjs";import"./NcUserStatusIcon-DsviB2Cr-C0S9RnqH.chunk.mjs";import"./emoji-C8k9NUlo-C5D-rZyy.chunk.mjs";import"./colors-BDeMBgfq-FBweF9ga.chunk.mjs";import{w as D}from"./index-BWlXKV4T.chunk.mjs";import"./util-BcZIBtn7.chunk.mjs";import"./ArrowRight-3hdWfV3g.chunk.mjs";const G=V({__name:"SettingsPersonalChangePrivateKey",props:{recoveryEnabledForUser:{type:Boolean}},emits:["updated"],setup(y,{emit:a}){const n=a,i=x("form"),t=p(!1),o=p(!1),r=p(""),m=p("");async function F(){if(!t.value){t.value=!0,o.value=!1;try{await U.post(k("/apps/encryption/ajax/updatePrivateKeyPassword"),{oldPassword:r.value,newPassword:m.value}),r.value=m.value="",i.value?.reset(),n("updated")}catch(c){P(c)&&c.response&&c.response.data?.data?.message&&S(c.response.data.data.message),o.value=!0}finally{t.value=!1}}}return(c,v)=>(l(),j("form",{ref:"form",onSubmit:z(F,["prevent"])},[f(e(Y),{label:e(s)("encryption","Update private key password"),description:e(s)("encryption","Your private key password no longer matches your log-in password. Set your old private key password to your current log-in password.")},{default:d(()=>[y.recoveryEnabledForUser?(l(),u(e(N),{key:0},{default:d(()=>[g(w(e(s)("encryption","If you do not remember your old password you can ask your administrator to recover your files.")),1)]),_:1})):h("",!0),f(e(_),{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=b=>r.value=b),required:"",name:"oldPassword",label:e(s)("encryption","Old log-in password")},null,8,["modelValue","label"]),f(e(_),{modelValue:m.value,"onUpdate:modelValue":v[1]||(v[1]=b=>m.value=b),required:"",name:"newPassword",label:e(s)("encryption","Current log-in password")},null,8,["modelValue","label"]),f(e(M),{type:"submit",variant:"primary"},{default:d(()=>[g(w(e(s)("encryption","Update")),1)]),_:1})]),_:1},8,["label","description"])],544))}}),H=V({__name:"SettingsPersonalEnableRecovery",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(y){const a=I(y,"modelValue"),n=p(!1);return q(a,()=>{n.value=!0}),D([a],async([i],[t])=>{if(i===t){n.value=!1;return}const o=K(s("encryption","Updating recovery keys. This can take some time…"));try{await U.post(k("/apps/encryption/ajax/userSetRecovery"),{userEnableRecovery:a.value})}catch(r){a.value=t,P(r)&&r.response&&r.response.data?.data?.message&&S(r.response.data.data.message)}finally{o.hideToast(),n.value=!1}},{debounce:800}),(i,t)=>(l(),u(e(O),{modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=o=>a.value=o),type:"switch",loading:n.value,description:e(s)("encryption","Enabling this option will allow you to reobtain access to your encrypted files in case of password loss")},{default:d(()=>[g(w(e(s)("encryption","Enable password recovery")),1)]),_:1},8,["modelValue","loading","description"]))}}),J=V({__name:"SettingsPersonal",setup(y){const a=C("encryption","personalSettings"),n=p(a.initialized),i=p(a.recoveryEnabledForUser);async function t(){try{const{data:o}=await U.get(k("/apps/encryption/ajax/getStatus"));n.value=o.initStatus,o.data.message&&R(o.data.message)}catch(o){A.error("Failed to fetch current encryption status",{error:o})}}return(o,r)=>(l(),u(e(T),{name:e(s)("encryption","Basic encryption module")},{default:d(()=>[n.value===e(E).NotInitialized?(l(),u(e(N),{key:0,type:"warning"},{default:d(()=>[g(w(e(s)("encryption","Encryption app is enabled but your keys are not initialized, please log-out and log-in again")),1)]),_:1})):n.value===e(E).InitExecuted?(l(),u(G,{key:1,recoveryEnabledForUser:i.value,onUpdated:t},null,8,["recoveryEnabledForUser"])):e(a).recoveryEnabled&&e(a).privateKeySet?(l(),u(H,{key:2,modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=m=>i.value=m)},null,8,["modelValue"])):h("",!0)]),_:1},8,["name"]))}}),L=B(J);L.mount("#encryption-settings-section");
//# sourceMappingURL=encryption-settings_personal.mjs.map
Loading
Loading