2023-12-14 02:04:15 +03:00
|
|
|
import { persisted, type Persisted } from '$lib/persisted/persisted';
|
2023-08-24 17:17:54 +03:00
|
|
|
|
|
|
|
export function projectHttpsWarningBannerDismissed(projectId: string): Persisted<boolean> {
|
2024-02-29 02:58:47 +03:00
|
|
|
const key = 'projectHttpsWarningBannerDismissed_';
|
|
|
|
return persisted(false, key + projectId);
|
2023-08-24 17:17:54 +03:00
|
|
|
}
|
2023-08-28 14:27:07 +03:00
|
|
|
|
|
|
|
export function projectMergeUpstreamWarningDismissed(projectId: string): Persisted<boolean> {
|
2024-02-29 02:58:47 +03:00
|
|
|
const key = 'projectMergeUpstreamWarningDismissed_';
|
|
|
|
return persisted(false, key + projectId);
|
2023-08-28 14:27:07 +03:00
|
|
|
}
|
2023-09-15 12:26:09 +03:00
|
|
|
|
|
|
|
export function projectCommitGenerationExtraConcise(projectId: string): Persisted<boolean> {
|
2024-02-29 02:58:47 +03:00
|
|
|
const key = 'projectCommitGenerationExtraConcise_';
|
|
|
|
return persisted(false, key + projectId);
|
2023-09-15 12:26:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export function projectCommitGenerationUseEmojis(projectId: string): Persisted<boolean> {
|
2024-02-29 02:58:47 +03:00
|
|
|
const key = 'projectCommitGenerationUseEmojis_';
|
|
|
|
return persisted(false, key + projectId);
|
2023-09-15 12:26:09 +03:00
|
|
|
}
|
2023-10-13 16:08:03 +03:00
|
|
|
|
2023-10-28 21:43:58 +03:00
|
|
|
export enum ListPRsFilter {
|
2024-02-29 02:58:47 +03:00
|
|
|
All = 'ALL',
|
|
|
|
ExcludeBots = 'EXCLUDE_BOTS',
|
|
|
|
OnlyYours = 'ONLY_YOURS'
|
2023-10-28 21:43:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export function projectPullRequestListingFilter(projectId: string): Persisted<string> {
|
2024-02-29 02:58:47 +03:00
|
|
|
const key = 'projectPullRequestListingFilter_';
|
|
|
|
return persisted(ListPRsFilter.All, key + projectId);
|
2023-10-28 21:43:58 +03:00
|
|
|
}
|
2023-11-30 19:47:12 +03:00
|
|
|
|
|
|
|
export function projectAiGenEnabled(projectId: string): Persisted<boolean> {
|
2024-02-29 02:58:47 +03:00
|
|
|
const key = 'projectAiGenEnabled_';
|
|
|
|
return persisted(false, key + projectId);
|
2023-11-30 19:47:12 +03:00
|
|
|
}
|
2023-12-22 15:41:43 +03:00
|
|
|
|
|
|
|
export function projectRunCommitHooks(projectId: string): Persisted<boolean> {
|
2024-02-29 02:58:47 +03:00
|
|
|
const key = 'projectRunCommitHooks_';
|
|
|
|
return persisted(false, key + projectId);
|
2023-12-22 15:41:43 +03:00
|
|
|
}
|
2024-02-11 15:02:01 +03:00
|
|
|
|
|
|
|
export function projectLaneCollapsed(projectId: string, laneId: string): Persisted<boolean> {
|
2024-02-29 02:58:47 +03:00
|
|
|
const key = 'projectLaneCollapsed_';
|
|
|
|
return persisted(false, key + projectId + '_' + laneId);
|
2024-02-11 15:02:01 +03:00
|
|
|
}
|
2024-02-17 22:28:36 +03:00
|
|
|
|
2024-03-14 16:29:06 +03:00
|
|
|
export function persistedCommitMessage(projectId: string, branchId: string): Persisted<string> {
|
|
|
|
return persisted('', 'projectCurrentCommitMessage_' + projectId + '_' + branchId);
|
2024-02-17 22:28:36 +03:00
|
|
|
}
|