translate page agent admin guide to English
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-08 14:40:46 +09:00
parent 71eeac278f
commit 403d3ac0ed
4 changed files with 363 additions and 136 deletions
+13 -5
View File
@@ -7,6 +7,7 @@ import type { BuildJob, SourceComponent } from '../../types/application';
import { LoadingModal, useMinimumLoading } from '../operations/operation-utils';
import { AppSelector, StatusBadge, formatDate, isBuildDone, useApps } from './ApplicationControls';
import { cancelBuildJob, createBuildJob, deleteBuildJob, listBuildJobsPage, listSources } from './application-api';
import { getStoredSelectedComponentId, setStoredSelectedComponentId } from '../../lib/selected-app';
function blockPageAgentDestructiveClick(event: MouseEvent<HTMLElement>) {
if (event.nativeEvent.isTrusted) return false;
@@ -144,8 +145,11 @@ export function BuildManagementPage() {
.filter((source) => (source.imageSource ?? 'SOURCE') === 'SOURCE');
setSelectedComponentId((prev) => {
const valid = filteredSources.some((source) => source.id === prev);
const next = valid ? prev : filteredSources[0]?.id || '';
setBranch('develop');
const storedComponentId = getStoredSelectedComponentId(selectedAppId);
const storedValid = filteredSources.some((source) => source.id === storedComponentId);
const next = valid ? prev : storedValid ? storedComponentId : filteredSources[0]?.id || '';
if (next && next !== prev) setStoredSelectedComponentId(selectedAppId, next);
if (next !== prev) setBranch('develop');
return next;
});
} finally {
@@ -187,11 +191,13 @@ export function BuildManagementPage() {
useEffect(() => {
if (!componentOptions.some((source) => source.id === selectedComponentId)) {
const nextComponent = componentOptions[0];
const storedComponentId = getStoredSelectedComponentId(selectedAppId);
const nextComponent = componentOptions.find((source) => source.id === storedComponentId) ?? componentOptions[0];
setSelectedComponentId(nextComponent?.id || '');
if (nextComponent?.id) setStoredSelectedComponentId(selectedAppId, nextComponent.id);
setBranch('develop');
}
}, [componentOptions, selectedComponentId]);
}, [componentOptions, selectedAppId, selectedComponentId]);
useEffect(() => {
setPage(1);
@@ -261,7 +267,9 @@ export function BuildManagementPage() {
className="mt-2 h-9 w-full rounded-md border border-input bg-background px-3 text-sm text-foreground outline-none focus:ring-2 focus:ring-ring"
value={selectedComponent?.id ?? ''}
onChange={(event) => {
setSelectedComponentId(event.target.value);
const nextComponentId = event.target.value;
setSelectedComponentId(nextComponentId);
setStoredSelectedComponentId(selectedAppId, nextComponentId);
setBranch('develop');
}}
>