added survey dialog. closes #1307
This commit is contained in:
parent
ce4157ac08
commit
20b9279eec
14 changed files with 113 additions and 32 deletions
42
app/ui/surveyDialog.js
Normal file
42
app/ui/surveyDialog.js
Normal file
|
@ -0,0 +1,42 @@
|
|||
const html = require('choo/html');
|
||||
const version = require('../../package.json').version;
|
||||
const { browserName } = require('../utils');
|
||||
|
||||
module.exports = function() {
|
||||
return function(state, emit, close) {
|
||||
const surveyUrl = `${
|
||||
state.PREFS.surveyUrl
|
||||
}?ver=${version}&browser=${browserName()}&anon=${
|
||||
state.user.loggedIn
|
||||
}&active_count=${state.storage.files.length}`;
|
||||
return html`
|
||||
<send-survey-dialog
|
||||
class="flex flex-col items-center text-center p-4 max-w-sm m-auto"
|
||||
>
|
||||
<h1 class="font-bold my-4">
|
||||
Tell us what you think.
|
||||
</h1>
|
||||
<p class="font-normal leading-normal text-grey-darkest px-4">
|
||||
Love Firefox Send? Take a quick survey to let us know how we can make
|
||||
it better.
|
||||
</p>
|
||||
<a
|
||||
class="btn rounded-lg w-full flex-no-shrink focus:outline my-5"
|
||||
onclick="${() => emit('closeModal')}"
|
||||
title="Give feedback"
|
||||
href="${surveyUrl}"
|
||||
target="_blank"
|
||||
>
|
||||
Give feedback
|
||||
</a>
|
||||
<button
|
||||
class="text-blue-dark hover:text-blue-darker focus:text-blue-darker font-medium cursor-pointer focus:outline"
|
||||
onclick="${close}"
|
||||
title="Skip"
|
||||
>
|
||||
Skip
|
||||
</button>
|
||||
</send-survey-dialog>
|
||||
`;
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue