Back to Meteor

Login Buttons

packages/accounts-ui-unstyled/login_buttons.html

0.8.3.11.5 KB
Original Source

{{#if currentUser}} {{#if loggingInOrOut}} {{! We aren't actually logged in/out yet; we're just setting Meteor.userId optimistically during an at-startup login-with-token. We expose this state so other UIs can treat it specially, but we'll just treat it as logged out. }} {{#if dropdown}} {{> _loginButtonsLoggingIn }} {{else}} {{> _loginButtonsLoggingInSingleLoginButton }} {{/if}} {{else}} {{> _loginButtonsLoggedIn}} {{/if}} {{else}} {{> _loginButtonsLoggedOut}} {{/if}} {{#if dropdown}} {{> _loginButtonsLoggedInDropdown}} {{else}} {{> _loginButtonsLoggedInSingleLogoutButton}} {{/if}} {{#if services}} {{! if at least one service is configured }} {{#if configurationLoaded}} {{#if dropdown}} {{! if more than one service configured, or password is configured}} {{> _loginButtonsLoggedOutDropdown}} {{else}} {{#with singleService}} {{! at this point there must be only one configured services }} {{#if loggingIn}} {{> _loginButtonsLoggingInSingleLoginButton}} {{else}} {{> _loginButtonsLoggedOutSingleLoginButton}} {{/if}} {{/with}} {{/if}} {{/if}} {{else}} No login services configured {{/if}} {{#if errorMessage}} {{errorMessage}} {{/if}} {{#if infoMessage}} {{infoMessage}} {{/if}} {{> _loginButtonsLoggingInPadding}}

{{> _loginButtonsLoggingInPadding}} {{#unless dropdown}} {{! invisible div used for correct height of surrounding div. this ensures that the _loginButtons template is always the same height and the rest of the page doesn't move up and down }}

{{else}} {{! just add some padding }}

{{/unless}}