ManifestModal.svelte 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. import XMark from '$lib/components/icons/XMark.svelte';
  7. const i18n = getContext('i18n');
  8. const dispatch = createEventDispatcher();
  9. export let show = false;
  10. export let manifest = {};
  11. </script>
  12. <Modal size="sm" bind:show>
  13. <div>
  14. <div class=" flex justify-between dark:text-gray-300 px-5 pt-4 pb-2">
  15. <div class=" text-lg font-medium self-center">{$i18n.t('Show your support!')}</div>
  16. <button
  17. class="self-center"
  18. on:click={() => {
  19. show = false;
  20. }}
  21. >
  22. <XMark className={'size-5'} />
  23. </button>
  24. </div>
  25. <div class="flex flex-col md:flex-row w-full px-5 pb-4 md:space-x-4 dark:text-gray-200">
  26. <div class=" flex flex-col w-full sm:flex-row sm:justify-center sm:space-x-6">
  27. <form
  28. class="flex flex-col w-full"
  29. on:submit|preventDefault={() => {
  30. show = false;
  31. }}
  32. >
  33. <div class="px-1 text-sm">
  34. <div class="my-2">
  35. {$i18n.t(
  36. 'The developers behind this plugin are passionate volunteers from the community. If you find this plugin helpful, please consider contributing to its development.'
  37. )}
  38. </div>
  39. <div class="my-2">
  40. {$i18n.t(
  41. '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.'
  42. )}
  43. </div>
  44. <hr class="dark:border-gray-800 my-3" />
  45. <div class="my-2">
  46. {$i18n.t('Support this plugin:')}
  47. <a
  48. href={manifest.funding_url}
  49. target="_blank"
  50. class="underline text-blue-400 hover:text-blue-300">{manifest.funding_url}</a
  51. >
  52. </div>
  53. </div>
  54. <div class="flex justify-end pt-3 text-sm font-medium">
  55. <button
  56. 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"
  57. type="submit"
  58. >
  59. {$i18n.t('Done')}
  60. </button>
  61. </div>
  62. </form>
  63. </div>
  64. </div>
  65. </div>
  66. </Modal>
  67. <style>
  68. input::-webkit-outer-spin-button,
  69. input::-webkit-inner-spin-button {
  70. /* display: none; <- Crashes Chrome on hover */
  71. -webkit-appearance: none;
  72. margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
  73. }
  74. .tabs::-webkit-scrollbar {
  75. display: none; /* for Chrome, Safari and Opera */
  76. }
  77. .tabs {
  78. -ms-overflow-style: none; /* IE and Edge */
  79. scrollbar-width: none; /* Firefox */
  80. }
  81. input[type='number'] {
  82. -moz-appearance: textfield; /* Firefox */
  83. }
  84. </style>