All files / src/components FileList.vue

100% Statements 6/6
100% Branches 0/0
100% Functions 0/0
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59                                2x 2x   2x                         3x           8x 3x                                      
<template>
  <div :class="'col-md-'+cols">
    <div class="ls-flex ls-flex-row align-items-flex-end align-content-flex-end ls-space margin bottom-10">
      <div class="btn-group" role="group">
        <button type="button" id="FileManager--change-filewiz-to-tablerep" class="btn" @click="fileviz='tablerep'" :class="fileviz=='tablerep' ? 'btn-info active' : 'btn-default'">Table</button>
        <button type="button" id="FileManager--change-filewiz-to-iconrep" class="btn" @click="fileviz='iconrep'" :class="fileviz=='iconrep' ? 'btn-info active' : 'btn-default'">Icons</button>
      </div>
    </div>
    <div class="container-fluid">
        <component :is="fileviz" @setLoading="setLoading" :loading="loading"></component>
    </div>
    <modals-container />
  </div>
</template>
 
<script>
import Tablerep from './subcomponents/_tableRepresentation';
import Iconrep from './subcomponents/_iconRepresentation';
 
import applyLoader from '../mixins/applyLoader';
 
export default {
  name: 'FileList',
  mixins: [applyLoader],
  components: {
    Tablerep,
    Iconrep
  },
  props: {
    cols: {type: Number, default: 6},
  },
  data() {
    return {
      event: null
    };
  },
  computed: {
        fileviz: {
            get() { return this.$store.state.fileRepresentation; },
            set(nV) {this.$store.commit('setFileRepresentation', nV);}
        }
  }
}
</script>
 
<style lang="scss" scoped>
    .scoped-loadingOverlay {
        position: absolute;
        top: 0;
        left: 0;
        width:98%;
        height:98%;
        margin: 1%;
        padding:1%;
        background: hsla(0,0%,75%,0.5);
        z-index: 2;
    }
</style>