<commit_before><template>
  <div class="open-productions page">

    <div v-if="openProductions.length > 0">
      <h1 class="title has-text-centered">
        {{ $t('productions.home.title') }}
      </h1>
      <div class="open-productions-list">
        <div
          class="open-production has-text-centered"
          v-for="production in openProductions">

          <router-link
            :to="getPath(production)"
          >
            <div
               class="avatar has-text-centered"
               v-bind:style="{
               background: getAvatarColor(production),
               width: size + 'px',
               height: size + 'px'
            }">
              {{ generateAvatar(production) }}
            </div>
            <div class="production-name">
              {{ production.name }}
            </div>
          </router-link>
        </div>
      </div>
    </div>

    <div class="has-text-centered welcome" v-else>
      <p class="kitsu-logo">
        <img src="../assets/kitsu.png" />
      </p>
      <h1 class="title has-text-centered">
        {{ $t('productions.home.welcome') }}
      </h1>
      <p class="has-text-centered">
        {{ $t('productions.home.empty') }}
      </p>
      <p class="has-text-centered">
        <button-link
          class="level-item big-button"
          :text="$t('productions.home.create_new')"
          path="/productions/new"
        >
        </button-link>
      </p>

    </div>
  </div>
</template>

<script>
import colors from '../lib/colors.js'
import { mapGetters, mapActions } from 'vuex'
import ButtonLink from './widgets/ButtonLink.vue'

export default {
  name: 'menu',

  components: {
    ButtonLink
  },

  data () {
    return {
      size: 100
    }<commit_msg>Add an icon to open production page<commit_after><template>
  <div class="open-productions page">

    <div v-if="openProductions.length > 0">
      <h1 class="title has-text-centered">
        <activity-icon></activity-icon>
        {{ $t('productions.home.title') }}
      </h1>
      <div class="open-productions-list">
        <div
          class="open-production has-text-centered"
          v-for="production in openProductions">

          <router-link
            :to="getPath(production)"
          >
            <div
               class="avatar has-text-centered"
               v-bind:style="{
               background: getAvatarColor(production),
               width: size + 'px',
               height: size + 'px'
            }">
              {{ generateAvatar(production) }}
            </div>
            <div class="production-name">
              {{ production.name }}
            </div>
          </router-link>
        </div>
      </div>
    </div>

    <div class="has-text-centered welcome" v-else>
      <p class="kitsu-logo">
        <img src="../assets/kitsu.png" />
      </p>
      <h1 class="title has-text-centered">
        {{ $t('productions.home.welcome') }}
      </h1>
      <p class="has-text-centered">
        {{ $t('productions.home.empty') }}
      </p>
      <p class="has-text-centered">
        <button-link
          class="level-item big-button"
          :text="$t('productions.home.create_new')"
          path="/productions/new"
        >
        </button-link>
      </p>

    </div>
  </div>
</template>

<script>
import { mapGetters, mapActions } from 'vuex'
import { ActivityIcon } from 'vue-feather-icons'

import colors from '../lib/colors.js'
import ButtonLink from './widgets/ButtonLink'

export default {
  name: 'menu',

  components: {
    ActivityIcon,
    ButtonLink
  },

  data () {
    return {
      size: 100
    }
{'fraction_non_alphanumeric': 0.1588913282107574, 'fraction_numerical': 0.0043907793633369925, 'mean_word_length': 1.7447289156626506, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 71, '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': '2212932', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1101, 'n_words': 208}