Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat 更改新LOGO #81

Merged
merged 4 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions src/dashboard-front/src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
class="navigation-content"
navigation-type="top-bottom"
:need-menu="false"
:default-open="true">
:default-open="true"
:side-title="sideTitle"
>
<template #side-icon>
<!-- <img v-if="locale === 'en'" src="@/images/APIgataway-en.png" class="api-logo">
<img v-else src="@/images/APIgataway-c.png" class="api-logo"> -->
<img :src="appLogo" class="api-logo" />
</template>
<div class="content">
Expand Down Expand Up @@ -81,9 +81,7 @@ import { useSidebar } from '@/hooks';
// @ts-ignore
import { getPlatformConfig, setShortcutIcon, setDocumentTitle } from '@blueking/platform-config';
// @ts-ignore
import logoSvg from '@/images/APIgataway-c.png';
// @ts-ignore
import logoSvgEn from '@/images/APIgataway-en.png';
import logoWithoutName from '@/images/APIgateway-logo.png';
import { isChinese } from '@/language/i18n';
import constantConfig from '@/constant/config';

Expand All @@ -106,6 +104,12 @@ const bkuiLocale = computed(() => {
return bkuiLocaleData.en;
});

// t()方法的 | 符号有特殊含义,需要用插值才能正确显示
const sideTitle = computed(() => {
// return t("蓝鲸 {pipe} API 网关", { pipe: '|'});
return t('蓝鲸 API 网关');
});

const websiteConfig = ref<any>({});

const getWebsiteConfig = async () => {
Expand Down Expand Up @@ -133,9 +137,7 @@ const getWebsiteConfig = async () => {
getWebsiteConfig();

const appLogo = computed(() => {
// 如果未获取到配置,使用默认logo
const src = websiteConfig.value?.i18n?.appLogo || (isChinese ? logoSvg : logoSvgEn);
return src;
return logoWithoutName;
});

// 加载完用户数据才会展示页面
Expand Down Expand Up @@ -387,8 +389,13 @@ onMounted(() => {
height: 100%;
}

.api-logo{
height: 22px;
:deep(.title-desc) {
color: #eaebf0;
cursor: pointer;
}

.api-logo {
height: 28px;
cursor: pointer;
}

Expand Down
Binary file modified src/dashboard-front/src/images/APIgataway-c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/dashboard-front/src/images/APIgataway-en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/dashboard-front/src/language/lang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const lang: ILANG = {
'基本信息': ['Basic Info'],
'系统出现异常': ['The system is abnormal'],
'校验': ['Check'],
'蓝鲸 API 网关(API Gateway) 是蓝鲸体系的 API 托管服务。': ['API Gateway is the API hosting service of the BlueKing system.'],
'(API Gateway) 是蓝鲸体系的 API 托管服务。': ['API Gateway is the API hosting service of the BlueKing system.'],
'可以帮助开发者创建、发布、维护,和保护 API,以快速、低成本、低风险地开放系统的数据或服务。': ['It can help developers create, publish, maintain, and protect APIs to open up the system\'s data or services quickly, inexpensively, and with low risk.'],
'API 网关支持“自助配置接入”和“组件编码接入”两种方式,并提供了统一的用户认证、蓝鲸应用鉴权、请求转发、日志记录等功能。': ['The API Gateway supports both "Self-Configuration" and "Component Coding", and provides unified user authentication, app authentication, request forwarding, and log recording.'],
'“自助配置接入”采用网关的方案,具体请参考“我的网关”,“组件编码接入”采用组件 API 的方案。': ['Please refer to “My Gateway” for “Self-Configuration” and “Component Coding” for “Component API”.'],
Expand Down Expand Up @@ -1195,6 +1195,7 @@ const lang: ILANG = {
'请输入关键字搜索': ['Please input keyword'],
'请输入关键字': ['Please enter keyword'],
'API Gateway | 腾讯蓝鲸智云': ['API Gateway | BlueKing'],
'蓝鲸 API 网关': ['BK API Gateway'],
'只支持.tar.gz、.tgz、.zip 压缩格式': ['Only supports .tar.gz, .tgz, .zip compression formats'],
'无该应用访问权限': ['No access permission to this application.'],
'服务异常': ['Service exception'],
Expand Down
Binary file modified src/dashboard-front/static/images/APIgataway-c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/dashboard-front/static/images/APIgataway-en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading