From f6096a18016be63c719d2ce5a27d64363862b0fd Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 22 Jun 2021 00:18:35 +0200 Subject: Initial commit --- app/src/App.vue | 3 + app/src/components/Folders.vue | 21 +++++++ app/src/components/Panel.vue | 34 +++++++++++ app/src/index.js | 13 +++++ app/src/mixins/dynamicModelObjectEmit.js | 16 ++++++ app/src/pages/Home.vue | 99 ++++++++++++++++++++++++++++++++ app/src/router.js | 12 ++++ app/src/store.js | 30 ++++++++++ 8 files changed, 228 insertions(+) create mode 100644 app/src/App.vue create mode 100644 app/src/components/Folders.vue create mode 100644 app/src/components/Panel.vue create mode 100644 app/src/index.js create mode 100644 app/src/mixins/dynamicModelObjectEmit.js create mode 100644 app/src/pages/Home.vue create mode 100644 app/src/router.js create mode 100644 app/src/store.js (limited to 'app/src') diff --git a/app/src/App.vue b/app/src/App.vue new file mode 100644 index 0000000..98240ae --- /dev/null +++ b/app/src/App.vue @@ -0,0 +1,3 @@ + diff --git a/app/src/components/Folders.vue b/app/src/components/Folders.vue new file mode 100644 index 0000000..b801c1a --- /dev/null +++ b/app/src/components/Folders.vue @@ -0,0 +1,21 @@ + + + diff --git a/app/src/components/Panel.vue b/app/src/components/Panel.vue new file mode 100644 index 0000000..3ae4000 --- /dev/null +++ b/app/src/components/Panel.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/app/src/index.js b/app/src/index.js new file mode 100644 index 0000000..46dc556 --- /dev/null +++ b/app/src/index.js @@ -0,0 +1,13 @@ +import { createApp } from 'vue'; +import router from './router'; +import store from './store'; +import App from './App'; + +const app = createApp(App); + +app.config.globalProperties.$electron = require('electron'); + +app.use(router); +app.use(store); + +app.mount('#app'); diff --git a/app/src/mixins/dynamicModelObjectEmit.js b/app/src/mixins/dynamicModelObjectEmit.js new file mode 100644 index 0000000..93701c8 --- /dev/null +++ b/app/src/mixins/dynamicModelObjectEmit.js @@ -0,0 +1,16 @@ +export default { + props: { + modelValue: { + type: Object, + required: true, + }, + }, + + emits: ['update:modelValue'], + + methods: { + emit (key, value) { + this.$emit('update:modelValue', { ...this.modelValue, [key]: value }); + }, + }, +}; diff --git a/app/src/pages/Home.vue b/app/src/pages/Home.vue new file mode 100644 index 0000000..2fe4030 --- /dev/null +++ b/app/src/pages/Home.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/app/src/router.js b/app/src/router.js new file mode 100644 index 0000000..7676449 --- /dev/null +++ b/app/src/router.js @@ -0,0 +1,12 @@ +import { createRouter, createWebHashHistory } from 'vue-router'; +import Home from './pages/Home'; + +export default createRouter({ + history: createWebHashHistory(), + routes: [ + { + path: '/', + component: Home, + }, + ], +}); diff --git a/app/src/store.js b/app/src/store.js new file mode 100644 index 0000000..db5a9fa --- /dev/null +++ b/app/src/store.js @@ -0,0 +1,30 @@ +import { createStore } from 'vuex'; + +export default createStore({ + state () { + return { + from: { + server: 'localhost', + port: '3143', + username: 'd@cool.de', + password: 'lolo11', + }, + to: { + server: '', + port: '', + username: '', + password: '', + }, + }; + }, + + mutations: { + setFrom (state, payload) { + state.from = Object.assign(state.from, payload); + }, + + setTo (state, payload) { + state.to = Object.assign(state.to, payload); + }, + }, +}); -- cgit v1.2.3