Small improvement to commit dialog data binding

This commit is contained in:
Mattias Granlund 2024-03-16 09:20:26 +01:00
parent 1475f06958
commit 717186a3e4
2 changed files with 4 additions and 4 deletions

View File

@ -52,10 +52,11 @@
export let selectedFiles: Writable<LocalFile[]>;
export let githubService: GitHubService;
export let selectedOwnership: Writable<Ownership>;
export let commitBoxOpen: Writable<boolean>;
export let isLaneCollapsed: Persisted<boolean>;
export let baseBranchService: BaseBranchService;
export const commitBoxOpen = persisted<boolean>(false, 'commitBoxExpanded_' + branch.id);
const aiGenEnabled = projectAiGenEnabled(project.id);
const aiGenAutoBranchNamingEnabled = projectAiGenAutoBranchNamingEnabled(project.id);
@ -284,7 +285,7 @@
{cloud}
{selectedOwnership}
{user}
bind:expanded={commitBoxOpen}
expanded={commitBoxOpen}
on:action={(e) => {
if (e.detail == 'generate-branch-name') {
generateBranchName();

View File

@ -15,7 +15,6 @@
projectRunCommitHooks,
persistedCommitMessage
} from '$lib/config/config';
import { persisted } from '$lib/persisted/persisted';
import * as toasts from '$lib/utils/toasts';
import { tooltip } from '$lib/utils/tooltip';
import { setAutoHeight } from '$lib/utils/useAutoHeight';
@ -39,7 +38,7 @@
export let cloud: ReturnType<typeof getCloudApiClient>;
export let user: User | undefined;
export let selectedOwnership: Writable<Ownership>;
export const expanded = persisted<boolean>(false, 'commitBoxExpanded_' + branch.id);
export let expanded: Writable<boolean>;
const aiGenEnabled = projectAiGenEnabled(projectId);
const runCommitHooks = projectRunCommitHooks(projectId);