diff --git a/src/components/config/GitHubMirrorSettings.tsx b/src/components/config/GitHubMirrorSettings.tsx index a191dbc..eb9d701 100644 --- a/src/components/config/GitHubMirrorSettings.tsx +++ b/src/components/config/GitHubMirrorSettings.tsx @@ -76,6 +76,18 @@ export function GitHubMirrorSettings({ // When metadata is disabled, all components should be disabled const isMetadataEnabled = mirrorOptions.mirrorMetadata; + + // Calculate what content is included for starred repos + const starredRepoContent = { + code: true, // Always included + releases: !advancedOptions.skipStarredIssues && mirrorOptions.mirrorReleases, + issues: !advancedOptions.skipStarredIssues && mirrorOptions.mirrorMetadata && mirrorOptions.metadataComponents.issues, + pullRequests: !advancedOptions.skipStarredIssues && mirrorOptions.mirrorMetadata && mirrorOptions.metadataComponents.pullRequests, + wiki: !advancedOptions.skipStarredIssues && mirrorOptions.mirrorMetadata && mirrorOptions.metadataComponents.wiki, + }; + + const starredContentCount = Object.entries(starredRepoContent).filter(([key, value]) => key !== 'code' && value).length; + const totalStarredOptions = 4; // releases, issues, PRs, wiki return (
@@ -112,7 +124,7 @@ export function GitHubMirrorSettings({
-
+
- {/* Lightweight starred repos option - inline to prevent layout shift */} + {/* Starred repos content selection - inline to prevent layout shift */}
- handleAdvancedChange('skipStarredIssues', !!checked)} - disabled={!githubConfig.mirrorStarred} - /> -
- -

- Only code, skip issues and metadata -

-
+ + + + + +
+
+
Starred repos content
+ + + + + + +

+ Choose what content to mirror from starred repositories. + Selecting "Lightweight mode" will only mirror code for better performance. +

+
+
+
+
+ + + +
+
+ handleAdvancedChange('skipStarredIssues', !!checked)} + /> + +
+ + {!advancedOptions.skipStarredIssues && ( + <> + +
+

+ Content included for starred repos: +

+ +
+
+ + Source code + Always +
+ +
+ + Releases & Tags + {starredRepoContent.releases && Included} +
+ +
+ + Issues + {starredRepoContent.issues && Included} +
+ +
+ + Pull Requests + {starredRepoContent.pullRequests && Included} +
+ +
+ + Wiki + {starredRepoContent.wiki && Included} +
+
+ +

+ To include more content, enable them in the Content & Data section below +

+
+ + )} +
+
+
+