mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-05 17:15:19 +03:00
Resolve linting errors
This commit is contained in:
parent
8192b4e5fa
commit
105ad7d0fa
@ -14,24 +14,18 @@
|
|||||||
modal.close();
|
modal.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleClick() {
|
function handleClick() {
|
||||||
if (noModal) {
|
if (noModal) {
|
||||||
onDeleteClicked();
|
onDeleteClicked();
|
||||||
} else {
|
} else {
|
||||||
modal.show();
|
modal.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
let modal: Modal;
|
let modal: Modal;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Button
|
<Button style="error" kind="solid" icon="bin-small" reversedDirection onclick={handleClick}>
|
||||||
style="error"
|
|
||||||
kind="solid"
|
|
||||||
icon="bin-small"
|
|
||||||
reversedDirection
|
|
||||||
onclick={handleClick}
|
|
||||||
>
|
|
||||||
Remove project…
|
Remove project…
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ export interface FailedToOpenRepoInexistentError extends BaseKnownError {
|
|||||||
|
|
||||||
export type KnownError = FailedToOpenRepoInexistentError;
|
export type KnownError = FailedToOpenRepoInexistentError;
|
||||||
|
|
||||||
|
|
||||||
export function getErrorMessage(something: unknown): string | null {
|
export function getErrorMessage(something: unknown): string | null {
|
||||||
if (something instanceof Error) return something.message;
|
if (something instanceof Error) return something.message;
|
||||||
if (typeof something === 'string') return something;
|
if (typeof something === 'string') return something;
|
||||||
|
@ -98,7 +98,7 @@ pub mod commands {
|
|||||||
projects: State<'_, Controller>,
|
projects: State<'_, Controller>,
|
||||||
path: &path::Path,
|
path: &path::Path,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
let project = projects
|
let project = projects
|
||||||
.list()
|
.list()
|
||||||
.context("failed to list projects")?
|
.context("failed to list projects")?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
Loading…
Reference in New Issue
Block a user