示例#1
0
    def _sign_in_press(self,
                       account_type: str,
                       show_test_warning: bool = True) -> None:
        del show_test_warning  # unused
        _ba.sign_in(account_type)

        # Make note of the type account we're *wanting* to be signed in with.
        cfg = ba.app.config
        cfg['Auto Account State'] = account_type
        cfg.commit()
        self._needs_refresh = True
        ba.timer(0.1, ba.WeakCall(self._update), timetype=ba.TimeType.REAL)
示例#2
0
def show_sign_in_prompt(account_type: str = None) -> None:
    """Bring up a prompt telling the user they must sign in."""
    from bastd.ui import confirm
    from bastd.ui.account import settings
    if account_type == 'Google Play':
        confirm.ConfirmWindow(
            ba.Lstr(resource='notSignedInGooglePlayErrorText'),
            lambda: _ba.sign_in('Google Play'),
            ok_text=ba.Lstr(resource='accountSettingsWindow.signInText'),
            width=460,
            height=130)
    else:
        confirm.ConfirmWindow(
            ba.Lstr(resource='notSignedInErrorText'),
            lambda: settings.AccountSettingsWindow(modal=True,
                                                   close_once_signed_in=True),
            ok_text=ba.Lstr(resource='accountSettingsWindow.signInText'),
            width=460,
            height=130)
示例#3
0
 def do_auto_sign_in() -> None:
     if self.headless_build:
         _ba.sign_in('Local')
     elif cfg.get('Auto Account State') == 'Local':
         _ba.sign_in('Local')
示例#4
0
 def do_auto_sign_in() -> None:
     if _ba.app.headless_mode or _ba.app.config.get(
             'Auto Account State') == 'Local':
         _ba.sign_in('Local')
示例#5
0
 def do_auto_sign_in() -> None:
     if self.subplatform == 'headless':
         _ba.sign_in('Local')
     elif cfg.get('Auto Account State') == 'Local':
         _ba.sign_in('Local')