<commit_before><div ng-controller="Umbraco.Overlays.UserController">

    <div class="umb-control-group" ng-if="!showPasswordFields">

       <h5><localize key="user_yourProfile" /></h5>

       <p class="muted">
           <small>
               <localize key="user_sessionExpires" />: {{remainingAuthSeconds | timespan}}
           </small>
       </p>

        <umb-button
            alias="editUser"
            type="link"
            href="#/users/users/user/{{user.id}}"
            action="model.close()"
            button-style="primary"
            label="Edit"
            label-key="general_edit"
            ng-if="canEditProfile">
       </umb-button>

        <umb-button
            alias="changePassword"
            type="button"
            action="togglePasswordFields()"
            label="Change password"
            label-key="general_changePassword"
            button-style="success">
       </umb-button>

        <umb-button
            alias="logOut"
            type="button"
            action="logout()"
            shortcut="ctrl+shift+l"
            button-style="danger"
            label="Log out"
            label-key="general_logout">
        </umb-button>

    </div>

    <div class="umb-control-group external-logins" ng-if="externalLoginProviders.length > 0 && !showPasswordFields">

        <h5>
            <localize key="defaultdialogs_externalLoginProviders">External login providers</localize>
        </h5>

        <div ng-repeat="login in externalLoginProviders">

			<form ng-if="login.linkedProviderKey == undefined" method="POST" name="externalLoginForm"
				  action="{{externalLinkLoginFormAction}}" id="oauthloginform" name="oauthloginform">
				<input type="hidden" name="provider" value="{{login.authType}}" />
				<button class="btn btn-block btn-social"
						ng-class="login.properties.SocialStyle"
						id="{{login.authType}}"
						onclick="document.forms.oauthloginform.submit();">

					<i class="fa" ng-class="login.properties.SocialIcon"></i>
					<localize key="defaultdialogs_linkYour">Link your</localize> {{login.caption}} <localize key="defaultdialogs_account">account</localize>
				</button>
			</form>

            <button ng-if="login.linkedProviderKey != undefined"
                    ng-click="unlink($event, login.authType, login.linkedProviderKey)"
                    class="btn btn-block btn-social"
                    ng-class="login.properties.SocialStyle"
                    id="{{login.authType}}"
                    name="provider"
                    value="{{login.authType}}">
                <i class="fa" ng-class="login.properties.SocialIcon"></i>
                <localize key="defaultdialogs_unLinkYour">Un-link your</localize> {{login.caption}} <localize key="defaultdialogs_account">account</localize>
            </button>
        </div>

    </div>


    <div class="umb-control-group" ng-if="!showPasswordFields">
        <h5><localize key="user_yourHistory" /></h5>
        <ul class="umb-tree">
            <li ng-repeat="item in history | orderBy:'time':true">
                <a ng-href="{{item.link}}" ng-click="gotoHistory(item.link)" prevent-default>
                    <i class="{{item.icon}}"></i> {{item.name}}
                </a>
            </li>
        </ul>
    </div>

    <div ng-show="showPasswordFields">

       <h5>
           <localize key="general_changePassword">Change password</localize>
       </h5>

       <form
          name="passwordForm"
          class="block-form"
          ng-submit="changePassword()"
          novalidate
          val-form-manager>

         <change-password password-values="changePasswordModel.value"
                          config="changePasswordModel.config">
         </change-password>

           <umb-button
               type="button"
               action="togglePasswordFields()"
               label="Back"
               label-key="general_back"
               button-style="cancel">
          </umb-button>

           <umb-button
               type="submit"
               label="Change password"
               label-key="general_changePassword"
               state="changePasswordButtonState"
               button-style="success">
           </umb-button>

       </form>

    </div>

    <div class="umb-control-group">
        <div ng-repeat="tab in dashboard">
            <div ng-repeat="property in tab.properties">
                <div>
                    <h3 ng-if="property.caption">{{property.caption}}</h3>
                    <div ng-include="property.path"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<commit_msg>v7: User history showing even if it's empty (#4524)<commit_after><div ng-controller="Umbraco.Overlays.UserController">
    <div class="umb-control-group" ng-if="!showPasswordFields">

       <h5><localize key="user_yourProfile" /></h5>

       <p class="muted">
           <small>
               <localize key="user_sessionExpires" />: {{remainingAuthSeconds | timespan}}
           </small>
       </p>

        <umb-button
            alias="editUser"
            type="link"
            href="#/users/users/user/{{user.id}}"
            action="model.close()"
            button-style="primary"
            label="Edit"
            label-key="general_edit"
            ng-if="canEditProfile">
       </umb-button>

        <umb-button
            alias="changePassword"
            type="button"
            action="togglePasswordFields()"
            label="Change password"
            label-key="general_changePassword"
            button-style="success">
       </umb-button>

        <umb-button
            alias="logOut"
            type="button"
            action="logout()"
            shortcut="ctrl+shift+l"
            button-style="danger"
            label="Log out"
            label-key="general_logout">
        </umb-button>

    </div>

    <div class="umb-control-group external-logins" ng-if="externalLoginProviders.length > 0 && !showPasswordFields">

        <h5>
            <localize key="defaultdialogs_externalLoginProviders">External login providers</localize>
        </h5>

        <div ng-repeat="login in externalLoginProviders">

			<form ng-if="login.linkedProviderKey == undefined" method="POST" name="externalLoginForm"
				  action="{{externalLinkLoginFormAction}}" id="oauthloginform" name="oauthloginform">
				<input type="hidden" name="provider" value="{{login.authType}}" />
				<button class="btn btn-block btn-social"
						ng-class="login.properties.SocialStyle"
						id="{{login.authType}}"
						onclick="document.forms.oauthloginform.submit();">

					<i class="fa" ng-class="login.properties.SocialIcon"></i>
					<localize key="defaultdialogs_linkYour">Link your</localize> {{login.caption}} <localize key="defaultdialogs_account">account</localize>
				</button>
			</form>

            <button ng-if="login.linkedProviderKey != undefined"
                    ng-click="unlink($event, login.authType, login.linkedProviderKey)"
                    class="btn btn-block btn-social"
                    ng-class="login.properties.SocialStyle"
                    id="{{login.authType}}"
                    name="provider"
                    value="{{login.authType}}">
                <i class="fa" ng-class="login.properties.SocialIcon"></i>
                <localize key="defaultdialogs_unLinkYour">Un-link your</localize> {{login.caption}} <localize key="defaultdialogs_account">account</localize>
            </button>
        </div>

    </div>


    <div class="umb-control-group" ng-if="!showPasswordFields && history.length">
        <h5><localize key="user_yourHistory" /></h5>
        <ul class="umb-tree">
            <li ng-repeat="item in history | orderBy:'time':true">
                <a ng-href="{{item.link}}" ng-click="gotoHistory(item.link)" prevent-default>
                    <i class="{{item.icon}}"></i> {{item.name}}
                </a>
            </li>
        </ul>
    </div>

    <div ng-show="showPasswordFields">

       <h5>
           <localize key="general_changePassword">Change password</localize>
       </h5>

       <form
          name="passwordForm"
          class="block-form"
          ng-submit="changePassword()"
          novalidate
          val-form-manager>

         <change-password password-values="changePasswordModel.value"
                          config="changePasswordModel.config">
         </change-password>

           <umb-button
               type="button"
               action="togglePasswordFields()"
               label="Back"
               label-key="general_back"
               button-style="cancel">
          </umb-button>

           <umb-button
               type="submit"
               label="Change password"
               label-key="general_changePassword"
               state="changePasswordButtonState"
               button-style="success">
           </umb-button>

       </form>

    </div>

    <div class="umb-control-group" ng-if="tab.length">
        <div ng-repeat="tab in dashboard">
            <div ng-repeat="property in tab.properties">
                <div>
                    <h3 ng-if="property.caption">{{property.caption}}</h3>
                    <div ng-include="property.path"></div>
                </div>
            </div>
        </div>
    </div>
</div>

{'fraction_non_alphanumeric': 0.14594882729211087, 'fraction_numerical': 0.002878464818763326, 'mean_word_length': 1.95, 'pattern_counts': {'":': 0, '<': 171, '<?xml version=': 0, '>': 173, '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': '5325680', 'n_tokens_mistral': 2730, 'n_tokens_neox': 2533, 'n_words': 402}