-
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.
- Loading branch information
1 parent
841889a
commit 63b3d16
Showing
30 changed files
with
214 additions
and
116 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
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
export { type AnimePagination, type AnimePerDomain } from './types'; | ||
export { | ||
type AnimePagination, | ||
type AddedAnimePerDomain, | ||
type AddedAnimePerMonth, | ||
} from './types'; |
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
14 changes: 9 additions & 5 deletions
14
src/resources/js/features/dashboard/charts/count-anime-per-domain/CountAnimePerDomain.vue
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
14 changes: 14 additions & 0 deletions
14
src/resources/js/features/navigation/search-button/SearchButton.vue
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,14 @@ | ||
<script setup lang="ts"> | ||
import { Button } from '@/shared/ui/button'; | ||
</script> | ||
|
||
<template> | ||
<Button | ||
variant="secondary" | ||
class="outline-none border-none bg-transparent focus:outline-none focus:ring-0 focus:border-none" | ||
> | ||
<i class="pi pi-search text-zinc-600 dark:text-white" /> | ||
</Button> | ||
</template> | ||
|
||
<style scoped></style> |
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 @@ | ||
export { default as SearchButton } from './SearchButton.vue'; |
34 changes: 34 additions & 0 deletions
34
src/resources/js/features/navigation/search-modal/SearchModal.test.ts
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,34 @@ | ||
import { describe, expect, it } from 'vitest'; | ||
import { mount } from '@vue/test-utils'; | ||
import { Modal } from '@/shared/ui/modal'; | ||
import { TextInput } from '@/shared/ui/input/text'; | ||
import SearchModal from './SearchModal.vue'; | ||
|
||
describe('SearchModal test (SearchModal.vue)', () => { | ||
it('Shows modal when visible is true', () => { | ||
const wrapper = mount(SearchModal, { | ||
props: { visible: true }, | ||
}); | ||
|
||
expect(wrapper.findComponent(Modal).props('visible')).toBeTruthy(); | ||
}); | ||
|
||
it('Modal emits closed event when it is closed', async () => { | ||
const wrapper = mount(SearchModal, { | ||
props: { visible: true }, | ||
}); | ||
|
||
await wrapper.findComponent(Modal).vm.$emit('close'); | ||
expect(wrapper.emitted()).toHaveProperty('closed'); | ||
}); | ||
|
||
it('Modal binds input value to ref', async () => { | ||
const wrapper = mount(SearchModal, { | ||
props: { visible: true }, | ||
}); | ||
|
||
const input = wrapper.findComponent(TextInput); | ||
await input.setValue('test query'); | ||
expect(wrapper.vm.query).toBe('test query'); | ||
}); | ||
}); |
37 changes: 37 additions & 0 deletions
37
src/resources/js/features/navigation/search-modal/SearchModal.vue
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,37 @@ | ||
<script setup lang="ts"> | ||
import { Modal } from '@/shared/ui/modal'; | ||
import { TextInput } from '@/shared/ui/input/text'; | ||
import { ref } from 'vue'; | ||
type Props = { | ||
visible: boolean; | ||
}; | ||
defineProps<Props>(); | ||
defineEmits<{ closed: [] }>(); | ||
const query = ref<string>(''); | ||
</script> | ||
|
||
<template> | ||
<Modal | ||
:visible="visible" | ||
:close-button="false" | ||
close-on-escape | ||
close-on-outside-click | ||
@close="$emit('closed')" | ||
> | ||
<template #header> | ||
<TextInput | ||
ref="searchInput" | ||
v-model="query" | ||
name="search" | ||
autofocus | ||
class="w-full text-xs ring-1 bg-transparent ring-gray-200 dark:ring-zinc-600 focus:ring-red-300 px-5 text-gray-600 dark:text-white py-3 rounded-full w-full outline-none focus:ring-1" | ||
placeholder="Search" | ||
/> | ||
</template> | ||
</Modal> | ||
</template> | ||
|
||
<style scoped></style> |
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 @@ | ||
export { default as SearchModal } from './SearchModal.vue'; |
33 changes: 0 additions & 33 deletions
33
src/resources/js/features/navigation/search/SearchInput.test.ts
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
src/resources/js/features/navigation/search/SearchInput.vue
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/resources/js/features/telegram/login-widget/TelegramLoginWidget.test.ts
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
4 changes: 2 additions & 2 deletions
4
src/resources/js/features/telegram/login-widget/TelegramLoginWidget.vue
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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.