<commit_before><template>
  <b-modal headline="Add track" :show="show">
    <track-search class="adder" @select="appendTrackToPlaylist" />
    <div slot="footer">
      <b-button @click="$emit('close')">
        Close
      </b-button>
    </div>
  </b-modal>
</template>

<script>
import { mapActions } from 'vuex';
import TrackSearch from './TrackSearch';

export default {
  name: 'AddTrackModal',
  components: { TrackSearch },
  props: {
    show: {
      type: Boolean,
      required: true,
    },
  },
  methods: {
    ...mapActions('app', [
      'closeModal',
    ]),
    ...mapActions('editor', [
      'appendTrackToPlaylist',
    ]),
  },
};
</script>

<style lang="scss" scoped>
  .adder {
    width: 600px;
    height: 290px;
  }
</style><commit_msg>fix: 🐛 Fixed track adder window on mobile<commit_after><template>
  <b-modal headline="Add track" :show="show">
    <track-search class="adder" @select="addTrack" />
    <div slot="footer">
      <b-button @click="$emit('close')">
        Close
      </b-button>
    </div>
  </b-modal>
</template>

<script>
import { mapActions } from 'vuex';
import TrackSearch from './TrackSearch';

export default {
  name: 'AddTrackModal',
  components: { TrackSearch },
  props: {
    show: {
      type: Boolean,
      required: true,
    },
  },
  methods: {
    ...mapActions('editor', [
      'appendTrackToPlaylist',
    ]),
    addTrack(uri) {
      this.appendTrackToPlaylist(uri);
      this.$emit('close');
    },
  },
};
</script>

<style lang="scss" scoped>
  .adder {
    width: 600px;
    height: 290px;
  }

  @media screen and (max-width: 768px) {
    .adder {
      min-width: calc(100vw - 80px);
      width: calc(100vw - 80px);
      height:70vh;
    }
  }
</style>
{'fraction_non_alphanumeric': 0.17904432930339667, 'fraction_numerical': 0.015544041450777202, 'mean_word_length': 2.6589473684210527, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '3855828', 'n_tokens_mistral': 641, 'n_tokens_neox': 601, 'n_words': 126}