Add JSDoc documentation and file headers to all source files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,16 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
// The Lucia project.
|
||||
// Copyright 2024-2026 DSP, inc. All rights reserved.
|
||||
// Authors:
|
||||
// cindy.chang@dsp.im (Cindy Chang), 2024/5/30
|
||||
// imacat.yang@dsp.im (imacat), 2023/9/23
|
||||
/**
|
||||
* @module components/AccountMenu/SearchBar Search input bar for
|
||||
* filtering accounts, emits search query on click or Enter key.
|
||||
*/
|
||||
|
||||
import { ref } from 'vue';
|
||||
import i18next from '@/i18n/i18n.js';
|
||||
|
||||
@@ -17,11 +27,19 @@ const emit = defineEmits(['on-search-account-button-click']);
|
||||
|
||||
const inputQuery = ref("");
|
||||
|
||||
/**
|
||||
* Emits the search query when the search icon is clicked.
|
||||
* @param {Event} event - The click event.
|
||||
*/
|
||||
const onSearchClick = (event) => {
|
||||
event.preventDefault();
|
||||
emit('on-search-account-button-click', inputQuery.value);
|
||||
};
|
||||
|
||||
/**
|
||||
* Emits the search query when Enter key is pressed.
|
||||
* @param {KeyboardEvent} event - The keypress event.
|
||||
*/
|
||||
const handleKeyPressOfSearch = (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
emit('on-search-account-button-click', inputQuery.value);
|
||||
|
||||
Reference in New Issue
Block a user