mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
Bump svelte 5.28 -> 5.55
This commit is contained in:
@@ -25,7 +25,11 @@
|
||||
let hideChanges = $state(false);
|
||||
let filesExpanded = $state(true);
|
||||
let selectedCommit = $state<string>();
|
||||
// Parent reuses this component across patch revisions; a sibling $effect
|
||||
// resets base and head when patchId changes.
|
||||
// svelte-ignore state_referenced_locally
|
||||
let base = $state(revision.base);
|
||||
// svelte-ignore state_referenced_locally
|
||||
let head = $state(revision.head);
|
||||
|
||||
$effect(() => {
|
||||
|
||||
@@ -328,6 +328,7 @@
|
||||
class:context={line.type === "context"}
|
||||
class:selected={!thread &&
|
||||
isSelected(filePath(file, "left"), hunkIdx, lineIdx)}>
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
class="left"
|
||||
class:selection-disabled={!codeComments || thread}
|
||||
@@ -341,6 +342,7 @@
|
||||
{lineNumber(line, "left")}
|
||||
</div>
|
||||
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
class="right"
|
||||
class:selection-disabled={!codeComments || thread}
|
||||
@@ -447,6 +449,7 @@
|
||||
{/if}
|
||||
|
||||
{#if codeComments && selection?.hunkIdx === hunkIdx && selection?.lineIdx === lineIdx}
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
class="comment-form"
|
||||
onpointerdown={e => {
|
||||
|
||||
@@ -50,22 +50,19 @@
|
||||
}: Props = $props();
|
||||
/* eslint-enable prefer-const */
|
||||
|
||||
let previousCobId = cobId;
|
||||
let previousCobId: string | undefined;
|
||||
let focusReply: boolean = $state(false);
|
||||
let commentFormKey = $state(0);
|
||||
|
||||
let hideDiscussion = $state(false);
|
||||
|
||||
$effect(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
cobId;
|
||||
|
||||
if (cobId !== previousCobId) {
|
||||
previousCobId = cobId;
|
||||
if (previousCobId !== undefined && cobId !== previousCobId) {
|
||||
hideDiscussion = false;
|
||||
focusReply = false;
|
||||
commentFormKey += 1;
|
||||
}
|
||||
previousCobId = cobId;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -96,6 +96,9 @@
|
||||
}, [])) as Thread<CodeLocation>[]) || [],
|
||||
);
|
||||
|
||||
// The verdict prop seeds a local working copy that the form mutates until
|
||||
// submit; later prop updates intentionally do not overwrite it.
|
||||
// svelte-ignore state_referenced_locally
|
||||
let verdict: Review["verdict"] = $state(review.verdict);
|
||||
|
||||
async function editReview(
|
||||
|
||||
@@ -41,13 +41,15 @@
|
||||
return el.scrollTop + el.clientHeight >= el.scrollHeight - threshold;
|
||||
}
|
||||
|
||||
const scrollHalfHandler = onScrollHalf
|
||||
? (instance: Parameters<typeof shouldLoadMore>[0]) => {
|
||||
if (shouldLoadMore(instance)) {
|
||||
onScrollHalf();
|
||||
const scrollHalfHandler = $derived(
|
||||
onScrollHalf
|
||||
? (instance: Parameters<typeof shouldLoadMore>[0]) => {
|
||||
if (shouldLoadMore(instance)) {
|
||||
onScrollHalf();
|
||||
}
|
||||
}
|
||||
}
|
||||
: undefined;
|
||||
: undefined,
|
||||
);
|
||||
</script>
|
||||
|
||||
<OverlayScrollbarsComponent
|
||||
|
||||
Reference in New Issue
Block a user