mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2 lines
No EOL
9.9 KiB
JavaScript
2 lines
No EOL
9.9 KiB
JavaScript
"use strict";(globalThis.webpackChunknextcloud_ui_legacy=globalThis.webpackChunknextcloud_ui_legacy||[]).push([[2311],{3357(t,n,e){e.d(n,{A:()=>a});var o=e(71354),i=e.n(o),r=e(76314),s=e.n(r)()(i());s.push([t.id,"\n._loginFlowContainer_OSz1H {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n","",{version:3,sources:["webpack://./core/src/components/LoginFlow/LoginFlowContainer.vue"],names:[],mappings:";AAqBA;CACA,aAAA;CACA,sBAAA;AACA",sourcesContent:['\x3c!--\n - SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n<script setup lang="ts">\nimport NcGuestContent from \'@nextcloud/vue/components/NcGuestContent\'\n\ndefineProps<{\n\theading: string\n}>()\n<\/script>\n\n<template>\n\t<NcGuestContent class="picker-window" :class="$style.loginFlowContainer">\n\t\t<h2>{{ heading }}</h2>\n\t\t<slot />\n\t</NcGuestContent>\n</template>\n\n<style module>\n.loginFlowContainer {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n</style>\n'],sourceRoot:""}]),s.locals={loginFlowContainer:"_loginFlowContainer_OSz1H"};const a=s},5879(t,n,e){e.d(n,{A:()=>a});var o=e(71354),i=e.n(o),r=e(76314),s=e.n(r)()(i());s.push([t.id,"\n._loginFlowAuth__button__Logp {\n\tmargin-top: 0.5rem;\n\tmargin-inline: auto;\n\tmin-width: 50% !important;\n}\n","",{version:3,sources:["webpack://./core/src/views/LoginFlowAuth.vue"],names:[],mappings:";AAmEA;CACA,kBAAA;CACA,mBAAA;CACA,yBAAA;AACA",sourcesContent:["\x3c!--\n - SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n<script setup lang=\"ts\">\nimport { loadState } from '@nextcloud/initial-state'\nimport { t } from '@nextcloud/l10n'\nimport { ref } from 'vue'\nimport NcButton from '@nextcloud/vue/components/NcButton'\nimport NcNoteCard from '@nextcloud/vue/components/NcNoteCard'\nimport LoginFlowAuthAppToken from '../components/LoginFlow/LoginFlowAuthAppToken.vue'\nimport LoginFlowContainer from '../components/LoginFlow/LoginFlowContainer.vue'\n\nconst {\n\tclient,\n\tdirect,\n\tinstanceName,\n\tloginRedirectUrl,\n\tappTokenUrl,\n\tstateToken,\n} = loadState<{\n\tclient: string\n\tdirect?: boolean\n\tinstanceName: string\n\tloginRedirectUrl: string\n\tappTokenUrl: string\n\tstateToken: string\n}>('core', 'loginFlowAuth')\n\nconst useAppTokenLogin = ref(false)\n<\/script>\n\n<template>\n\t<LoginFlowContainer :heading=\"t('core', 'Connect to your account')\">\n\t\t<NcNoteCard type=\"info\">\n\t\t\t{{ t('core', 'Please log in before granting \"{client}\" access to your {instanceName} account.', { client, instanceName }) }}\n\t\t</NcNoteCard>\n\n\t\t<NcNoteCard type=\"warning\" :heading=\"t('core', 'Security warning')\">\n\t\t\t{{ t('core', 'If you are not trying to set up a new device or app, someone is trying to trick you into granting them access to your data. In this case do not proceed and instead contact your system administrator.') }}\n\t\t</NcNoteCard>\n\n\t\t<NcButton\n\t\t\tv-if=\"!useAppTokenLogin\"\n\t\t\t:class=\"$style.loginFlowAuth__button\"\n\t\t\t:href=\"loginRedirectUrl\"\n\t\t\tvariant=\"primary\">\n\t\t\t{{ t('core', 'Log in') }}\n\t\t</NcButton>\n\n\t\t<LoginFlowAuthAppToken\n\t\t\tv-else\n\t\t\t:app-token-url=\"appTokenUrl\"\n\t\t\t:direct=\"direct ?? false\"\n\t\t\t:state-token=\"stateToken\" />\n\n\t\t<NcButton\n\t\t\t:class=\"$style.loginFlowAuth__button\"\n\t\t\tvariant=\"tertiary\"\n\t\t\t@click=\"useAppTokenLogin = !useAppTokenLogin\">\n\t\t\t{{ useAppTokenLogin ? t('core', 'Log in using password') : t('core', 'Alternative log in using app password') }}\n\t\t</NcButton>\n\t</LoginFlowContainer>\n</template>\n\n<style module>\n.loginFlowAuth__button {\n\tmargin-top: 0.5rem;\n\tmargin-inline: auto;\n\tmin-width: 50% !important;\n}\n</style>\n"],sourceRoot:""}]),s.locals={loginFlowAuth__button:"_loginFlowAuth__button__Logp"};const a=s},7579(t,n,e){e.d(n,{A:()=>N});var o=e(85471),i=e(66768);const r=(0,o.pM)({__name:"LoginFlowContainer",props:{heading:null},setup:t=>({__sfc:!0,NcGuestContent:i.A})});var s=e(85072),a=e.n(s),l=e(97825),c=e.n(l),u=e(77659),p=e.n(u),d=e(55056),A=e.n(d),g=e(10540),m=e.n(g),_=e(41113),w=e.n(_),y=e(3357),h={};h.styleTagTransform=w(),h.setAttributes=A(),h.insert=p().bind(null,"head"),h.domAPI=c(),h.insertStyleElement=m(),a()(y.A,h);const k=y.A&&y.A.locals?y.A.locals:void 0,N=(0,e(14486).A)(r,function(){var t=this,n=t._self._c;return n(t._self._setupProxy.NcGuestContent,{staticClass:"picker-window",class:t.$style.loginFlowContainer},[n("h2",[t._v(t._s(t.heading))]),t._v(" "),t._t("default")],2)},[],!1,function(t){this.$style=k.locals||k},null,null).exports},21780(t,n,e){e.d(n,{A:()=>a});var o=e(71354),i=e.n(o),r=e(76314),s=e.n(r)()(i());s.push([t.id,"\n._loginFlowAuthAppToken_BFXrV {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--default-grid-baseline);\n}\n","",{version:3,sources:["webpack://./core/src/components/LoginFlow/LoginFlowAuthAppToken.vue"],names:[],mappings:";AA2CA;CACA,aAAA;CACA,sBAAA;CACA,iCAAA;AACA",sourcesContent:['\x3c!--\n - SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n<script setup lang="ts">\nimport { getRequestToken } from \'@nextcloud/auth\'\nimport { t } from \'@nextcloud/l10n\'\nimport NcButton from \'@nextcloud/vue/components/NcButton\'\nimport NcFormBox from \'@nextcloud/vue/components/NcFormBox\'\nimport NcPasswordField from \'@nextcloud/vue/components/NcPasswordField\'\nimport NcTextField from \'@nextcloud/vue/components/NcTextField\'\n\ndefineProps<{\n\tappTokenUrl: string\n\tdirect: boolean\n\tstateToken: string\n}>()\n\nconst requestToken = getRequestToken()\n<\/script>\n\n<template>\n\t<form :action="appTokenUrl" :class="$style.loginFlowAuthAppToken" method="post">\n\t\t<NcFormBox>\n\t\t\t<NcTextField name="user" :label="t(\'core\', \'Login\')" />\n\t\t\t<NcPasswordField name="password" :label="t(\'core\', \'App password\')" />\n\t\t</NcFormBox>\n\t\t<input type="hidden" name="stateToken" :value="stateToken">\n\t\t<input type="hidden" name="requesttoken" :value="requestToken">\n\t\t<input\n\t\t\tv-if="direct"\n\t\t\ttype="hidden"\n\t\t\tname="direct"\n\t\t\tvalue="1">\n\n\t\t<NcButton type="submit" variant="primary" wide>\n\t\t\t{{ t(\'core\', \'Grant access\') }}\n\t\t</NcButton>\n\t</form>\n</template>\n\n<style module>\n.loginFlowAuthAppToken {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--default-grid-baseline);\n}\n</style>\n'],sourceRoot:""}]),s.locals={loginFlowAuthAppToken:"_loginFlowAuthAppToken_BFXrV"};const a=s},72311(t,n,e){e.r(n),e.d(n,{default:()=>R});var o=e(85471),i=e(81222),r=e(53334),s=e(74095),a=e(371),l=e(21777),c=e(57268),u=e(16044),p=e(82182);const d=(0,o.pM)({__name:"LoginFlowAuthAppToken",props:{appTokenUrl:null,direct:{type:Boolean},stateToken:null},setup:t=>({__sfc:!0,requestToken:(0,l.do)(),t:r.t,NcButton:s.A,NcFormBox:c.A,NcPasswordField:u.A,NcTextField:p.A})});var A=e(85072),g=e.n(A),m=e(97825),_=e.n(m),w=e(77659),y=e.n(w),h=e(55056),k=e.n(h),N=e(10540),v=e.n(N),f=e(41113),T=e.n(f),F=e(21780),C={};C.styleTagTransform=T(),C.setAttributes=k(),C.insert=y().bind(null,"head"),C.domAPI=_(),C.insertStyleElement=v(),g()(F.A,C);const x=F.A&&F.A.locals?F.A.locals:void 0;var L=e(14486);const b=(0,L.A)(d,function(){var t=this,n=t._self._c,e=t._self._setupProxy;return n("form",{class:t.$style.loginFlowAuthAppToken,attrs:{action:t.appTokenUrl,method:"post"}},[n(e.NcFormBox,[n(e.NcTextField,{attrs:{name:"user",label:e.t("core","Login")}}),t._v(" "),n(e.NcPasswordField,{attrs:{name:"password",label:e.t("core","App password")}})],1),t._v(" "),n("input",{attrs:{type:"hidden",name:"stateToken"},domProps:{value:t.stateToken}}),t._v(" "),n("input",{attrs:{type:"hidden",name:"requesttoken"},domProps:{value:e.requestToken}}),t._v(" "),t.direct?n("input",{attrs:{type:"hidden",name:"direct",value:"1"}}):t._e(),t._v(" "),n(e.NcButton,{attrs:{type:"submit",variant:"primary",wide:""}},[t._v("\n\t\t"+t._s(e.t("core","Grant access"))+"\n\t")])],1)},[],!1,function(t){this.$style=x.locals||x},null,null).exports;var B=e(7579);const P=(0,o.pM)({__name:"LoginFlowAuth",setup(t){const{client:n,direct:e,instanceName:l,loginRedirectUrl:c,appTokenUrl:u,stateToken:p}=(0,i.C)("core","loginFlowAuth");return{__sfc:!0,client:n,direct:e,instanceName:l,loginRedirectUrl:c,appTokenUrl:u,stateToken:p,useAppTokenLogin:(0,o.KR)(!1),t:r.t,NcButton:s.A,NcNoteCard:a.A,LoginFlowAuthAppToken:b,LoginFlowContainer:B.A}}});var U=e(5879),S={};S.styleTagTransform=T(),S.setAttributes=k(),S.insert=y().bind(null,"head"),S.domAPI=_(),S.insertStyleElement=v(),g()(U.A,S);const G=U.A&&U.A.locals?U.A.locals:void 0,R=(0,L.A)(P,function(){var t=this,n=t._self._c,e=t._self._setupProxy;return n(e.LoginFlowContainer,{attrs:{heading:e.t("core","Connect to your account")}},[n(e.NcNoteCard,{attrs:{type:"info"}},[t._v("\n\t\t"+t._s(e.t("core",'Please log in before granting "{client}" access to your {instanceName} account.',{client:e.client,instanceName:e.instanceName}))+"\n\t")]),t._v(" "),n(e.NcNoteCard,{attrs:{type:"warning",heading:e.t("core","Security warning")}},[t._v("\n\t\t"+t._s(e.t("core","If you are not trying to set up a new device or app, someone is trying to trick you into granting them access to your data. In this case do not proceed and instead contact your system administrator."))+"\n\t")]),t._v(" "),e.useAppTokenLogin?n(e.LoginFlowAuthAppToken,{attrs:{"app-token-url":e.appTokenUrl,direct:e.direct??!1,"state-token":e.stateToken}}):n(e.NcButton,{class:t.$style.loginFlowAuth__button,attrs:{href:e.loginRedirectUrl,variant:"primary"}},[t._v("\n\t\t"+t._s(e.t("core","Log in"))+"\n\t")]),t._v(" "),n(e.NcButton,{class:t.$style.loginFlowAuth__button,attrs:{variant:"tertiary"},on:{click:function(t){e.useAppTokenLogin=!e.useAppTokenLogin}}},[t._v("\n\t\t"+t._s(e.useAppTokenLogin?e.t("core","Log in using password"):e.t("core","Alternative log in using app password"))+"\n\t")])],1)},[],!1,function(t){this.$style=G.locals||G},null,null).exports}}]);
|
|
//# sourceMappingURL=2311-2311.js.map?v=3336a095660f56f06fe2
|