mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-30 04:58:55 +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 Button from '$lib/components/Button.svelte';
|
||||||
import Tag from '$lib/components/Tag.svelte';
|
import Tag from '$lib/components/Tag.svelte';
|
||||||
import TimeAgo from '$lib/components/TimeAgo.svelte';
|
import TimeAgo from '$lib/components/TimeAgo.svelte';
|
||||||
|
import { projectCurrentCommitMessage, projectLastCommitMessage } from '$lib/config/config';
|
||||||
import { draggable } from '$lib/dragging/draggable';
|
import { draggable } from '$lib/dragging/draggable';
|
||||||
import { draggableCommit, nonDraggable } from '$lib/dragging/draggables';
|
import { draggableCommit, nonDraggable } from '$lib/dragging/draggables';
|
||||||
import { openExternalUrl } from '$lib/utils/url';
|
import { openExternalUrl } from '$lib/utils/url';
|
||||||
@ -21,6 +22,8 @@
|
|||||||
export let selectedFiles: Writable<(LocalFile | RemoteFile)[]>;
|
export let selectedFiles: Writable<(LocalFile | RemoteFile)[]>;
|
||||||
|
|
||||||
const selectedOwnership = writable(Ownership.default());
|
const selectedOwnership = writable(Ownership.default());
|
||||||
|
const currentCommitMessage = projectCurrentCommitMessage(projectId);
|
||||||
|
const lastCommitMessage = projectLastCommitMessage(projectId);
|
||||||
|
|
||||||
let showFiles = false;
|
let showFiles = false;
|
||||||
|
|
||||||
@ -55,6 +58,7 @@
|
|||||||
border
|
border
|
||||||
clickable
|
clickable
|
||||||
on:click={(e) => {
|
on:click={(e) => {
|
||||||
|
currentCommitMessage.set($lastCommitMessage);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
resetHeadCommit();
|
resetHeadCommit();
|
||||||
}}>Undo</Tag
|
}}>Undo</Tag
|
||||||
|
Loading…
Reference in New Issue
Block a user