Auto config fonts
This commit is contained in:
parent
0173a7fdbb
commit
ca1a6e9b1a
BIN
src/assets/inter.ttf
Normal file
BIN
src/assets/inter.ttf
Normal file
Binary file not shown.
@ -1,9 +1,19 @@
|
||||
@font-face {
|
||||
font-family: "font";
|
||||
src: url("font.ttf") format("truetype");
|
||||
font-family: "Inter";
|
||||
src: url("inter.ttf") format("truetype");
|
||||
}
|
||||
* {
|
||||
font-family: "font" !important;
|
||||
|
||||
@font-face {
|
||||
font-family: "Onest";
|
||||
src: url("onest.ttf") format("truetype");
|
||||
}
|
||||
|
||||
.inter {
|
||||
font-family: "Inter", sans-serif !important;
|
||||
}
|
||||
|
||||
.onest {
|
||||
font-family: "Onest", sans-serif !important;
|
||||
}
|
||||
|
||||
@tailwind base;
|
||||
@ -62,6 +72,6 @@
|
||||
|
||||
/* Hide scrollbar for IE, Edge and Firefox */
|
||||
.no-scrollbar {
|
||||
-ms-overflow-style: none; /* IE and Edge */
|
||||
scrollbar-width: none; /* Firefox */
|
||||
-ms-overflow-style: none; /* IE and Edge */
|
||||
scrollbar-width: none; /* Firefox */
|
||||
}
|
@ -11,13 +11,16 @@ import { PageAssistProvider } from "@/components/Common/PageAssistProvider"
|
||||
|
||||
function IndexOption() {
|
||||
const { mode } = useDarkMode()
|
||||
const { t } = useTranslation()
|
||||
const { t, i18n } = useTranslation()
|
||||
return (
|
||||
<MemoryRouter>
|
||||
<ConfigProvider
|
||||
theme={{
|
||||
algorithm:
|
||||
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm
|
||||
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm,
|
||||
token: {
|
||||
fontFamily: i18n.language === "ru" ? "Onest" : "Inter"
|
||||
}
|
||||
}}
|
||||
renderEmpty={() => (
|
||||
<Empty
|
||||
|
@ -11,14 +11,17 @@ import { PageAssistProvider } from "@/components/Common/PageAssistProvider"
|
||||
|
||||
function IndexSidepanel() {
|
||||
const { mode } = useDarkMode()
|
||||
const { t } = useTranslation()
|
||||
const { t, i18n } = useTranslation()
|
||||
|
||||
return (
|
||||
<MemoryRouter>
|
||||
<ConfigProvider
|
||||
theme={{
|
||||
algorithm:
|
||||
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm
|
||||
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm,
|
||||
token: {
|
||||
fontFamily: i18n.language === "ru" ? "Onest" : "Inter"
|
||||
}
|
||||
}}
|
||||
renderEmpty={() => (
|
||||
<Empty
|
||||
|
@ -10,12 +10,17 @@ import { OptionSettings } from "./option-settings"
|
||||
import { OptionShare } from "./option-settings-share"
|
||||
import { OptionKnowledgeBase } from "./option-settings-knowledge"
|
||||
import { OptionAbout } from "./option-settings-about"
|
||||
import { useTranslation } from "react-i18next"
|
||||
|
||||
export const OptionRouting = () => {
|
||||
const { mode } = useDarkMode()
|
||||
const { i18n } = useTranslation()
|
||||
|
||||
return (
|
||||
<div className={mode === "dark" ? "dark" : "light"}>
|
||||
<div
|
||||
className={`${mode === "dark" ? "dark" : "light"} ${
|
||||
i18n.language === "ru" ? "onest" : "inter"
|
||||
}`}>
|
||||
<Routes>
|
||||
<Route path="/" element={<OptionIndex />} />
|
||||
<Route path="/settings" element={<OptionSettings />} />
|
||||
@ -32,9 +37,13 @@ export const OptionRouting = () => {
|
||||
|
||||
export const SidepanelRouting = () => {
|
||||
const { mode } = useDarkMode()
|
||||
const { i18n } = useTranslation()
|
||||
|
||||
return (
|
||||
<div className={mode === "dark" ? "dark" : "light"}>
|
||||
<div
|
||||
className={`${mode === "dark" ? "dark" : "light"} ${
|
||||
i18n.language === "ru" ? "onest" : "inter"
|
||||
}`}>
|
||||
<Routes>
|
||||
<Route path="/" element={<SidepanelChat />} />
|
||||
<Route path="/settings" element={<SidepanelSettings />} />
|
||||
|
@ -24,7 +24,7 @@ export default defineConfig({
|
||||
srcDir: "src",
|
||||
outDir: "build",
|
||||
manifest: {
|
||||
version: "1.1.4",
|
||||
version: "1.1.5",
|
||||
name: '__MSG_extName__',
|
||||
description: '__MSG_extDescription__',
|
||||
default_locale: 'en',
|
||||
|
Loading…
x
Reference in New Issue
Block a user