diff --git a/frontend/src/api/modules/project-management/fileManagement.ts b/frontend/src/api/modules/project-management/fileManagement.ts index 1074bc00be..3fb8f2445c 100644 --- a/frontend/src/api/modules/project-management/fileManagement.ts +++ b/frontend/src/api/modules/project-management/fileManagement.ts @@ -1,6 +1,7 @@ import MSR from '@/api/http/index'; import { AddModuleUrl, + AddRepositoryFileUrl, AddRepositoryUrl, BatchDownloadFileUrl, BatchMoveFileUrl, @@ -15,11 +16,13 @@ import { GetModuleUrl, GetRepositoryFileTypesUrl, GetRepositoryFileUrl, + GetRepositoryInfoUrl, MoveModuleUrl, ReuploadFileUrl, ToggleJarFileUrl, UpdateFileUrl, UpdateModuleUrl, + UpdateRepositoryFileUrl, UpdateRepositoryUrl, UploadFileUrl, } from '@/api/requrls/project-management/fileManagement'; @@ -27,6 +30,7 @@ import { import type { CommonList } from '@/models/common'; import type { AddModuleParams, + AddRepositoryFileParams, AddRepositoryParams, BatchFileApiParams, FileDetail, @@ -36,6 +40,7 @@ import type { ModuleTreeNode, MoveModuleParams, Repository, + RepositoryInfo, ReuploadFileParams, TestRepositoryConnectParams, UpdateFileParams, @@ -153,3 +158,18 @@ export function connectRepository(data: TestRepositoryConnectParams) { export function updateRepository(data: UpdateRepositoryParams) { return MSR.post({ url: UpdateRepositoryUrl, data }); } + +// 添加存储库文件 +export function addRepositoryFile(data: AddRepositoryFileParams) { + return MSR.post({ url: AddRepositoryFileUrl, data }); +} + +// 更新存储库文件 +export function updateRepositoryFile(id: string) { + return MSR.get({ url: UpdateRepositoryFileUrl, params: id }); +} + +// 获取存储库信息 +export function getRepositoryInfo(id: string) { + return MSR.get({ url: GetRepositoryInfoUrl, params: id }); +} diff --git a/frontend/src/api/requrls/project-management/fileManagement.ts b/frontend/src/api/requrls/project-management/fileManagement.ts index 29c5f4b4e5..1a178f2396 100644 --- a/frontend/src/api/requrls/project-management/fileManagement.ts +++ b/frontend/src/api/requrls/project-management/fileManagement.ts @@ -22,3 +22,6 @@ export const GetRepositoryFileTypesUrl = '/project/file/repository/file-type'; / export const UpdateRepositoryUrl = '/project/file/repository/update-repository'; // 修改存储库信息 export const ConnectRepositoryUrl = '/project/file/repository/connect'; // 测试存储库连接 export const AddRepositoryUrl = '/project/file/repository/add-repository'; // 添加存储库 +export const AddRepositoryFileUrl = '/project/file/repository/add-file'; // 添加存储库文件 +export const UpdateRepositoryFileUrl = '/project/file/repository/pull-file'; // 更新存储库文件 +export const GetRepositoryInfoUrl = '/project/file/repository/info'; // 获取存储库信息 diff --git a/frontend/src/components/pure/ms-list/index.vue b/frontend/src/components/pure/ms-list/index.vue index 9e03636a38..ff01a480a6 100644 --- a/frontend/src/components/pure/ms-list/index.vue +++ b/frontend/src/components/pure/ms-list/index.vue @@ -139,11 +139,10 @@ const listRef: Ref = ref(null); - const { isArrivedBottom, isInitListener, containerStatusClass, setContainer, initScrollListener } = - useContainerShadow({ - overHeight: props.itemHeight, - containerClassName: 'ms-list', - }); + const { isInitListener, containerStatusClass, setContainer, initScrollListener } = useContainerShadow({ + overHeight: props.itemHeight, + containerClassName: 'ms-list', + }); watch( props.data, diff --git a/frontend/src/components/pure/ms-split-box/index.vue b/frontend/src/components/pure/ms-split-box/index.vue index 636d7f4338..7e686f7f98 100644 --- a/frontend/src/components/pure/ms-split-box/index.vue +++ b/frontend/src/components/pure/ms-split-box/index.vue @@ -11,14 +11,16 @@ @@ -66,7 +68,7 @@ const isExpandedLeft = ref(true); const isExpandAnimating = ref(false); // 控制动画类 - function changeFolderExpand() { + function changeLeftExpand() { isExpandAnimating.value = true; isExpandedLeft.value = !isExpandedLeft.value; if (isExpandedLeft.value) { @@ -90,12 +92,16 @@ @apply hidden; } :deep(.arco-split-pane) { - overflow: hidden; + @apply relative overflow-hidden; } } + :deep(.arco-split-pane) { + @apply relative overflow-hidden; + } .animating { :deep(.arco-split-pane) { - overflow: hidden; + @apply relative overflow-hidden; + transition: flex 0.3s ease; } } @@ -106,17 +112,15 @@ .ms-split-box--left { width: calc(v-bind(innerWidth) - 4px); } + .expand-icon { + @apply z-10 cursor-pointer; + + padding: 8px 2px; + border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; + background-color: var(--color-text-n8); + } .ms-split-box--right { @apply w-full; - .expand-icon { - @apply absolute cursor-pointer; - - top: 50%; - transform: translateY(-50%); - padding: 8px 2px; - border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; - background-color: var(--color-text-n8); - } } :deep(.arco-split-trigger-icon) { font-size: 14px; diff --git a/frontend/src/models/projectManagement/file.ts b/frontend/src/models/projectManagement/file.ts index 2e0e28b30d..6bf3804310 100644 --- a/frontend/src/models/projectManagement/file.ts +++ b/frontend/src/models/projectManagement/file.ts @@ -111,12 +111,25 @@ export interface AddRepositoryParams extends RepositoryCommon { url: string; } // 更新存储库信息入参 -export interface UpdateRepositoryParams extends RepositoryCommon { +export interface UpdateRepositoryParams extends Partial { id: string; } +// 存储库信息 +export interface RepositoryInfo extends RepositoryCommon { + id: string; + url: string; + projectId: string; +} // 测试存储库连接 export interface TestRepositoryConnectParams { url: string; token: string; userName: string; } +// 添加存储库文件入参 +export interface AddRepositoryFileParams { + moduleId: string; + branch: string; + filePath: string; + enable: boolean; +} diff --git a/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue b/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue index f0766cdca8..b46c2000df 100644 --- a/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue +++ b/frontend/src/views/project-management/fileManagement/components/fileDetailDrawer.vue @@ -34,11 +34,12 @@ {{ t('project.fileManagement.download') }} {{ t('project.fileManagement.updateFile') }} @@ -58,7 +59,7 @@