<commit_before><template>
  <div class="main-wrapper">
    <sidebar />
    <editor />
  </div>
</template>

<script>
import Sidebar from './Sidebar';
import Editor from './Editor';
import { getContentsRootUrl } from './../helpers/apiHelpers';

export default {
  components: {
    'sidebar': Sidebar,
    'editor': Editor,
  },
  mounted() {
    /* on start we need to set project's source folder
    path into the store to be accessible for the rest of the app components */
    getContentsRootUrl().then(resp => {
      this.$store.dispatch('setArticleRootPath', resp.data);
    });
  },
};
</script>

<style lang="scss">
.main-wrapper {
  background: $gray-lighter;
  bottom: 0;
  display: block;
  left: 0;
  margin: 0;
  padding: 0;
  position: fixed;
  right: 0;
  top: 0;
  width: 100%;
}<commit_msg>Added if statement to toggle whole editor if article is selected.<commit_after><template>
  <div class="main-wrapper">
    <sidebar />
    <editor v-if="selectedArticle" />
  </div>
</template>

<script>
import Sidebar from './Sidebar';
import Editor from './Editor';
import { getContentsRootUrl } from './../helpers/apiHelpers';

export default {
  components: {
    'sidebar': Sidebar,
    'editor': Editor,
  },
  computed: {
    selectedArticle() {
      return Object.keys(this.$store.getters.getSelectedArticle).length;
    }
  },
  mounted() {
    /* on start we need to set project's source folder
    path into the store to be accessible for the rest of the app components */
    getContentsRootUrl().then(resp => {
      this.$store.dispatch('setArticleRootPath', resp.data);
    });
  },
};
</script>

<style lang="scss">
.main-wrapper {
  background: $gray-lighter;
  bottom: 0;
  display: block;
  left: 0;
  margin: 0;
  padding: 0;
  position: fixed;
  right: 0;
  top: 0;
  width: 100%;
}
{'fraction_non_alphanumeric': 0.15129762562120375, 'fraction_numerical': 0.009939260077305357, 'mean_word_length': 3.2237762237762237, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, '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': '2747506', 'n_tokens_mistral': 602, 'n_tokens_neox': 582, 'n_words': 171}