summaryrefslogtreecommitdiff
path: root/app/src/store.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/store.js')
-rw-r--r--app/src/store.js49
1 files changed, 21 insertions, 28 deletions
diff --git a/app/src/store.js b/app/src/store.js
index 294380c..b2fe7f1 100644
--- a/app/src/store.js
+++ b/app/src/store.js
@@ -1,32 +1,25 @@
-import { createStore } from 'vuex';
+import { ref } from 'vue';
+import { defineStore } from 'pinia';
-export default createStore({
- state () {
- return {
- from: {
- server: 'localhost',
- port: 3143,
- username: 'from@example.org',
- password: 'password',
- tls: false,
- },
- to: {
- server: 'localhost',
- port: 31432,
- username: 'to@example.org',
- password: 'password',
- tls: false,
- },
- };
- },
+export const useStore = defineStore('store', () => {
+ const from = ref({
+ server: 'localhost',
+ port: 3143,
+ username: 'from@example.org',
+ password: 'password',
+ tls: false,
+ });
- mutations: {
- setFrom (state, payload) {
- state.from = Object.assign(state.from, payload);
- },
+ const to = ref({
+ server: 'localhost',
+ port: 31432,
+ username: 'to@example.org',
+ password: 'password',
+ tls: false,
+ });
- setTo (state, payload) {
- state.to = Object.assign(state.to, payload);
- },
- },
+ return {
+ from,
+ to,
+ };
});