diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..4382ab1
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,38 @@
+name: 'CI/CD pipeline'
+
+on:
+ push:
+ branches:
+ - main
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: 'Use Node.js 16.x'
+ uses: actions/setup-node@v3
+ with:
+ node-version: '16.x'
+ cache: 'yarn'
+ - run: yarn build
+
+ - name: 'Drop artifacts'
+ uses: actions/upload-artifact@v3.0.0
+ with:
+ name: 'Build'
+ path: 'build'
+
+ - name: SSH Server Deploy
+ uses: kostya-ten/ssh-server-deploy@v4
+ with:
+ host: ezlog.app
+ username: ${{ secrets.prodUser }}
+ password: ${{ secrets.prodPwd }}
+ scp_source: 'build/*'
+ scp_target: '/var/www/demo.ezlog.app/'
+
+ - name: GitHub Release from Tag
+ uses: eloquent/github-release-action@v1
\ No newline at end of file
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644
index 0000000..50cf389
--- /dev/null
+++ b/.github/workflows/pr.yml
@@ -0,0 +1,26 @@
+name: 'PR validation pipeline'
+
+on:
+ pull_request:
+ branches:
+ - main
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: 'Use Node.js 16.x'
+ uses: actions/setup-node@v3
+ with:
+ node-version: '16.x'
+ cache: 'yarn'
+ - run: yarn build
+
+ - name: 'Drop artifacts'
+ uses: actions/upload-artifact@v3.0.0
+ with:
+ name: 'Build'
+ path: 'build'
\ No newline at end of file
diff --git a/README.md b/README.md
index f49010b..9c15307 100644
--- a/README.md
+++ b/README.md
@@ -1,51 +1,13 @@
-# Getting Started with Create React App and Fluent UI
+# EasyLogon demo application
+This is a repository for web application, that demonstrates capabilities of [EasyLogon service](https://easylogon.foxdev.studio)
-This is a [Create React App](https://github.com/facebook/create-react-app) based repo that comes with Fluent UI pre-installed!
+## Production website
+https://demo.ezlog.app
-## Available Scripts
-
-In the project directory, you can run:
-
-### `yarn start`
-
-Runs the app in the development mode.
-Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
-
-The page will reload if you make edits.
-You will also see any lint errors in the console.
-
-### `yarn test`
-
-Launches the test runner in the interactive watch mode.
-See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
-
-### `yarn build`
-
-Builds the app for production to the `build` folder.
-It correctly bundles React in production mode and optimizes the build for the best performance.
-
-The build is minified and the filenames include the hashes.
-Your app is ready to be deployed!
-
-See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
-
-### `yarn eject`
-
-**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
-
-If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
-
-Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
-
-You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
-
-## Learn More
-
-You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
-
-To learn React, check out the [React documentation](https://reactjs.org/).
-
-# Contributing
+## Contributing
+1. Clone the repo
+2. Compile and start debug session with `yarn start`
+3. Build production-ready bundle with `yarn build`
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
@@ -57,4 +19,4 @@ provided by the bot. You will only need to do this once across all repos using o
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
-contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
+contact [opensource@foxdev.studio](mailto:opensource@foxdev.studio) with any additional questions or comments.
diff --git a/src/Components/Sandboxes/SandboxOne.tsx b/src/Components/Sandboxes/SandboxOne.tsx
index e1a7750..207dff7 100644
--- a/src/Components/Sandboxes/SandboxOne.tsx
+++ b/src/Components/Sandboxes/SandboxOne.tsx
@@ -47,7 +47,7 @@ export default class SandboxOne extends React.Component
this.setState(newState);
- // if (newState.loginError === null && newState.passwordError === null)
+ if (newState.loginError === null && newState.passwordError === null)
this.props.context.current.OnFinished();
}
diff --git a/src/Components/Sandboxes/SandboxThree.tsx b/src/Components/Sandboxes/SandboxThree.tsx
index 823fcb0..491c6e1 100644
--- a/src/Components/Sandboxes/SandboxThree.tsx
+++ b/src/Components/Sandboxes/SandboxThree.tsx
@@ -53,7 +53,7 @@ export default class SandboxThree extends React.Component
this.setState(newState);
- // if (newState.loginError === null && newState.passwordError === null)
+ if (newState.loginError === null && newState.passwordError === null)
this.props.context.current.OnFinished();
}
diff --git a/src/Services/LocalizationService.ts b/src/Services/LocalizationService.ts
index 2d1178d..9195bf2 100644
--- a/src/Services/LocalizationService.ts
+++ b/src/Services/LocalizationService.ts
@@ -1,4 +1,4 @@
-import LocalizedStrings, { LocalizedStringsMethods } from "react-localization";
+import LocalizedStrings from "react-localization";
export let Strings = new LocalizedStrings(
{
diff --git a/src/index.tsx b/src/index.tsx
index 261c7b6..fcead8a 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -30,9 +30,10 @@ function UpdateLocale() : void
// CIS countries languages ()
let ruLanguages : string[] = [ "ru", "uk", "be", "kk", "ky", "ab", "mo", "my", "uz" ];
- if (window.location.pathname.startsWith("/en"))
- return;
+ console.log((ruLanguages.includes(navigator.language.substring(0, 2)) || window.location.pathname.startsWith("/ru")) && !window.location.pathname.startsWith("/en"));
- if (ruLanguages.includes(navigator.language.substring(0, 2)) || window.location.pathname.startsWith("/ru"))
+ if ((ruLanguages.includes(navigator.language.substring(0, 2)) || window.location.pathname.startsWith("/ru")) && !window.location.pathname.startsWith("/en"))
Strings.setLanguage("ru");
+ else
+ Strings.setLanguage("en");
}
\ No newline at end of file