2019-05-20 11:57:58 -04:00
|
|
|
block scripts
|
|
|
|
script(type='text/javascript').
|
|
|
|
window.oauthProviders = !{StringHelper.stringifyJsonForScript(oauthProviders)}
|
|
|
|
window.thirdPartyIds = !{StringHelper.stringifyJsonForScript(thirdPartyIds)}
|
|
|
|
|
|
|
|
mixin providerList()
|
|
|
|
ul.list-like-table
|
2019-06-18 17:01:52 -04:00
|
|
|
li(ng-repeat="(key, provider) in providers" ng-if="!provider.hideWhenNotLinked || (provider.hideWhenNotLinked && thirdPartyIds[key])")
|
2019-06-03 14:17:33 -04:00
|
|
|
.row
|
2019-05-20 11:57:58 -04:00
|
|
|
.col-xs-12.col-sm-8.col-md-10
|
|
|
|
h4 {{provider.name}}
|
|
|
|
p.small(ng-bind-html="provider.description")
|
|
|
|
.col-xs-2.col-sm-4.col-md-2.text-right
|
|
|
|
//- Unlink
|
|
|
|
button.btn.btn-default(
|
|
|
|
ng-click="unlink(key)"
|
|
|
|
ng-disabled="providers[key].ui.isProcessing"
|
2019-06-18 17:01:52 -04:00
|
|
|
ng-if="thirdPartyIds[key]"
|
2019-05-20 11:57:58 -04:00
|
|
|
)
|
|
|
|
span(ng-if="!providers[key].ui.isProcessing") #{translate("unlink")}
|
|
|
|
span(ng-if="providers[key].ui.isProcessing") #{translate("processing")}
|
|
|
|
//- Link
|
2019-06-03 14:17:33 -04:00
|
|
|
a.btn.btn-primary.text-capitalize(
|
2019-05-20 11:57:58 -04:00
|
|
|
href="{{provider.linkPath}}?intent=link"
|
|
|
|
ng-if="!thirdPartyIds[key] && !provider.hideWhenNotLinked"
|
|
|
|
) #{translate("link")}
|
|
|
|
//- unlink error
|
|
|
|
.row(
|
|
|
|
ng-if="providers[key].ui.hasError"
|
|
|
|
)
|
|
|
|
.col-sm-12
|
|
|
|
//- to do: fix CSS so that we don't need inline styling
|
|
|
|
.alert.alert-danger(
|
|
|
|
ng-if="providers[key].ui.hasError"
|
|
|
|
style="display: block; margin-bottom: 10px;"
|
|
|
|
)
|
|
|
|
i.fa.fa-fw.fa-exclamation-triangle(aria-hidden="true")
|
|
|
|
| {{providers[key].ui.errorMessage}}
|
|
|
|
.row(
|
2019-04-23 10:19:52 -04:00
|
|
|
ng-controller="UserOauthController"
|
|
|
|
ng-cloak
|
|
|
|
)
|
|
|
|
.col-xs-12
|
2019-05-20 11:57:58 -04:00
|
|
|
h3.text-capitalize#linked-accounts #{translate("linked_accounts")}
|
2019-04-23 10:19:52 -04:00
|
|
|
p.small #{translate("linked_accounts_explained", {appName:'{{settings.appName}}'})}
|
2019-07-31 04:23:30 -04:00
|
|
|
+providerList()
|