aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
Diffstat (limited to 'modern')
-rw-r--r--modern/public/fonts/IRANSansWeb(FaNum).ttfbin59524 -> 0 bytes
-rw-r--r--modern/src/App.js5
-rw-r--r--modern/src/common/localization.js7
-rw-r--r--modern/src/components/registration/LoginForm.js8
4 files changed, 6 insertions, 14 deletions
diff --git a/modern/public/fonts/IRANSansWeb(FaNum).ttf b/modern/public/fonts/IRANSansWeb(FaNum).ttf
deleted file mode 100644
index 168a908e..00000000
--- a/modern/public/fonts/IRANSansWeb(FaNum).ttf
+++ /dev/null
Binary files differ
diff --git a/modern/src/App.js b/modern/src/App.js
index 5197a074..d3ba39ad 100644
--- a/modern/src/App.js
+++ b/modern/src/App.js
@@ -35,10 +35,10 @@ import LoginForm from './components/registration/LoginForm';
import RegisterForm from './components/registration/RegisterForm';
import ResetPasswordForm from './components/registration/ResetPasswordForm';
+import theme from './theme';
import GeofencesPage from './GeofencesPage';
import GeofencePage from './GeofencePage';
import { LocalizationProvider } from './common/localization';
-import theme from './theme';
const App = () => {
const initialized = useSelector((state) => !!state.session.server && !!state.session.user);
@@ -88,8 +88,7 @@ const App = () => {
</Switch>
</ThemeProvider>
</LocalizationProvider>
-
);
};
-export default App;
+export default App; \ No newline at end of file
diff --git a/modern/src/common/localization.js b/modern/src/common/localization.js
index 6f3e5855..5f1b8863 100644
--- a/modern/src/common/localization.js
+++ b/modern/src/common/localization.js
@@ -1,5 +1,4 @@
import React, { useState, createContext, useContext, useEffect } from "react";
-import { create } from 'jss';
import af from '../../../web/l10n/af.json';
import ar from '../../../web/l10n/ar.json';
@@ -55,7 +54,6 @@ import uz from '../../../web/l10n/uz.json';
import vi from '../../../web/l10n/vi.json';
import zh from '../../../web/l10n/zh.json';
import zh_TW from '../../../web/l10n/zh_TW.json';
-import theme from "../theme";
const supportedLanguages = {
af: { data: af, name: 'Afrikaans' },
@@ -115,17 +113,13 @@ const supportedLanguages = {
};
export const languageList = Object.entries(supportedLanguages).map((values) => ({ code: values[0], name: values[1].name }));
-
const languages = localStorage.getItem('language') ? [localStorage.getItem('language')] : (window.navigator.languages !== undefined ? window.navigator.languages.slice() : []);
-
let language = localStorage.getItem('language') || window.navigator.userLanguage || window.navigator.language;
-
languages.push(language);
languages.push(language.substring(0, 2));
languages.push('en');
for (let i = 0; i < languages.length; i++) {
language = languages[i].replace('-', '_');
-
if (language in supportedLanguages) {
break;
}
@@ -158,7 +152,6 @@ export const LocalizationContext = createContext({
language
});
-
export function LocalizationProvider(props) {
const [language, setLanguage] = useState(defaultLanguage);
diff --git a/modern/src/components/registration/LoginForm.js b/modern/src/components/registration/LoginForm.js
index 461a1ab6..9b5ca3ed 100644
--- a/modern/src/components/registration/LoginForm.js
+++ b/modern/src/components/registration/LoginForm.js
@@ -136,11 +136,11 @@ const LoginForm = () => {
</Grid>
</Grid>
{emailEnabled && (
- <Grid item container justify="flex-end">
- <Grid item>
- <Link onClick={() => history.push('/reset-password')} className={classes.resetPassword} underline="none">{t('loginReset')}</Link>
- </Grid>
+ <Grid item container justify="flex-end">
+ <Grid item>
+ <Link onClick={() => history.push('/reset-password')} className={classes.resetPassword} underline="none">{t('loginReset')}</Link>
</Grid>
+ </Grid>
)}
</Grid>
</StartPage>