Enable Login with Proton
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user