mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
refactor: initial pinia implementation
This commit is contained in:
@ -57,6 +57,8 @@
|
||||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useApplicationStore } from '@/stores/application';
|
||||
import Draggable from 'vuedraggable';
|
||||
import SettingBarContext from '@/components/SettingBarContext';
|
||||
|
||||
@ -66,6 +68,18 @@ export default {
|
||||
Draggable,
|
||||
SettingBarContext
|
||||
},
|
||||
setup () {
|
||||
const applicationStore = useApplicationStore();
|
||||
const { updateStatus } = storeToRefs(applicationStore);
|
||||
const { showSettingModal, showScratchpad } = applicationStore;
|
||||
|
||||
return {
|
||||
applicationStore,
|
||||
updateStatus,
|
||||
showSettingModal,
|
||||
showScratchpad
|
||||
};
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
dragElement: null,
|
||||
@ -81,8 +95,7 @@ export default {
|
||||
getConnections: 'connections/getConnections',
|
||||
getConnectionName: 'connections/getConnectionName',
|
||||
getWorkspace: 'workspaces/getWorkspace',
|
||||
selectedWorkspace: 'workspaces/getSelected',
|
||||
updateStatus: 'application/getUpdateStatus'
|
||||
selectedWorkspace: 'workspaces/getSelected'
|
||||
}),
|
||||
connections: {
|
||||
get () {
|
||||
@ -99,8 +112,6 @@ export default {
|
||||
methods: {
|
||||
...mapActions({
|
||||
updateConnections: 'connections/updateConnections',
|
||||
showSettingModal: 'application/showSettingModal',
|
||||
showScratchpad: 'application/showScratchpad',
|
||||
selectWorkspace: 'workspaces/selectWorkspace'
|
||||
}),
|
||||
contextMenu (event, connection) {
|
||||
|
Reference in New Issue
Block a user