<commit_before><commit_msg>notes template<commit_after><template>
  <div id="notes-list">

    <div id="list-header">
      <h2> Notes |  Coligo</h2>
      <div class="btn-group btn-group-justified" role="group">

        <div class="btn-group" role="group">
          <button type="button" class="btn btn-default" @click="show = 'all'" :class="{active: show === 'all'}">
          All Notes
          </button>
        </div>

        <div class="btn-group" role="group">
          <button type="button" class="btn btn-default" @click="show = 'favorite'" :class="{active: show === 'favorite'}">
          Favorite
          </button>
        </div>
      </div>
    </div>

    <div class="container">
      <div class="list-group">
        <a v-for="note in filteredNotes" class="list-group-item" href="#" :class=""{active: activeNote === note}" @click="updateActiveNote(note)">
          <h4 class="list-group-item-heading">
            {{note.text.trim().substring(0, 30)}}
          </h4>
        </a>
      </div>
    </div>
    
  </div>
</template>

<script>
import { updateActiveNote } from '../vuex/actions'

export default {
  data () {
    return {
      show: 'all'
    }
  },
  vuex: {
    getters: {
      notes: state => state.notes,
      activeNote: state => state.activeNote
    },
    actions: {
      updateActiveNote
    }
  },
  computed: {
    filteredNotes () {
      if (this.show === 'all'){
        return this.notes
      } else if (this.show === 'favorite') {
        return this.notes.filter(note => note.favorite)
      }
    }
  }
}
</script>

{'fraction_non_alphanumeric': 0.18401015228426396, 'fraction_numerical': 0.004441624365482234, 'mean_word_length': 2.2183673469387757, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 34, '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': '2325362', 'n_tokens_mistral': 520, 'n_tokens_neox': 508, 'n_words': 106}