feat: port to Microsoft Windows

This commit is contained in:
2025-02-23 18:12:20 +00:00
parent a29bce2227
commit caead1e70f
12 changed files with 145 additions and 26 deletions

View File

@ -24,7 +24,7 @@ const loadProfile = async () => {
await store.reloadProfile();
if (store.profile === null) {
const file = await open({
const exePath = await open({
multiple: false,
directory: false,
filters: [
@ -34,8 +34,8 @@ const loadProfile = async () => {
},
],
});
if (file !== null) {
await store.initProfile(file);
if (exePath !== null) {
await store.initProfile(exePath);
}
}
if (store.profile !== null) {
@ -48,8 +48,8 @@ const loadProfile = async () => {
const isProfileDisabled = computed(() => store.profile === null);
const startline = () => {
invoke('startline');
const startline = async () => {
await invoke('startline');
//startDisabled.value = true;
};

View File

@ -77,8 +77,8 @@ export const usePkgStore = defineStore('pkg', {
Object.assign(this.pkg[key], rv);
},
async initProfile(path: string) {
this.prf = await invoke('init_profile', { path });
async initProfile(exePath: string) {
this.prf = await invoke('init_profile', { exePath });
},
async saveProfile() {