Files
Enterprise-Knowledge-Base/frontend/src/components/empty-knowledge.vue
T
Claude f140c12518 feat(frontend): unify font rendering and add font picker in settings
The UI used hardcoded "PingFang SC" in 50+ components, while the global
font stack in App.vue used a different fallback chain. Outside of mainland
China this caused visibly different fonts in the sidebar, breadcrumbs,
search and agent views compared to settings and document panes.

- Introduce --app-font-family / --app-font-family-mono CSS variables in
  theme.css and route TDesign's --td-font-family through them
- Add a useFont composable that persists the user's choice in localStorage
  and applies it via document.documentElement.style before mount
- Replace hardcoded font-family declarations across the app with the new
  variables (TencentSans logo and the SVG attribute list are preserved)
- Add UI font and monospace font selectors in General Settings with
  i18n strings for en-US, zh-CN, ko-KR and ru-RU

https://claude.ai/code/session_01S1FVPf4jRfWXkTSnpMmMp7
2026-05-05 00:48:40 +08:00

45 lines
1.0 KiB
Vue

<script setup lang="ts">
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
</script>
<template>
<div class="empty">
<img class="empty-img" src="@/assets/img/upload.svg" alt="">
<span class="empty-txt">{{ $t('knowledgeBase.emptyKnowledgeDragDrop') }}</span>
<span class="empty-type-txt">{{ $t('knowledgeBase.pdfDocFormat') }}</span>
<span class="empty-type-txt">{{ $t('knowledgeBase.textMarkdownFormat') }}</span>
</div>
</template>
<style scoped lang="less">
.empty {
flex: 1;
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
}
.empty-txt {
color: var(--td-text-color-placeholder);
font-family: var(--app-font-family);
font-size: 16px;
font-weight: 600;
line-height: 26px;
margin: 12px 0 16px 0;
}
.empty-type-txt {
color: var(--td-text-color-disabled);
text-align: center;
font-family: var(--app-font-family);
font-size: 12px;
font-weight: 400;
width: 217px;
}
.empty-img {
width: 162px;
height: 162px;
}
</style>