74 lines
2.4 KiB
XML
74 lines
2.4 KiB
XML
<!-- index.wxml -->
|
|
<block wx:if="{{enabled.length === 0}}">
|
|
<view class="container">
|
|
{{t('noMethods')}}
|
|
</view>
|
|
</block>
|
|
<block wx:elif="{{enabled.length === 1}}">
|
|
<block wx:if="{{enabled[0] === 'email'}}">
|
|
<view class="container">
|
|
{{t('not-implemented')}}
|
|
</view>
|
|
</block>
|
|
<block wx:elif="{{enabled[0] === 'mobile'}}">
|
|
<byMobile
|
|
passwordRequired="{{passwordRequired}}"
|
|
entity="{{entity}}"
|
|
entityId="{{entityId}}"
|
|
relations="{{relations}}"
|
|
oakPath="$userRelation-upsert-by-mobile"
|
|
/>
|
|
</block>
|
|
<block wx:else>
|
|
<byUserEntityGrant
|
|
qrCodeType="{{qrCodeType}}"
|
|
entity="{{entity}}"
|
|
entityId="{{entityId}}"
|
|
relations="{{relations}}"
|
|
claimUrl="{{claimUrl}}"
|
|
rule="{{rule}}"
|
|
oakPath="$userRelation-upsert-by-userEntityGrant"
|
|
redirectToAfterConfirm="{{redirectToAfterConfirm}}"
|
|
onUserEntityGrantCreated="{{onUserEntityGrantCreated}}"
|
|
/>
|
|
</block>
|
|
</block>
|
|
<block wx:else>
|
|
<l-tabs>
|
|
<l-tabpanel
|
|
wx:for="{{enabled}}"
|
|
tab="{{t('methods.' + item)}}"
|
|
key="{{item}}"
|
|
slot="{{item}}"
|
|
scrollable="{{true}}"
|
|
bind:linchange="onTabChange"
|
|
>
|
|
<block wx:if="{{item === 'email'}}">
|
|
<view class="container">
|
|
{{t('not-implemented')}}
|
|
</view>
|
|
</block>
|
|
<block wx:elif="{{item === 'mobile'}}">
|
|
<byMobile
|
|
passwordRequired="{{passwordRequired}}"
|
|
entity="{{entity}}"
|
|
entityId="{{entityId}}"
|
|
relations="{{relations}}"
|
|
oakPath="$userRelation-upsert-by-mobile"
|
|
/>
|
|
</block>
|
|
<block wx:else>
|
|
<byUserEntityGrant
|
|
qrCodeType="{{qrCodeType}}"
|
|
entity="{{entity}}"
|
|
entityId="{{entityId}}"
|
|
relations="{{relations}}"
|
|
claimUrl="{{claimUrl}}"
|
|
rule="{{rule}}"
|
|
oakPath="$userRelation-upsert-by-userEntityGrant"
|
|
redirectToAfterConfirm="{{redirectToAfterConfirm}}"
|
|
/>
|
|
</block>
|
|
</l-tabpanel>
|
|
</l-tabs>
|
|
</block> |