Fix formating, search

This commit is contained in:
2022-03-14 22:51:24 +01:00
parent acc21b7b24
commit d83d87ebfe
4 changed files with 7 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ class TermsHandler extends Basehandler
{ {
$translation = $this->em->getTranslationRepository()->findOneBy(['id' => $_GET['translation']]); $translation = $this->em->getTranslationRepository()->findOneBy(['id' => $_GET['translation']]);
$this->termFacade->setDirection($translation->direction); $this->termFacade->setDirection($translation->direction);
$q = $this->termFacade->findByStringFull($_GET['string'], $translation->dictionary, ''); $q = $this->termFacade->findByStringFull($_GET['string'], $translation->dictionary, '', mb_strlen($_GET['string']) <= 3 ? false : true);
$terms = $q->getArrayResult(); $terms = $q->getArrayResult();
return new JsonApiResponse(200, ['status' => 'ok', 'terms' => $terms]); return new JsonApiResponse(200, ['status' => 'ok', 'terms' => $terms]);

View File

@@ -25,6 +25,6 @@ di:
tags: no tags: no
tracy: tracy:
showBar: false showBar: true
bar: bar:
- VitePanel - VitePanel

View File

@@ -122,7 +122,7 @@
id="mobile-menu-2" id="mobile-menu-2"
class="bg-yellow-100 md:text-lg flex flex-col w-full px-4 border-b lg:border-r lg:h-fit lg:w-64" class="bg-yellow-100 md:text-lg flex flex-col w-full px-4 border-b lg:border-r lg:h-fit lg:w-64"
> >
<left-dict :data="trData" @switch-trans="switchTrans"></left-dict> <left-dict :translation="currentTrans" :data="trData" @switch-trans="switchTrans"></left-dict>
</div> </div>
<div class="flex flex-col w-full px-4"> <div class="flex flex-col w-full px-4">
<translation-content <translation-content

View File

@@ -1,6 +1,6 @@
<script> <script>
export default { export default {
props: ['data'], props: ['data', 'translation'],
} }
</script> </script>
@@ -14,7 +14,9 @@ export default {
<a <a
href="#" href="#"
class="flex flex-row items-center h-12 transform hover:translate-x-2 transition-transform ease-in duration-200 text-gray-500 hover:text-gray-800" class="flex flex-row items-center h-12 transform hover:translate-x-2 transition-transform ease-in duration-200 text-gray-500 hover:text-gray-800"
v-bind:class="{ 'translate-x-2 text-black font-bold' : translation == i }"
> >
<span v-if="translation == i">>></span>
<span <span
class="inline-flex items-center justify-center h-12 w-12 text-lg text-gray-400" class="inline-flex items-center justify-center h-12 w-12 text-lg text-gray-400"
><i class="bx bx-home"></i ><i class="bx bx-home"></i