added survey dialog. closes #1307
This commit is contained in:
parent
ce4157ac08
commit
20b9279eec
14 changed files with 113 additions and 32 deletions
|
@ -144,6 +144,11 @@ const conf = convict({
|
|||
format: String,
|
||||
default: 'https://identity.mozilla.com/apps/send',
|
||||
env: 'FXA_KEY_SCOPE'
|
||||
},
|
||||
survey_url: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'SURVEY_URL'
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ module.exports = function(state) {
|
|||
|
||||
var LIMITS = ${JSON.stringify(clientConstants.LIMITS)};
|
||||
var DEFAULTS = ${JSON.stringify(clientConstants.DEFAULTS)};
|
||||
const LOCALE = '${state.locale}';
|
||||
const downloadMetadata = ${
|
||||
var PREFS = ${JSON.stringify(state.prefs)};
|
||||
var downloadMetadata = ${
|
||||
state.downloadMetadata ? raw(JSON.stringify(state.downloadMetadata)) : '{}'
|
||||
};
|
||||
${authConfig};
|
||||
|
|
|
@ -19,6 +19,10 @@ module.exports = async function(req) {
|
|||
// continue without accounts
|
||||
}
|
||||
}
|
||||
const prefs = {};
|
||||
if (config.survey_url) {
|
||||
prefs.surveyUrl = config.survey_url;
|
||||
}
|
||||
return {
|
||||
archive: {
|
||||
numFiles: 0
|
||||
|
@ -39,6 +43,7 @@ module.exports = async function(req) {
|
|||
user: { avatar: assets.get('user.svg'), loggedIn: false },
|
||||
robots,
|
||||
authConfig,
|
||||
prefs,
|
||||
layout
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue