Skip to content

Commit

Permalink
Use copy filepath by default
Browse files Browse the repository at this point in the history
  • Loading branch information
dejan committed Apr 22, 2024
1 parent 64aad8f commit 7c657f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extension/src/stores/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7c657f9

Please sign in to comment.