From e450374764b6751c3c6150fda943c8aff5a81393 Mon Sep 17 00:00:00 2001 From: PopeRigby Date: Sat, 21 Dec 2024 12:03:24 -0800 Subject: [PATCH] Include font as dependency --- gui/backend/Cargo.toml | 2 +- gui/frontend/src/app/globals.css | 1 + gui/frontend/src/app/layout.tsx | 4 ++-- gui/frontend/src/components/meta/font.ts | 3 --- package-lock.json | 7 +++++++ package.json | 1 + 6 files changed, 12 insertions(+), 6 deletions(-) delete mode 100644 gui/frontend/src/components/meta/font.ts diff --git a/gui/backend/Cargo.toml b/gui/backend/Cargo.toml index d49ecb3..5dbab59 100644 --- a/gui/backend/Cargo.toml +++ b/gui/backend/Cargo.toml @@ -26,7 +26,7 @@ once_cell = "1.20.1" serde = { workspace = true, features = ["derive"] } # Implement (De)Serializer serde_json = { workspace = true } # To avoid generate_context error. snafu = { workspace = true } # Implement error types -tauri = { version = "2.0.1", features = ["devtools"] } # For GUI +tauri = { version = "2.0.1", features = ["devtools", "native-tls"] } # For GUI tauri-plugin-dialog = "2.0.1" # https://github.com/tauri-apps/plugins-workspace tauri-plugin-fs = "2.0.1" tauri-plugin-shell = "2.0.1" diff --git a/gui/frontend/src/app/globals.css b/gui/frontend/src/app/globals.css index 4b4af68..541d9da 100644 --- a/gui/frontend/src/app/globals.css +++ b/gui/frontend/src/app/globals.css @@ -18,6 +18,7 @@ html, body { + font-family: 'Inter', sans-serif; max-width: 100vw; min-height: 100vh; overflow-x: hidden; diff --git a/gui/frontend/src/app/layout.tsx b/gui/frontend/src/app/layout.tsx index 1f2043c..cad253b 100644 --- a/gui/frontend/src/app/layout.tsx +++ b/gui/frontend/src/app/layout.tsx @@ -1,8 +1,8 @@ import dynamic from 'next/dynamic'; export { metadata } from '@/components/meta/meta'; -import { inter } from '@/components/meta/font'; import Loading from '@/components/templates/Loading'; +import '@fontsource/inter' import type { ReactNode } from 'react'; @@ -19,7 +19,7 @@ type Props = Readonly<{ export default function RootLayout({ children }: Props) { return ( - + {children} diff --git a/gui/frontend/src/components/meta/font.ts b/gui/frontend/src/components/meta/font.ts deleted file mode 100644 index c9d320f..0000000 --- a/gui/frontend/src/components/meta/font.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Inter } from 'next/font/google'; - -export const inter = Inter({ subsets: ['latin'] }); diff --git a/package-lock.json b/package-lock.json index 5dc9d54..31e39cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", + "@fontsource/inter": "^5.1.0", "@monaco-editor/react": "^4.6.0", "@mui/icons-material": "6.1.4", "@mui/lab": "6.0.0-beta.12", @@ -998,6 +999,12 @@ "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==", "license": "MIT" }, + "node_modules/@fontsource/inter": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-5.1.0.tgz", + "integrity": "sha512-zKZR3kf1G0noIes1frLfOHP5EXVVm0M7sV/l9f/AaYf+M/DId35FO4LkigWjqWYjTJZGgplhdv4cB+ssvCqr5A==", + "license": "OFL-1.1" + }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", diff --git a/package.json b/package.json index 7b2d068..001d51b 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", + "@fontsource/inter": "^5.1.0", "@monaco-editor/react": "^4.6.0", "@mui/icons-material": "6.1.4", "@mui/lab": "6.0.0-beta.12",