scinote-web/app/javascript/packs/vue/repository_item_sidebar.js

25 lines
917 B
JavaScript
Raw Normal View History

/* global notTurbolinksPreview */
2023-10-24 18:54:58 +08:00
import { createApp } from 'vue/dist/vue.esm-bundler.js';
import TurbolinksAdapter from 'vue-turbolinks';
import Vue from 'vue/dist/vue.esm';
import 'vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css';
import PerfectScrollbar from 'vue2-perfect-scrollbar';
import RepositoryItemSidebar from '../../vue/repository_item_sidebar/RepositoryItemSidebar.vue';
import outsideClick from './directives/outside_click';
2023-11-10 02:17:51 +08:00
import { mountWithTurbolinks } from './helpers/turbolinks.js';
Vue.use(TurbolinksAdapter);
Vue.directive('click-outside', outsideClick);
Vue.use(PerfectScrollbar);
Vue.prototype.i18n = window.I18n;
function initRepositoryItemSidebar() {
2023-10-24 18:54:58 +08:00
const app = createApp({});
app.component('RepositoryItemSidebar', RepositoryItemSidebar);
app.config.globalProperties.i18n = window.I18n;
2023-11-10 02:17:51 +08:00
mountWithTurbolinks(app, '#repositoryItemSidebar');
}
initRepositoryItemSidebar();