Мелкий рефакторинг, поправки цветов
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
<div class="row q-mx-md q-mb-sm items-center">
|
<div class="row q-mx-md q-mb-sm items-center">
|
||||||
<q-input
|
<q-input
|
||||||
ref="authorInput" v-model="search.author" :maxlength="5000" :debounce="inputDebounce"
|
ref="authorInput" v-model="search.author" :maxlength="5000" :debounce="inputDebounce"
|
||||||
class="bg-white q-mt-xs" style="width: 300px;" label="Автор" stack-label outlined dense clearable
|
class="q-mt-xs" :bg-color="inputBgColor('author')" style="width: 200px;" label="Автор" stack-label outlined dense clearable
|
||||||
>
|
>
|
||||||
<q-tooltip v-if="search.author" :delay="500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
<q-tooltip v-if="search.author" :delay="500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
||||||
{{ search.author }}
|
{{ search.author }}
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
<div class="q-mx-xs" />
|
<div class="q-mx-xs" />
|
||||||
<q-input
|
<q-input
|
||||||
v-model="search.series" :maxlength="inputMaxLength" :debounce="inputDebounce"
|
v-model="search.series" :maxlength="inputMaxLength" :debounce="inputDebounce"
|
||||||
class="bg-white q-mt-xs" style="width: 200px;" label="Серия" stack-label outlined dense clearable
|
class="q-mt-xs" :bg-color="inputBgColor('series')" style="width: 200px;" label="Серия" stack-label outlined dense clearable
|
||||||
>
|
>
|
||||||
<q-tooltip v-if="search.series" :delay="500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
<q-tooltip v-if="search.series" :delay="500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
||||||
{{ search.series }}
|
{{ search.series }}
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
<div class="q-mx-xs" />
|
<div class="q-mx-xs" />
|
||||||
<q-input
|
<q-input
|
||||||
v-model="search.title" :maxlength="inputMaxLength" :debounce="inputDebounce"
|
v-model="search.title" :maxlength="inputMaxLength" :debounce="inputDebounce"
|
||||||
class="bg-white q-mt-xs" style="width: 200px;" label="Название" stack-label outlined dense clearable
|
class="q-mt-xs" :bg-color="inputBgColor('title')" style="width: 200px;" label="Название" stack-label outlined dense clearable
|
||||||
>
|
>
|
||||||
<q-tooltip v-if="search.title" :delay="500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
<q-tooltip v-if="search.title" :delay="500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
||||||
{{ search.title }}
|
{{ search.title }}
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
<div class="q-mx-xs" />
|
<div class="q-mx-xs" />
|
||||||
<q-input
|
<q-input
|
||||||
v-model="genreNames" :maxlength="inputMaxLength" :debounce="inputDebounce"
|
v-model="genreNames" :maxlength="inputMaxLength" :debounce="inputDebounce"
|
||||||
class="bg-white q-mt-xs" input-style="cursor: pointer" style="width: 200px;" label="Жанр" stack-label outlined dense clearable readonly
|
class="q-mt-xs" :bg-color="inputBgColor()" input-style="cursor: pointer" style="width: 200px;" label="Жанр" stack-label outlined dense clearable readonly
|
||||||
@click="selectGenre"
|
@click="selectGenre"
|
||||||
>
|
>
|
||||||
<template v-if="genreNames" #append>
|
<template v-if="genreNames" #append>
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
<div class="q-mx-xs" />
|
<div class="q-mx-xs" />
|
||||||
<q-input
|
<q-input
|
||||||
v-model="search.lang" :maxlength="inputMaxLength" :debounce="inputDebounce"
|
v-model="search.lang" :maxlength="inputMaxLength" :debounce="inputDebounce"
|
||||||
class="bg-white q-mt-xs" input-style="cursor: pointer" style="width: 80px;" label="Язык" stack-label outlined dense clearable readonly
|
class="q-mt-xs" :bg-color="inputBgColor()" input-style="cursor: pointer" style="width: 80px;" label="Язык" stack-label outlined dense clearable readonly
|
||||||
@click="selectLang"
|
@click="selectLang"
|
||||||
>
|
>
|
||||||
<q-tooltip v-if="search.lang && showTooltips" :delay="500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
<q-tooltip v-if="search.lang && showTooltips" :delay="500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
||||||
@@ -187,7 +187,7 @@ import _ from 'lodash';
|
|||||||
const route2component = {
|
const route2component = {
|
||||||
'author': {component: 'AuthorList', label: 'Авторы'},
|
'author': {component: 'AuthorList', label: 'Авторы'},
|
||||||
'series': {component: 'SeriesList', label: 'Серии'},
|
'series': {component: 'SeriesList', label: 'Серии'},
|
||||||
'book': {component: 'TitleList', label: 'Книги'},
|
'title': {component: 'TitleList', label: 'Книги'},
|
||||||
};
|
};
|
||||||
|
|
||||||
const componentOptions = {
|
const componentOptions = {
|
||||||
@@ -452,6 +452,13 @@ class Search {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inputBgColor(inp) {
|
||||||
|
if (inp === this.selectedList)
|
||||||
|
return 'white';
|
||||||
|
else
|
||||||
|
return 'yellow-1';
|
||||||
|
}
|
||||||
|
|
||||||
async updateListFromRoute(to) {
|
async updateListFromRoute(to) {
|
||||||
const newPath = to.path;
|
const newPath = to.path;
|
||||||
let newList = this.getListRoute(newPath);
|
let newList = this.getListRoute(newPath);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import _ from 'lodash';
|
|||||||
|
|
||||||
class TitleList extends BaseList {
|
class TitleList extends BaseList {
|
||||||
get foundCountMessage() {
|
get foundCountMessage() {
|
||||||
return `Найден${utils.wordEnding(this.list.totalFound, 4)} ${this.list.totalFound} уникальн${utils.wordEnding(this.list.totalFound, 6)} назван${utils.wordEnding(this.list.totalFound, 3)}`;
|
return `Найден${utils.wordEnding(this.list.totalFound, 7)} ${this.list.totalFound} уникальн${utils.wordEnding(this.list.totalFound, 6)} назван${utils.wordEnding(this.list.totalFound, 3)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateTableData() {
|
async updateTableData() {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const myRoutes = [
|
|||||||
['/', Search],
|
['/', Search],
|
||||||
['/author', Search],
|
['/author', Search],
|
||||||
['/series', Search],
|
['/series', Search],
|
||||||
['/book', Search],
|
['/title', Search],
|
||||||
['/:pathMatch(.*)*', null, null, '/'],
|
['/:pathMatch(.*)*', null, null, '/'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export function wordEnding(num, type = 0) {
|
|||||||
['о', 'а', 'о', 'о', 'о', 'о', 'о', 'о', 'о', 'о'],
|
['о', 'а', 'о', 'о', 'о', 'о', 'о', 'о', 'о', 'о'],
|
||||||
['ок', 'ка', 'ки', 'ки', 'ки', 'ок', 'ок', 'ок', 'ок', 'ок'],
|
['ок', 'ка', 'ки', 'ки', 'ки', 'ок', 'ок', 'ок', 'ок', 'ок'],
|
||||||
['ых', 'ое', 'ых', 'ых', 'ых', 'ых', 'ых', 'ых', 'ых', 'ых'],
|
['ых', 'ое', 'ых', 'ых', 'ых', 'ых', 'ых', 'ых', 'ых', 'ых'],
|
||||||
|
['о', 'о', 'о', 'о', 'о', 'о', 'о', 'о', 'о', 'о'],
|
||||||
];
|
];
|
||||||
const deci = num % 100;
|
const deci = num % 100;
|
||||||
if (deci > 10 && deci < 20) {
|
if (deci > 10 && deci < 20) {
|
||||||
|
|||||||
Reference in New Issue
Block a user