<commit_before>import './profile-flyout-content.scss';

var Template = require('./profile-flyout-content.html');
var Interface = require('interface.json');
var Core = require('_core.js');

var Button = require('../../../../../basics/button/button.js');

/**
 * Creates an ProfileFlyoutContent
 *
 * @class
 */

class ProfileFlyoutContent extends Core {

    constructor(options){
        super(options);
        this.options = options;
        this._render(Template, options);
    }

    _componentDidMount() {
        this.signOutButton = new Button({
            title: this.options.signOutLabel
        });
        this.mountPartialToComment('SIGN_OUT_BUTTON', this.signOutButton);

        this.settingsLink = new Button({
            title: this.options.profileSettingsLabel,
            style: 'link'
        });
        this.mountPartialToComment('SETTINGS_LINK', this.settingsLink);
    }

    setEmail(email) {
        const el = this.el.querySelector('.src__components__global-nav__top-nav__profile__profile-flyout-content__email');
        el.textContent = email;
        el.setAttribute('title', email);
    }

    setName(name) {
        const el = this.el.querySelector('.src__components__global-nav__top-nav__profile__profile-flyout-content__name')
        el.textContent = name;
        el.setAttribute('title', name);
    }

    setProfileSettingsLabel(label) {
        this.settingsLink.setTitle(label);
    }

    setSignOutLabel(label) {
        this.signOutButton.setTitle(label);
    }

    setProfileSettingsLink(link) {
        this.settingsLink.setLink(link);
    }

    setSignOutLink(link) {
        this.signOutButton.setLink(link);
    }

    onProfileSettingsClick(fn){
        return this.settingsLink.onClick(fn);
    }

    onSignOutClick(fn){
        return this.signOutButton.onClick(fn);
    }

}

ProfileFlyoutContent._interface = {
    methods: {
        "setEmail": {},
        "setName": {},
        "setProfileSettingsLabel": {},
        "setSignOutLabel": {},
        "setProfileSettingsLink": {},
        "setSignOutLink": {},
        "onProfileSettingsClick": {},
        "onSignOutClick": {},
    },
    defaults: {}
};
ProfileFlyoutContent._defaults = {};

module.exports = ProfileFlyoutContent;<commit_msg>profile settings link wasn't being set<commit_after>import './profile-flyout-content.scss';

var Template = require('./profile-flyout-content.html');
var Interface = require('interface.json');
var Core = require('_core.js');

var Button = require('../../../../../basics/button/button.js');

/**
 * Creates an ProfileFlyoutContent
 *
 * @class
 */

class ProfileFlyoutContent extends Core {

    constructor(options){
        super(options);
        this.options = options;
        this._render(Template, options);
    }

    _componentDidMount() {
        this.signOutButton = new Button({
            title: this.options.signOutLabel
        });
        this.mountPartialToComment('SIGN_OUT_BUTTON', this.signOutButton);

        this.settingsLink = new Button({
            title: this.options.profileSettingsLabel,
            link: this.options.profileSettingsLink,
            style: 'link'
        });
        this.mountPartialToComment('SETTINGS_LINK', this.settingsLink);
    }

    setEmail(email) {
        const el = this.el.querySelector('.src__components__global-nav__top-nav__profile__profile-flyout-content__email');
        el.textContent = email;
        el.setAttribute('title', email);
    }

    setName(name) {
        const el = this.el.querySelector('.src__components__global-nav__top-nav__profile__profile-flyout-content__name')
        el.textContent = name;
        el.setAttribute('title', name);
    }

    setProfileSettingsLabel(label) {
        this.settingsLink.setTitle(label);
    }

    setSignOutLabel(label) {
        this.signOutButton.setTitle(label);
    }

    setProfileSettingsLink(link) {
        this.settingsLink.setLink(link);
    }

    setSignOutLink(link) {
        this.signOutButton.setLink(link);
    }

    onProfileSettingsClick(fn){
        return this.settingsLink.onClick(fn);
    }

    onSignOutClick(fn){
        return this.signOutButton.onClick(fn);
    }

}

ProfileFlyoutContent._interface = {
    methods: {
        "setEmail": {},
        "setName": {},
        "setProfileSettingsLabel": {},
        "setSignOutLabel": {},
        "setProfileSettingsLink": {},
        "setSignOutLink": {},
        "onProfileSettingsClick": {},
        "onSignOutClick": {},
    },
    defaults: {}
};
ProfileFlyoutContent._defaults = {};

module.exports = ProfileFlyoutContent;
{'fraction_non_alphanumeric': 0.13419157756927777, 'fraction_numerical': 0.0, 'mean_word_length': 2.7450980392156863, 'pattern_counts': {'":': 16, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3878071', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1317, 'n_words': 184}