<commit_before><!-- Copyright 2017 <NAME> <<EMAIL>>. All rights
     reserved. Use of this source code is governed by the AGPLv3 license that
     can be found in the LICENSE file. -->

<template>
  <div id="app">
    <navbar></navbar>
    <div class="content" v-bind:style="{ marginLeft: showSidebar ? sidebarWidth : '0px' }">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
 import Navbar from '@/components/General/Navbar'

 import { mapState } from 'vuex'

 export default {
   name: 'app',
   computed: mapState({
     sidebarWidth: (state) => { return state.sidebarWidth },
     showSidebar: (state) => { return state.showSidebar }
   }),

   components: {
     Navbar
   },

   mounted: function () {
     this.$store.commit('sidebarShown', false)
   }
 }
</script>

<style lang="scss">
 $fa-font-path: "~font-awesome/fonts";
 @import '~font-awesome/scss/font-awesome.scss';

 #app {
   font-family: 'Avenir', Helvetica, Arial, sans-serif;<commit_msg>Start support for global keybindings<commit_after><!-- Copyright 2017 <NAME> <<EMAIL>>. All rights
     reserved. Use of this source code is governed by the AGPLv3 license that
     can be found in the LICENSE file. -->

<template>
  <div id="app" @keydown="handleGlobalKeybind">
    <navbar></navbar>
    <div class="content"
      v-bind:style="{ marginLeft: showSidebar ? sidebarWidth : '0px' }">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
 import Navbar from '@/components/General/Navbar'

 import { mapState } from 'vuex'

 export default {
   name: 'app',

   computed: mapState({
     sidebarWidth: (state) => { return state.sidebarWidth },
     showSidebar: (state) => { return state.showSidebar }
   }),

   methods: {
     handleGlobalKeybind: function (ev) {
       console.log('global keybind', ev, boundKey)
       if (ev.target.tagName === 'INPUT' || ev.target.tagName === 'TEXTAREA') {
         console.log('inside input field ignore keybind')
         return
       }

       const boundKey = this.boundKeys[ev.key]
     }
   },

   data: function () {
     return {
       boundKeys: {
       }
     }
   },

   components: {
     Navbar
   },

   mounted: function () {
     this.$store.commit('sidebarShown', false)
   }
 }
</script>

<style lang="scss">
 $fa-font-path: "~font-awesome/fonts";
 @import '~font-awesome/scss/font-awesome.scss';

 #app {
   font-family: 'Avenir', Helvetica, Arial, sans-serif;
{'fraction_non_alphanumeric': 0.15664621676891616, 'fraction_numerical': 0.0049079754601227, 'mean_word_length': 2.9643435980551054, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 41, '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': '6136008', 'n_tokens_mistral': 833, 'n_tokens_neox': 792, 'n_words': 198}