-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from SpeciesFileGroup/development
Development
- Loading branch information
Showing
25 changed files
with
441 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| <template> | ||
| <VButton | ||
| class="px-2 py-2 rounded-full" | ||
| primary | ||
| @click="copyText" | ||
| > | ||
| <IconCheck | ||
| v-if="isCopied" | ||
| class="w-4 h-4" | ||
| /> | ||
| <IconClipboard | ||
| v-else | ||
| class="w-4 h-4" | ||
| /> | ||
| </VButton> | ||
| </template> | ||
|
|
||
| <script setup> | ||
| import { ref, onBeforeUnmount } from 'vue' | ||
| const props = defineProps({ | ||
| text: { | ||
| type: String, | ||
| required: true | ||
| }, | ||
| delay: { | ||
| type: Number, | ||
| default: 2000 | ||
| } | ||
| }) | ||
| const isCopied = ref(false) | ||
| let timeoutId | ||
| function copyText() { | ||
| navigator.clipboard.writeText(props.text).then(() => { | ||
| isCopied.value = true | ||
| timeoutId = setTimeout(() => { | ||
| isCopied.value = false | ||
| }, props.delay) | ||
| }) | ||
| } | ||
| onBeforeUnmount(() => { | ||
| clearTimeout(timeoutId) | ||
| }) | ||
| </script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <template> | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| fill="none" | ||
| viewBox="0 0 24 24" | ||
| stroke-width="1.5" | ||
| stroke="currentColor" | ||
| > | ||
| <path | ||
| stroke-linecap="round" | ||
| stroke-linejoin="round" | ||
| d="M4.5 12.75l6 6 9-13.5" | ||
| /> | ||
| </svg> | ||
| </template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <template> | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| fill="none" | ||
| viewBox="0 0 24 24" | ||
| stroke-width="1.5" | ||
| stroke="currentColor" | ||
| > | ||
| <path | ||
| stroke-linecap="round" | ||
| stroke-linejoin="round" | ||
| d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" | ||
| /> | ||
| </svg> | ||
| </template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <template> | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="32" | ||
| height="32" | ||
| viewBox="0 0 24 24" | ||
| > | ||
| <path | ||
| fill="currentColor" | ||
| d="M5 3h2v2H5v5a2 2 0 0 1-2 2a2 2 0 0 1 2 2v5h2v2H5c-1.07-.27-2-.9-2-2v-4a2 2 0 0 0-2-2H0v-2h1a2 2 0 0 0 2-2V5a2 2 0 0 1 2-2m14 0a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h1v2h-1a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2v-2h2v-5a2 2 0 0 1 2-2a2 2 0 0 1-2-2V5h-2V3h2m-7 12a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m-4 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m8 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1Z" | ||
| /> | ||
| </svg> | ||
| </template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| <template> | ||
| <div | ||
| class="fixed top-0 left-0 w-full h-screen max-h-screen flex flex-col justify-center bg-black bg-opacity-50 z-[2000]" | ||
| @click="emit('close')" | ||
| @key.esc.stop="emit('close')" | ||
| > | ||
| <div | ||
| class="h-full md:h-auto mx-auto md:max-h-[70vh] bg-base-foreground container" | ||
| @click.stop | ||
| > | ||
| <div | ||
| class="w-full p-4 md:p-4 flex flex-row box-border justify-between items-center" | ||
| > | ||
| <slot name="header"> | ||
| <span /> | ||
| </slot> | ||
| <IconClose | ||
| class="w-6 h-6 cursor-pointer opacity-50" | ||
| @click="() => emit('close')" | ||
| /> | ||
| </div> | ||
| <div | ||
| class="bg-base-foreground overflow-x-auto h-full md:h-auto max-h-full" | ||
| > | ||
| <slot /> | ||
| </div> | ||
| <div> | ||
| <slot name="footer" /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup> | ||
| import { onMounted, onUnmounted } from 'vue' | ||
| const emit = defineEmits(['close']) | ||
| const handleKeys = (e) => { | ||
| if (e.key === 'Escape') { | ||
| e.stopPropagation() | ||
| emit('close') | ||
| } | ||
| } | ||
| onMounted(() => { | ||
| document.addEventListener('keydown', handleKeys) | ||
| document.body.classList.add('overflow-hidden') | ||
| }) | ||
| onUnmounted(() => { | ||
| document.removeEventListener('keydown', handleKeys) | ||
| document.body.classList.remove('overflow-hidden') | ||
| }) | ||
| </script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.