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'
};
const getTooltipTranslation = function(colorScheme) {
const getTooltipTranslation = function getTooltipTranslation(colorScheme) {
return t(`preferences.colorScheme.switch.${colorSchemeNextMapper[colorScheme]}`);
};
@@ -36,12 +36,12 @@ const selectLanguage = function selectLanguage(code) {
watch(() => getSetting(LANGUAGE_PATH), setLocale);
const close = function() {
const close = function close() {
document.removeEventListener('click', closeWrapperOnClickOutside);
isOpen.value = false;
};
const closeWrapperOnClickOutside = function(e) {
const closeWrapperOnClickOutside = function closeWrapperOnClickOutside(e) {
if (languageDropdown.value) {
if (!languageDropdown.value.contains(e.target)) {
close();
@@ -49,7 +49,7 @@ const closeWrapperOnClickOutside = function(e) {
};
};
const open = function() {
const open = function open() {
if (!isOpen.value) {
isOpen.value = true;
setTimeout(() => {
+1 -1
View File
@@ -27,7 +27,7 @@ const { t } = useI18n();
const router = useRouter();
const props = defineProps(['autoSubmit']);
const submitSearch = function() {
const submitSearch = function submitSearch() {
if (props.autoSubmit !== undefined) {
router.push({
name: 'searchResults',
+1 -1
View File
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
export const ensureUnit = function(d) {
export const ensureUnit = function ensureUnit(d) {
if (!d) d = 0;
// ensure that it is a string
+1 -1
View File
@@ -26,7 +26,7 @@ const router = useRouter();
const searchQuery = ref('');
const submitSearch = function() {
const submitSearch = function ensureUnit() {
};
</script>