feat: also copy aime.txt
This commit is contained in:
@ -3,6 +3,7 @@ import { computed, ref } from 'vue';
|
||||
import InputText from 'primevue/inputtext';
|
||||
import Select from 'primevue/select';
|
||||
import ToggleSwitch from 'primevue/toggleswitch';
|
||||
import { listen } from '@tauri-apps/api/event';
|
||||
import * as path from '@tauri-apps/api/path';
|
||||
import { readTextFile, writeTextFile } from '@tauri-apps/plugin-fs';
|
||||
import OptionCategory from '../OptionCategory.vue';
|
||||
@ -40,10 +41,14 @@ const aimeCodePaste = (ev: ClipboardEvent) => {
|
||||
.join('') ?? '';
|
||||
};
|
||||
|
||||
(async () => {
|
||||
const load = async () => {
|
||||
const aime_path = await path.join(await prf.configDir, 'aime.txt');
|
||||
aimeCode.value = await readTextFile(aime_path).catch(() => '');
|
||||
})();
|
||||
};
|
||||
|
||||
listen('reload-aime-code', load);
|
||||
|
||||
load();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
Reference in New Issue
Block a user