<commit_before><template>
  <div class="jinya-my-jinya">
    <jinya-message :message="message" :state="state" v-if="state"></jinya-message>
    <div class="jinya-my-jinya__content">
      <aside class="jinya-my-jinya__sidebar">
        <img :src="artist.profilePicture" alt="" class="jinya-my-jinya__profile-picture">
        <button @click="pickProfilePicture()"
                class="jinya-my-jinya__profile-picture jinya-my-jinya__profile-picture--button"
                v-if="editMode"></button>
        <span class="jinya-my-jinya__name" v-if="!editMode">{{artist.artistName}}</span>
        <jinya-input label="my_jinya.my_jinya.artist_name" v-if="editMode" v-model="artist.artistName"/>
        <a :href="`mailto:${artist.email}`" class="jinya-my-jinya__email" v-if="!editMode">{{artist.email}}</a>
        <jinya-input label="my_jinya.my_jinya.email" v-if="editMode" v-model="artist.email"/>
      </aside>
      <div class="jinya-my-jinya__about-me">
        <span class="jinya-my-jinya__about-me-title">{{'my_jinya.my_jinya.about_me'|jmessage}}</span>
        <section class="jinya-my-jinya__about-me-content" v-html="aboutMe" v-if="!editMode"></section>
        <jinya-tiny-mce :content="aboutMe" v-if="editMode" v-model="aboutMe"></jinya-tiny-mce>
        <div class="jinya-my-jinya__buttonbar" v-if="editMode">
          <jinya-button :is-inverse="true" :is-secondary="true" @click="cancel()" label="my_jinya.my_jinya.cancel"/>
          <jinya-button :is-inverse="true" :is-primary="true" @click="save()" label="my_jinya.my_jinya.save"/>
        </div>
      </div>
    </div>
    <jinya-floating-action-button :is-secondary="true" @click="editProfile()" icon="pencil" v-if="!editMode"/>
  </div>
</template>

<script>
  import Routes from '@/router/Routes';
  import JinyaFloatingActionButton from '@/framework/Markup/FloatingActionButton';
  import { getCurrentUser } from '@/framework/Storage/AuthStorage';
  import JinyaRequest from '@/framework/Ajax/JinyaRequest';
  import DOMUtils from '@/framework/Utils/DOMUtils';
  import JinyaTinyMce from '@/framework/Markup/Form/TinyMce';
  import JinyaButton from '@/framework/Markup/Button';
  import JinyaMessage from '@/framework/Markup/Validation/Message';
  import Timing from '@/framework/Utils/Timing';
  import { refreshMe } from '@/security/Authentication';
  import JinyaInput from '@/framework/Markup/Form/Input';
  import FileUtils from '@/framework/IO/FileUtils';

  export default {
    name: 'MyJinya',
    components: {
      JinyaInput,
      JinyaMessage,
      JinyaButton,
      JinyaTinyMce,
      JinyaFloatingActionButton,
    },
    async mounted() {
      if (this.isMe) {
        this.artist = getCurrentUser();
      } else {
        this.artist = await JinyaRequest.get(`/api/user/${this.$route.params.id}`);
      }

      this.aboutMe = await JinyaRequest.get(`/api/user/${this.artist.id}/about`);

      DOMUtils.changeTitle(this.artist.artistName);<commit_msg>Fixed profile page<commit_after><template>
  <div class="jinya-my-jinya">
    <jinya-message :message="message" :state="state" v-if="state"></jinya-message>
    <div class="jinya-my-jinya__content">
      <aside class="jinya-my-jinya__sidebar">
        <img :src="artist.profilePicture" alt="" class="jinya-my-jinya__profile-picture">
        <button @click="pickProfilePicture()"
                class="jinya-my-jinya__profile-picture jinya-my-jinya__profile-picture--button"
                v-if="editMode"></button>
        <span class="jinya-my-jinya__name" v-if="!editMode">{{artist.artistName}}</span>
        <jinya-input label="my_jinya.my_jinya.artist_name" v-if="editMode" v-model="artist.artistName"/>
        <a :href="`mailto:${artist.email}`" class="jinya-my-jinya__email" v-if="!editMode">{{artist.email}}</a>
        <jinya-input label="my_jinya.my_jinya.email" v-if="editMode" v-model="artist.email"/>
      </aside>
      <div class="jinya-my-jinya__about-me">
        <span class="jinya-my-jinya__about-me-title">{{'my_jinya.my_jinya.about_me'|jmessage}}</span>
        <section class="jinya-my-jinya__about-me-content" v-html="aboutMe" v-if="!editMode"></section>
        <jinya-tiny-mce :content="aboutMe" v-if="editMode" v-model="aboutMe"></jinya-tiny-mce>
        <div class="jinya-my-jinya__buttonbar" v-if="editMode">
          <jinya-button :is-inverse="true" :is-secondary="true" @click="cancel()" label="my_jinya.my_jinya.cancel"/>
          <jinya-button :is-inverse="true" :is-primary="true" @click="save()" label="my_jinya.my_jinya.save"/>
        </div>
      </div>
    </div>
    <jinya-floating-action-button :is-secondary="true" @click="editProfile()" icon="pencil" v-if="!editMode"/>
  </div>
</template>

<script>
  import Routes from '@/router/Routes';
  import JinyaFloatingActionButton from '@/framework/Markup/FloatingActionButton';
  import { getCurrentUser } from '@/framework/Storage/AuthStorage';
  import JinyaRequest from '@/framework/Ajax/JinyaRequest';
  import DOMUtils from '@/framework/Utils/DOMUtils';
  import JinyaTinyMce from '@/framework/Markup/Form/TinyMce';
  import JinyaButton from '@/framework/Markup/Button';
  import JinyaMessage from '@/framework/Markup/Validation/Message';
  import Timing from '@/framework/Utils/Timing';
  import { refreshMe } from '@/security/Authentication';
  import JinyaInput from '@/framework/Markup/Form/Input';
  import FileUtils from '@/framework/IO/FileUtils';

  export default {
    name: 'MyJinya',
    components: {
      JinyaInput,
      JinyaMessage,
      JinyaButton,
      JinyaTinyMce,
      JinyaFloatingActionButton,
    },
    async mounted() {
      if (this.isMe) {
        this.artist = getCurrentUser();
        this.aboutMe = await JinyaRequest.get(`/api/user/${this.artist.id}/about`);
      } else {
        this.artist = await JinyaRequest.get(`/api/user/${this.$route.params.id}`);
        this.aboutMe = await JinyaRequest.get(`/api/user/${this.$route.params.id}/about`);
      }


      DOMUtils.changeTitle(this.artist.artistName);
{'fraction_non_alphanumeric': 0.17293608521970705, 'fraction_numerical': 0.0, 'mean_word_length': 3.731496062992126, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, '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': '6029678', 'n_tokens_mistral': 2205, 'n_tokens_neox': 2178, 'n_words': 292}