<commit_before><template>
  <div class="dashboard-page">
    <p v-if="!user.activated">
      We sent you an email at {{ user.email }}.<br />
      Follow its instructions to be able to access your projects later.
    </p>

    <container row>
      <card v-for="project in inProgressProjects" :title="project.name" :to="project.urlShow">
        Due on <b>{{ project.dueAtLabel }}</b>
      </card>
    </container>

    <list-item v-for="project in notInProgressProjects">
      <router-link :to="project.urlShow">
        {{ project.name }}
        <span v-if="project.isFinished">(finished)</span>
      </router-link>
    </list-item>

    <btn
      v-if="!createFormEnabled"
      type="secondary"
      @click="createFormEnabled = true"
    >
      + create a project
    </btn>
    <create-project-form v-else :onCancel="disableCreateForm"></create-project-form>
  </div>
</template>

<script>
  import { mapGetters } from 'vuex'
  import CreateProjectForm from '../forms/CreateProject'

  export default {

    name: 'dashboard-page',

    components: {
      CreateProjectForm,
    },

    data () {
      return {
        createFormEnabled: false,
      }
    },

    computed: {
      ...mapGetters({
        user: 'users/current',
        inProgressProjects: 'projects/listInProgress',
        notInProgressProjects: 'projects/listNotInProgress',
      }),
    },

    methods: {
      disableCreateForm () {
        this.createFormEnabled = false
      }
    },

  }
</script>

<style>

  .container > .dashboard-page {
    padding-top: 30px;
    padding-bottom: 60px;
  }

  .dashboard-page .list-item:last-of-type {
    margin-bottom: 10px;
  }

  .dashboard-page .card {
    width: 30%;
  }

</style><commit_msg>fix: Center dashboard's cards<commit_after><template>
  <div class="dashboard-page">
    <p v-if="!user.activated">
      We sent you an email at {{ user.email }}.<br />
      Follow its instructions to be able to access your projects later.
    </p>

    <container row>
      <card v-for="project in inProgressProjects" :title="project.name" :to="project.urlShow">
        Due on <b>{{ project.dueAtLabel }}</b>
      </card>
    </container>

    <list-item v-for="project in notInProgressProjects">
      <router-link :to="project.urlShow">
        {{ project.name }}
        <span v-if="project.isFinished">(finished)</span>
      </router-link>
    </list-item>

    <btn
      v-if="!createFormEnabled"
      type="secondary"
      @click="createFormEnabled = true"
    >
      + create a project
    </btn>
    <create-project-form v-else :onCancel="disableCreateForm"></create-project-form>
  </div>
</template>

<script>
  import { mapGetters } from 'vuex'
  import CreateProjectForm from '../forms/CreateProject'

  export default {

    name: 'dashboard-page',

    components: {
      CreateProjectForm,
    },

    data () {
      return {
        createFormEnabled: false,
      }
    },

    computed: {
      ...mapGetters({
        user: 'users/current',
        inProgressProjects: 'projects/listInProgress',
        notInProgressProjects: 'projects/listNotInProgress',
      }),
    },

    methods: {
      disableCreateForm () {
        this.createFormEnabled = false
      }
    },

  }
</script>

<style>

  .container > .dashboard-page {
    padding-top: 30px;
    padding-bottom: 60px;
  }

  .dashboard-page .list-item:last-of-type {
    margin-bottom: 10px;
  }

  .dashboard-page .card {
    width: 30%;
  }

  .dashboard-page > .container {
    justify-content: space-between;
  }

</style>
{'fraction_non_alphanumeric': 0.14704225352112676, 'fraction_numerical': 0.004507042253521127, 'mean_word_length': 2.398086124401914, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 60, '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': '5757325', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1127, 'n_words': 232}