mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 14:40:55 +03:00
added survey dialog. closes #1307
This commit is contained in:
@@ -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
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user