style: ensure named functions

This commit is contained in:
2026-08-09 13:09:39 +02:00
committed by Gitea
parent dd07392821
commit a086affbef
5 changed files with 7 additions and 7 deletions
@@ -38,7 +38,7 @@ const colorSchemeIconMapper = {
'auto': 'circle-black-white' 'auto': 'circle-black-white'
}; };
const getTooltipTranslation = function(colorScheme) { const getTooltipTranslation = function getTooltipTranslation(colorScheme) {
return t(`preferences.colorScheme.switch.${colorSchemeNextMapper[colorScheme]}`); return t(`preferences.colorScheme.switch.${colorSchemeNextMapper[colorScheme]}`);
}; };
@@ -36,12 +36,12 @@ const selectLanguage = function selectLanguage(code) {
watch(() => getSetting(LANGUAGE_PATH), setLocale); watch(() => getSetting(LANGUAGE_PATH), setLocale);
const close = function() { const close = function close() {
document.removeEventListener('click', closeWrapperOnClickOutside); document.removeEventListener('click', closeWrapperOnClickOutside);
isOpen.value = false; isOpen.value = false;
}; };
const closeWrapperOnClickOutside = function(e) { const closeWrapperOnClickOutside = function closeWrapperOnClickOutside(e) {
if (languageDropdown.value) { if (languageDropdown.value) {
if (!languageDropdown.value.contains(e.target)) { if (!languageDropdown.value.contains(e.target)) {
close(); close();
@@ -49,7 +49,7 @@ const closeWrapperOnClickOutside = function(e) {
}; };
}; };
const open = function() { const open = function open() {
if (!isOpen.value) { if (!isOpen.value) {
isOpen.value = true; isOpen.value = true;
setTimeout(() => { setTimeout(() => {
+1 -1
View File
@@ -27,7 +27,7 @@ const { t } = useI18n();
const router = useRouter(); const router = useRouter();
const props = defineProps(['autoSubmit']); const props = defineProps(['autoSubmit']);
const submitSearch = function() { const submitSearch = function submitSearch() {
if (props.autoSubmit !== undefined) { if (props.autoSubmit !== undefined) {
router.push({ router.push({
name: 'searchResults', name: 'searchResults',
+1 -1
View File
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
export const ensureUnit = function(d) { export const ensureUnit = function ensureUnit(d) {
if (!d) d = 0; if (!d) d = 0;
// ensure that it is a string // ensure that it is a string
+1 -1
View File
@@ -26,7 +26,7 @@ const router = useRouter();
const searchQuery = ref(''); const searchQuery = ref('');
const submitSearch = function() { const submitSearch = function ensureUnit() {
}; };
</script> </script>