Start the folder picker in the home folder
ci / check (push) Successful in 1m40s

This commit is contained in:
2026-10-15 00:41:26 +02:00
parent 80906a9bda
commit 788a373e17
+3 -1
View File
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { computed, nextTick, onMounted, onUnmounted, reactive, ref, shallowRef, watch } from "vue";
import { invoke } from "@tauri-apps/api/core";
import { homeDir } from "@tauri-apps/api/path";
import { getCurrentWindow } from "@tauri-apps/api/window";
import { writeText } from "@tauri-apps/plugin-clipboard-manager";
import { open as openDialog } from "@tauri-apps/plugin-dialog";
@@ -119,7 +120,8 @@ async function openRepo(path: string) {
async function browse() {
menuOpen.value = false;
const path = await openDialog({ directory: true, title: "Open a git repository" }).catch(() => null);
const home = await homeDir().catch(() => undefined);
const path = await openDialog({ directory: true, title: "Open a git repository", defaultPath: home }).catch(() => null);
if (typeof path === "string") await openRepo(path);
}