Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
fix(plot): change default plots dir
Browse files Browse the repository at this point in the history
  • Loading branch information
dnoishi committed Sep 26, 2022
1 parent daa37cd commit 951b83c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/mainMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default defineComponent({
try {
const log_path = await util.getLogPath();
util.infoLogger('log path acquired:' + log_path);
await tauri.invoke("open_folder", {dir: log_path});
await tauri.invoke('open_folder', {dir: log_path});
} catch (error) {
// TODO: add proper error handling - update store and show error page
util.errorLogger(error);
Expand Down
5 changes: 4 additions & 1 deletion src/pages/SetupPlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export default defineComponent({
},
async mounted() {
await this.updateDriveStats();
const path = (await tauri.path.dataDir()) + util.appName;
const path = (await tauri.path.dataDir()) + util.appName + '/plots';
this.store.setPlotPath(path);
},
async created() {
Expand All @@ -248,6 +248,8 @@ export default defineComponent({
methods: {
async confirmCreateDir() {
const dirExists = await native.dirExists(this.store.plotPath);
console.log('🚀 ~ file: SetupPlot.vue ~ line 251 ~ confirmCreateDir ~ this.store.plotPath', this.store.plotPath);
console.log('🚀 ~ file: SetupPlot.vue ~ line 251 ~ confirmCreateDir ~ dirExists', dirExists);
if (dirExists) {
util.infoLogger('SETUP PLOT | found the old plotting directory');
Expand All @@ -258,6 +260,7 @@ export default defineComponent({
});
if (files) {
console.log('🚀 ~ file: SetupPlot.vue ~ line 262 ~ confirmCreateDir ~ files', files);
console.log('FILES ARE: :', files);
if (files.length === 0 || (files.length === 1 && files.some(item => item.name === 'subspace-desktop.cfg'))) {
directoryDialogs.existingDirectoryConfirm(this.store.plotPath, this.startPlotting);
Expand Down
6 changes: 3 additions & 3 deletions src/shims-vue.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Mocks all files ending in `.vue` showing them as plain Vue instances
declare module '*.vue' {
import { ComponentOptions } from 'vue'
const component: ComponentOptions
export default component
import { ComponentOptions } from 'vue';
const component: ComponentOptions;
export default component;
}

0 comments on commit 951b83c

Please sign in to comment.