feat: more breaking changes
This commit is contained in:
@ -4,7 +4,9 @@ import Button from 'primevue/button';
|
||||
import * as path from '@tauri-apps/api/path';
|
||||
import { open } from '@tauri-apps/plugin-dialog';
|
||||
import { readTextFile, writeTextFile } from '@tauri-apps/plugin-fs';
|
||||
import { invoke } from '../invoke';
|
||||
import { usePrfStore } from '../stores';
|
||||
|
||||
const prf = usePrfStore();
|
||||
|
||||
const props = defineProps({
|
||||
filename: String,
|
||||
@ -53,13 +55,10 @@ const filePick = async () => {
|
||||
};
|
||||
|
||||
(async () => {
|
||||
const profileDir: string = await invoke('get_current_profile_dir');
|
||||
|
||||
if (props.filename === undefined) {
|
||||
throw new Error('FileEditor without a filename');
|
||||
}
|
||||
|
||||
target_path.value = await path.join(profileDir, props.filename);
|
||||
target_path.value = await path.join(await prf.configDir, props.filename);
|
||||
await load(target_path.value);
|
||||
})();
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user