<commit_before><template>
<div :class="{ 'toggle-menu' : showMenu, 'toggle-search' : showSearch  }">
  <!-- header -->
  <div id="header">
    <a class="button button-mobile" @click.prevent="toggleMenu">
      <i class="material-icons" v-if="!showMenu">&#xE5D2;</i>
      <i class="material-icons" v-else>&#xE5CD;</i>
    </a>

    <a class="button button-mobile button-right" @click.prevent="toggleSearch" v-if="showSearchButton">
      <i class="material-icons" v-if="!showSearch">&#xE8B6;</i>
      <i class="material-icons" v-else>&#xE5CD;</i>
    </a>

    <a class="button button-mobile button-right" 
        v-if="hasMoviePath"
        v-link="{ path: '/movies' }">
      <i class="material-icons">&#xE02C;</i>
    </a>

    <a class="button button-mobile button-right" 
        v-if="hasShowPath"
        v-link="{ path: '/shows' }">
      <i class="material-icons">&#xE639;</i>
    </a>

    <a id="logo" v-link="{ path: '/' }">
      Airflix
    </a>
  </div>

  <!-- menu -->
  <div id="navigation">
    <a class="button button-mobile" @click.prevent="hideMenu">
      <i class="material-icons">&#xE314;</i>
    </a>

    <ul>
      <li v-link-active>
          <a v-link="{ path: '/movies' }" @click="hideMenu">
            <i class="material-icons">&#xE02C;</i>
            Movies
          </a>
      </li>
      <li v-link-active>
        <a v-link="{ path: '/shows' }" @click="hideMenu">
          <i class="material-icons">&#xE639;</i>
          Shows
        </a>
      </li>
      <li v-link-active>
        <a v-link="{ path: '/settings' }" @click="hideMenu">
          <i class="material-icons">&#xE8B8;</i>
          Settings
        </a>
      </li>
    </ul>
  </div>

  <!-- overlay -->
  <a id="overlay" @click.prevent="toggleMenu"></a>

  <!-- main view -->
  <div id="content">
    <router-view
      class="view"
      transition
      transition-mode="out-in">
    </router-view>
  </div>

  <!-- footer -->
  <div id="footer">
    Created by <NAME>
  </div>

  <!-- toasts -->
  <toast></toast>
</div>
</template>

<script>
import store from '../vuex/store'
import Toast from './Toast.vue'
import {
  hideMenu,
  toggleMenu, 
  toggleSearch
} from '../vuex/actions/mobile'

export default {
  name: 'App',
  components: { 
    Toast
  },
  store,
  vuex: {
    getters: {
      showMenu: ({ mobile }) => mobile.showMenu,
      showSearch: ({ mobile }) => mobile.showSearch
    },
    actions: {
      hideMenu,
      toggleMenu,
      toggleSearch
    }
  },
  computed: {
    hasMoviePath: function () {
      return this.$route.path.indexOf('/movies/') > -1
    },
    hasShowPath: function () {
      return this.$route.path.indexOf('/shows/') > -1 ||
        this.$route.path.indexOf('/seasons/') > -1
    },
    showSearchButton: function () {
      return this.$route.path == '/movies' ||
        this.$route.path == '/shows';
    }
  }
}
</script><commit_msg>Update App component to vue v2.<commit_after><template>
<div id="app" :class="{ 'toggle-menu' : showMenu, 'toggle-search' : showSearch  }">
  <!-- header -->
  <div id="header">
    <a class="button button-mobile" 
        @click.prevent="toggleMenu">
      <i class="material-icons" v-if="!showMenu">&#xE5D2;</i>
      <i class="material-icons" v-else>&#xE5CD;</i>
    </a>

    <a class="button button-mobile button-right" 
        v-if="showSearchButton"
        @click.prevent="toggleSearch">
      <i class="material-icons" v-if="!showSearch">&#xE8B6;</i>
      <i class="material-icons" v-else>&#xE5CD;</i>
    </a>

    <router-link class="button button-mobile button-right" 
        v-if="hasMoviePath"
        to="/movies">
      <i class="material-icons">&#xE02C;</i>
    </router-link>

    <router-link class="button button-mobile button-right" 
        v-if="hasShowPath"
        to="/shows">
      <i class="material-icons">&#xE639;</i>
    </router-link>

    <router-link id="logo" to="/">
      Airflix
    </router-link>
  </div>

  <!-- menu -->
  <div id="navigation">
    <a class="button button-mobile" @click.prevent="hideMenu">
      <i class="material-icons">&#xE314;</i>
    </a>

    <ul>
      <router-link tag="li" to="/movies">
          <a @click="hideMenu">
            <i class="material-icons">&#xE02C;</i>
            Movies
          </a>
      </router-link>
      <router-link tag="li" to="/shows">
        <a @click="hideMenu">
          <i class="material-icons">&#xE639;</i>
          Shows
        </a>
      </router-link>
      <router-link tag="li" to="/settings">
        <a @click="hideMenu">
          <i class="material-icons">&#xE8B8;</i>
          Settings
        </a>
      </router-link>
    </ul>
  </div>

  <!-- overlay -->
  <a id="overlay" @click.prevent="toggleMenu"></a>

  <!-- main view -->
  <div id="content">
    <router-view
      class="view"
      transition
      transition-mode="out-in">
    </router-view>
  </div>

  <!-- footer -->
  <div id="footer">
    Created by <NAME>
  </div>

  <!-- toasts -->
  <toast></toast>
</div>
</template>

<script>
import Toast from './Toast.vue'
import { mapActions } from 'vuex'

export default {
  name: 'App',

  components: { 
    Toast
  },

  computed: {
    hasMoviePath: function () {
      return this.$route.path.indexOf('/movies/') > -1
    },

    hasShowPath: function () {
      return this.$route.path.indexOf('/shows/') > -1 ||
        this.$route.path.indexOf('/seasons/') > -1
    },

    showSearchButton: function () {
      return this.$route.path == '/movies' ||
        this.$route.path == '/shows';
    },

    showMenu: function () {
      return this.$store.state.interfaces.showMenu
    },

    showSearch: function () {
      return this.$store.state.interfaces.showSearch
    }
  },

  methods: {
    ...mapActions([
      'hideMenu',
      'toggleMenu',
      'toggleSearch'
    ])
  }
}
</script>
{'fraction_non_alphanumeric': 0.20565552699228792, 'fraction_numerical': 0.008397600685518423, 'mean_word_length': 2.240421987784564, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 0, '>': 157, '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': '7135260', 'n_tokens_mistral': 2067, 'n_tokens_neox': 1997, 'n_words': 372}