160160 <div class =" q-mx-xs" />
161161 <q-input
162162 v-model =" librateNames" :maxlength =" inputMaxLength" :debounce =" inputDebounce"
163- class =" q-mt-xs col-1 " :bg-color =" inputBgColor()" input-style =" cursor: pointer" style =" min-width : 90 px ;" label =" Оценка" stack-label outlined dense clearable readonly
163+ class =" q-mt-xs col-2 " :bg-color =" inputBgColor()" input-style =" cursor: pointer" style =" min-width : 140 px ;" label =" Оценка" stack-label outlined dense clearable readonly
164164 @click.stop.prevent =" selectLibRate"
165165 >
166166 <template v-if =" librateNames " #append >
171171 {{ librateNames }}
172172 </q-tooltip >
173173 </q-input >
174+
175+ <div class =" q-mx-xs" />
176+ <q-input
177+ v-model =" search.ext" :maxlength =" inputMaxLength" :debounce =" inputDebounce"
178+ class =" q-mt-xs col-2" :bg-color =" inputBgColor()" input-style =" cursor: pointer" style =" min-width : 140px ;" label =" Тип файла" stack-label outlined dense clearable readonly
179+ @click.stop.prevent =" selectExt"
180+ >
181+ <template v-if =" search .ext " #append >
182+ <q-icon name =" la la-times-circle" class =" q-field__focusable-action" @click.stop.prevent =" search.ext = ''" />
183+ </template >
184+
185+ <q-tooltip v-if =" search.ext && showTooltips" :delay =" 500" anchor =" bottom middle" content-style =" font-size: 80%" max-width =" 400px" >
186+ {{ search.ext }}
187+ </q-tooltip >
188+ </q-input >
174189 </div >
175190 <div v-show =" !isExtendedSearch && !extendedParams && extendedParamsMessage" class =" row q-mx-sm items-center clickable" @click.stop.prevent =" extendedParams = true" >
176191 +{{ extendedParamsMessage }}
331346 <SelectLangDialog v-model =" selectLangDialogVisible" v-model:lang =" search.lang" :lang-list =" langList" :lang-default =" langDefault" />
332347 <SelectLibRateDialog v-model =" selectLibRateDialogVisible" v-model:librate =" search.librate" />
333348 <SelectDateDialog v-model =" selectDateDialogVisible" v-model:date =" search.date" />
349+ <SelectExtDialog v-model =" selectExtDialogVisible" v-model:ext =" search.ext" :ext-list =" extList" />
334350 <BookInfoDialog v-model =" bookInfoDialogVisible" :book-info =" bookInfo" />
335351 <SelectExtSearchDialog v-model =" selectExtSearchDialogVisible" v-model:ext-search =" extSearch" />
336352 </div >
@@ -351,6 +367,7 @@ import SelectGenreDialog from './SelectGenreDialog/SelectGenreDialog.vue';
351367import SelectLangDialog from ' ./SelectLangDialog/SelectLangDialog.vue' ;
352368import SelectLibRateDialog from ' ./SelectLibRateDialog/SelectLibRateDialog.vue' ;
353369import SelectDateDialog from ' ./SelectDateDialog/SelectDateDialog.vue' ;
370+ import SelectExtDialog from ' ./SelectExtDialog/SelectExtDialog.vue' ;
354371import BookInfoDialog from ' ./BookInfoDialog/BookInfoDialog.vue' ;
355372import SelectExtSearchDialog from ' ./SelectExtSearchDialog/SelectExtSearchDialog.vue' ;
356373
@@ -384,6 +401,7 @@ const componentOptions = {
384401 SelectLangDialog,
385402 SelectLibRateDialog,
386403 SelectDateDialog,
404+ SelectExtDialog,
387405 BookInfoDialog,
388406 SelectExtSearchDialog,
389407 Dialog,
@@ -495,6 +513,7 @@ class Search {
495513 selectLangDialogVisible = false ;
496514 selectLibRateDialogVisible = false ;
497515 selectDateDialogVisible = false ;
516+ selectExtDialogVisible = false ;
498517 bookInfoDialogVisible = false ;
499518 selectExtSearchDialogVisible = false ;
500519
@@ -531,6 +550,7 @@ class Search {
531550 genreTree = [];
532551 genreMap = new Map ();
533552 langList = [];
553+ extList = [];
534554 genreTreeInpxHash = ' ' ;
535555 showTooltips = true ;
536556
@@ -561,7 +581,7 @@ class Search {
561581 this .commit = this .$store .commit ;
562582 this .api = this .$root .api ;
563583
564- this .generateDefaults (this .search , [' author' , ' series' , ' title' , ' genre' , ' lang' , ' date' , ' librate' ]);
584+ this .generateDefaults (this .search , [' author' , ' series' , ' title' , ' genre' , ' lang' , ' date' , ' librate' , ' ext ' ]);
565585 this .search .setDefaults (this .search );
566586
567587 this .loadSettings ();
@@ -705,6 +725,7 @@ class Search {
705725 result .push (s .genre ? ' Жанр' : ' ' );
706726 result .push (s .date ? ' Дата поступления' : ' ' );
707727 result .push (s .librate ? ' Оценка' : ' ' );
728+ result .push (s .ext ? ' Тип файла' : ' ' );
708729
709730 return result .filter (s => s).join (' , ' );
710731 }
@@ -941,6 +962,11 @@ class Search {
941962 this .selectLibRateDialogVisible = true ;
942963 }
943964
965+ selectExt () {
966+ this .hideTooltip ();
967+ this .selectExtDialogVisible = true ;
968+ }
969+
944970 selectExtSearch () {
945971 this .hideTooltip ();
946972 this .selectExtSearchDialogVisible = true ;
@@ -1079,6 +1105,7 @@ class Search {
10791105 lang: (typeof (query .lang ) == ' string' ? query .lang : this .langDefault ),
10801106 date: query .date ,
10811107 librate: query .librate ,
1108+ ext: query .ext ,
10821109
10831110 page: parseInt (query .page , 10 ),
10841111 limit: parseInt (query .limit , 10 ) || this .search .limit ,
@@ -1170,6 +1197,7 @@ class Search {
11701197 }
11711198
11721199 this .langList = result .langList ;
1200+ this .extList = result .extList ;
11731201 this .genreTreeInpxHash = result .inpxHash ;
11741202 }
11751203 } catch (e) {
0 commit comments