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-face {
|
||||||
font-family: "font";
|
font-family: "Inter";
|
||||||
src: url("font.ttf") format("truetype");
|
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;
|
@tailwind base;
|
||||||
@ -47,7 +57,7 @@
|
|||||||
@keyframes animatedgradient {
|
@keyframes animatedgradient {
|
||||||
0% {
|
0% {
|
||||||
background-position: 0% 50%;
|
background-position: 0% 50%;
|
||||||
}
|
}
|
||||||
50% {
|
50% {
|
||||||
background-position: 100% 50%;
|
background-position: 100% 50%;
|
||||||
}
|
}
|
||||||
@ -62,6 +72,6 @@
|
|||||||
|
|
||||||
/* Hide scrollbar for IE, Edge and Firefox */
|
/* Hide scrollbar for IE, Edge and Firefox */
|
||||||
.no-scrollbar {
|
.no-scrollbar {
|
||||||
-ms-overflow-style: none; /* IE and Edge */
|
-ms-overflow-style: none; /* IE and Edge */
|
||||||
scrollbar-width: none; /* Firefox */
|
scrollbar-width: none; /* Firefox */
|
||||||
}
|
}
|
||||||
|
@ -11,13 +11,16 @@ import { PageAssistProvider } from "@/components/Common/PageAssistProvider"
|
|||||||
|
|
||||||
function IndexOption() {
|
function IndexOption() {
|
||||||
const { mode } = useDarkMode()
|
const { mode } = useDarkMode()
|
||||||
const { t } = useTranslation()
|
const { t, i18n } = useTranslation()
|
||||||
return (
|
return (
|
||||||
<MemoryRouter>
|
<MemoryRouter>
|
||||||
<ConfigProvider
|
<ConfigProvider
|
||||||
theme={{
|
theme={{
|
||||||
algorithm:
|
algorithm:
|
||||||
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm
|
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm,
|
||||||
|
token: {
|
||||||
|
fontFamily: i18n.language === "ru" ? "Onest" : "Inter"
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
renderEmpty={() => (
|
renderEmpty={() => (
|
||||||
<Empty
|
<Empty
|
||||||
|
@ -11,14 +11,17 @@ import { PageAssistProvider } from "@/components/Common/PageAssistProvider"
|
|||||||
|
|
||||||
function IndexSidepanel() {
|
function IndexSidepanel() {
|
||||||
const { mode } = useDarkMode()
|
const { mode } = useDarkMode()
|
||||||
const { t } = useTranslation()
|
const { t, i18n } = useTranslation()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MemoryRouter>
|
<MemoryRouter>
|
||||||
<ConfigProvider
|
<ConfigProvider
|
||||||
theme={{
|
theme={{
|
||||||
algorithm:
|
algorithm:
|
||||||
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm
|
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm,
|
||||||
|
token: {
|
||||||
|
fontFamily: i18n.language === "ru" ? "Onest" : "Inter"
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
renderEmpty={() => (
|
renderEmpty={() => (
|
||||||
<Empty
|
<Empty
|
||||||
|
@ -10,12 +10,17 @@ import { OptionSettings } from "./option-settings"
|
|||||||
import { OptionShare } from "./option-settings-share"
|
import { OptionShare } from "./option-settings-share"
|
||||||
import { OptionKnowledgeBase } from "./option-settings-knowledge"
|
import { OptionKnowledgeBase } from "./option-settings-knowledge"
|
||||||
import { OptionAbout } from "./option-settings-about"
|
import { OptionAbout } from "./option-settings-about"
|
||||||
|
import { useTranslation } from "react-i18next"
|
||||||
|
|
||||||
export const OptionRouting = () => {
|
export const OptionRouting = () => {
|
||||||
const { mode } = useDarkMode()
|
const { mode } = useDarkMode()
|
||||||
|
const { i18n } = useTranslation()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={mode === "dark" ? "dark" : "light"}>
|
<div
|
||||||
|
className={`${mode === "dark" ? "dark" : "light"} ${
|
||||||
|
i18n.language === "ru" ? "onest" : "inter"
|
||||||
|
}`}>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<OptionIndex />} />
|
<Route path="/" element={<OptionIndex />} />
|
||||||
<Route path="/settings" element={<OptionSettings />} />
|
<Route path="/settings" element={<OptionSettings />} />
|
||||||
@ -32,9 +37,13 @@ export const OptionRouting = () => {
|
|||||||
|
|
||||||
export const SidepanelRouting = () => {
|
export const SidepanelRouting = () => {
|
||||||
const { mode } = useDarkMode()
|
const { mode } = useDarkMode()
|
||||||
|
const { i18n } = useTranslation()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={mode === "dark" ? "dark" : "light"}>
|
<div
|
||||||
|
className={`${mode === "dark" ? "dark" : "light"} ${
|
||||||
|
i18n.language === "ru" ? "onest" : "inter"
|
||||||
|
}`}>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<SidepanelChat />} />
|
<Route path="/" element={<SidepanelChat />} />
|
||||||
<Route path="/settings" element={<SidepanelSettings />} />
|
<Route path="/settings" element={<SidepanelSettings />} />
|
||||||
|
@ -24,7 +24,7 @@ export default defineConfig({
|
|||||||
srcDir: "src",
|
srcDir: "src",
|
||||||
outDir: "build",
|
outDir: "build",
|
||||||
manifest: {
|
manifest: {
|
||||||
version: "1.1.4",
|
version: "1.1.5",
|
||||||
name: '__MSG_extName__',
|
name: '__MSG_extName__',
|
||||||
description: '__MSG_extDescription__',
|
description: '__MSG_extDescription__',
|
||||||
default_locale: 'en',
|
default_locale: 'en',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user