Enable Login with Proton
This commit is contained in:
@@ -113,7 +113,7 @@ jobs:
|
|||||||
- name: Generate buildConfig
|
- name: Generate buildConfig
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
ENABLE_LOGIN_WITH_PROTON: false
|
ENABLE_LOGIN_WITH_PROTON: true
|
||||||
run: |
|
run: |
|
||||||
npm run generate:buildconfig
|
npm run generate:buildconfig
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,19 @@ const path = require('path');
|
|||||||
|
|
||||||
const PATH = path.join(__dirname, '../src', 'popup', 'buildConfig.json');
|
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 = {
|
const config = {
|
||||||
features: {
|
features: {
|
||||||
loginWithProtonEnabled: process.env.ENABLE_LOGIN_WITH_PROTON === 'true'
|
loginWithProtonEnabled: isLoginWithProtonEnabled()
|
||||||
},
|
},
|
||||||
buildTime: new Date().getTime()
|
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