surveyDialog.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const html = require('choo/html');
  2. const version = require('../../package.json').version;
  3. const { browserName } = require('../utils');
  4. module.exports = function() {
  5. return function(state, emit, close) {
  6. const surveyUrl = `${
  7. state.PREFS.surveyUrl
  8. }?ver=${version}&browser=${browserName()}&anon=${
  9. state.user.loggedIn
  10. }&active_count=${state.storage.files.length}`;
  11. return html`
  12. <send-survey-dialog
  13. class="flex flex-col items-center text-center p-4 max-w-sm m-auto"
  14. >
  15. <h1 class="text-3xl font-bold my-4">
  16. Tell us what you think.
  17. </h1>
  18. <p class="font-normal leading-normal text-grey-80 px-4">
  19. Love Send? Take a quick survey to let us know how we can make it
  20. better.
  21. </p>
  22. <a
  23. class="btn rounded-lg w-full flex-shrink-0 focus:outline my-5"
  24. onclick="${() => emit('closeModal')}"
  25. title="Give feedback"
  26. href="${surveyUrl}"
  27. target="_blank"
  28. >
  29. Give feedback
  30. </a>
  31. <button
  32. class="link-primary font-medium cursor-pointer focus:outline"
  33. onclick="${close}"
  34. title="Skip"
  35. >
  36. Skip
  37. </button>
  38. </send-survey-dialog>
  39. `;
  40. };
  41. };