snibox/snibox

View on GitHub
app/javascript/packs/page.js

Summary

Maintainability
A
0 mins
Test Coverage
import Vue from 'vue/dist/vue.esm'
import Notifications from '../snibox/utils/notifications'

document.addEventListener('DOMContentLoaded', () => {
  window.navbar = new Vue({
    el: '#page-wrapper',

    mounted() {
      this.$el.style.display = 'block'
    },

    methods: {
      resetLocalStorage() {
        localStorage.removeItem('labels_active')
        localStorage.removeItem('label_snippets_active')
        Notifications.toast.success('Local storage flushed!')
      }
    }
  })
})