app.js 2.0 KB

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