ManifestModal.svelte 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <script lang="ts">
  2. import { toast } from 'svelte-sonner';
  3. import { createEventDispatcher } from 'svelte';
  4. import { onMount, getContext } from 'svelte';
  5. import Modal from '../../common/Modal.svelte';
  6. const i18n = getContext('i18n');
  7. const dispatch = createEventDispatcher();
  8. export let show = false;
  9. export let manifest = {};
  10. </script>
  11. <Modal size="sm" bind:show>
  12. <div>
  13. <div class=" flex justify-between dark:text-gray-300 px-5 pt-4 pb-2">
  14. <div class=" text-lg font-medium self-center">{$i18n.t('Show your support!')}</div>
  15. <button
  16. class="self-center"
  17. on:click={() => {
  18. show = false;
  19. }}
  20. >
  21. <svg
  22. xmlns="http://www.w3.org/2000/svg"
  23. viewBox="0 0 20 20"
  24. fill="currentColor"
  25. class="w-5 h-5"
  26. >
  27. <path
  28. d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"
  29. />
  30. </svg>
  31. </button>
  32. </div>
  33. <div class="flex flex-col md:flex-row w-full px-5 pb-4 md:space-x-4 dark:text-gray-200">
  34. <div class=" flex flex-col w-full sm:flex-row sm:justify-center sm:space-x-6">
  35. <form
  36. class="flex flex-col w-full"
  37. on:submit|preventDefault={() => {
  38. show = false;
  39. }}
  40. >
  41. <div class="px-1 text-sm">
  42. <div class="my-2">
  43. {$i18n.t(
  44. 'The developers behind this plugin are passionate volunteers from the community. If you find this plugin helpful, please consider contributing to its development.'
  45. )}
  46. </div>
  47. <div class="my-2">
  48. {$i18n.t(
  49. 'Your entire contribution will go directly to the plugin developer; Open WebUI does not take any percentage. However, the chosen funding platform might have its own fees.'
  50. )}
  51. </div>
  52. <hr class="dark:border-gray-800 my-3" />
  53. <div class="my-2">
  54. {$i18n.t('Support this plugin:')}
  55. <a
  56. href={manifest.funding_url}
  57. target="_blank"
  58. class="underline text-blue-400 hover:text-blue-300">{manifest.funding_url}</a
  59. >
  60. </div>
  61. </div>
  62. <div class="flex justify-end pt-3 text-sm font-medium">
  63. <button
  64. class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg flex flex-row space-x-1 items-center"
  65. type="submit"
  66. >
  67. {$i18n.t('Done')}
  68. </button>
  69. </div>
  70. </form>
  71. </div>
  72. </div>
  73. </div>
  74. </Modal>
  75. <style>
  76. input::-webkit-outer-spin-button,
  77. input::-webkit-inner-spin-button {
  78. /* display: none; <- Crashes Chrome on hover */
  79. -webkit-appearance: none;
  80. margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
  81. }
  82. .tabs::-webkit-scrollbar {
  83. display: none; /* for Chrome, Safari and Opera */
  84. }
  85. .tabs {
  86. -ms-overflow-style: none; /* IE and Edge */
  87. scrollbar-width: none; /* Firefox */
  88. }
  89. input[type='number'] {
  90. -moz-appearance: textfield; /* Firefox */
  91. }
  92. </style>