Advertisement
DubStepMad

Untitled

Sep 22nd, 2022
1,149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import './bootstrap';
  2. import '../css/app.css';
  3. import '../css/main.css';
  4.  
  5. import Alpine from 'alpinejs';
  6. window.Alpine = Alpine;
  7. Alpine.start();
  8.  
  9. import { createApp } from 'vue/dist/vue.esm-bundler.js';
  10.  
  11. import moment from 'moment-timezone';
  12. import { createMetaManager } from 'vue-meta'
  13. import router from './routes';
  14. import vueCountryRegionSelect from 'vue-country-region-select';
  15. import LetItSnow from 'vue-let-it-snow';
  16.  
  17. const metaManager = createMetaManager();
  18. const app = createApp({
  19.     components: {
  20.         'player': import('./components/Player.vue').default,
  21.     },
  22.     data: function() {
  23.         return {
  24.             apiKey: 'd37598bc8168e874:1bc568275bc9944ed9458253013fcf5b'
  25.         }
  26.     },
  27.     computed: {
  28.         formatDate(value) {
  29.             if (value) {
  30.                 return moment.unix((value)).format('DD/MM/YYYY H:mm');
  31.             }
  32.         }
  33.     }
  34. })
  35.     .use(metaManager)
  36.     .use(vueCountryRegionSelect)
  37.     .use(LetItSnow)
  38.     .use(router);
  39.  
  40. app.config.compilerOptions.isCustomElement = (tag) => tag.includes('player')
  41.  
  42. if(document.querySelector("meta[name='user_id']")) {
  43.     app.config.globalProperties.$userId = document.querySelector("meta[name='user_id']").getAttribute('content');
  44. }
  45.  
  46. if(document.querySelector("meta[name='user_name']")) {
  47.     app.config.globalProperties.$userName = document.querySelector("meta[name='user_name']").getAttribute('content');
  48. }
  49.  
  50. app.mount('#app');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement