You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud/dist/settings-vue-settings-perso...

3 lines
8.7 KiB
JavaScript

/*! For license information please see settings-vue-settings-personal-password.js.LICENSE.txt */
(()=>{"use strict";var t,e,n,s={18012:(t,e,n)=>{var s=n(20144),r=n(90580),o=n(54572),a=n(16972),i=n(93664),l=n(79753),d=n(64024);const c={name:"PasswordSection",components:{NcSettingsSection:r.Z,NcButton:o.Z,NcPasswordField:a.Z},data:()=>({oldPass:"",newPass:""}),methods:{changePassword(){i.Z.post((0,l.generateUrl)("/settings/personal/changepassword"),{oldpassword:this.oldPass,newpassword:this.newPass}).then((t=>t.data)).then((t=>{"error"===t.status?(this.errorMessage=t.data.message,(0,d.x2)(t.data.message)):(0,d.s$)(t.data.message)}))}}};var u=n(93379),p=n.n(u),m=n(7795),h=n.n(m),f=n(90569),w=n.n(f),g=n(3565),v=n.n(g),b=n(19216),P=n.n(b),y=n(44589),A=n.n(y),N=n(15388),S={};S.styleTagTransform=A(),S.setAttributes=v(),S.insert=w().bind(null,"head"),S.domAPI=h(),S.insertStyleElement=P(),p()(N.Z,S),N.Z&&N.Z.locals&&N.Z.locals;const x=(0,n(51900).Z)(c,(function(){var t=this,e=t._self._c;return e("NcSettingsSection",{attrs:{name:t.t("settings","Password")}},[e("form",{attrs:{id:"passwordform",method:"POST"},on:{submit:function(e){return e.preventDefault(),t.changePassword.apply(null,arguments)}}},[e("NcPasswordField",{attrs:{id:"old-pass",label:t.t("settings","Current password"),name:"oldpassword",value:t.oldPass,autocomplete:"current-password",autocapitalize:"none",spellcheck:"false"},on:{"update:value":function(e){t.oldPass=e}}}),t._v(" "),e("NcPasswordField",{attrs:{id:"new-pass",label:t.t("settings","New password"),value:t.newPass,maxlength:469,autocomplete:"new-password",autocapitalize:"none",spellcheck:"false","check-password-strength":!0},on:{"update:value":function(e){t.newPass=e}}}),t._v(" "),e("NcButton",{attrs:{type:"primary","native-type":"submit",disabled:0===t.newPass.length||0===t.oldPass.length}},[t._v("\n\t\t\t"+t._s(t.t("settings","Change password"))+"\n\t\t")])],1)])}),[],!1,null,null,null).exports;var C=n(31352);n.nc=btoa(OC.requestToken),s.ZP.prototype.t=C.Iu,s.ZP.prototype.n=C.uN,new s.ZP({el:"#security-password",name:"main-personal-password",render:t=>t(x)})},15388:(t,e,n)=>{n.d(e,{Z:()=>i});var s=n(87537),r=n.n(s),o=n(23645),a=n.n(o)()(r());a.push([t.id,"\n#passwordform {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 1rem;\n\tmax-width: 400px;\n}\n","",{version:3,sources:["webpack://./apps/settings/src/components/PasswordSection.vue"],names:[],mappings:";AAiGA;CACA,aAAA;CACA,sBAAA;CACA,SAAA;CACA,gBAAA;AACA",sourcesContent:['\x3c!--\n - @copyright 2022 Carl Schwan <carl@carlschwan.eu>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n --\x3e\n<template>\n\t<NcSettingsSection :name="t(\'settings\', \'Password\')">\n\t\t<form id="passwordform" method="POST" @submit.prevent="changePassword">\n\t\t\t<NcPasswordField id="old-pass"\n\t\t\t\t:label="t(\'settings\', \'Current password\')"\n\t\t\t\tname="oldpassword"\n\t\t\t\t:value.sync="oldPass"\n\t\t\t\tautocomplete="current-password"\n\t\t\t\tautocapitalize="none"\n\t\t\t\tspellcheck="false" />\n\n\t\t\t<NcPasswordField id="new-pass"\n\t\t\t\t:label="t(\'settings\', \'New password\')"\n\t\t\t\t:value.sync="newPass"\n\t\t\t\t:maxlength="469"\n\t\t\t\tautocomplete="new-password"\n\t\t\t\tautocapitalize="none"\n\t\t\t\tspellcheck="false"\n\t\t\t\t:check-password-strength="true" />\n\n\t\t\t<NcButton type="primary"\n\t\t\t\tnative-type="submit"\n\t\t\t\t:disabled="newPass.length === 0 || oldPass.length === 0">\n\t\t\t\t{{ t(\'settings\', \'Change password\') }
//# sourceMappingURL=settings-vue-settings-personal-password.js.map?v=187b9bb3edb05ff58527