Skip to content

Commit

Permalink
refactor(gui): Bundle roboto font directly from npm registry
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybaron committed Nov 20, 2024
1 parent 1699f64 commit 5e13b6f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 33 deletions.
63 changes: 31 additions & 32 deletions src-gui/index.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/renderer/index.tsx"></script>
<style>
::-webkit-scrollbar {
display: none;
}
*,
*::after,
*::before {
-webkit-user-select: none;
-webkit-user-drag: none;
-webkit-app-region: no-drag;
}
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>

html,
body {
height: 100%;
margin: 0;
overflow: auto;
}
</style>
</body>
</html>
<body>
<div id="root"></div>
<script type="module" src="/src/renderer/index.tsx"></script>
<style>
::-webkit-scrollbar {
display: none;
}

*,
*::after,
*::before {
-webkit-user-select: none;
-webkit-user-drag: none;
-webkit-app-region: no-drag;
}

html,
body {
height: 100%;
margin: 0;
overflow: auto;
}
</style>
</body>

</html>
3 changes: 2 additions & 1 deletion src-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"tauri": "tauri"
},
"dependencies": {
"@fontsource/roboto": "^5.1.0",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@material-ui/lab": "^4.0.0-alpha.61",
Expand Down Expand Up @@ -66,4 +67,4 @@
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^2.1.1"
}
}
}
1 change: 1 addition & 0 deletions src-gui/src/renderer/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { useSettings } from "store/hooks";
import { themes } from "./theme";
import { useEffect } from "react";
import { setupBackgroundTasks } from "renderer/background";
import "@fontsource/roboto";

const useStyles = makeStyles((theme) => ({
innerContent: {
Expand Down
5 changes: 5 additions & 0 deletions src-gui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@
resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843"
integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==

"@fontsource/roboto@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@fontsource/roboto/-/roboto-5.1.0.tgz#00230737ec09c60ae877a5e33d067c0607fdd5ba"
integrity sha512-cFRRC1s6RqPygeZ8Uw/acwVHqih8Czjt6Q0MwoUoDe9U3m4dH1HmNDRBZyqlMSFwgNAUKgFImncKdmDHyKpwdg==

"@humanwhocodes/module-importer@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
Expand Down

0 comments on commit 5e13b6f

Please sign in to comment.