diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 2cbf7f6..7a51ea1 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -4146,6 +4146,8 @@ fn main() { get_daily_commit_stats, get_all_commit_hashes, trigger_rewrite_now, + rewrite_commit, + rewrite_pending_commits, show_folder_context_menu, show_tree_context_menu, has_readme, diff --git a/tauriBridge.js b/tauriBridge.js index 338e56f..60b60ed 100644 --- a/tauriBridge.js +++ b/tauriBridge.js @@ -26,6 +26,10 @@ window.dispatchEvent(new CustomEvent('repo-updated', { detail: event.payload })); }); + listen('rewrite-progress', event => { + window.dispatchEvent(new CustomEvent('rewrite-progress', { detail: event.payload })); + }); + listen('theme-changed', event => { const theme = event.payload; window.dispatchEvent(new CustomEvent('theme-changed', { detail: theme })); @@ -117,7 +121,9 @@ squashCommits: folderPath => invoke('squash_commits', { folderPath }), pushToGitea: (folderPath, allowDirty = false) => invoke('push_to_gitea', { folderPath, allowDirty }), initRepo: folderPath => invoke('init_repo', { folderPath }), - triggerRewriteNow: folderPath => invoke('trigger_rewrite_now', { folderPath }) + triggerRewriteNow: folderPath => invoke('trigger_rewrite_now', { folderPath }), + rewriteCommit: (folderPath, hash) => invoke('rewrite_commit', { folderPath, hash }), + rewritePendingCommits: folderPath => invoke('rewrite_pending_commits', { folderPath }) }; window.addEventListener('beforeunload', () => {