From 7c657f9fa1b2bb9309148952b398a50baeff260b Mon Sep 17 00:00:00 2001 From: Dejan Simic Date: Tue, 23 Apr 2024 00:12:43 +0200 Subject: [PATCH] Use `copy` filepath by default --- extension/src/stores/settings.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extension/src/stores/settings.js b/extension/src/stores/settings.js index a915f8d..aed28c4 100644 --- a/extension/src/stores/settings.js +++ b/extension/src/stores/settings.js @@ -2,9 +2,11 @@ import { ref, watch } from 'vue' import { defineStore } from 'pinia' import { editors } from '../configs/editors' +const defaultEditor = editors[0].id; + export const useSettingsStore = defineStore('settings', () => { - const filepathLinkBehaviour = ref(localStorage.getItem('railspanel.filepathLinkBehaviour') || 'open'); - const editor = ref(editors.find((e) => e.id == (localStorage.getItem('railspanel.editor') || editors[0].id))); + const filepathLinkBehaviour = ref(localStorage.getItem('railspanel.filepathLinkBehaviour') || 'copy'); + const editor = ref(editors.find((e) => e.id == (localStorage.getItem('railspanel.editor') || defaultEditor)) || defaultEditor); watch(editor, (newVal, oldVal) => { localStorage.setItem('railspanel.editor', newVal.id);