Working sidebar on mobile
							parent
							
								
									14ff4f2b74
								
							
						
					
					
						commit
						fb4af0afe0
					
				| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
  <div :class="{ multiple, loading }">
 | 
			
		||||
    <header>
 | 
			
		||||
      <div>
 | 
			
		||||
        <button aria-label="Toggle sidebar" title="Toggle sidebar" class="action">
 | 
			
		||||
        <button @click="openSidebar" aria-label="Toggle sidebar" title="Toggle sidebar" class="action">
 | 
			
		||||
          <i class="material-icons">menu</i>
 | 
			
		||||
        </button>
 | 
			
		||||
        <img src="../assets/logo.svg" alt="File Manager">
 | 
			
		||||
| 
						 | 
				
			
			@ -227,6 +227,9 @@ export default {
 | 
			
		|||
        this.loading = false
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    openSidebar () {
 | 
			
		||||
      this.$store.commit('showHover', 'sidebar')
 | 
			
		||||
    },
 | 
			
		||||
    openSearch () {
 | 
			
		||||
      this.$store.commit('showHover', 'search')
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,7 @@
 | 
			
		|||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div v-for="plugin in plugins">
 | 
			
		||||
      <button v-for="action in plugin.sidebar" @click="action.click" :aria-label="action.name" :title="action.name" class="action">
 | 
			
		||||
      <button v-for="action in plugin.sidebar" @click="action.click" :aria-label="action.name" :title="action.name" :key="action.name" class="action">
 | 
			
		||||
        <i class="material-icons">{{ action.icon }}</i>
 | 
			
		||||
        <span>{{ action.name }}</span>
 | 
			
		||||
      </button>
 | 
			
		||||
| 
						 | 
				
			
			@ -48,11 +48,15 @@ export default {
 | 
			
		|||
  name: 'sidebar',
 | 
			
		||||
  data: () => {
 | 
			
		||||
    return {
 | 
			
		||||
      plugins: [],
 | 
			
		||||
      active: false
 | 
			
		||||
      plugins: []
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    ...mapState(['user']),
 | 
			
		||||
    active () {
 | 
			
		||||
      return this.$store.state.show === 'sidebar'
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: mapState(['user']),
 | 
			
		||||
  mounted () {
 | 
			
		||||
    if (window.plugins !== undefined || window.plugins !== null) {
 | 
			
		||||
      this.plugins = window.plugins
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,14 +14,17 @@
 | 
			
		|||
@media (max-width: 736px) {
 | 
			
		||||
  nav {
 | 
			
		||||
    top: 0;
 | 
			
		||||
    z-index: 9999;
 | 
			
		||||
    z-index: 99999;
 | 
			
		||||
    background: #fff;
 | 
			
		||||
    height: 100%;
 | 
			
		||||
    width: 13em;
 | 
			
		||||
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
 | 
			
		||||
    transition: .2s ease-in-out left;
 | 
			
		||||
    transition: .1s ease left;
 | 
			
		||||
    left: -14em;
 | 
			
		||||
  }
 | 
			
		||||
  nav.active {
 | 
			
		||||
    left: 0;
 | 
			
		||||
  }
 | 
			
		||||
  header .search-button,
 | 
			
		||||
  header>div:first-child>.action {
 | 
			
		||||
    display: inherit;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue