Fix issue with dismiss changes in title

This commit is contained in:
Sebastian Martinez
2023-11-15 09:32:12 +01:00
parent 56c87787ed
commit e658e67c43
3 changed files with 9 additions and 8 deletions
+5 -2
View File
@@ -1,4 +1,6 @@
<script lang="ts" strictEvents>
import { createEventDispatcher } from "svelte";
import * as utils from "@app/lib/utils";
import IconSmall from "@app/components/IconSmall.svelte";
@@ -25,7 +27,8 @@
}
}
const oldTitle = title;
const dispatch = createEventDispatcher<{ refresh: null }>();
let submitNewTitle = false;
</script>
@@ -106,7 +109,7 @@
title="dismiss changes"
loading={submitNewTitle}
on:click={() => {
title = oldTitle;
dispatch("refresh");
mode = "readOnly";
}}>
<IconSmall name={"cross"} />
+2 -3
View File
@@ -338,8 +338,6 @@
},
});
}
} finally {
issue = issue;
}
}
@@ -444,7 +442,8 @@
<CobHeader
id={issue.id}
title={issue.title}
editTitle={session && partial(editTitle, session.id)}>
editTitle={session && partial(editTitle, session.id)}
on:refresh={refreshIssue}>
<svelte:fragment slot="icon">
<div
class="state"
+2 -3
View File
@@ -408,8 +408,6 @@
},
});
}
} finally {
patch = patch;
}
}
@@ -652,7 +650,8 @@
<CobHeader
id={patch.id}
title={patch.title}
editTitle={session && partial(editTitle, session.id)}>
editTitle={session && partial(editTitle, session.id)}
on:refresh={refreshPatch}>
<svelte:fragment slot="icon">
<div
class="state"