fix: exclude .laputa-cache.json and settings.json from vault git tracking
These files are machine-specific and should never be committed or cause conflicts when syncing vaults across devices. Changes: - init_repo() now writes .gitignore with .laputa-cache.json and .laputa/settings.json excluded before the first commit - .DS_Store and common editor artifacts also excluded - openConflictFileRef falls back to openLocalFile() for non-note files so 'Open in editor' works for .json conflict files (opens in system default app, e.g. TextEdit/VS Code) - Removed stale git.rs (replaced by git/mod.rs from refactor) - 2 new Rust tests for .gitignore creation behavior
This commit is contained in:
@@ -22,3 +22,11 @@ export async function openExternalUrl(url: string): Promise<void> {
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
}
|
||||
|
||||
/** Open a local file path with the system default app (e.g. TextEdit for .json). */
|
||||
export async function openLocalFile(absolutePath: string): Promise<void> {
|
||||
if (isTauri()) {
|
||||
const { openPath } = await import('@tauri-apps/plugin-opener')
|
||||
await openPath(absolutePath)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user