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

View File

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