gitbutler/packages/ui/src/lib/config/config.ts

38 lines
1.3 KiB
TypeScript
Raw Normal View History

import { persisted, type Persisted } from '@square/svelte-store';
export function projectHttpsWarningBannerDismissed(projectId: string): Persisted<boolean> {
const key = 'projectHttpsWarningBannerDismissed_';
return persisted(false, key + projectId);
}
export function projectMergeUpstreamWarningDismissed(projectId: string): Persisted<boolean> {
const key = 'projectMergeUpstreamWarningDismissed_';
return persisted(false, key + projectId);
}
export function projectCommitGenerationExtraConcise(projectId: string): Persisted<boolean> {
const key = 'projectCommitGenerationExtraConcise_';
return persisted(false, key + projectId);
}
export function projectCommitGenerationUseEmojis(projectId: string): Persisted<boolean> {
const key = 'projectCommitGenerationUseEmojis_';
return persisted(false, key + projectId);
}
export function projectCreatePullRequestInsteadOfPush(projectId: string): Persisted<boolean> {
const key = 'projectCreatePullRequestInsteadOfPush_';
return persisted(false, key + projectId);
}
export enum ListPRsFilter {
All = 'ALL',
ExcludeBots = 'EXCLUDE_BOTS',
OnlyYours = 'ONLY_YOURS'
}
export function projectPullRequestListingFilter(projectId: string): Persisted<string> {
const key = 'projectPullRequestListingFilter_';
return persisted(ListPRsFilter.All, key + projectId);
}