feat: AI建议 & 许可证页面

This commit is contained in:
@user8949
2025-03-14 20:03:14 +08:00
parent 154a03dcf0
commit 03db951292
14 changed files with 786 additions and 89 deletions

View File

@@ -1,9 +1,9 @@
<template>
<div class="full-w" :style="{ height: `${height}px` }">
<div class="g-header fixed z-20" ref="headerRef">
<div class="g-header fixed z-20" ref="headerRef" :class="{'home-background': isHome, 'normal-background': !isHome}">
<div class="g-toolbar w-full overflow-hidden" :class="[searchClass, route?.meta?.headerClassName]">
<div class="g-toolbar-left flex-shrink items-center">
<div class="flex-center gap-[16px]">
<div class="flex-center gap-[16px]" v-if="!isHome">
<!-- <g-icon v-if="!asideSetShow" @click="$emit('clickMenu')" name="gt-hamburger" size="20px" class="cursor-pointer hover:!text-black" color="#1D1F3A"></g-icon>-->
<GLink class="g-toolbar-left-logo" :href="baseUrl" />
<GLink class="g-toolbar-left-title" :href="baseUrl">可信代码库</GLink>
@@ -11,7 +11,7 @@
<!-- <Entrance v-if="isLogin" :is-mobile="isMobile" /> -->
</div>
</div>
<div class="flex-1 flex items-center justify-end">
<div class="flex-1 flex items-center justify-end" v-if="!isHome">
<Search class="g-toolbar-left-search" v-if="!isMobile" :key="$route.fullPath"/>
</div>
<div class="g-toolbar-right gap-[12px] flex-grow-0 flex-shrink-0">
@@ -101,6 +101,7 @@ const { height = 56 } = useElementSize(headerRef);
const userInfo = useAccountStore();
const { isLogin } = storeToRefs(userInfo);
const showSearch = computed(() => route.name !== 'home' && route.name !== 'search');
const isHome = computed(() => route.name === 'home');
const handleLogin = (type) => {
emitEvent('login', { type, triggerType: '主动注册' });
};
@@ -139,7 +140,12 @@ $header-bg: #fff;
flex-direction: column;
align-items: stretch;
justify-content: space-between;
background-color: $header-bg;
.home-background {
background-color: #fff0;
}
.normal-background {
background-color: $header-bg;
}
:deep(.g-link) {
color: $devui-text-weak;
}