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-27 02:24:07 +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-27 02:24:07 +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-27 02:24:07 +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-27 02:24:07 +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-27 02:24:07 +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-27 02:24:07 +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-27 02:24:07 +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
|
|
|
|
2024-02-16 16:43:31 +03:00
|
|
|
export function projectAiGenAutoBranchNamingEnabled(projectId: string): Persisted<boolean> {
|
2024-02-27 02:24:07 +03:00
|
|
|
const key = 'projectAiGenAutoBranchNamingEnabled_';
|
|
|
|
return persisted(false, key + projectId);
|
2024-02-16 16:43:31 +03:00
|
|
|
}
|
|
|
|
|
2023-12-22 15:41:43 +03:00
|
|
|
export function projectRunCommitHooks(projectId: string): Persisted<boolean> {
|
2024-02-27 02:24:07 +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-27 02:24:07 +03:00
|
|
|
const key = 'projectLaneCollapsed_';
|
|
|
|
return persisted(false, key + projectId + '_' + laneId);
|
2024-02-23 05:18:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export function navCollapsed(): Persisted<boolean> {
|
2024-02-27 02:24:07 +03:00
|
|
|
const key = 'projectNavCollapsed_';
|
|
|
|
return persisted(false, key);
|
2024-02-11 15:02:01 +03:00
|
|
|
}
|
2024-02-17 22:28:36 +03:00
|
|
|
|
2024-02-17 23:13:02 +03:00
|
|
|
export function projectCurrentCommitMessage(
|
2024-02-27 02:24:07 +03:00
|
|
|
projectId: string,
|
|
|
|
branchId: string
|
2024-02-17 23:13:02 +03:00
|
|
|
): Persisted<string> {
|
2024-02-27 02:24:07 +03:00
|
|
|
const key = 'projectCurrentCommitMessage_';
|
|
|
|
return persisted('', key + projectId + '_' + branchId);
|
2024-02-17 22:28:36 +03:00
|
|
|
}
|