chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.61.0 to 6.0.0 (#954)

* chore(deps-dev): bump @typescript-eslint/eslint-plugin

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.61.0 to 6.0.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.0.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: linter

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daan Wijns <dw.daanwijns@gmail.com>
This commit is contained in:
dependabot[bot] 2023-07-15 10:43:44 +02:00 committed by GitHub
parent 4869afd2a2
commit 639463d49f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 925 additions and 751 deletions

View file

@ -2,65 +2,78 @@
## [1.6.1](https://github.com/WDaan/VueTorrent/compare/v1.6.0...v1.6.1) (2023-07-13) ## [1.6.1](https://github.com/WDaan/VueTorrent/compare/v1.6.0...v1.6.1) (2023-07-13)
### Bug Fixes ### Bug Fixes
* AddModal button not present on desktop ([#935](https://github.com/WDaan/VueTorrent/issues/935)) ([8a2e2bf](https://github.com/WDaan/VueTorrent/commit/8a2e2bf8a215d66b8cc5a17375e6a7372bd3b675)) - AddModal button not present on desktop ([#935](https://github.com/WDaan/VueTorrent/issues/935))
* light theme handling ([#937](https://github.com/WDaan/VueTorrent/issues/937)) ([3d3b1bf](https://github.com/WDaan/VueTorrent/commit/3d3b1bf4d847bf2c7ffc86e6fe6fcc3a286261e2)) ([8a2e2bf](https://github.com/WDaan/VueTorrent/commit/8a2e2bf8a215d66b8cc5a17375e6a7372bd3b675))
* mobile plus button not working ([#945](https://github.com/WDaan/VueTorrent/issues/945)) ([d1fda81](https://github.com/WDaan/VueTorrent/commit/d1fda8155d79ed6be7417f4984911370fa96b595)) - light theme handling ([#937](https://github.com/WDaan/VueTorrent/issues/937)) ([3d3b1bf](https://github.com/WDaan/VueTorrent/commit/3d3b1bf4d847bf2c7ffc86e6fe6fcc3a286261e2))
* Repair broken keybinds ([#942](https://github.com/WDaan/VueTorrent/issues/942)) ([5a861de](https://github.com/WDaan/VueTorrent/commit/5a861deeb25eeda086ac3e07bc31815c67a0f165)) - mobile plus button not working ([#945](https://github.com/WDaan/VueTorrent/issues/945))
* **search:** remove limit parameter ([#946](https://github.com/WDaan/VueTorrent/issues/946)) ([7b77162](https://github.com/WDaan/VueTorrent/commit/7b77162871bc1eae202ac6a13a5236471d344928)) ([d1fda81](https://github.com/WDaan/VueTorrent/commit/d1fda8155d79ed6be7417f4984911370fa96b595))
* **tags:** Fix tags being duplicated ([#959](https://github.com/WDaan/VueTorrent/issues/959)) ([2cca039](https://github.com/WDaan/VueTorrent/commit/2cca039e1860d0eb7dc2fdb483243f61c5ccabfa)) - Repair broken keybinds ([#942](https://github.com/WDaan/VueTorrent/issues/942)) ([5a861de](https://github.com/WDaan/VueTorrent/commit/5a861deeb25eeda086ac3e07bc31815c67a0f165))
* transparent bg for speed dial ([#927](https://github.com/WDaan/VueTorrent/issues/927)) ([5b1a1bc](https://github.com/WDaan/VueTorrent/commit/5b1a1bc91758cb7998203e468283c40bdac6f0d4)), closes [#926](https://github.com/WDaan/VueTorrent/issues/926) - **search:** remove limit parameter ([#946](https://github.com/WDaan/VueTorrent/issues/946))
([7b77162](https://github.com/WDaan/VueTorrent/commit/7b77162871bc1eae202ac6a13a5236471d344928))
- **tags:** Fix tags being duplicated ([#959](https://github.com/WDaan/VueTorrent/issues/959))
([2cca039](https://github.com/WDaan/VueTorrent/commit/2cca039e1860d0eb7dc2fdb483243f61c5ccabfa))
- transparent bg for speed dial ([#927](https://github.com/WDaan/VueTorrent/issues/927))
([5b1a1bc](https://github.com/WDaan/VueTorrent/commit/5b1a1bc91758cb7998203e468283c40bdac6f0d4)), closes [#926](https://github.com/WDaan/VueTorrent/issues/926)
### Improvements ### Improvements
* **modals:** add autofocus ([#955](https://github.com/WDaan/VueTorrent/issues/955)) ([5f33d94](https://github.com/WDaan/VueTorrent/commit/5f33d94d88eff213bbbecf59876fcd9c4f3e90be)) - **modals:** add autofocus ([#955](https://github.com/WDaan/VueTorrent/issues/955))
* **overview:** Disable canvas generation on large torrents ([#947](https://github.com/WDaan/VueTorrent/issues/947)) ([b56caef](https://github.com/WDaan/VueTorrent/commit/b56caef1dbc6fe6d5276e4f362be2bd34f40a192)) ([5f33d94](https://github.com/WDaan/VueTorrent/commit/5f33d94d88eff213bbbecf59876fcd9c4f3e90be))
* **overview:** Fixes spacing for tag chips ([#957](https://github.com/WDaan/VueTorrent/issues/957)) ([373e825](https://github.com/WDaan/VueTorrent/commit/373e825cca5d76fa8974026ec25e116c1b11fef0)) - **overview:** Disable canvas generation on large torrents ([#947](https://github.com/WDaan/VueTorrent/issues/947))
* **overview:** Use selected file count instead of total file count to preview filename ([#944](https://github.com/WDaan/VueTorrent/issues/944)) ([cf5e53c](https://github.com/WDaan/VueTorrent/commit/cf5e53cbca22df9496fc6fc00f4d8d9745a52ae5)) ([b56caef](https://github.com/WDaan/VueTorrent/commit/b56caef1dbc6fe6d5276e4f362be2bd34f40a192))
* Rework Content tab ([#940](https://github.com/WDaan/VueTorrent/issues/940)) ([516f1d7](https://github.com/WDaan/VueTorrent/commit/516f1d7913f934a7fcd5f9718cefc9244dde7774)) - **overview:** Fixes spacing for tag chips ([#957](https://github.com/WDaan/VueTorrent/issues/957))
* **search:** Add tabs + reset results on new search ([#958](https://github.com/WDaan/VueTorrent/issues/958)) ([2de5f85](https://github.com/WDaan/VueTorrent/commit/2de5f85798cf879c39732edd3c3ecf374110b5ce)) ([373e825](https://github.com/WDaan/VueTorrent/commit/373e825cca5d76fa8974026ec25e116c1b11fef0))
- **overview:** Use selected file count instead of total file count to preview filename ([#944](https://github.com/WDaan/VueTorrent/issues/944))
([cf5e53c](https://github.com/WDaan/VueTorrent/commit/cf5e53cbca22df9496fc6fc00f4d8d9745a52ae5))
- Rework Content tab ([#940](https://github.com/WDaan/VueTorrent/issues/940)) ([516f1d7](https://github.com/WDaan/VueTorrent/commit/516f1d7913f934a7fcd5f9718cefc9244dde7774))
- **search:** Add tabs + reset results on new search ([#958](https://github.com/WDaan/VueTorrent/issues/958))
([2de5f85](https://github.com/WDaan/VueTorrent/commit/2de5f85798cf879c39732edd3c3ecf374110b5ce))
## [1.6.0](https://github.com/WDaan/VueTorrent/compare/v1.5.12...v1.6.0) (2023-07-03) ## [1.6.0](https://github.com/WDaan/VueTorrent/compare/v1.5.12...v1.6.0) (2023-07-03)
### Features ### Features
* add logs view ([#904](https://github.com/WDaan/VueTorrent/issues/904)) ([0c6e9d8](https://github.com/WDaan/VueTorrent/commit/0c6e9d86d599679eb5f352fed7a5a51190cfb927)) - add logs view ([#904](https://github.com/WDaan/VueTorrent/issues/904)) ([0c6e9d8](https://github.com/WDaan/VueTorrent/commit/0c6e9d86d599679eb5f352fed7a5a51190cfb927))
* Add TorrentDetail overview tab ([#917](https://github.com/WDaan/VueTorrent/issues/917)) ([4e67040](https://github.com/WDaan/VueTorrent/commit/4e6704081dd8210f9de2559f6755f789bfa09034)) - Add TorrentDetail overview tab ([#917](https://github.com/WDaan/VueTorrent/issues/917))
([4e67040](https://github.com/WDaan/VueTorrent/commit/4e6704081dd8210f9de2559f6755f789bfa09034))
### Bug Fixes ### Bug Fixes
* events not working properly on views ([#912](https://github.com/WDaan/VueTorrent/issues/912)) ([906da74](https://github.com/WDaan/VueTorrent/commit/906da74ee4a167e8fcd8d908d3f84fbfffcdbca3)) - events not working properly on views ([#912](https://github.com/WDaan/VueTorrent/issues/912))
* searchFilter is sometimes null ([#918](https://github.com/WDaan/VueTorrent/issues/918)) ([f5adce6](https://github.com/WDaan/VueTorrent/commit/f5adce657de72b421d22d6ae19e53daa6b7ed909)) ([906da74](https://github.com/WDaan/VueTorrent/commit/906da74ee4a167e8fcd8d908d3f84fbfffcdbca3))
* size error ([#900](https://github.com/WDaan/VueTorrent/issues/900)) ([d1d5498](https://github.com/WDaan/VueTorrent/commit/d1d5498e31c6d672ba5a413784aad7c50f152c43)) - searchFilter is sometimes null ([#918](https://github.com/WDaan/VueTorrent/issues/918))
([f5adce6](https://github.com/WDaan/VueTorrent/commit/f5adce657de72b421d22d6ae19e53daa6b7ed909))
- size error ([#900](https://github.com/WDaan/VueTorrent/issues/900)) ([d1d5498](https://github.com/WDaan/VueTorrent/commit/d1d5498e31c6d672ba5a413784aad7c50f152c43))
### Improvements ### Improvements
* Add qbit refresh interval setting ([#923](https://github.com/WDaan/VueTorrent/issues/923)) ([d2cae69](https://github.com/WDaan/VueTorrent/commit/d2cae697b83988da8d496c693b821c8af51c8ac3)) - Add qbit refresh interval setting ([#923](https://github.com/WDaan/VueTorrent/issues/923))
* Add text filter in active filter tooltip ([#915](https://github.com/WDaan/VueTorrent/issues/915)) ([b0d7a25](https://github.com/WDaan/VueTorrent/commit/b0d7a257525c8e348a762b0b28748ac50fa44333)) ([d2cae69](https://github.com/WDaan/VueTorrent/commit/d2cae697b83988da8d496c693b821c8af51c8ac3))
* change manual keyboard shortcuts to vue events ([#905](https://github.com/WDaan/VueTorrent/issues/905)) ([e7171dc](https://github.com/WDaan/VueTorrent/commit/e7171dca90d744211f43d610b6d7d5c97727e36f)) - Add text filter in active filter tooltip ([#915](https://github.com/WDaan/VueTorrent/issues/915))
* overview improvements ([#920](https://github.com/WDaan/VueTorrent/issues/920)) ([e0c5fb5](https://github.com/WDaan/VueTorrent/commit/e0c5fb5488638da09fd3db4e0ea94bb6bd3a9468)) ([b0d7a25](https://github.com/WDaan/VueTorrent/commit/b0d7a257525c8e348a762b0b28748ac50fa44333))
* search on enter and customfilter ([#903](https://github.com/WDaan/VueTorrent/issues/903)) ([754aeb9](https://github.com/WDaan/VueTorrent/commit/754aeb9959353a8f08ca39f83ebb07048c03118f)) - change manual keyboard shortcuts to vue events ([#905](https://github.com/WDaan/VueTorrent/issues/905))
([e7171dc](https://github.com/WDaan/VueTorrent/commit/e7171dca90d744211f43d610b6d7d5c97727e36f))
- overview improvements ([#920](https://github.com/WDaan/VueTorrent/issues/920)) ([e0c5fb5](https://github.com/WDaan/VueTorrent/commit/e0c5fb5488638da09fd3db4e0ea94bb6bd3a9468))
- search on enter and customfilter ([#903](https://github.com/WDaan/VueTorrent/issues/903))
([754aeb9](https://github.com/WDaan/VueTorrent/commit/754aeb9959353a8f08ca39f83ebb07048c03118f))
## [1.5.12](https://github.com/WDaan/VueTorrent/compare/v1.5.11...v1.5.12) (2023-06-26) ## [1.5.12](https://github.com/WDaan/VueTorrent/compare/v1.5.11...v1.5.12) (2023-06-26)
### Bug Fixes ### Bug Fixes
* favicons ([#898](https://github.com/WDaan/VueTorrent/issues/898)) ([942b1a9](https://github.com/WDaan/VueTorrent/commit/942b1a9f65798dab602ce40f945c81ee53db8ce2)) - favicons ([#898](https://github.com/WDaan/VueTorrent/issues/898)) ([942b1a9](https://github.com/WDaan/VueTorrent/commit/942b1a9f65798dab602ce40f945c81ee53db8ce2))
* size error when deleting torrents under certain conditions ([#870](https://github.com/WDaan/VueTorrent/issues/870)) ([09828cb](https://github.com/WDaan/VueTorrent/commit/09828cb9ab33c12c4d3176695a0a6ddedae35e4b)) - size error when deleting torrents under certain conditions ([#870](https://github.com/WDaan/VueTorrent/issues/870))
([09828cb](https://github.com/WDaan/VueTorrent/commit/09828cb9ab33c12c4d3176695a0a6ddedae35e4b))
### Improvements ### Improvements
* Add active filter ([#868](https://github.com/WDaan/VueTorrent/issues/868)) ([e007289](https://github.com/WDaan/VueTorrent/commit/e007289b4817dbbc2ea65961ab675a17a315e38d)) - Add active filter ([#868](https://github.com/WDaan/VueTorrent/issues/868)) ([e007289](https://github.com/WDaan/VueTorrent/commit/e007289b4817dbbc2ea65961ab675a17a315e38d))
* Add hook to repaint piece state canvas on update ([#869](https://github.com/WDaan/VueTorrent/issues/869)) ([87038f4](https://github.com/WDaan/VueTorrent/commit/87038f48b9a4d8ace9f5234f9e36f62892c1f940)) - Add hook to repaint piece state canvas on update ([#869](https://github.com/WDaan/VueTorrent/issues/869))
* Add right click exception on link elements ([#899](https://github.com/WDaan/VueTorrent/issues/899)) ([b8324d9](https://github.com/WDaan/VueTorrent/commit/b8324d96d8aae2d068fa775cddc4599a2aaa115a)) ([87038f4](https://github.com/WDaan/VueTorrent/commit/87038f48b9a4d8ace9f5234f9e36f62892c1f940))
- Add right click exception on link elements ([#899](https://github.com/WDaan/VueTorrent/issues/899))
([b8324d9](https://github.com/WDaan/VueTorrent/commit/b8324d96d8aae2d068fa775cddc4599a2aaa115a))
## [1.5.11](https://github.com/WDaan/VueTorrent/compare/v1.5.10...v1.5.11) (2023-06-15) ## [1.5.11](https://github.com/WDaan/VueTorrent/compare/v1.5.10...v1.5.11) (2023-06-15)

View file

@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
@ -8,9 +8,9 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" /> <meta name="mobile-web-app-capable" content="yes" />
<link rel="icon" href="/favicon.ico" sizes="any"> <link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href="/icon.svg" type="image/svg+xml"> <link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png"> <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<meta name="theme-color" content="#000" /> <meta name="theme-color" content="#000" />
<title>qBittorrent</title> <title>qBittorrent</title>
</head> </head>

1084
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -37,8 +37,8 @@
"@types/jsdom": "^21.1.1", "@types/jsdom": "^21.1.1",
"@types/lodash": "^4.14.191", "@types/lodash": "^4.14.191",
"@types/uuid": "^9.0.0", "@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/eslint-plugin": "^6",
"@typescript-eslint/parser": "^5", "@typescript-eslint/parser": "^6",
"@vitejs/plugin-vue2": "^2", "@vitejs/plugin-vue2": "^2",
"@vue/eslint-config-typescript": "^11", "@vue/eslint-config-typescript": "^11",
"@vue/test-utils": "^1", "@vue/test-utils": "^1",

View file

@ -38,9 +38,9 @@
</template> </template>
<script> <script>
import {mapGetters} from 'vuex' import { mapGetters } from 'vuex'
import {mdiClose, mdiFile, mdiFolder} from '@mdi/js' import { mdiClose, mdiFile, mdiFolder } from '@mdi/js'
import {FullScreenModal, Modal} from '@/mixins' import { FullScreenModal, Modal } from '@/mixins'
import qbit from '@/services/qbit' import qbit from '@/services/qbit'
export default { export default {

View file

@ -79,8 +79,8 @@ export default defineComponent({
} }
result.then( result.then(
() => this.close(), () => this.close(),
() => this.$toast.error(this.$t('modals.rename.errorConflict')) () => this.$toast.error(this.$t('modals.rename.errorConflict'))
) )
}, },
close() { close() {

View file

@ -1,5 +1,13 @@
<template> <template>
<v-dialog v-model="dialog" scrollable max-width="750px" :content-class="phoneLayout ? 'rounded-0' : 'rounded-form'" :fullscreen="phoneLayout" @keydown.enter.prevent="rename" @keydown.esc.prevent="close"> <v-dialog
v-model="dialog"
scrollable
max-width="750px"
:content-class="phoneLayout ? 'rounded-0' : 'rounded-form'"
:fullscreen="phoneLayout"
@keydown.enter.prevent="rename"
@keydown.esc.prevent="close"
>
<v-card> <v-card>
<v-card-title class="pa-0"> <v-card-title class="pa-0">
<v-toolbar-title class="ma-4 primarytext--text"> <v-toolbar-title class="ma-4 primarytext--text">
@ -29,12 +37,12 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {mapGetters} from 'vuex' import { mapGetters } from 'vuex'
import Modal from '@/mixins/Modal' import Modal from '@/mixins/Modal'
import {mdiFile} from '@mdi/js' import { mdiFile } from '@mdi/js'
import {FullScreenModal} from '@/mixins' import { FullScreenModal } from '@/mixins'
import qbit from '@/services/qbit' import qbit from '@/services/qbit'
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
export default defineComponent({ export default defineComponent({
name: 'RenameTorrentModal', name: 'RenameTorrentModal',

View file

@ -31,9 +31,9 @@
<script lang="ts"> <script lang="ts">
import qbit from '@/services/qbit' import qbit from '@/services/qbit'
import {Modal} from '@/mixins' import { Modal } from '@/mixins'
import {mdiCancel, mdiPencil, mdiTagPlus} from '@mdi/js' import { mdiCancel, mdiPencil, mdiTagPlus } from '@mdi/js'
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
export default defineComponent({ export default defineComponent({
name: 'FeedForm', name: 'FeedForm',
@ -43,9 +43,7 @@ export default defineComponent({
}, },
data: () => ({ data: () => ({
feed: { url: '', name: '' }, feed: { url: '', name: '' },
rules: [ rules: [(v: string) => !!v || 'Required'],
(v: string) => !!v || 'Required'
],
mdiCancel, mdiCancel,
mdiTagPlus, mdiTagPlus,
mdiPencil mdiPencil

View file

@ -101,14 +101,14 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
import {mapGetters} from 'vuex' import { mapGetters } from 'vuex'
import qbit from '@/services/qbit' import qbit from '@/services/qbit'
import {Modal} from '@/mixins' import { Modal } from '@/mixins'
import {mdiClose, mdiContentSave} from '@mdi/js' import { mdiClose, mdiContentSave } from '@mdi/js'
import i18n from '@/plugins/i18n' import i18n from '@/plugins/i18n'
import {AppPreferences} from '@/enums/qbit' import { AppPreferences } from '@/enums/qbit'
import {Category, Feed} from '@/types/vuetorrent' import { Category, Feed } from '@/types/vuetorrent'
type FormattedArticle = { type: string; value?: string } type FormattedArticle = { type: string; value?: string }

View file

@ -69,12 +69,12 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
import {FullScreenModal, Modal} from '@/mixins' import { FullScreenModal, Modal } from '@/mixins'
import {mapState} from 'vuex' import { mapState } from 'vuex'
import {SearchPlugin} from '@/types/qbit/models' import { SearchPlugin } from '@/types/qbit/models'
import qbit from '@/services/qbit' import qbit from '@/services/qbit'
import {mdiDelete} from '@mdi/js' import { mdiDelete } from '@mdi/js'
export default defineComponent({ export default defineComponent({
name: 'SearchPluginManager', name: 'SearchPluginManager',

View file

@ -8,7 +8,14 @@
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<v-container> <v-container>
<v-text-field v-model="category.name" :rules="nameRules" :label="$t('modals.newCategory.categoryName')" required :autofocus="!hasInitialCategory" :disabled="hasInitialCategory" /> <v-text-field
v-model="category.name"
:rules="nameRules"
:label="$t('modals.newCategory.categoryName')"
required
:autofocus="!hasInitialCategory"
:disabled="hasInitialCategory"
/>
<v-text-field v-model="category.savePath" :rules="pathRules" :label="$t('path')" required :autofocus="hasInitialCategory" /> <v-text-field v-model="category.savePath" :rules="pathRules" :label="$t('path')" required :autofocus="hasInitialCategory" />
</v-container> </v-container>
</v-card-text> </v-card-text>
@ -29,10 +36,10 @@
</template> </template>
<script> <script>
import {mapGetters} from 'vuex' import { mapGetters } from 'vuex'
import qbit from '@/services/qbit' import qbit from '@/services/qbit'
import {Modal} from '@/mixins' import { Modal } from '@/mixins'
import {mdiCancel, mdiPencil, mdiTagPlus} from '@mdi/js' import { mdiCancel, mdiPencil, mdiTagPlus } from '@mdi/js'
import Vue from 'vue' import Vue from 'vue'
export default { export default {

View file

@ -25,10 +25,10 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
import {mapGetters} from 'vuex' import { mapGetters } from 'vuex'
import qbit from '@/services/qbit' import qbit from '@/services/qbit'
import {Modal} from '@/mixins' import { Modal } from '@/mixins'
export default defineComponent({ export default defineComponent({
name: 'CreateTagDialog', name: 'CreateTagDialog',

View file

@ -124,7 +124,13 @@ export default {
return this.getTorrentCountString() return this.getTorrentCountString()
}, },
filterCount() { filterCount() {
return (this.dashboard.searchFilter?.length > 0) + (this.sort_options.filter !== null) + (this.sort_options.category !== null) + (this.sort_options.tag !== null) + (this.sort_options.tracker !== null) return (
(this.dashboard.searchFilter?.length > 0) +
(this.sort_options.filter !== null) +
(this.sort_options.category !== null) +
(this.sort_options.tag !== null) +
(this.sort_options.tracker !== null)
)
} }
}, },
created() { created() {

View file

@ -87,7 +87,20 @@
import { General } from '@/mixins' import { General } from '@/mixins'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import qbit from '@/services/qbit' import qbit from '@/services/qbit'
import { mdiSort, mdiCog, mdiCheckboxBlankOutline, mdiCheckboxMarked, mdiSearchWeb, mdiDelete, mdiPlus, mdiPlay, mdiPause, mdiRss, mdiFileDocumentMultiple, mdiPower } from '@mdi/js' import {
mdiSort,
mdiCog,
mdiCheckboxBlankOutline,
mdiCheckboxMarked,
mdiSearchWeb,
mdiDelete,
mdiPlus,
mdiPlay,
mdiPause,
mdiRss,
mdiFileDocumentMultiple,
mdiPower
} from '@mdi/js'
export default { export default {
name: 'TopActions', name: 'TopActions',

View file

@ -3,8 +3,7 @@
<div v-else> <div v-else>
<v-tooltip bottom open-delay="400"> <v-tooltip bottom open-delay="400">
<template #activator="{ on }"> <template #activator="{ on }">
<v-btn text small fab color="grey--text" class="mr-16 ml-0 mb-1" <v-btn text small fab color="grey--text" class="mr-16 ml-0 mb-1" :aria-label="$t('navbar.topActions.addTorrent')" v-on="on" @click="createModal('AddModal')">
:aria-label="$t('navbar.topActions.addTorrent')" v-on="on" @click="createModal('AddModal')">
<v-icon color="grey"> <v-icon color="grey">
{{ mdiPlus }} {{ mdiPlus }}
</v-icon> </v-icon>
@ -26,14 +25,14 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
import {General} from '@/mixins' import { General } from '@/mixins'
import TopActions from './TopActions.vue' import TopActions from './TopActions.vue'
import {mdiClose, mdiDotsVertical, mdiPlus} from '@mdi/js' import { mdiClose, mdiDotsVertical, mdiPlus } from '@mdi/js'
export default defineComponent({ export default defineComponent({
name: 'TopMenu', name: 'TopMenu',
components: {TopActions}, components: { TopActions },
mixins: [General], mixins: [General],
data() { data() {
return { return {

View file

@ -5,13 +5,13 @@
<v-row class="my-2"> <v-row class="my-2">
<v-col cols="12" md="6"> <v-col cols="12" md="6">
<v-text-field <v-text-field
v-model="searchPattern" v-model="searchPattern"
dense dense
hide-details hide-details
clearable clearable
:rules="[v => !!v || 'Search term is required']" :rules="[v => !!v || 'Search term is required']"
label="Search pattern" label="Search pattern"
@keydown.enter.prevent="runNewSearch" @keydown.enter.prevent="runNewSearch"
/> />
</v-col> </v-col>
<v-col cols="6" sm="5" md="2"> <v-col cols="6" sm="5" md="2">
@ -57,15 +57,15 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
import {mapGetters} from 'vuex' import { mapGetters } from 'vuex'
import {mdiDownload} from '@mdi/js' import { mdiDownload } from '@mdi/js'
import {SearchPlugin, SearchResult} from "@/types/qbit/models"; import { SearchPlugin, SearchResult } from '@/types/qbit/models'
import {General} from "@/mixins"; import { General } from '@/mixins'
import qbit from "@/services/qbit"; import qbit from '@/services/qbit'
export default defineComponent({ export default defineComponent({
name: "SearchTab", name: 'SearchTab',
mixins: [General], mixins: [General],
data() { data() {
return { return {
@ -113,7 +113,9 @@ export default defineComponent({
{ text: 'Only enabled', value: 'enabled' } { text: 'Only enabled', value: 'enabled' }
] ]
this.getSearchPlugins().filter((plugin: SearchPlugin) => plugin.enabled).forEach((plugin: SearchPlugin) => plugins.push({ text: plugin.fullName, value: plugin.name })) this.getSearchPlugins()
.filter((plugin: SearchPlugin) => plugin.enabled)
.forEach((plugin: SearchPlugin) => plugins.push({ text: plugin.fullName, value: plugin.name }))
return plugins return plugins
}, },
@ -138,10 +140,16 @@ export default defineComponent({
clearInterval(this.queryTimer) clearInterval(this.queryTimer)
}, },
customFilter(value: any, search: string | null) { customFilter(value: any, search: string | null) {
return value != null return (
&& search != null value != null &&
&& typeof value === 'string' search != null &&
&& search.trim().toLowerCase().split(' ').every(i => value.toString().toLowerCase().indexOf(i) !== -1) typeof value === 'string' &&
search
.trim()
.toLowerCase()
.split(' ')
.every(i => value.toString().toLowerCase().indexOf(i) !== -1)
)
}, },
async refreshResults() { async refreshResults() {
const response = await qbit.getSearchResults(this.queryId, this.queryResults.length) const response = await qbit.getSearchResults(this.queryId, this.queryResults.length)
@ -151,11 +159,9 @@ export default defineComponent({
this.queryId = 0 this.queryId = 0
await this.stopSearch() await this.stopSearch()
} }
}, }
} }
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss"></style>
</style>

View file

@ -50,12 +50,13 @@
<v-row> <v-row>
<v-col cols="12" sm="6" md="4" class="mb-n4"> <v-col cols="12" sm="6" md="4" class="mb-n4">
<v-text-field <v-text-field
v-model="settings.refreshInterval" v-model="settings.refreshInterval"
type="number" type="number"
dense dense
outlined outlined
:hint="$t('modals.settings.vueTorrent.general.refreshIntervalHint')" :hint="$t('modals.settings.vueTorrent.general.refreshIntervalHint')"
:label="$t('modals.settings.vueTorrent.general.refreshInterval')" /> :label="$t('modals.settings.vueTorrent.general.refreshInterval')"
/>
</v-col> </v-col>
<v-col cols="12" sm="6" md="4" class="mb-n4"> <v-col cols="12" sm="6" md="4" class="mb-n4">
<v-text-field <v-text-field
@ -64,16 +65,18 @@
dense dense
outlined outlined
:hint="$t('modals.settings.vueTorrent.general.contentIntervalHint')" :hint="$t('modals.settings.vueTorrent.general.contentIntervalHint')"
:label="$t('modals.settings.vueTorrent.general.contentInterval')" /> :label="$t('modals.settings.vueTorrent.general.contentInterval')"
/>
</v-col> </v-col>
<v-col cols="12" sm="6" md="4"> <v-col cols="12" sm="6" md="4">
<v-text-field <v-text-field
v-model="settings.torrentPieceCountRenderThreshold" v-model="settings.torrentPieceCountRenderThreshold"
type="number" type="number"
dense dense
outlined outlined
hide-details hide-details
:label="$t('modals.settings.vueTorrent.general.torrentPieceCountRenderThreshold')" /> :label="$t('modals.settings.vueTorrent.general.torrentPieceCountRenderThreshold')"
/>
</v-col> </v-col>
</v-row> </v-row>
</v-list-item> </v-list-item>
@ -166,14 +169,14 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
import {mapGetters, mapState} from 'vuex' import { mapGetters, mapState } from 'vuex'
import {Qbit} from '@/services/qbit' import { Qbit } from '@/services/qbit'
import {LOCALES} from '@/lang/locales' import { LOCALES } from '@/lang/locales'
import {General} from '@/mixins' import { General } from '@/mixins'
import {TitleOptions} from '@/enums/vuetorrent' import { TitleOptions } from '@/enums/vuetorrent'
import Ajv from 'ajv' import Ajv from 'ajv'
import {StoreStateSchema} from '@/schemas' import { StoreStateSchema } from '@/schemas'
import WebUISettings from '@/types/vuetorrent/WebUISettings' import WebUISettings from '@/types/vuetorrent/WebUISettings'
export default defineComponent({ export default defineComponent({

View file

@ -1,14 +1,6 @@
<template> <template>
<v-card flat :loading="loading"> <v-card flat :loading="loading">
<v-treeview <v-treeview v-model="fileSelection" :open.sync="openedItems" :items="fileTree" activatable selectable item-key="id" @input="updateSelection">
v-model="fileSelection"
:open.sync="openedItems"
:items="fileTree"
activatable
selectable
item-key="id"
@input="updateSelection"
>
<template v-slot:prepend="{ item: node, open }"> <template v-slot:prepend="{ item: node, open }">
<v-icon v-if="node.type === 'root'"> <v-icon v-if="node.type === 'root'">
{{ mdiFileTree }} {{ mdiFileTree }}
@ -24,9 +16,7 @@
<span class="item-name">{{ node.type === 'root' ? $t('modals.detail.pageContent.rootNode') : node.name }}</span> <span class="item-name">{{ node.type === 'root' ? $t('modals.detail.pageContent.rootNode') : node.name }}</span>
</template> </template>
<template #append="{ item: node }"> <template #append="{ item: node }">
<div v-if="node.type === 'root'"> <div v-if="node.type === 'root'"></div>
</div>
<div v-else-if="node.type === 'folder'"> <div v-else-if="node.type === 'folder'">
<span class="ml-4">{{ node | nodeContent }}</span> <span class="ml-4">{{ node | nodeContent }}</span>
<v-btn fab x-small class="accent white--text elevation-0 px-4 ml-2" @click="renameNode(node)"> <v-btn fab x-small class="accent white--text elevation-0 px-4 ml-2" @click="renameNode(node)">
@ -44,8 +34,7 @@
</v-btn> </v-btn>
</template> </template>
<v-list> <v-list>
<v-list-item v-for="prio in filePriorityOptions" :key="prio.value" link <v-list-item v-for="prio in filePriorityOptions" :key="prio.value" link @click="setFilePrio(node, prio.value)">
@click="setFilePrio(node, prio.value)">
<v-icon>{{ prio.icon }}</v-icon> <v-icon>{{ prio.icon }}</v-icon>
<v-list-item-title class="caption"> <v-list-item-title class="caption">
{{ prio.name }} {{ prio.name }}
@ -63,8 +52,8 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
import {mapGetters} from 'vuex' import { mapGetters } from 'vuex'
import { import {
mdiArrowDown, mdiArrowDown,
mdiArrowUp, mdiArrowUp,
@ -86,16 +75,16 @@ import {
mdiPriorityLow, mdiPriorityLow,
mdiTrendingUp mdiTrendingUp
} from '@mdi/js' } from '@mdi/js'
import {TreeFile, TreeFolder, TreeNode, TreeRoot} from '@/types/vuetorrent' import { TreeFile, TreeFolder, TreeNode, TreeRoot } from '@/types/vuetorrent'
import {Priority} from '@/enums/qbit' import { Priority } from '@/enums/qbit'
import qbit from '@/services/qbit' import qbit from '@/services/qbit'
import i18n from "@/plugins/i18n"; import i18n from '@/plugins/i18n'
import {TorrentFile} from "@/types/qbit/models"; import { TorrentFile } from '@/types/qbit/models'
import {genFileTree} from "@/helpers"; import { genFileTree } from '@/helpers'
import {General} from "@/mixins"; import { General } from '@/mixins'
export default defineComponent({ export default defineComponent({
name: "Content", name: 'Content',
props: { props: {
hash: String, hash: String,
isActive: Boolean isActive: Boolean
@ -111,10 +100,10 @@ export default defineComponent({
openedItems: [] as string[], openedItems: [] as string[],
fileSelection: [] as number[], fileSelection: [] as number[],
filePriorityOptions: [ filePriorityOptions: [
{name: 'Max', icon: mdiPriorityHigh, value: Priority.MAXIMAL}, { name: 'Max', icon: mdiPriorityHigh, value: Priority.MAXIMAL },
{name: 'High', icon: mdiArrowUp, value: Priority.HIGH}, { name: 'High', icon: mdiArrowUp, value: Priority.HIGH },
{name: 'Normal', icon: mdiArrowDown, value: Priority.NORMAL}, { name: 'Normal', icon: mdiArrowDown, value: Priority.NORMAL },
{name: 'Unwanted', icon: mdiPriorityLow, value: Priority.DO_NOT_DOWNLOAD} { name: 'Unwanted', icon: mdiPriorityLow, value: Priority.DO_NOT_DOWNLOAD }
], ],
mdiFolderOpen, mdiFolderOpen,
mdiFolder, mdiFolder,
@ -199,15 +188,15 @@ export default defineComponent({
const oldValue = this.cachedFiles.filter(f => f.priority !== Priority.DO_NOT_DOWNLOAD).map(f => f.index) const oldValue = this.cachedFiles.filter(f => f.priority !== Priority.DO_NOT_DOWNLOAD).map(f => f.index)
const filesToExclude = oldValue const filesToExclude = oldValue
.filter(index => !newValue.includes(index)) .filter(index => !newValue.includes(index))
.map(index => this.cachedFiles.find(f => f.index === index)) .map(index => this.cachedFiles.find(f => f.index === index))
.filter(f => f.priority !== Priority.DO_NOT_DOWNLOAD) .filter(f => f.priority !== Priority.DO_NOT_DOWNLOAD)
.map(f => f.index) .map(f => f.index)
const filesToInclude = newValue const filesToInclude = newValue
.filter(index => !oldValue.includes(index)) .filter(index => !oldValue.includes(index))
.map(index => this.cachedFiles.find(f => f.index === index)) .map(index => this.cachedFiles.find(f => f.index === index))
.filter(f => f.priority === Priority.DO_NOT_DOWNLOAD) .filter(f => f.priority === Priority.DO_NOT_DOWNLOAD)
.map(f => f.index) .map(f => f.index)
if (filesToExclude.length) { if (filesToExclude.length) {
await qbit.setTorrentFilePriority(this.torrentHash, filesToExclude, Priority.DO_NOT_DOWNLOAD) await qbit.setTorrentFilePriority(this.torrentHash, filesToExclude, Priority.DO_NOT_DOWNLOAD)

View file

@ -15,7 +15,9 @@
<v-card-text> <v-card-text>
<v-row> <v-row>
<v-col cols="4" md="3"> <v-col cols="4" md="3">
<v-progress-circular v-if="isFetchingMetadata" indeterminate :size="100" color="torrent-metadata">{{ $t('modals.detail.pageOverview.fetchingMetadata') }}</v-progress-circular> <v-progress-circular v-if="isFetchingMetadata" indeterminate :size="100" color="torrent-metadata">{{
$t('modals.detail.pageOverview.fetchingMetadata')
}}</v-progress-circular>
<v-progress-circular v-else-if="torrent?.progress === 100" :size="100" :width="15" :value="100" color="torrent-seeding"> <v-progress-circular v-else-if="torrent?.progress === 100" :size="100" :width="15" :value="100" color="torrent-seeding">
<v-icon color="torrent-seeding">{{ mdiCheck }}</v-icon> <v-icon color="torrent-seeding">{{ mdiCheck }}</v-icon>
</v-progress-circular> </v-progress-circular>
@ -53,7 +55,7 @@
<v-col cols="6"> <v-col cols="6">
<div>{{ $t('modals.detail.pageOverview.fileCount') }}:</div> <div>{{ $t('modals.detail.pageOverview.fileCount') }}:</div>
<div> <div>
{{ selectedFileCount }} / {{torrentFileCount }} {{ selectedFileCount }} / {{ torrentFileCount }}
<span v-if="selectedFileCount === 1">({{ torrentFileName }})</span> <span v-if="selectedFileCount === 1">({{ torrentFileName }})</span>
</div> </div>
</v-col> </v-col>
@ -66,15 +68,11 @@
<v-card-text> <v-card-text>
<v-row> <v-row>
<v-col cols="6"> <v-col cols="6">
<div> <div>{{ $t('torrent.properties.status') }}:</div>
{{ $t('torrent.properties.status') }}:
</div>
<v-chip small :class="torrentStateClass" class="white--text caption">{{ torrent.state }}</v-chip> <v-chip small :class="torrentStateClass" class="white--text caption">{{ torrent.state }}</v-chip>
</v-col> </v-col>
<v-col cols="6"> <v-col cols="6">
<div> <div>{{ $t('torrent.properties.category') }}:</div>
{{ $t('torrent.properties.category') }}:
</div>
<v-chip small class="upload white--text caption"> <v-chip small class="upload white--text caption">
{{ torrent.category.length ? torrent.category : $t('navbar.filters.uncategorized') }} {{ torrent.category.length ? torrent.category : $t('navbar.filters.uncategorized') }}
</v-chip> </v-chip>
@ -82,15 +80,11 @@
</v-row> </v-row>
<v-row> <v-row>
<v-col cols="6"> <v-col cols="6">
<div> <div>{{ $t('torrent.properties.tracker') }}:</div>
{{ $t('torrent.properties.tracker') }}:
</div>
<v-chip small class="moving white--text caption">{{ this.torrent?.tracker ? getDomainBody(this.torrent?.tracker) : $t('navbar.filters.untracked') }}</v-chip> <v-chip small class="moving white--text caption">{{ this.torrent?.tracker ? getDomainBody(this.torrent?.tracker) : $t('navbar.filters.untracked') }}</v-chip>
</v-col> </v-col>
<v-col cols="6" class="d-flex flex-wrap chipgap"> <v-col cols="6" class="d-flex flex-wrap chipgap">
<div> <div>{{ $t('torrent.properties.tags') }}:</div>
{{ $t('torrent.properties.tags') }}:
</div>
<v-chip v-if="torrent?.tags" v-for="tag in torrent.tags" :key="tag" small class="tags white--text caption"> <v-chip v-if="torrent?.tags" v-for="tag in torrent.tags" :key="tag" small class="tags white--text caption">
{{ tag }} {{ tag }}
</v-chip> </v-chip>
@ -137,16 +131,16 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import dayjs from "dayjs"; import dayjs from 'dayjs'
import {FullScreenModal} from "@/mixins"; import { FullScreenModal } from '@/mixins'
import qbit from "@/services/qbit"; import qbit from '@/services/qbit'
import {getDomainBody, splitByUrl, stringContainsUrl} from "@/helpers"; import { getDomainBody, splitByUrl, stringContainsUrl } from '@/helpers'
import {defineComponent} from "vue"; import { defineComponent } from 'vue'
import {Torrent} from "@/models"; import { Torrent } from '@/models'
import {mapState} from "vuex"; import { mapState } from 'vuex'
import {mdiArrowDown, mdiArrowUp, mdiCheck, mdiClose, mdiContentSave, mdiPencil} from "@mdi/js"; import { mdiArrowDown, mdiArrowUp, mdiCheck, mdiClose, mdiContentSave, mdiPencil } from '@mdi/js'
import {TorrentState} from "@/enums/vuetorrent"; import { TorrentState } from '@/enums/vuetorrent'
import {Priority} from "@/enums/qbit"; import { Priority } from '@/enums/qbit'
export default defineComponent({ export default defineComponent({
name: 'Overflow', name: 'Overflow',
@ -207,9 +201,7 @@ export default defineComponent({
return this.torrent?.state === TorrentState.METADATA return this.torrent?.state === TorrentState.METADATA
}, },
shouldRenderPieceStates() { shouldRenderPieceStates() {
return !this.isFetchingMetadata return !this.isFetchingMetadata && this.torrentPieceCount > 0 && this.torrentPieceCount < this.webuiSettings.torrentPieceCountRenderThreshold
&& this.torrentPieceCount > 0
&& this.torrentPieceCount < this.webuiSettings.torrentPieceCountRenderThreshold
} }
}, },
watch: { watch: {
@ -255,10 +247,10 @@ export default defineComponent({
let newColor = '' let newColor = ''
if (status === 1) if (status === 1)
// requested / downloading // requested / downloading
newColor = this.$vuetify.theme.currentTheme['torrent-downloading'] as string newColor = this.$vuetify.theme.currentTheme['torrent-downloading'] as string
else if (status === 2) else if (status === 2)
// already downloaded // already downloaded
newColor = this.$vuetify.theme.currentTheme['torrent-done'] as string newColor = this.$vuetify.theme.currentTheme['torrent-done'] as string
else { else {
// pending download // pending download
@ -299,7 +291,7 @@ export default defineComponent({
}, },
async copyHash() { async copyHash() {
try { try {
await navigator.clipboard.writeText(this.torrent?.hash as string); await navigator.clipboard.writeText(this.torrent?.hash as string)
this.$toast.success(this.$t('toast.copySuccess').toString()) this.$toast.success(this.$t('toast.copySuccess').toString())
} catch (err) { } catch (err) {
this.$toast.error(this.$t('toast.copyNotSupported').toString()) this.$toast.error(this.$t('toast.copyNotSupported').toString())

View file

@ -17,7 +17,7 @@ export function formatBytes(a, b) {
return `${parseFloat((a / Math.pow(c, f)).toFixed(d))} ${e[f]}` return `${parseFloat((a / Math.pow(c, f)).toFixed(d))} ${e[f]}`
} }
export const isWindows = navigator.userAgent.includes('Windows'); export const isWindows = navigator.userAgent.includes('Windows')
/** /**
* Convert code to flag * Convert code to flag
@ -57,46 +57,49 @@ export function genFileTree(files) {
for (const file of files) { for (const file of files) {
/** @type {TreeRoot | TreeFolder} */ /** @type {TreeRoot | TreeFolder} */
let cursor = rootNode let cursor = rootNode
file.name.replace('\\', '/').split('/').reduce((parentPath, nodeName) => { file.name
const nextPath = parentPath === '' ? nodeName : parentPath + '/' + nodeName .replace('\\', '/')
.split('/')
.reduce((parentPath, nodeName) => {
const nextPath = parentPath === '' ? nodeName : parentPath + '/' + nodeName
if (file.name.endsWith(nodeName)) { if (file.name.endsWith(nodeName)) {
/** @type {TreeFile} */ /** @type {TreeFile} */
const newFile = { const newFile = {
type: 'file', type: 'file',
name: nodeName,
fullName: nextPath,
id: file.index,
availability: file.availability,
index: file.index,
is_seed: file.is_seed,
priority: file.priority,
progress: file.progress,
size: file.size
}
cursor.children.push(newFile)
} else {
/** @type {TreeFolder | undefined} */
const folder = cursor.children.find(el => el.name === nodeName)
if (folder) {
cursor = folder
} else {
// if not found, create folder and set cursor to folder
/** @type {TreeFolder} */
const newFolder = {
type: 'folder',
name: nodeName, name: nodeName,
fullName: nextPath, fullName: nextPath,
id: nextPath, id: file.index,
children: [] availability: file.availability,
index: file.index,
is_seed: file.is_seed,
priority: file.priority,
progress: file.progress,
size: file.size
}
cursor.children.push(newFile)
} else {
/** @type {TreeFolder | undefined} */
const folder = cursor.children.find(el => el.name === nodeName)
if (folder) {
cursor = folder
} else {
// if not found, create folder and set cursor to folder
/** @type {TreeFolder} */
const newFolder = {
type: 'folder',
name: nodeName,
fullName: nextPath,
id: nextPath,
children: []
}
cursor.children.push(newFolder)
cursor = newFolder
} }
cursor.children.push(newFolder)
cursor = newFolder
} }
}
return nextPath return nextPath
}, '') }, '')
} }
return rootNode return rootNode

View file

@ -225,7 +225,7 @@
}, },
"logs": { "logs": {
"title": "qBittorrent日志", "title": "qBittorrent日志",
"table": { "table": {
"id": "日志ID", "id": "日志ID",
"type": "日志等级", "type": "日志等级",
"message": "信息", "message": "信息",

View file

@ -1,4 +1,4 @@
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
export default defineComponent({ export default defineComponent({
name: 'Tab', name: 'Tab',

View file

@ -1,6 +1,6 @@
import {JSONSchemaType} from 'ajv' import { JSONSchemaType } from 'ajv'
import {PersistentStoreState} from '@/types/vuetorrent' import { PersistentStoreState } from '@/types/vuetorrent'
import {DashboardProperty, TitleOptions} from '@/enums/vuetorrent' import { DashboardProperty, TitleOptions } from '@/enums/vuetorrent'
export const StoreStateSchema: JSONSchemaType<PersistentStoreState> = { export const StoreStateSchema: JSONSchemaType<PersistentStoreState> = {
type: 'object', type: 'object',

View file

@ -1,4 +1,4 @@
import type {AxiosInstance} from 'axios' import type { AxiosInstance } from 'axios'
import axios from 'axios' import axios from 'axios'
import type { import type {
ApplicationVersion, ApplicationVersion,
@ -20,7 +20,7 @@ import type { MainDataResponse, SearchResultsResponse, TorrentPeersResponse } fr
import type { AddTorrentPayload, AppPreferencesPayload, CreateFeedPayload, LoginPayload } from '@/types/qbit/payloads' import type { AddTorrentPayload, AppPreferencesPayload, CreateFeedPayload, LoginPayload } from '@/types/qbit/payloads'
import type { FeedRule as VtFeedRule, SortOptions } from '@/types/vuetorrent' import type { FeedRule as VtFeedRule, SortOptions } from '@/types/vuetorrent'
import type { Priority } from '@/enums/qbit' import type { Priority } from '@/enums/qbit'
import {LogType} from "@/enums/qbit"; import { LogType } from '@/enums/qbit'
type Parameters = Record<string, any> type Parameters = Record<string, any>
@ -574,7 +574,7 @@ export class QBitApi {
critical: (logsToInclude & LogType.CRITICAL) == LogType.CRITICAL critical: (logsToInclude & LogType.CRITICAL) == LogType.CRITICAL
} }
return this.axios.get('/log/main', {params}).then(r => r.data) return this.axios.get('/log/main', { params }).then(r => r.data)
} }
} }

View file

@ -1,13 +1,13 @@
import { i18n } from '@/plugins/i18n' import { i18n } from '@/plugins/i18n'
import type { StoreState } from '@/types/vuetorrent' import type { StoreState } from '@/types/vuetorrent'
import { formatSize } from '@/filters' import { formatSize } from '@/filters'
import {Torrent} from "@/models"; import { Torrent } from '@/models'
export default { export default {
getAppVersion: (state: StoreState) => () => state.version, getAppVersion: (state: StoreState) => () => state.version,
containsTorrent: (state: StoreState) => (hash: string) => state.selected_torrents.includes(hash), containsTorrent: (state: StoreState) => (hash: string) => state.selected_torrents.includes(hash),
isDarkMode: (state: StoreState) => () => state.webuiSettings.darkTheme, isDarkMode: (state: StoreState) => () => state.webuiSettings.darkTheme,
getTheme: (state: StoreState) => () => state.webuiSettings.darkTheme ? 'dark' : 'light', getTheme: (state: StoreState) => () => (state.webuiSettings.darkTheme ? 'dark' : 'light'),
getModalState: (state: StoreState) => (guid: string) => state.modals.find(m => m.guid === guid), getModalState: (state: StoreState) => (guid: string) => state.modals.find(m => m.guid === guid),
getSettings: (state: StoreState) => () => state.settings, getSettings: (state: StoreState) => () => state.settings,
getStatus: (state: StoreState) => () => state.status, getStatus: (state: StoreState) => () => state.status,
@ -39,5 +39,5 @@ export default {
}, },
getSearchPlugins: (state: StoreState) => () => state.searchPlugins, getSearchPlugins: (state: StoreState) => () => state.searchPlugins,
getApiRefreshInterval: (state: StoreState) => () => state.webuiSettings.refreshInterval, getApiRefreshInterval: (state: StoreState) => () => state.webuiSettings.refreshInterval,
getContentInterval: (state: StoreState) => () => state.webuiSettings.contentInterval, getContentInterval: (state: StoreState) => () => state.webuiSettings.contentInterval
} }

View file

@ -4,10 +4,10 @@ import VuexPersist from 'vuex-persist'
import actions from './actions' import actions from './actions'
import getters from './getters' import getters from './getters'
import mutations from './mutations' import mutations from './mutations'
import type {PersistentStoreState, StoreState} from '@/types/vuetorrent' import type { PersistentStoreState, StoreState } from '@/types/vuetorrent'
import {Status} from '@/models' import { Status } from '@/models'
import {DashboardProperty, TitleOptions} from '@/enums/vuetorrent' import { DashboardProperty, TitleOptions } from '@/enums/vuetorrent'
import {AppPreferences} from '@/types/qbit/models' import { AppPreferences } from '@/types/qbit/models'
const vuexPersist = new VuexPersist<PersistentStoreState>({ const vuexPersist = new VuexPersist<PersistentStoreState>({
key: 'vuetorrent', key: 'vuetorrent',

View file

@ -1,8 +1,8 @@
import { LogType } from '@/enums/qbit' import { LogType } from '@/enums/qbit'
export default interface Log { export default interface Log {
id: number; id: number
message: string; message: string
timestamp: number; timestamp: number
type: LogType; type: LogType
} }

View file

@ -1,4 +1,4 @@
import {Priority} from "@/enums/qbit"; import { Priority } from '@/enums/qbit'
export interface TreeNode { export interface TreeNode {
/** Represents the type of the node */ /** Represents the type of the node */

View file

@ -1,4 +1,4 @@
import type {DashboardProperty, TitleOptions} from '@/enums/vuetorrent' import type { DashboardProperty, TitleOptions } from '@/enums/vuetorrent'
export class TorrentProperty { export class TorrentProperty {
name: DashboardProperty name: DashboardProperty

View file

@ -19,14 +19,15 @@
<v-data-table <v-data-table
id="logsTable" id="logsTable"
:headers="headers" :headers="headers"
:footer-props="{itemsPerPageOptions: [50, 100, 250, 500, 1000, -1]}" :footer-props="{ itemsPerPageOptions: [50, 100, 250, 500, 1000, -1] }"
:items="filteredLogs" :items="filteredLogs"
:items-per-page="50" :items-per-page="50"
item-key="id" item-key="id"
multi-sort multi-sort
:sort-by="['id']" :sort-by="['id']"
:sort-desc="[true]" :sort-desc="[true]"
:item-class="getLogTypeClassName"> :item-class="getLogTypeClassName"
>
<template #top> <template #top>
<div class="mx-4 mb-5"> <div class="mx-4 mb-5">
<v-select v-model="logTypeFilter" :items="logTypeOptions" :label="$t('modals.logs.filters.type')" multiple chips> <v-select v-model="logTypeFilter" :items="logTypeOptions" :label="$t('modals.logs.filters.type')" multiple chips>
@ -56,14 +57,14 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {General} from '@/mixins' import { General } from '@/mixins'
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
import {mdiClose, mdiCloseBox, mdiMinusBox, mdiCheckboxBlankOutline} from '@mdi/js' import { mdiClose, mdiCloseBox, mdiMinusBox, mdiCheckboxBlankOutline } from '@mdi/js'
import qbit from '@/services/qbit' import qbit from '@/services/qbit'
import {Log} from '@/types/qbit/models' import { Log } from '@/types/qbit/models'
import {LogType} from '@/enums/qbit' import { LogType } from '@/enums/qbit'
import dayjs from "dayjs"; import dayjs from 'dayjs'
import {mapGetters, mapState} from "vuex"; import { mapGetters, mapState } from 'vuex'
export default defineComponent({ export default defineComponent({
name: 'Logs', name: 'Logs',
@ -74,7 +75,7 @@ export default defineComponent({
{ text: this.$t('modals.logs.table.id'), value: 'id', sortable: true }, { text: this.$t('modals.logs.table.id'), value: 'id', sortable: true },
{ text: this.$t('modals.logs.table.type'), value: 'type', sortable: true }, { text: this.$t('modals.logs.table.type'), value: 'type', sortable: true },
{ text: this.$t('modals.logs.table.message'), value: 'message', sortable: true }, { text: this.$t('modals.logs.table.message'), value: 'message', sortable: true },
{ text: this.$t('modals.logs.table.timestamp'), value: 'timestamp', sortable: true }, { text: this.$t('modals.logs.table.timestamp'), value: 'timestamp', sortable: true }
], ],
logTypeOptions: [ logTypeOptions: [
{ text: LogType[LogType.NORMAL], value: LogType.NORMAL }, { text: LogType[LogType.NORMAL], value: LogType.NORMAL },
@ -92,7 +93,7 @@ export default defineComponent({
...mapState(['webuiSettings']), ...mapState(['webuiSettings']),
...mapGetters(['getModals']), ...mapGetters(['getModals']),
lastFetchedId() { lastFetchedId() {
return this.logs.length > 0 ? this.logs[this.logs.length-1].id : -1 return this.logs.length > 0 ? this.logs[this.logs.length - 1].id : -1
}, },
filteredLogs() { filteredLogs() {
return this.logs.filter(log => this.logTypeFilter.includes(log.type)) return this.logs.filter(log => this.logTypeFilter.includes(log.type))
@ -118,7 +119,7 @@ export default defineComponent({
}, },
methods: { methods: {
async updateLogs() { async updateLogs() {
this.logs.push(...await qbit.getLogs(this.lastFetchedId)) this.logs.push(...(await qbit.getLogs(this.lastFetchedId)))
await this.$nextTick() await this.$nextTick()
}, },
getLogTypeClassName(log: Log) { getLogTypeClassName(log: Log) {
@ -180,4 +181,4 @@ export default defineComponent({
color: red !important; color: red !important;
} }
} }
</style> </style>

View file

@ -64,7 +64,7 @@
<script lang="ts"> <script lang="ts">
import { General } from '@/mixins' import { General } from '@/mixins'
import {mapGetters, mapState } from 'vuex' import { mapGetters, mapState } from 'vuex'
import { defineComponent } from 'vue' import { defineComponent } from 'vue'
import { FeedArticle } from '@/types/vuetorrent/rss' import { FeedArticle } from '@/types/vuetorrent/rss'
import { Feed, FeedRule } from '@/types/vuetorrent' import { Feed, FeedRule } from '@/types/vuetorrent'

View file

@ -22,7 +22,7 @@
<v-container class="d-flex align-center justify-center ma-0 pa-0 primary" fluid> <v-container class="d-flex align-center justify-center ma-0 pa-0 primary" fluid>
<v-tabs v-model="tab" align-with-title show-arrows background-color="primary" slider-color="white" class="overflow-auto"> <v-tabs v-model="tab" align-with-title show-arrows background-color="primary" slider-color="white" class="overflow-auto">
<v-tab v-for="t in tabs" :href="`#${t.value}`" class="white--text"> <v-tab v-for="t in tabs" :href="`#${t.value}`" class="white--text">
<h4>{{ $t('search.tabHeaderTemplate').replace("$0", t.id) }}</h4> <h4>{{ $t('search.tabHeaderTemplate').replace('$0', t.id) }}</h4>
</v-tab> </v-tab>
</v-tabs> </v-tabs>
<v-spacer /> <v-spacer />
@ -44,19 +44,19 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
import {mapGetters} from 'vuex' import { mapGetters } from 'vuex'
import {mdiClose, mdiToyBrick, mdiPlusCircleOutline, mdiMinusCircleOutline} from '@mdi/js' import { mdiClose, mdiToyBrick, mdiPlusCircleOutline, mdiMinusCircleOutline } from '@mdi/js'
import {FullScreenModal, General} from '@/mixins' import { FullScreenModal, General } from '@/mixins'
import SearchTab from '@/components/SearchEngine/SearchTab.vue' import SearchTab from '@/components/SearchEngine/SearchTab.vue'
export default defineComponent({ export default defineComponent({
name: 'SearchEngine', name: 'SearchEngine',
components: {SearchTab}, components: { SearchTab },
mixins: [General, FullScreenModal], mixins: [General, FullScreenModal],
data() { data() {
return { return {
tabs: [] as { id: number, value: string }[], tabs: [] as { id: number; value: string }[],
tabCount: 0, tabCount: 0,
mdiClose, mdiClose,
mdiToyBrick, mdiToyBrick,

View file

@ -68,8 +68,8 @@
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { Content, Info, DetailPeers, Trackers, TorrentTagsAndCategories } from '../components/TorrentDetail/Tabs' import { Content, Info, DetailPeers, Trackers, TorrentTagsAndCategories } from '../components/TorrentDetail/Tabs'
import { mdiClose } from '@mdi/js' import { mdiClose } from '@mdi/js'
import Overview from "@/components/TorrentDetail/Tabs/Overview.vue"; import Overview from '@/components/TorrentDetail/Tabs/Overview.vue'
import {defineComponent} from 'vue' import { defineComponent } from 'vue'
export default defineComponent({ export default defineComponent({
name: 'TorrentDetail', name: 'TorrentDetail',

View file

@ -44,13 +44,7 @@ export default defineConfig(({ mode }) => {
] ]
}), }),
VitePWA({ VitePWA({
includeAssets: [ includeAssets: ['favicon.ico', 'icon.svg', 'icon-192.png', 'icon-512.png', 'robots.txt'],
'favicon.ico',
'icon.svg',
'icon-192.png',
'icon-512.png',
'robots.txt'
],
manifest: { manifest: {
name: 'VueTorrent', name: 'VueTorrent',
short_name: 'VueTorrent', short_name: 'VueTorrent',
@ -58,8 +52,8 @@ export default defineConfig(({ mode }) => {
start_url: '.', start_url: '.',
background_color: '#000', background_color: '#000',
icons: [ icons: [
{ "src": "./icon-192.png", "type": "image/png", "sizes": "192x192" }, { src: './icon-192.png', type: 'image/png', sizes: '192x192' },
{ "src": "./icon-512.png", "type": "image/png", "sizes": "512x512" } { src: './icon-512.png', type: 'image/png', sizes: '512x512' }
] ]
}, },
// Other options // Other options