Skip to content

Commit

Permalink
fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Kesomannen committed Jul 30, 2024
1 parent 714b025 commit 09edf28
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.7.1 (2024-07-30)

### Fixed

- "Invalid type: map ..." errors when importing profile from file and editing path settings

## 0.7.0 (2024-07-30)

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gale",
"version": "0.7.0",
"version": "0.7.1",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gale"
version = "0.7.0"
version = "0.7.1"
description = "A lightweight mod manager for Thunderstore"
authors = ["Kesomannen"]
license = "GPL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"createUpdaterArtifacts": "v1Compatible"
},
"productName": "Gale",
"version": "0.7.0",
"version": "0.7.1",
"identifier": "com.kesomannen.gale",
"plugins": {
"updater": {
Expand Down
8 changes: 4 additions & 4 deletions src/lib/menu/Menubar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
}
async function importFile() {
let path = await open({
let response = await open({
title: 'Select the file to import',
filters: [{ name: 'Profile file', extensions: ['r2z'] }]
});
if (!path) return;
let data = await invokeCommand<ImportData>('import_file', { path });
if (!response) return;
let data = await invokeCommand<ImportData>('import_file', { path: response.path });
importProfileData = data;
importProfileOpen = true;
}
Expand All @@ -93,7 +93,7 @@
function openProfileOperation(operation: 'rename' | 'duplicate') {
profileOperation = operation;
profileOperationName = $activeProfile?.name ?? "Unknown";
profileOperationName = $activeProfile?.name ?? 'Unknown';
profileOperationOpen = true;
}
Expand Down
8 changes: 3 additions & 5 deletions src/lib/prefs/PathPref.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
export let label: string;
export let type: 'dir' | 'file';
export let canClear: boolean = false;
export let value: string | null;
export let set: (value: string | null) => void;
Expand All @@ -20,10 +20,8 @@
title: 'Select ' + sentenceCase(label),
directory: type === 'dir'
}).then(async (result) => {
if (result === null) return;
value = result as string;
set(result as string);
if (result === null) return;
set(result.path);
});
}
</script>
Expand Down

0 comments on commit 09edf28

Please sign in to comment.