Feature: Add API support for rewriting specific or pending commits
This commit is contained in:
@@ -4146,6 +4146,8 @@ fn main() {
|
|||||||
get_daily_commit_stats,
|
get_daily_commit_stats,
|
||||||
get_all_commit_hashes,
|
get_all_commit_hashes,
|
||||||
trigger_rewrite_now,
|
trigger_rewrite_now,
|
||||||
|
rewrite_commit,
|
||||||
|
rewrite_pending_commits,
|
||||||
show_folder_context_menu,
|
show_folder_context_menu,
|
||||||
show_tree_context_menu,
|
show_tree_context_menu,
|
||||||
has_readme,
|
has_readme,
|
||||||
|
|||||||
@@ -26,6 +26,10 @@
|
|||||||
window.dispatchEvent(new CustomEvent('repo-updated', { detail: event.payload }));
|
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 => {
|
listen('theme-changed', event => {
|
||||||
const theme = event.payload;
|
const theme = event.payload;
|
||||||
window.dispatchEvent(new CustomEvent('theme-changed', { detail: theme }));
|
window.dispatchEvent(new CustomEvent('theme-changed', { detail: theme }));
|
||||||
@@ -117,7 +121,9 @@
|
|||||||
squashCommits: folderPath => invoke('squash_commits', { folderPath }),
|
squashCommits: folderPath => invoke('squash_commits', { folderPath }),
|
||||||
pushToGitea: (folderPath, allowDirty = false) => invoke('push_to_gitea', { folderPath, allowDirty }),
|
pushToGitea: (folderPath, allowDirty = false) => invoke('push_to_gitea', { folderPath, allowDirty }),
|
||||||
initRepo: folderPath => invoke('init_repo', { folderPath }),
|
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', () => {
|
window.addEventListener('beforeunload', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user