mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-25 02:26:14 +03:00
Change action name and logging
This commit is contained in:
parent
bb791f7d13
commit
a8f6e0a3b9
@ -1,18 +1,18 @@
|
||||
<script lang="ts">
|
||||
import Button from '@gitbutler/ui/inputs/Button.svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
async function defaultBeforeOnMouseDown() {
|
||||
async function defaultPreMouseDown() {
|
||||
Promise.resolve();
|
||||
}
|
||||
|
||||
export let beforeOnMouseDown: () => Promise<void> = defaultBeforeOnMouseDown;
|
||||
export let preMouseDown: () => Promise<void> = defaultPreMouseDown;
|
||||
</script>
|
||||
|
||||
<Button
|
||||
style="ghost"
|
||||
outline
|
||||
onmousedown={() => {
|
||||
beforeOnMouseDown().then(
|
||||
preMouseDown().then(
|
||||
() => {
|
||||
if (history.length > 0) {
|
||||
history.back();
|
||||
@ -21,7 +21,7 @@
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
console.log('The pre-back button action failed');
|
||||
console.log('Failed to execute the pre-mouse-down action');
|
||||
console.log(err);
|
||||
}
|
||||
);
|
||||
|
@ -258,7 +258,7 @@
|
||||
</SetupFeature>
|
||||
</div>
|
||||
<div class="action-buttons">
|
||||
<BackButton beforeOnMouseDown={deleteProject}>Cancel</BackButton>
|
||||
<BackButton preMouseDown={deleteProject}>Cancel</BackButton>
|
||||
<Button
|
||||
style="pop"
|
||||
kind="solid"
|
||||
|
Loading…
Reference in New Issue
Block a user