ShareChatModal.svelte 903 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <script lang="ts">
  2. import Modal from '../common/Modal.svelte';
  3. export let downloadChat: Function;
  4. export let shareChat: Function;
  5. export let show = false;
  6. </script>
  7. <Modal bind:show size="xs">
  8. <div class="px-4 pt-4 pb-5 w-full flex flex-col justify-center">
  9. <button
  10. class=" self-center px-8 py-1.5 w-full rounded-full text-sm font-medium bg-blue-600 hover:bg-blue-500 text-white"
  11. type="button"
  12. on:click={() => {
  13. shareChat();
  14. show = false;
  15. }}
  16. >
  17. Share to OllamaHub
  18. </button>
  19. <div class="flex justify-center space-x-1 mt-1.5">
  20. <div class=" self-center text-gray-400 text-xs font-medium">or</div>
  21. <button
  22. class=" self-center rounded-full text-xs font-medium text-gray-700 dark:text-gray-500 underline"
  23. type="button"
  24. on:click={() => {
  25. downloadChat();
  26. show = false;
  27. }}
  28. >
  29. Download as a File
  30. </button>
  31. </div>
  32. </div>
  33. </Modal>