mirror of https://github.com/Fabio286/antares.git
refactor: initial pinia implementation
This commit is contained in:
parent
0821586bb3
commit
9dd685b062
|
@ -26,9 +26,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { defineAsyncComponent } from 'vue';
|
import { defineAsyncComponent } from 'vue';
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
import { Menu, getCurrentWindow } from '@electron/remote';
|
import { Menu, getCurrentWindow } from '@electron/remote';
|
||||||
|
import { useApplicationStore } from '@/stores/application';
|
||||||
import TheSettingBar from '@/components/TheSettingBar';
|
import TheSettingBar from '@/components/TheSettingBar';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -44,16 +46,30 @@ export default {
|
||||||
TheScratchpad: defineAsyncComponent(() => import(/* webpackChunkName: "TheScratchpad" */'@/components/TheScratchpad')),
|
TheScratchpad: defineAsyncComponent(() => import(/* webpackChunkName: "TheScratchpad" */'@/components/TheScratchpad')),
|
||||||
BaseTextEditor: defineAsyncComponent(() => import(/* webpackChunkName: "BaseTextEditor" */'@/components/BaseTextEditor'))
|
BaseTextEditor: defineAsyncComponent(() => import(/* webpackChunkName: "BaseTextEditor" */'@/components/BaseTextEditor'))
|
||||||
},
|
},
|
||||||
|
setup () {
|
||||||
|
const applicationStore = useApplicationStore();
|
||||||
|
const {
|
||||||
|
isLoading,
|
||||||
|
isSettingModal,
|
||||||
|
isScratchpad
|
||||||
|
} = storeToRefs(applicationStore);
|
||||||
|
|
||||||
|
const { checkVersionUpdate } = applicationStore;
|
||||||
|
|
||||||
|
return {
|
||||||
|
applicationStore,
|
||||||
|
isLoading,
|
||||||
|
isSettingModal,
|
||||||
|
isScratchpad,
|
||||||
|
checkVersionUpdate
|
||||||
|
};
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters({
|
...mapGetters({
|
||||||
selectedWorkspace: 'workspaces/getSelected',
|
|
||||||
isLoading: 'application/isLoading',
|
|
||||||
isSettingModal: 'application/isSettingModal',
|
|
||||||
isScratchpad: 'application/isScratchpad',
|
|
||||||
connections: 'connections/getConnections',
|
connections: 'connections/getConnections',
|
||||||
applicationTheme: 'settings/getApplicationTheme',
|
applicationTheme: 'settings/getApplicationTheme',
|
||||||
disableBlur: 'settings/getDisableBlur',
|
disableBlur: 'settings/getDisableBlur',
|
||||||
isUnsavedDiscardModal: 'workspaces/isUnsavedDiscardModal'
|
selectedWorkspace: 'workspaces/getSelected'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
@ -96,12 +112,6 @@ export default {
|
||||||
node = node.parentNode;
|
node = node.parentNode;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
...mapActions({
|
|
||||||
showNewConnModal: 'application/showNewConnModal',
|
|
||||||
checkVersionUpdate: 'application/checkVersionUpdate'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
import * as ace from 'ace-builds';
|
import * as ace from 'ace-builds';
|
||||||
import 'ace-builds/webpack-resolver';
|
import 'ace-builds/webpack-resolver';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import { uidGen } from 'common/libs/uidGen';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BaseTextEditor',
|
name: 'BaseTextEditor',
|
||||||
|
@ -78,7 +79,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.id = this._uid;
|
this.id = uidGen('E');
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.editor = ace.edit(`editor-${this.id}`, {
|
this.editor = ace.edit(`editor-${this.id}`, {
|
||||||
|
|
|
@ -320,6 +320,8 @@
|
||||||
<script>
|
<script>
|
||||||
import { shell } from 'electron';
|
import { shell } from 'electron';
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
|
import { useApplicationStore } from '@/stores/application';
|
||||||
import localesNames from '@/i18n/supported-locales';
|
import localesNames from '@/i18n/supported-locales';
|
||||||
import ModalSettingsUpdate from '@/components/ModalSettingsUpdate';
|
import ModalSettingsUpdate from '@/components/ModalSettingsUpdate';
|
||||||
import ModalSettingsChangelog from '@/components/ModalSettingsChangelog';
|
import ModalSettingsChangelog from '@/components/ModalSettingsChangelog';
|
||||||
|
@ -332,6 +334,27 @@ export default {
|
||||||
ModalSettingsChangelog,
|
ModalSettingsChangelog,
|
||||||
BaseTextEditor
|
BaseTextEditor
|
||||||
},
|
},
|
||||||
|
setup () {
|
||||||
|
const applicationStore = useApplicationStore();
|
||||||
|
const {
|
||||||
|
selectedSettingTab,
|
||||||
|
updateStatus
|
||||||
|
} = storeToRefs(applicationStore);
|
||||||
|
|
||||||
|
const {
|
||||||
|
hideSettingModal,
|
||||||
|
appName,
|
||||||
|
appVersion
|
||||||
|
} = applicationStore;
|
||||||
|
|
||||||
|
return {
|
||||||
|
appName,
|
||||||
|
appVersion,
|
||||||
|
selectedSettingTab,
|
||||||
|
updateStatus,
|
||||||
|
closeModal: hideSettingModal
|
||||||
|
};
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
appAuthor: 'Fabio Di Stasio',
|
appAuthor: 'Fabio Di Stasio',
|
||||||
|
@ -395,9 +418,6 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters({
|
...mapGetters({
|
||||||
appName: 'application/appName',
|
|
||||||
appVersion: 'application/appVersion',
|
|
||||||
selectedSettingTab: 'application/selectedSettingTab',
|
|
||||||
selectedLocale: 'settings/getLocale',
|
selectedLocale: 'settings/getLocale',
|
||||||
pageSize: 'settings/getDataTabLimit',
|
pageSize: 'settings/getDataTabLimit',
|
||||||
selectedAutoComplete: 'settings/getAutoComplete',
|
selectedAutoComplete: 'settings/getAutoComplete',
|
||||||
|
@ -408,7 +428,6 @@ export default {
|
||||||
applicationTheme: 'settings/getApplicationTheme',
|
applicationTheme: 'settings/getApplicationTheme',
|
||||||
editorTheme: 'settings/getEditorTheme',
|
editorTheme: 'settings/getEditorTheme',
|
||||||
editorFontSize: 'settings/getEditorFontSize',
|
editorFontSize: 'settings/getEditorFontSize',
|
||||||
updateStatus: 'application/getUpdateStatus',
|
|
||||||
selectedWorkspace: 'workspaces/getSelected',
|
selectedWorkspace: 'workspaces/getSelected',
|
||||||
getWorkspace: 'workspaces/getWorkspace'
|
getWorkspace: 'workspaces/getWorkspace'
|
||||||
}),
|
}),
|
||||||
|
@ -462,7 +481,6 @@ ORDER BY
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions({
|
...mapActions({
|
||||||
closeModal: 'application/hideSettingModal',
|
|
||||||
changeLocale: 'settings/changeLocale',
|
changeLocale: 'settings/changeLocale',
|
||||||
changePageSize: 'settings/changePageSize',
|
changePageSize: 'settings/changePageSize',
|
||||||
changeRestoreTabs: 'settings/changeRestoreTabs',
|
changeRestoreTabs: 'settings/changeRestoreTabs',
|
||||||
|
|
|
@ -15,15 +15,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { marked } from 'marked';
|
import { marked } from 'marked';
|
||||||
import BaseLoader from '@/components/BaseLoader';
|
import BaseLoader from '@/components/BaseLoader';
|
||||||
|
import { useApplicationStore } from '@/stores/application';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalSettingsChangelog',
|
name: 'ModalSettingsChangelog',
|
||||||
components: {
|
components: {
|
||||||
BaseLoader
|
BaseLoader
|
||||||
},
|
},
|
||||||
|
setup () {
|
||||||
|
const { appVersion } = useApplicationStore();
|
||||||
|
return { appVersion };
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
changelog: '',
|
changelog: '',
|
||||||
|
@ -32,9 +36,6 @@ export default {
|
||||||
isError: false
|
isError: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapGetters({ appVersion: 'application/appVersion' })
|
|
||||||
},
|
|
||||||
created () {
|
created () {
|
||||||
this.getChangelog();
|
this.getChangelog();
|
||||||
},
|
},
|
||||||
|
|
|
@ -53,15 +53,27 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapActions } from 'vuex';
|
|
||||||
import { ipcRenderer, shell } from 'electron';
|
import { ipcRenderer, shell } from 'electron';
|
||||||
|
import { mapGetters, mapActions } from 'vuex';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
|
import { useApplicationStore } from '@/stores/application';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ModalSettingsUpdate',
|
name: 'ModalSettingsUpdate',
|
||||||
|
setup () {
|
||||||
|
const applicationStore = useApplicationStore();
|
||||||
|
const {
|
||||||
|
updateStatus,
|
||||||
|
getDownloadProgress
|
||||||
|
} = storeToRefs(applicationStore);
|
||||||
|
|
||||||
|
return {
|
||||||
|
updateStatus,
|
||||||
|
downloadPercentage: getDownloadProgress
|
||||||
|
};
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters({
|
...mapGetters({
|
||||||
updateStatus: 'application/getUpdateStatus',
|
|
||||||
downloadPercentage: 'application/getDownloadProgress',
|
|
||||||
allowPrerelease: 'settings/getAllowPrerelease'
|
allowPrerelease: 'settings/getAllowPrerelease'
|
||||||
}),
|
}),
|
||||||
updateMessage () {
|
updateMessage () {
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
import * as ace from 'ace-builds';
|
import * as ace from 'ace-builds';
|
||||||
import 'ace-builds/webpack-resolver';
|
import 'ace-builds/webpack-resolver';
|
||||||
import '../libs/ext-language_tools';
|
import '../libs/ext-language_tools';
|
||||||
import { mapGetters, mapActions } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
|
import { useApplicationStore } from '@/stores/application';
|
||||||
import Tables from '@/ipc-api/Tables';
|
import Tables from '@/ipc-api/Tables';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -27,6 +29,16 @@ export default {
|
||||||
height: { type: Number, default: 200 }
|
height: { type: Number, default: 200 }
|
||||||
},
|
},
|
||||||
emits: ['update:modelValue'],
|
emits: ['update:modelValue'],
|
||||||
|
setup () {
|
||||||
|
const applicationStore = useApplicationStore();
|
||||||
|
const { setBaseCompleters } = applicationStore;
|
||||||
|
const { baseCompleter } = storeToRefs(applicationStore);
|
||||||
|
|
||||||
|
return {
|
||||||
|
baseCompleter,
|
||||||
|
setBaseCompleters
|
||||||
|
};
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
editor: null,
|
editor: null,
|
||||||
|
@ -41,8 +53,7 @@ export default {
|
||||||
editorTheme: 'settings/getEditorTheme',
|
editorTheme: 'settings/getEditorTheme',
|
||||||
editorFontSize: 'settings/getEditorFontSize',
|
editorFontSize: 'settings/getEditorFontSize',
|
||||||
autoComplete: 'settings/getAutoComplete',
|
autoComplete: 'settings/getAutoComplete',
|
||||||
lineWrap: 'settings/getLineWrap',
|
lineWrap: 'settings/getLineWrap'
|
||||||
baseCompleter: 'application/getBaseCompleter'
|
|
||||||
}),
|
}),
|
||||||
tables () {
|
tables () {
|
||||||
return this.workspace
|
return this.workspace
|
||||||
|
@ -295,9 +306,6 @@ export default {
|
||||||
}, 20);
|
}, 20);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions({
|
|
||||||
setBaseCompleters: 'application/setBaseCompleter'
|
|
||||||
}),
|
|
||||||
setCustomCompleter () {
|
setCustomCompleter () {
|
||||||
this.editor.completers.push({
|
this.editor.completers.push({
|
||||||
getCompletions: (editor, session, pos, prefix, callback) => {
|
getCompletions: (editor, session, pos, prefix, callback) => {
|
||||||
|
|
|
@ -27,16 +27,26 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
import { useApplicationStore } from '@/stores/application';
|
||||||
const { shell } = require('electron');
|
const { shell } = require('electron');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TheFooter',
|
name: 'TheFooter',
|
||||||
|
setup () {
|
||||||
|
const applicationStore = useApplicationStore();
|
||||||
|
|
||||||
|
const { appVersion, showSettingModal } = applicationStore;
|
||||||
|
|
||||||
|
return {
|
||||||
|
appVersion,
|
||||||
|
showSettingModal
|
||||||
|
};
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters({
|
...mapGetters({
|
||||||
workspace: 'workspaces/getSelected',
|
workspace: 'workspaces/getSelected',
|
||||||
getWorkspace: 'workspaces/getWorkspace',
|
getWorkspace: 'workspaces/getWorkspace'
|
||||||
appVersion: 'application/appVersion'
|
|
||||||
}),
|
}),
|
||||||
version () {
|
version () {
|
||||||
return this.getWorkspace(this.workspace) ? this.getWorkspace(this.workspace).version : null;
|
return this.getWorkspace(this.workspace) ? this.getWorkspace(this.workspace).version : null;
|
||||||
|
@ -48,9 +58,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions({
|
|
||||||
showSettingModal: 'application/showSettingModal'
|
|
||||||
}),
|
|
||||||
openOutside (link) {
|
openOutside (link) {
|
||||||
shell.openExternal(link);
|
shell.openExternal(link);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
|
import { useApplicationStore } from '@/stores/application';
|
||||||
import ConfirmModal from '@/components/BaseConfirmModal';
|
import ConfirmModal from '@/components/BaseConfirmModal';
|
||||||
import TextEditor from '@/components/BaseTextEditor';
|
import TextEditor from '@/components/BaseTextEditor';
|
||||||
|
|
||||||
|
@ -40,6 +41,11 @@ export default {
|
||||||
TextEditor
|
TextEditor
|
||||||
},
|
},
|
||||||
emits: ['hide'],
|
emits: ['hide'],
|
||||||
|
setup () {
|
||||||
|
const applicationStore = useApplicationStore();
|
||||||
|
|
||||||
|
return { hideScratchpad: applicationStore.hideScratchpad };
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
localNotes: '',
|
localNotes: '',
|
||||||
|
@ -65,7 +71,6 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions({
|
...mapActions({
|
||||||
hideScratchpad: 'application/hideScratchpad',
|
|
||||||
changeNotes: 'scratchpad/changeNotes'
|
changeNotes: 'scratchpad/changeNotes'
|
||||||
}),
|
}),
|
||||||
hideModal () {
|
hideModal () {
|
||||||
|
|
|
@ -57,6 +57,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapActions, mapGetters } from 'vuex';
|
import { mapActions, mapGetters } from 'vuex';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
|
import { useApplicationStore } from '@/stores/application';
|
||||||
import Draggable from 'vuedraggable';
|
import Draggable from 'vuedraggable';
|
||||||
import SettingBarContext from '@/components/SettingBarContext';
|
import SettingBarContext from '@/components/SettingBarContext';
|
||||||
|
|
||||||
|
@ -66,6 +68,18 @@ export default {
|
||||||
Draggable,
|
Draggable,
|
||||||
SettingBarContext
|
SettingBarContext
|
||||||
},
|
},
|
||||||
|
setup () {
|
||||||
|
const applicationStore = useApplicationStore();
|
||||||
|
const { updateStatus } = storeToRefs(applicationStore);
|
||||||
|
const { showSettingModal, showScratchpad } = applicationStore;
|
||||||
|
|
||||||
|
return {
|
||||||
|
applicationStore,
|
||||||
|
updateStatus,
|
||||||
|
showSettingModal,
|
||||||
|
showScratchpad
|
||||||
|
};
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
dragElement: null,
|
dragElement: null,
|
||||||
|
@ -81,8 +95,7 @@ export default {
|
||||||
getConnections: 'connections/getConnections',
|
getConnections: 'connections/getConnections',
|
||||||
getConnectionName: 'connections/getConnectionName',
|
getConnectionName: 'connections/getConnectionName',
|
||||||
getWorkspace: 'workspaces/getWorkspace',
|
getWorkspace: 'workspaces/getWorkspace',
|
||||||
selectedWorkspace: 'workspaces/getSelected',
|
selectedWorkspace: 'workspaces/getSelected'
|
||||||
updateStatus: 'application/getUpdateStatus'
|
|
||||||
}),
|
}),
|
||||||
connections: {
|
connections: {
|
||||||
get () {
|
get () {
|
||||||
|
@ -99,8 +112,6 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions({
|
...mapActions({
|
||||||
updateConnections: 'connections/updateConnections',
|
updateConnections: 'connections/updateConnections',
|
||||||
showSettingModal: 'application/showSettingModal',
|
|
||||||
showScratchpad: 'application/showScratchpad',
|
|
||||||
selectWorkspace: 'workspaces/selectWorkspace'
|
selectWorkspace: 'workspaces/selectWorkspace'
|
||||||
}),
|
}),
|
||||||
contextMenu (event, connection) {
|
contextMenu (event, connection) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createI18n } from 'vue-i18n/dist/vue-i18n.esm-bundler';
|
import { createI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const i18n = createI18n({
|
const i18n = createI18n({
|
||||||
fallbackLocale: 'en-US',
|
fallbackLocale: 'en-US',
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||||
|
/* eslint-disable @typescript-eslint/no-this-alias */
|
||||||
/* eslint-disable no-labels */
|
/* eslint-disable no-labels */
|
||||||
/* eslint-disable no-return-assign */
|
/* eslint-disable no-return-assign */
|
||||||
/* eslint-disable no-cond-assign */
|
/* eslint-disable no-cond-assign */
|
||||||
|
|
|
@ -13,8 +13,6 @@ import ipcUpdates from './plugins/ipcUpdates';
|
||||||
import ipcExceptions from './plugins/ipcExceptions';
|
import ipcExceptions from './plugins/ipcExceptions';
|
||||||
import ipcShortcuts from './plugins/ipcShortcuts';
|
import ipcShortcuts from './plugins/ipcShortcuts';
|
||||||
|
|
||||||
// Vue.use(Vuex);
|
|
||||||
|
|
||||||
export const store = createStore({
|
export const store = createStore({
|
||||||
strict: true,
|
strict: true,
|
||||||
modules: {
|
modules: {
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
import { defineStore, acceptHMRUpdate } from 'pinia';
|
||||||
|
import Store from 'electron-store';
|
||||||
|
const persistentStore = new Store({ name: 'settings' });
|
||||||
|
|
||||||
|
export const useApplicationStore = defineStore('application', {
|
||||||
|
state: () => ({
|
||||||
|
appName: 'Antares - SQL Client',
|
||||||
|
appVersion: process.env.PACKAGE_VERSION || 0,
|
||||||
|
cachedVersion: persistentStore.get('cached_version', 0),
|
||||||
|
isLoading: false,
|
||||||
|
isNewModal: false,
|
||||||
|
isSettingModal: false,
|
||||||
|
isScratchpad: false,
|
||||||
|
selectedSettingTab: 'general',
|
||||||
|
selectedConection: {},
|
||||||
|
updateStatus: 'noupdate', // 'noupdate' | 'available' | 'checking' | 'nocheck' | 'downloading' | 'downloaded' | 'disabled'
|
||||||
|
downloadProgress: 0,
|
||||||
|
baseCompleter: [] // Needed to reset ace editor, due global-only ace completer
|
||||||
|
}),
|
||||||
|
getters: {
|
||||||
|
getBaseCompleter: state => state.baseCompleter,
|
||||||
|
getSelectedConnection: state => state.selectedConection,
|
||||||
|
getDownloadProgress: state => Number(state.downloadProgress.toFixed(1))
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
checkVersionUpdate () {
|
||||||
|
if (this.appVersion !== this.cachedVersion) {
|
||||||
|
this.showSettingModal('changelog');
|
||||||
|
this.cachedVersion = this.appVersion;
|
||||||
|
persistentStore.set('cached_version', this.cachedVersion);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setLoadingStatus (payload) {
|
||||||
|
this.isLoading = payload;
|
||||||
|
},
|
||||||
|
setBaseCompleters (payload) {
|
||||||
|
this.baseCompleter = payload;
|
||||||
|
},
|
||||||
|
// Modals
|
||||||
|
showNewConnModal () {
|
||||||
|
this.isNewModal = true;
|
||||||
|
},
|
||||||
|
hideNewConnModal () {
|
||||||
|
this.isNewModal = false;
|
||||||
|
},
|
||||||
|
showSettingModal (tab) {
|
||||||
|
this.selectedSettingTab = tab;
|
||||||
|
this.isSettingModal = true;
|
||||||
|
},
|
||||||
|
hideSettingModal () {
|
||||||
|
this.isSettingModal = false;
|
||||||
|
},
|
||||||
|
showScratchpad () {
|
||||||
|
this.isScratchpad = true;
|
||||||
|
},
|
||||||
|
hideScratchpad () {
|
||||||
|
this.isScratchpad = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (import.meta.webpackHot)
|
||||||
|
import.meta.webpackHot.accept(acceptHMRUpdate(useApplicationStore, import.meta.webpackHot));
|
|
@ -14,7 +14,7 @@ const parsedContributors = contributors.reduce((acc, c) => {
|
||||||
}, []).join(',');
|
}, []).join(',');
|
||||||
|
|
||||||
const isDevMode = process.env.NODE_ENV !== 'production';
|
const isDevMode = process.env.NODE_ENV !== 'production';
|
||||||
const whiteListedModules = ['.bin', 'vue', '@vue'];
|
const whiteListedModules = ['.bin', 'vue', '@vue', 'pinia', 'vue-i18n'];
|
||||||
const externals = {};
|
const externals = {};
|
||||||
|
|
||||||
fs.readdirSync('node_modules')
|
fs.readdirSync('node_modules')
|
||||||
|
|
Loading…
Reference in New Issue