diff --git a/src/assets/css/devui.scss b/src/assets/css/devui.scss index 0090549..24bf709 100644 --- a/src/assets/css/devui.scss +++ b/src/assets/css/devui.scss @@ -289,10 +289,10 @@ button.devui-button--solid--secondary { padding: 3px 0; } .devui-checkbox__label-text { - font-size: 16px; + font-size: 14px; } .devui-radio.devui-radio--md span .devui-radio__label { - font-size: 16px; + font-size: 14px; } .devui-radio-group div.devui-radio__wrapper { height: auto; diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index 7ff0af9..fea6bd9 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -16,13 +16,15 @@ body, height: 100%; -webkit-font-smoothing: antialiased; // scorll 事件失效 overflow-y: overlay + // devUI 主题颜色重置 + --devui-text: rgb(25, 25, 25); } html { overflow-y: scroll; // html本身没有滚动 为了防止自定义滚动条出现时界面抖动,需要预留轨道 } html body { //background-color: $devui-global-bg; - background-color: #F6F6F8; + background-color: #f6f6f8; font-size: var(--text-sm); color: var(--color-font); @@ -126,15 +128,17 @@ textarea::placeholder { } } /* 滚动条样式自定义 */ -body::-webkit-scrollbar, body>* ::-webkit-scrollbar { +body::-webkit-scrollbar, +body > * ::-webkit-scrollbar { width: 6px; height: 4px; } -body::-webkit-scrollbar-thumb, body>* ::-webkit-scrollbar-thumb { +body::-webkit-scrollbar-thumb, +body > * ::-webkit-scrollbar-thumb { border-radius: 8px; background-color: var(--devui-disabled-text); - &:hover{ - background-color: var(--devui-placeholder) + &:hover { + background-color: var(--devui-placeholder); } } body::-webkit-scrollbar-track { @@ -188,12 +192,16 @@ body::-webkit-scrollbar-corner { } /* 自动补全输入框 去掉hover效果*/ -.devui-auto-complete-input__wrapper:not(.devui-auto-complete--disabled):not(.devui-auto-complete-input__wrapper--error):hover { +.devui-auto-complete-input__wrapper:not(.devui-auto-complete--disabled):not( + .devui-auto-complete-input__wrapper--error + ):hover { border-color: var(--devui-line, #d7d8da); } /* 可输入下拉选择框 去掉hover效果*/ -.devui-editable-select-input__wrapper:not(.devui-editable-select-input__wrapper--disabled):not(.devui-editable-select-input__wrapper--focus):hover { +.devui-editable-select-input__wrapper:not(.devui-editable-select-input__wrapper--disabled):not( + .devui-editable-select-input__wrapper--focus + ):hover { border-color: var(--devui-line, #d7d8da); } @@ -216,7 +224,10 @@ body::-webkit-scrollbar-corner { } /* 时间范围选择 去掉hover效果 */ -.devui-range-date-picker-pro .devui-range-date-picker-pro__range-picker:not(.devui-range-date-picker-pro--error):not(.devui-range-date-picker-pro--disabled):hover { +.devui-range-date-picker-pro + .devui-range-date-picker-pro__range-picker:not(.devui-range-date-picker-pro--error):not( + .devui-range-date-picker-pro--disabled + ):hover { border-color: var(--devui-line, #d7d8da); } @@ -356,16 +367,20 @@ body::-webkit-scrollbar-corner { } input { - background-color:transparent !important; + background-color: transparent !important; // appearance: none; - &:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill { + &:-webkit-autofill, + textarea:-webkit-autofill, + select:-webkit-autofill { -webkit-text-fill-color: inherit !important; background-color: transparent !important; background-image: none; transition: background-color 36000s ease-in-out 0s; //背景色透明 生效时长 过渡效果 启用时延迟的时间 } - &:-moz-autofill, textarea:-moz-autofill, select:-moz-autofill { + &:-moz-autofill, + textarea:-moz-autofill, + select:-moz-autofill { -webkit-text-fill-color: inherit !important; background-color: transparent !important; background-image: none; @@ -385,8 +400,6 @@ input { } } - - .g-content-card-v2 { background-color: $devui-global-bg; border-radius: $devui-border-radius-card; @@ -424,7 +437,7 @@ input { height: 1px; width: 100%; background: var(--devui-dividing-line); - margin: 32px 0 + margin: 32px 0; } .g-tip-text { @@ -434,7 +447,7 @@ input { } // 新版设计统一设置标题样式 大小颜色行高 -.unify-settingTitle-title{ +.unify-settingTitle-title { font-weight: 700; line-height: 34px; font-size: 24px; @@ -447,14 +460,16 @@ input { } // 下拉框动效 -.arrow-down{ - transition: transform var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)); +.arrow-down { + transition: transform var(--devui-animation-duration-slow, 0.3s) + var(--devui-animation-ease-in-out-smooth, cubic-bezier(0.645, 0.045, 0.355, 1)); transform-origin: center; transform: rotateZ(0deg) !important; } -.arrow-up{ - transition: transform var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)); +.arrow-up { + transition: transform var(--devui-animation-duration-slow, 0.3s) + var(--devui-animation-ease-in-out-smooth, cubic-bezier(0.645, 0.045, 0.355, 1)); transform-origin: center; transform: rotateZ(180deg) !important; } diff --git a/src/assets/imgs/jyh/nodata.png b/src/assets/imgs/jyh/nodata.png new file mode 100644 index 0000000..8e8155b Binary files /dev/null and b/src/assets/imgs/jyh/nodata.png differ diff --git a/src/components/AdvanceSearch/index.vue b/src/components/AdvanceSearch/index.vue index 87b0d82..99adc40 100644 --- a/src/components/AdvanceSearch/index.vue +++ b/src/components/AdvanceSearch/index.vue @@ -1,70 +1,109 @@ \ No newline at end of file diff --git a/src/components/ChartLine/index.vue b/src/components/ChartLine/index.vue new file mode 100644 index 0000000..ccccbde --- /dev/null +++ b/src/components/ChartLine/index.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/src/components/NoData/NoData.vue b/src/components/NoData/NoData.vue new file mode 100644 index 0000000..5a2d04e --- /dev/null +++ b/src/components/NoData/NoData.vue @@ -0,0 +1,32 @@ + + + + diff --git a/src/router/interceptor.ts b/src/router/interceptor.ts index c7c8fc8..c5b0cf9 100644 --- a/src/router/interceptor.ts +++ b/src/router/interceptor.ts @@ -41,7 +41,7 @@ const isRepoVisited = (id: string): boolean => { // }; const fromHomeWeb = ['home', 'search', 'gStar', 'gStarApply', 'explore']; -export const injectRouter = router => { +export const injectRouter = (router) => { const account = useAccountStore(); router.beforeEach(async (to, from) => { @@ -56,7 +56,7 @@ export const injectRouter = router => { path_name: Array.isArray(namespace) ? namespace.join('/') : namespace }; let res = await reqCatch(getPathType, params); - if (!res.error) { + if (!res.error && res.data) { res = res?.data?.data; if (res?.type === null) { @@ -77,15 +77,18 @@ export const injectRouter = router => { const BASE_URL = (import.meta as any).env.VITE_HOST; const beforeRef = sessionStorage.getItem('ref'); const ref = beforeRef || document.referrer || ''; - if (!fromHomeWeb.includes(to.name)) { // 设置全局ref + if (!fromHomeWeb.includes(to.name)) { + // 设置全局ref window.page_ref = ref; sessionStorage.setItem('ref', BASE_URL + to.fullPath); } // 获取组织详情 - if (to.meta.type === 'org' || globalStore.namespaceType === 1) { // 组织相关页面 || 组织主页 + if (to.meta.type === 'org' || globalStore.namespaceType === 1) { + // 组织相关页面 || 组织主页 const { orgId } = useOrgId('%2F', to.params.namespace); - if (orgId.value !== currentOrgId) { // 第一次进入或切换组织时调用接口 + if (orgId.value !== currentOrgId) { + // 第一次进入或切换组织时调用接口 const { setOrgInfo, setAccessLevel, setVisibility } = orgInfoStore(); const res = await reqCatch(getOrg, { orgId: orgId.value, with_full_path: true }); if (!res.error) { @@ -94,7 +97,8 @@ export const injectRouter = router => { if (res?.error?.error_code === 404) { return { name: '404' }; } - if (res?.error?.error_code === 403) { // 403代表无私有组织权限 + if (res?.error?.error_code === 403) { + // 403代表无私有组织权限 setAccessLevel(0); setVisibility('private'); return { name: '403' }; @@ -137,8 +141,8 @@ export const injectRouter = router => { ['DISCUSSION', 'repoDiscussion'], ['COMMUNITY', 'reqCommunity'] ]); - modules.forEach(item => { - if ((to.name === moduleRouteConfig.get(item.key)) && item.value === '0') { + modules.forEach((item) => { + if (to.name === moduleRouteConfig.get(item.key) && item.value === '0') { globalStore.setIsNotFound(true); } }); @@ -204,15 +208,18 @@ export const injectRouter = router => { } // 验证登录权限 - if (to.meta.needLogin) { // 是否需要登录 - if (account.isLogin) { // 已登录 + if (to.meta.needLogin) { + // 是否需要登录 + if (account.isLogin) { + // 已登录 return true; } else { emitEvent('login', { triggerType: to.meta?.loginType, Authorization: Boolean(to?.meta?.Authorization) }); return false; } } else { - if (account.isLogin && to.meta.loginHidden) { // 已登录,不能访问某些页面,进行跳转处理(如:登录注册) + if (account.isLogin && to.meta.loginHidden) { + // 已登录,不能访问某些页面,进行跳转处理(如:登录注册) const toOauth = to.name === 'oauth' && /(.*)_(.*)/.exec(to.query?.state); // 三方授权不跳转 const fromAtomGit = to.query.installation_id && /atomgit.com/.test(document.referrer); // 来自AtomGit应用的跳转 if (toOauth || fromAtomGit) return true; @@ -223,7 +230,8 @@ export const injectRouter = router => { }); router.afterEach((to, from) => { // 上报PV - if (to.fullPath === '/' || to.fullPath !== from.fullPath) { // 同地址切换不上报 + if (to.fullPath === '/' || to.fullPath !== from.fullPath) { + // 同地址切换不上报 if (!(to.name === 'repo' || to.name === 'repoDir') || (from.fullPath === '/' && to.name === 'repoDir')) { // 子应用单独处理 if (fromHomeWeb.includes(to.name)) return; diff --git a/src/views/Jyh/Home/index.vue b/src/views/Jyh/Home/index.vue index c4bcf24..563cffd 100644 --- a/src/views/Jyh/Home/index.vue +++ b/src/views/Jyh/Home/index.vue @@ -6,10 +6,33 @@

可信开源代码库

- 更多 > + 更多 >
- @@ -38,6 +40,8 @@ import { useRouter, useRoute } from 'vue-router'; import { getOrgInfo } from '@/views/Org/hooks/orgInfo'; import EarlyWarning from './Detail/EarlyWarning.vue'; import SubscribeList from './Detail/SubscribeList.vue'; +import OrganizationManage from './OrganizationManage/OrganizationManage.vue'; + const { namespace } = getOrgInfo(); const avatarUrl = '/src/assets/imgs/avatar/male.png'; diff --git a/src/views/Jyh/Search/Components/OssQuery.vue b/src/views/Jyh/Search/Components/OssQuery.vue index c48225e..6992e44 100644 --- a/src/views/Jyh/Search/Components/OssQuery.vue +++ b/src/views/Jyh/Search/Components/OssQuery.vue @@ -1,86 +1,15 @@ diff --git a/src/views/Jyh/Version/Detail/index.vue b/src/views/Jyh/Version/Detail/index.vue index 4b523c4..6134c73 100644 --- a/src/views/Jyh/Version/Detail/index.vue +++ b/src/views/Jyh/Version/Detail/index.vue @@ -27,6 +27,7 @@ + @@ -36,8 +37,10 @@ + -
+ + @@ -48,6 +51,7 @@ import { getOrgInfo } from '@/views/Org/hooks/orgInfo'; import VulnerabilitiesList from './VulnerabilitiesList.vue'; import CommunityInfo from './CommunityInfo.vue'; import VersionInfo from './VersionInfo.vue'; +import SBOM from './SBOM.vue'; import AIRepair from '../../AIRepair/index.vue'; import LicenseInfo from '../../LicenseInfo/index.vue'; const { namespace } = getOrgInfo();