Skip to content

Commit

Permalink
Changed default font
Browse files Browse the repository at this point in the history
  • Loading branch information
githubsaturn committed Oct 16, 2024
1 parent a3fa39b commit aec3e72
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
3 changes: 1 addition & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap"
rel="stylesheet">


<!-- font ends -->

<title>CapRover | Server Dashboard</title>
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function App() {
token: {
colorPrimary: '#4f5bff',
colorLink: '#2672c9',
fontFamily: `'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
fontFamily: `'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,
},
Expand Down
5 changes: 3 additions & 2 deletions src/containers/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,12 @@ export default class Dashboard extends ApiComponent<
</span>,
<i> captain.myawesomecompany.com </i>,
<i> foo.bar.myawesomecompany.com </i>,
<p>
<div>
{' '}
<b> Type:</b> <u>A</u>, <b>Name (or host):</b>{' '}
<u> *.caprover-root</u>, <b> IP (or Points to):</b>{' '}
<u> 110.120.130.140 </u>
</p>,
</div>,
]
const translatedBody = Utils.formatText(
localize(
Expand Down
11 changes: 4 additions & 7 deletions src/utils/StorageHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,10 @@ class StorageHelper {

getDarkModeFromLocalStorage(): boolean {
const isDarkMode = localStorage.getItem(DARK_MODE)
// If not preference exists, default to dark mode
return isDarkMode ? JSON.parse(isDarkMode) : true
// return DarkMode based on users colorScheme
// !(
// window.matchMedia &&
// window.matchMedia('(prefers-color-scheme: light)').matches
// )
return isDarkMode
? JSON.parse(isDarkMode)
: window.matchMedia &&
window.matchMedia('(prefers-color-scheme: dark)').matches
}

setLanguageInLocalStorage(language: string) {
Expand Down

0 comments on commit aec3e72

Please sign in to comment.