add organization management and refine source repository view
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -378,6 +378,7 @@ export function LauncherSourcePage() {
|
||||
'launcher-backend': emptyForm()
|
||||
});
|
||||
const [commits, setCommits] = useState<GiteaCommit[]>([]);
|
||||
const [sourceBranch, setSourceBranch] = useState('release');
|
||||
const [commitRange, setCommitRange] = useState<CommitRange>('week');
|
||||
const [commitPage, setCommitPage] = useState(1);
|
||||
const [hasNextCommitPage, setHasNextCommitPage] = useState(false);
|
||||
@@ -391,7 +392,7 @@ export function LauncherSourcePage() {
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [saving, setSaving] = useState(false);
|
||||
const loadingVisible = useMinimumLoading(loading);
|
||||
const sourceBranch = 'develop';
|
||||
const branchOptions = ['release', 'develop', 'main'];
|
||||
|
||||
const activeVersion = useMemo(() => versions.find((version) => version.isActive) ?? versions[0], [versions]);
|
||||
const activeForm = forms[activeTarget];
|
||||
@@ -446,7 +447,7 @@ export function LauncherSourcePage() {
|
||||
|
||||
useEffect(() => {
|
||||
setCommitPage(1);
|
||||
}, [activeForm.repository, activeTarget, commitRange]);
|
||||
}, [activeForm.repository, activeTarget, sourceBranch, commitRange]);
|
||||
|
||||
useEffect(() => {
|
||||
const repository = splitRepository(activeForm.repository, activeTargetMeta.defaultOrg);
|
||||
@@ -605,6 +606,18 @@ export function LauncherSourcePage() {
|
||||
{activeTarget === 'launcher-client' ? activeVersion?.version ?? '-' : activeForm.image || '-'}
|
||||
</Badge>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs text-muted-foreground">조회 브랜치</p>
|
||||
<select
|
||||
className="mt-2 h-9 w-full rounded-md border border-input bg-background px-3 text-sm font-medium text-foreground outline-none focus:ring-2 focus:ring-ring"
|
||||
value={sourceBranch}
|
||||
onChange={(event) => setSourceBranch(event.target.value)}
|
||||
>
|
||||
{branchOptions.map((option) => (
|
||||
<option key={option} value={option}>{option}</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs text-muted-foreground">HTTP Clone URL</p>
|
||||
<div className="mt-2 flex items-center gap-2 rounded-md border border-border bg-background px-3 py-2">
|
||||
@@ -630,7 +643,7 @@ export function LauncherSourcePage() {
|
||||
<Card className="mt-4 min-w-0 overflow-hidden">
|
||||
<CardHeader
|
||||
title="커밋 목록"
|
||||
description={`${activeTargetMeta.title} 저장소의 develop 브랜치 기준 커밋 내역입니다.`}
|
||||
description={`${activeTargetMeta.title} 저장소의 ${sourceBranch} 브랜치 기준 커밋 내역입니다.`}
|
||||
action={
|
||||
<div className="flex items-center gap-2">
|
||||
{(Object.keys(commitRangeLabels) as CommitRange[]).map((range) => (
|
||||
|
||||
Reference in New Issue
Block a user