Merge pull request #156 from simple-login/feature/enable-login-with-proton-in-extension

Enable Login with Proton
This commit is contained in:
Son Nguyen Kim
2022-08-01 10:01:36 +02:00
committed by GitHub
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ jobs:
- name: Generate buildConfig
shell: bash
env:
ENABLE_LOGIN_WITH_PROTON: false
ENABLE_LOGIN_WITH_PROTON: true
run: |
npm run generate:buildconfig
+10 -2
View File
@@ -3,11 +3,19 @@ const path = require('path');
const PATH = path.join(__dirname, '../src', 'popup', 'buildConfig.json');
const isLoginWithProtonEnabled = () => {
const enableLoginWithProton = process.env.ENABLE_LOGIN_WITH_PROTON;
if (enableLoginWithProton == undefined || enableLoginWithProton === 'true') {
return true;
}
return false;
};
const config = {
features: {
loginWithProtonEnabled: process.env.ENABLE_LOGIN_WITH_PROTON === 'true'
loginWithProtonEnabled: isLoginWithProtonEnabled()
},
buildTime: new Date().getTime()
};
fs.writeFileSync(PATH, JSON.stringify(config, null, 2));
fs.writeFileSync(PATH, JSON.stringify(config, null, 2));