diff --git a/components.d.ts b/components.d.ts index 677ad841cb3859174fc8a9279f9c50174faa7fef..c6281e2a245815ae6cfc1077b9c9a1659efc42d9 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,12 +8,14 @@ export {} declare module 'vue' { export interface GlobalComponents { AppBanner: typeof import('./src/components/AppBanner.vue')['default'] + AppBreadcrumb: typeof import('./src/components/AppBreadcrumb.vue')['default'] AppFeedback: typeof import('./src/components/AppFeedback.vue')['default'] AppFooter: typeof import('./src/components/AppFooter.vue')['default'] AppHeader: typeof import('./src/components/AppHeader.vue')['default'] - AppPagination: typeof import('./src/components/AppPagination.vue')['default'] AppSection: typeof import('./src/components/AppSection.vue')['default'] ContentWrapper: typeof import('./src/components/ContentWrapper.vue')['default'] + DetailAside: typeof import('./src/components/DetailAside.vue')['default'] + DetailHeader: typeof import('./src/components/DetailHeader.vue')['default'] ExternalLink: typeof import('./src/components/ExternalLink.vue')['default'] FilterCheckbox: typeof import('./src/components/filter/FilterCheckbox.vue')['default'] FilterHeader: typeof import('./src/components/filter/FilterHeader.vue')['default'] diff --git a/deploy/nginx/nginx.conf b/deploy/nginx/nginx.conf index d75e7881cc5f942807c05cf781e3ea39a80dedb8..92cb9ad7e770c803b5dd21bb6b63e74bffa0d2de 100644 --- a/deploy/nginx/nginx.conf +++ b/deploy/nginx/nginx.conf @@ -61,6 +61,7 @@ http { add_header X-Content-Type-Options nosniff; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; add_header Content-Security-Policy "script-src 'self' * 'unsafe-inline' 'unsafe-eval'; object-src 'none'; frame-src 'none'"; + add_header Cache-Control "no-cache,no-store,must-revalidate"; add_header Pragma no-cache; add_header Expires 0; diff --git a/src/@types/app.ts b/src/@types/app.ts index 4412386759c4d63a63d337859a6f424105269caa..9cb2379504931bff60d0772cbbcf0845b6cf7627 100644 --- a/src/@types/app.ts +++ b/src/@types/app.ts @@ -3,7 +3,7 @@ export interface AppItemT { description: string | null; iconUrl: string | null; name: string; - tags: string[]; + tags: PkgTypeT[]; pkgIds: PkgIdsT; } export interface PkgIdsT { @@ -25,3 +25,41 @@ export interface AppInfoT { source_code: string; bin_code: string; } + + +export interface MaintainerT { + maintainerId: string; + maintainerEmail: string; + maintainerGiteeId: string; +}; + +export interface DetailItemT { + name: string; + value: string | any; + type?: string; +} + + +export interface HomeInfoT { + id: string; + name: string; + desc: string; + icon: string; + href: string; +} + +export interface MoreMessgeT { + name: string; + value: MoreMessgeItemT[]; +} +export interface MoreMessgeItemT { + name: string; + flags: string; + rel: string; + ver: string; + epoch: string; +} + + + +export type PkgTypeT = 'RPM' | 'IMAGE' | 'EPKG'; \ No newline at end of file diff --git a/src/@types/detail.ts b/src/@types/detail.ts new file mode 100644 index 0000000000000000000000000000000000000000..aef029e22e20c8c498944555a1339773c0e631d4 --- /dev/null +++ b/src/@types/detail.ts @@ -0,0 +1,79 @@ +interface PackageDetailT { + name: string; + version: string; + os: string; + arch: string; + category: string; + srcRepo: string; + binDownloadUrl: string; + srcDownloadUrl: string; + summary: string; + osSupport: string; + repo: { type: string; url: string }; + repoType: { type: string; url: string }; + installation: string; + description: string; + requires: RequiresT[]; + provides: string[]; + conflicts: string[]; + changeLog: string; + files: FilesT[]; + maintainerId: string | null; + maintainerEmail: string | null; + maintainerGiteeId: string | null; + maintainerUpdateAt: string | null; + maintainerStatus: string | null; + upStream: string; + security: string; + similarPkgs: string; + downloadCount: number | null; + pkgId: string; + subPath: string | null; + license: string; +} + +interface RequiresT { + name: string; + flags: string; + rel: string; + ver: string; + epoch: string; +} +interface FilesT { + fileName: string; +} + +export interface EpkgDetailT extends PackageDetailT { + epkgSize: string; + epkgUpdateAt: string; + iconUrl: string | null; + securityLevel: string | null; +} + +export interface RpmDetailT extends PackageDetailT { + id: string; + rpmSize: string; + rpmUpdateAt: string; +} + +export interface ImageDetailT extends PackageDetailT { + id: string; + type: string; + download: string; + appSize: string | null; + environment: string; + iconUrl: string | null; + dependencyPkgs: string[]; + appVer: string; + safeLabel: string | null; + imageTags: string; + imageUsage: string; + securityLevel: string | null; + latestOsSupport: boolean; +} + +export interface ParamsKeyT { + appPkgId: string | null; + epkgPkgId: string | null; + rpmPkgId: string | null; +} diff --git a/src/@types/type-sort.ts b/src/@types/type-sort.ts new file mode 100644 index 0000000000000000000000000000000000000000..bd0d4d1b4a2cacae96affb4fcd0eeaf5bee7400b --- /dev/null +++ b/src/@types/type-sort.ts @@ -0,0 +1 @@ +export type SorT = 'asc' | 'desc' | ''; diff --git a/src/assets/style/detail/index.scss b/src/assets/style/detail/index.scss index 348198a02e3e1afb2a02bf59dece8bf55e3518cb..1ab8e2388e1984d0dbe5bf509772843883b18b86 100644 --- a/src/assets/style/detail/index.scss +++ b/src/assets/style/detail/index.scss @@ -50,7 +50,7 @@ --table-edge-padding: 24px; } // 容器镜像样式 - &.switch { + &.tabs-switch { .o-tab-nav-list { background: #ededf0; border-radius: 8px; @@ -74,6 +74,15 @@ } } } + &.tabs-one { + .o-tab-nav-active { + color: var(--o-color-info1); + cursor: default; + } + .o-tab-nav-anchor { + display: none; + } + } } .code-box { @@ -82,7 +91,7 @@ .basic-info { margin-top: 26px; - + p { @include tip1; color: var(--o-color-info2); @@ -90,12 +99,12 @@ align-items: top; border-bottom: 1px solid rgba(0, 0, 0, 0.1); border-right: 1px solid rgba(0, 0, 0, 0.1); - border-left: 4px solid #002fa7; - &:first-child{ + border-left: 4px solid var(--o-color-primary1); + &:first-child { border-top: 1px solid rgba(0, 0, 0, 0.1); } .label { - background: rgba(0,47,167,0.05); + background: rgba(0, 47, 167, 0.05); padding: 12px 24px; min-width: 150px; border-right: 1px solid rgba(0, 0, 0, 0.1); @@ -131,7 +140,7 @@ display: flex; align-items: center; justify-content: center; - background-color: #002fa7; + background-color: var(--o-color-primary1); color: #fff; padding: 10px 0px; } @@ -162,14 +171,15 @@ .title { display: flex; justify-content: space-between; + align-items: center; @include h3; } -.ver{ - background: #F2F4FA; -border: 1px solid rgba(0,47,167,0.20); -border-radius: 4px; -font-size: 18px; -color: #002FA7; -padding: 6px 24px; +.ver { + background: #f2f4fa; + @include text2; + border: 1px solid rgba(0, 47, 167, 0.2); + border-radius: var(--layout-pkg-radius); + color: var(--o-color-primary1); + padding: 6px 24px; } diff --git a/src/components/AppBreadcrumb.vue b/src/components/AppBreadcrumb.vue new file mode 100644 index 0000000000000000000000000000000000000000..07ffe018929b739b6cf7cfdb7d4241f66d36b0f7 --- /dev/null +++ b/src/components/AppBreadcrumb.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/src/views/applicationsPackage/components/DetailAside.vue b/src/components/DetailAside.vue similarity index 95% rename from src/views/applicationsPackage/components/DetailAside.vue rename to src/components/DetailAside.vue index c12bb72f1ba8928ba4d76ae873f5443a6a63c3a8..3bf6ac0071524724967bace73bcdacd5e400b0f0 100644 --- a/src/views/applicationsPackage/components/DetailAside.vue +++ b/src/components/DetailAside.vue @@ -153,9 +153,11 @@ const arraySpanMethod = (rowIndex: number, colIdx: number, row: any, column: any const { locale } = useLocale(); const jumpTo = (name: string, id: string) => { - const detailType = props.type === 'IMAGE' ? 'image' : props.type === 'RPM' ? 'package' : 'epkg'; - const newHref = `/${locale.value}/${detailType}/${xssAllTag(name)}?type=${props.type}&pkgId=${id}`; - return newHref; + if (props.type) { + const detailType = props.type === 'IMAGE' ? 'image' : props.type === 'RPM' ? 'package' : 'epkg'; + const newHref = `/${locale.value}/${detailType}/${xssAllTag(name)}?type=${props.type}&pkgId=${id}`; + return newHref; + } }; @@ -183,7 +185,7 @@ const jumpTo = (name: string, id: string) => { @@ -242,8 +244,5 @@ const jumpTo = (name: string, id: string) => { padding: 2px 12px; font-size: 14px !important; } - th { - font-weight: 600; - } } diff --git a/src/views/applicationsPackage/components/DetailNewHead.vue b/src/components/DetailHeader.vue similarity index 95% rename from src/views/applicationsPackage/components/DetailNewHead.vue rename to src/components/DetailHeader.vue index b1bfec120a9cb231d064b0dbb2ba995830db99d3..56eb7f34803f6bd5d881e75cf86163eaaa24edb0 100644 --- a/src/views/applicationsPackage/components/DetailNewHead.vue +++ b/src/components/DetailHeader.vue @@ -50,7 +50,9 @@ const onExternalDialog = (href: string) => {

{{ data.name }} - 主页 + 主页

{{ basicInfo }}

@@ -143,7 +145,7 @@ const onExternalDialog = (href: string) => { padding: 12px; img { max-width: 100%; - max-height: 100%; + max-height: 86px; } } diff --git a/src/components/HeaderNav.vue b/src/components/HeaderNav.vue index a5d939ebd939078d3bb40c97e18ed67a303c1a4b..6f4047eb25dd8c31fdcfbc965483ca9a94a4b4c4 100644 --- a/src/components/HeaderNav.vue +++ b/src/components/HeaderNav.vue @@ -28,7 +28,7 @@ const selectedIndex = computed(() => { return idx; } - if (route.path.includes('/applicationsPackage')) { + if (route.path.includes('/apppkg')) { idx = 1; return idx; } diff --git a/src/components/OCardItem.vue b/src/components/OCardItem.vue index afb3f57f9c7e6697bdaf39dfaf13e5e7ad9e5fa5..4af09e1b14ec19ea3c69895853761332441e0da9 100644 --- a/src/components/OCardItem.vue +++ b/src/components/OCardItem.vue @@ -1,7 +1,7 @@ diff --git a/src/views/applicationsPackage/TheApplicationsPackage.vue b/src/views/apppkg/TheAppPkg.vue similarity index 85% rename from src/views/applicationsPackage/TheApplicationsPackage.vue rename to src/views/apppkg/TheAppPkg.vue index 38870be87b6509a95ce35b07fea8cdb0393b2184..24cfa0a8de028b529f804ac0224951c4c930a87b 100644 --- a/src/views/applicationsPackage/TheApplicationsPackage.vue +++ b/src/views/apppkg/TheAppPkg.vue @@ -2,11 +2,11 @@ import AppBanner from '@/components/AppBanner.vue'; import ContentWrapper from '@/components/ContentWrapper.vue'; import AppPkgContent from './APkgContent.vue'; -import { resourceData } from '@/data/home/index'; +import { homeData } from '@/data/home/index'; import bannerImg from '@/assets/banner/banner.jpg'; -const bannerInfo = resourceData[0]; +const bannerInfo = homeData[0];