app.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. /**
  31. * Next, we will create a fresh Vue application instance and attach it to
  32. * the page. Then, you may begin adding components to this application
  33. * or customize the JavaScript scaffolding to fit your unique needs.
  34. */
  35. const app = new Vue({
  36. el: '#app',
  37. });
  38. $(function () {
  39. $('[data-toggle="tooltip"]').tooltip()
  40. });
  41. var clipboard = new Clipboard('.btn-clip');
  42. clipboard.on('success', function(e) {
  43. $('#' + e.trigger.getAttribute('id')).notify('Copied to Clipboard', {position:"right", className:'success'});
  44. e.clearSelection();
  45. });