mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-20 16:11:46 +03:00
feat: when a commit is undone, the commit message box will be pre-filled with the last message
This commit is contained in:
parent
2a48b7f072
commit
029377be06
@ -3,6 +3,7 @@
|
||||
import Button from '$lib/components/Button.svelte';
|
||||
import Tag from '$lib/components/Tag.svelte';
|
||||
import TimeAgo from '$lib/components/TimeAgo.svelte';
|
||||
import { projectCurrentCommitMessage, projectLastCommitMessage } from '$lib/config/config';
|
||||
import { draggable } from '$lib/dragging/draggable';
|
||||
import { draggableCommit, nonDraggable } from '$lib/dragging/draggables';
|
||||
import { openExternalUrl } from '$lib/utils/url';
|
||||
@ -21,6 +22,8 @@
|
||||
export let selectedFiles: Writable<(LocalFile | RemoteFile)[]>;
|
||||
|
||||
const selectedOwnership = writable(Ownership.default());
|
||||
const currentCommitMessage = projectCurrentCommitMessage(projectId);
|
||||
const lastCommitMessage = projectLastCommitMessage(projectId);
|
||||
|
||||
let showFiles = false;
|
||||
|
||||
@ -55,6 +58,7 @@
|
||||
border
|
||||
clickable
|
||||
on:click={(e) => {
|
||||
currentCommitMessage.set($lastCommitMessage);
|
||||
e.stopPropagation();
|
||||
resetHeadCommit();
|
||||
}}>Undo</Tag
|
||||
|
Loading…
Reference in New Issue
Block a user