Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (a *App) IgnoreMe(
) {
}

func (a *App) GetDefaultPath() string {
func (a *App) GetDefaultPath(subfolder string) string {
if runtime.GOOS == "windows" {
localappdata := os.Getenv("LOCALAPPDATA")
return filepath.Join(localappdata, "RLBot5")
Expand All @@ -49,7 +49,7 @@ func (a *App) GetDefaultPath() string {
xdgDataHome = filepath.Join(home, ".local/share")
}

return filepath.Join(xdgDataHome, "RLBot5")
return filepath.Join(xdgDataHome, "RLBot5", subfolder)
}

func (a *App) DownloadBotpack(repo string, installPath string) (string, error) {
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/AddBotpack.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ let customRepo = $state("");
let installPath = $state("");

async function setDefaultPath() {
const defaultPath = await App.GetDefaultPath();
installPath = `${defaultPath}/bots`;
installPath = await App.GetDefaultPath("bots");
}

setDefaultPath();
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/MatchSettings/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function resetMutators() {
}

// the reason for default being "" and not null is that NiceSelect considers that the default
let selectedPreset: Gamemode | "" = $state("");
let selectedPreset: Gamemode | "" = $state.raw("");
$effect(() => {
if (selectedPreset !== "") {
setPreset(selectedPreset);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ProgressBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let {
} = $props();

Events.On("monitor:download-progress", (event) => {
const { status, done } = event.data.at(-1);
const { status, done } = event.data;

if (done) {
percentComplete = 0;
Expand Down