From 73eb5ffe931b19a42e3858b3189fd1f3d65062ce Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Thu, 11 Mar 2021 21:58:12 +0100 Subject: [PATCH] split popup into ts --- .../{App.vue => ExtensionActionButtonApp.vue} | 84 +++++++------------ src/popup/Popup.ts | 10 +++ src/popup/popup.js | 5 +- 3 files changed, 43 insertions(+), 56 deletions(-) rename src/popup/{App.vue => ExtensionActionButtonApp.vue} (91%) create mode 100644 src/popup/Popup.ts diff --git a/src/popup/App.vue b/src/popup/ExtensionActionButtonApp.vue similarity index 91% rename from src/popup/App.vue rename to src/popup/ExtensionActionButtonApp.vue index ec50f96..6922723 100644 --- a/src/popup/App.vue +++ b/src/popup/ExtensionActionButtonApp.vue @@ -195,8 +195,8 @@ :settings="settings" :site="selectedSite" /> - + @@ -205,39 +205,23 @@ - diff --git a/src/popup/Popup.ts b/src/popup/Popup.ts new file mode 100644 index 0000000..76694ba --- /dev/null +++ b/src/popup/Popup.ts @@ -0,0 +1,10 @@ +import { createApp } from 'vue' +import App from './ExtensionActionButtonApp.vue'; + +class Popup { + static createApp() { + createApp(App).mount('#app'); + } +} + +export default Popup; \ No newline at end of file diff --git a/src/popup/popup.js b/src/popup/popup.js index d928927..905e90c 100644 --- a/src/popup/popup.js +++ b/src/popup/popup.js @@ -1,4 +1,3 @@ -import { createApp } from 'vue' -import App from './App'; +import Popup from './Popup'; -createApp(App).mount('#app'); +Popup.createApp();