<commit_before>import requests

from vanilla import Window, Button, TextBox
from vanilla.dialogs import message
from defconAppKit.windows.baseWindow import BaseWindowController

from ghostlines.lazy_property import lazy_property
from ghostlines.storage.app_storage import AppStorage


class AccountDetailsWindow(BaseWindowController):

    def __init__(self, logout_window, account=None):
        self.logout_window = logout_window
        if account is not None:
            self.account = account
        self.window.email_label = TextBox((15, 15, -15, 22), 'Account Email:', sizeStyle='small')
        self.window.account_email = TextBox((15, 40, -15, 22), self.account['email_address'], alignment='center')
        self.window.sign_out_button = Button((15, -40, -15, 22), 'Sign Out', callback=self.sign_out)

    def open(self):
        self.window.open()

    def sign_out(self, _):
        AppStorage("pm.ghostlines.ghostlines.access_token").store('')
        self.logout_window(self.__class__).open()
        self.window.close()

    @lazy_property
    def account(self):
        token = AppStorage('pm.ghostlines.ghostlines.access_token').retrieve()
        request = requests.get('https://ghostlines-staging.herokuapp.com/v1/account', headers={'Authorization': 'Bearer {}'.format(token)})
        return request.json()

    @lazy_property
    def window(self):
        return Window((300, 260),<commit_msg>Account details window shrunk, button made one-column.<commit_after>import requests

from vanilla import Window, Button, TextBox
from vanilla.dialogs import message
from defconAppKit.windows.baseWindow import BaseWindowController

from ghostlines.lazy_property import lazy_property
from ghostlines.storage.app_storage import AppStorage


class AccountDetailsWindow(BaseWindowController):

    def __init__(self, logout_window, account=None):
        self.logout_window = logout_window
        if account is not None:
            self.account = account
        self.window.email_label = TextBox((15, 15, -15, 22), 'Account Email:', sizeStyle='small')
        self.window.account_email = TextBox((15, 40, -15, 22), self.account['email_address'], alignment='center')
        self.window.sign_out_button = Button((175, -38, 110, 22), 'Sign Out', callback=self.sign_out)

    def open(self):
        self.window.open()

    def sign_out(self, _):
        AppStorage("pm.ghostlines.ghostlines.access_token").store('')
        self.logout_window(self.__class__).open()
        self.window.close()

    @lazy_property
    def account(self):
        token = AppStorage('pm.ghostlines.ghostlines.access_token').retrieve()
        request = requests.get('https://ghostlines-staging.herokuapp.com/v1/account', headers={'Authorization': 'Bearer {}'.format(token)})
        return request.json()

    @lazy_property
    def window(self):
        return Window((300, 110),
{'fraction_non_alphanumeric': 0.12047353760445682, 'fraction_numerical': 0.022284122562674095, 'mean_word_length': 3.8367003367003365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6883952', 'n_tokens_mistral': 897, 'n_tokens_neox': 833, 'n_words': 181}