app.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * First we will load all of this project's JavaScript dependencies which
  3. * includes Vue and other libraries. It is a great starting point when
  4. * building robust, powerful web applications using Vue and Laravel.
  5. */
  6. require('./bootstrap');
  7. window.Clipboard = require('clipboard');
  8. require('./notify.min.js');
  9. window.Vue = require('vue');
  10. /**
  11. * The following block of code may be used to automatically register your
  12. * Vue components. It will recursively scan this directory for the Vue
  13. * components and automatically register them with their "basename".
  14. *
  15. * Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
  16. */
  17. // const files = require.context('./', true, /\.vue$/i)
  18. // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))
  19. Vue.component('example-component', require('./components/ExampleComponent.vue').default);
  20. Vue.component('woinfo', require('./components/woinfo.vue').default);
  21. Vue.component('assetinfo', require('./components/assetinfo.vue').default);
  22. Vue.component('credential', require('./components/credential.vue').default);
  23. Vue.component('notes', require('./components/notes.vue').default);
  24. Vue.component('modal', require('./components/modal.vue').default);
  25. Vue.component('woinfo-edit-modal', require('./components/woinfo-edit-modal.vue').default);
  26. Vue.component('errorlist', require('./components/errorlist.vue').default);
  27. Vue.component('credential-form-modal', require('./components/credential-form-modal.vue').default);
  28. Vue.component('autocomplete-custom-dropdown', require('./components/autocomplete-custom-dropdown.vue').default);
  29. Vue.component('credential-list', require('./components/credential-list.vue').default);
  30. Vue.component('note-form-modal', require('./components/note-form-modal.vue').default);
  31. /**
  32. * Next, we will create a fresh Vue application instance and attach it to
  33. * the page. Then, you may begin adding components to this application
  34. * or customize the JavaScript scaffolding to fit your unique needs.
  35. */
  36. const app = new Vue({
  37. el: '#app',
  38. });
  39. $(function () {
  40. $('[data-toggle="tooltip"]').tooltip()
  41. });
  42. var clipboard = new Clipboard('.btn-clip');
  43. clipboard.on('success', function(e) {
  44. $('#' + e.trigger.getAttribute('id')).notify('Copied to Clipboard', {position:"right", className:'success'});
  45. e.clearSelection();
  46. });