diff --git a/jsonconfig.json b/jsconfig.json similarity index 100% rename from jsonconfig.json rename to jsconfig.json diff --git a/src/main/web/configuration.js b/src/main/web/configuration.js index 8998e59d..e22903b5 100644 --- a/src/main/web/configuration.js +++ b/src/main/web/configuration.js @@ -1,9 +1,6 @@ import Vue from 'vue'; -import LicensesPage from './configuration/licenses-page'; -import DependencyMappingsPage from './configuration/dependency-mappings-page'; -import LicenseMappingsPage from './configuration/license-mappings-page'; -import ProjectLicensesPage from './configuration/project-licenses-page'; import ModalDialog from './modal-dialog'; +import Configuration from './configuration/configuration.vue'; import VueSVGIcon from 'vue-svgicon' Vue.use(VueSVGIcon) @@ -13,44 +10,14 @@ window.registerExtension('licensecheck/configuration', function (options) { Vue.component('modal-dialog', ModalDialog); const app = new Vue({ el: options.el, - data: () => { - return { - currentRoute: 'licenses' - } - }, - methods: { - activateCategory(event, route) { - event.preventDefault(); - this.currentRoute = route; - window.history.pushState({}, document.title, `?category=${route}`) - }, - routeListener() { - const result = window.location.search.match(/category=([^&=]*)/); - if (result && result.length > 1) { - this.currentRoute = result[1]; - } else { - this.currentRoute = 'licenses'; + // Cannot use `template`. Eval is blocked by CSP + render(createElement) { + return createElement(Configuration, { + props: { + options } - } - }, - components: { LicensesPage, DependencyMappingsPage, LicenseMappingsPage, ProjectLicensesPage}, - template: `
` + }); + } }); window.addEventListener('popstate', app.routeListener); diff --git a/src/main/web/configuration/configuration.vue b/src/main/web/configuration/configuration.vue new file mode 100644 index 00000000..f0fc753f --- /dev/null +++ b/src/main/web/configuration/configuration.vue @@ -0,0 +1,52 @@ + + + + + +