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)
### Bug Fixes
* AddModal button not present on desktop ([#935](https://github.com/WDaan/VueTorrent/issues/935)) ([8a2e2bf](https://github.com/WDaan/VueTorrent/commit/8a2e2bf8a215d66b8cc5a17375e6a7372bd3b675))
* light theme handling ([#937](https://github.com/WDaan/VueTorrent/issues/937)) ([3d3b1bf](https://github.com/WDaan/VueTorrent/commit/3d3b1bf4d847bf2c7ffc86e6fe6fcc3a286261e2))
* mobile plus button not working ([#945](https://github.com/WDaan/VueTorrent/issues/945)) ([d1fda81](https://github.com/WDaan/VueTorrent/commit/d1fda8155d79ed6be7417f4984911370fa96b595))
* Repair broken keybinds ([#942](https://github.com/WDaan/VueTorrent/issues/942)) ([5a861de](https://github.com/WDaan/VueTorrent/commit/5a861deeb25eeda086ac3e07bc31815c67a0f165))
* **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)
- AddModal button not present on desktop ([#935](https://github.com/WDaan/VueTorrent/issues/935))
([8a2e2bf](https://github.com/WDaan/VueTorrent/commit/8a2e2bf8a215d66b8cc5a17375e6a7372bd3b675))
- light theme handling ([#937](https://github.com/WDaan/VueTorrent/issues/937)) ([3d3b1bf](https://github.com/WDaan/VueTorrent/commit/3d3b1bf4d847bf2c7ffc86e6fe6fcc3a286261e2))
- mobile plus button not working ([#945](https://github.com/WDaan/VueTorrent/issues/945))
([d1fda81](https://github.com/WDaan/VueTorrent/commit/d1fda8155d79ed6be7417f4984911370fa96b595))
- Repair broken keybinds ([#942](https://github.com/WDaan/VueTorrent/issues/942)) ([5a861de](https://github.com/WDaan/VueTorrent/commit/5a861deeb25eeda086ac3e07bc31815c67a0f165))
- **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
* **modals:** add autofocus ([#955](https://github.com/WDaan/VueTorrent/issues/955)) ([5f33d94](https://github.com/WDaan/VueTorrent/commit/5f33d94d88eff213bbbecf59876fcd9c4f3e90be))
* **overview:** Disable canvas generation on large torrents ([#947](https://github.com/WDaan/VueTorrent/issues/947)) ([b56caef](https://github.com/WDaan/VueTorrent/commit/b56caef1dbc6fe6d5276e4f362be2bd34f40a192))
* **overview:** Fixes spacing for tag chips ([#957](https://github.com/WDaan/VueTorrent/issues/957)) ([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))
- **modals:** add autofocus ([#955](https://github.com/WDaan/VueTorrent/issues/955))
([5f33d94](https://github.com/WDaan/VueTorrent/commit/5f33d94d88eff213bbbecf59876fcd9c4f3e90be))
- **overview:** Disable canvas generation on large torrents ([#947](https://github.com/WDaan/VueTorrent/issues/947))
([b56caef](https://github.com/WDaan/VueTorrent/commit/b56caef1dbc6fe6d5276e4f362be2bd34f40a192))
- **overview:** Fixes spacing for tag chips ([#957](https://github.com/WDaan/VueTorrent/issues/957))
([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)
### Features
* 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 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))
### Bug Fixes
* events not working properly on views ([#912](https://github.com/WDaan/VueTorrent/issues/912)) ([906da74](https://github.com/WDaan/VueTorrent/commit/906da74ee4a167e8fcd8d908d3f84fbfffcdbca3))
* 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))
- events not working properly on views ([#912](https://github.com/WDaan/VueTorrent/issues/912))
([906da74](https://github.com/WDaan/VueTorrent/commit/906da74ee4a167e8fcd8d908d3f84fbfffcdbca3))
- 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
* Add qbit refresh interval setting ([#923](https://github.com/WDaan/VueTorrent/issues/923)) ([d2cae69](https://github.com/WDaan/VueTorrent/commit/d2cae697b83988da8d496c693b821c8af51c8ac3))
* Add text filter in active filter tooltip ([#915](https://github.com/WDaan/VueTorrent/issues/915)) ([b0d7a25](https://github.com/WDaan/VueTorrent/commit/b0d7a257525c8e348a762b0b28748ac50fa44333))
* 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))
- Add qbit refresh interval setting ([#923](https://github.com/WDaan/VueTorrent/issues/923))
([d2cae69](https://github.com/WDaan/VueTorrent/commit/d2cae697b83988da8d496c693b821c8af51c8ac3))
- Add text filter in active filter tooltip ([#915](https://github.com/WDaan/VueTorrent/issues/915))
([b0d7a25](https://github.com/WDaan/VueTorrent/commit/b0d7a257525c8e348a762b0b28748ac50fa44333))
- 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)
### Bug Fixes
* 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))
- 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))
### Improvements
* 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 right click exception on link elements ([#899](https://github.com/WDaan/VueTorrent/issues/899)) ([b8324d9](https://github.com/WDaan/VueTorrent/commit/b8324d96d8aae2d068fa775cddc4599a2aaa115a))
- 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 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)

View file

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<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-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<meta name="theme-color" content="#000" />
<title>qBittorrent</title>
</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/lodash": "^4.14.191",
"@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^5",
"@typescript-eslint/parser": "^5",
"@typescript-eslint/eslint-plugin": "^6",
"@typescript-eslint/parser": "^6",
"@vitejs/plugin-vue2": "^2",
"@vue/eslint-config-typescript": "^11",
"@vue/test-utils": "^1",

View file

@ -1,5 +1,13 @@
<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-title class="pa-0">
<v-toolbar-title class="ma-4 primarytext--text">

View file

@ -43,9 +43,7 @@ export default defineComponent({
},
data: () => ({
feed: { url: '', name: '' },
rules: [
(v: string) => !!v || 'Required'
],
rules: [(v: string) => !!v || 'Required'],
mdiCancel,
mdiTagPlus,
mdiPencil

View file

@ -8,7 +8,14 @@
</v-card-title>
<v-card-text>
<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-container>
</v-card-text>

View file

@ -124,7 +124,13 @@ export default {
return this.getTorrentCountString()
},
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() {

View file

@ -87,7 +87,20 @@
import { General } from '@/mixins'
import { mapState } from 'vuex'
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 {
name: 'TopActions',

View file

@ -3,8 +3,7 @@
<div v-else>
<v-tooltip bottom open-delay="400">
<template #activator="{ on }">
<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')">
<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')">
<v-icon color="grey">
{{ mdiPlus }}
</v-icon>

View file

@ -60,12 +60,12 @@
import { defineComponent } from 'vue'
import { mapGetters } from 'vuex'
import { mdiDownload } from '@mdi/js'
import {SearchPlugin, SearchResult} from "@/types/qbit/models";
import {General} from "@/mixins";
import qbit from "@/services/qbit";
import { SearchPlugin, SearchResult } from '@/types/qbit/models'
import { General } from '@/mixins'
import qbit from '@/services/qbit'
export default defineComponent({
name: "SearchTab",
name: 'SearchTab',
mixins: [General],
data() {
return {
@ -113,7 +113,9 @@ export default defineComponent({
{ 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
},
@ -138,10 +140,16 @@ export default defineComponent({
clearInterval(this.queryTimer)
},
customFilter(value: any, search: string | null) {
return value != null
&& search != null
&& typeof value === 'string'
&& search.trim().toLowerCase().split(' ').every(i => value.toString().toLowerCase().indexOf(i) !== -1)
return (
value != null &&
search != null &&
typeof value === 'string' &&
search
.trim()
.toLowerCase()
.split(' ')
.every(i => value.toString().toLowerCase().indexOf(i) !== -1)
)
},
async refreshResults() {
const response = await qbit.getSearchResults(this.queryId, this.queryResults.length)
@ -151,11 +159,9 @@ export default defineComponent({
this.queryId = 0
await this.stopSearch()
}
},
}
}
})
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

View file

@ -55,7 +55,8 @@
dense
outlined
: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 cols="12" sm="6" md="4" class="mb-n4">
<v-text-field
@ -64,7 +65,8 @@
dense
outlined
: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 cols="12" sm="6" md="4">
<v-text-field
@ -73,7 +75,8 @@
dense
outlined
hide-details
:label="$t('modals.settings.vueTorrent.general.torrentPieceCountRenderThreshold')" />
:label="$t('modals.settings.vueTorrent.general.torrentPieceCountRenderThreshold')"
/>
</v-col>
</v-row>
</v-list-item>

View file

@ -1,14 +1,6 @@
<template>
<v-card flat :loading="loading">
<v-treeview
v-model="fileSelection"
:open.sync="openedItems"
:items="fileTree"
activatable
selectable
item-key="id"
@input="updateSelection"
>
<v-treeview v-model="fileSelection" :open.sync="openedItems" :items="fileTree" activatable selectable item-key="id" @input="updateSelection">
<template v-slot:prepend="{ item: node, open }">
<v-icon v-if="node.type === 'root'">
{{ mdiFileTree }}
@ -24,9 +16,7 @@
<span class="item-name">{{ node.type === 'root' ? $t('modals.detail.pageContent.rootNode') : node.name }}</span>
</template>
<template #append="{ item: node }">
<div v-if="node.type === 'root'">
</div>
<div v-if="node.type === 'root'"></div>
<div v-else-if="node.type === 'folder'">
<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)">
@ -44,8 +34,7 @@
</v-btn>
</template>
<v-list>
<v-list-item v-for="prio in filePriorityOptions" :key="prio.value" link
@click="setFilePrio(node, prio.value)">
<v-list-item v-for="prio in filePriorityOptions" :key="prio.value" link @click="setFilePrio(node, prio.value)">
<v-icon>{{ prio.icon }}</v-icon>
<v-list-item-title class="caption">
{{ prio.name }}
@ -89,13 +78,13 @@ import {
import { TreeFile, TreeFolder, TreeNode, TreeRoot } from '@/types/vuetorrent'
import { Priority } from '@/enums/qbit'
import qbit from '@/services/qbit'
import i18n from "@/plugins/i18n";
import {TorrentFile} from "@/types/qbit/models";
import {genFileTree} from "@/helpers";
import {General} from "@/mixins";
import i18n from '@/plugins/i18n'
import { TorrentFile } from '@/types/qbit/models'
import { genFileTree } from '@/helpers'
import { General } from '@/mixins'
export default defineComponent({
name: "Content",
name: 'Content',
props: {
hash: String,
isActive: Boolean

View file

@ -15,7 +15,9 @@
<v-card-text>
<v-row>
<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-icon color="torrent-seeding">{{ mdiCheck }}</v-icon>
</v-progress-circular>
@ -66,15 +68,11 @@
<v-card-text>
<v-row>
<v-col cols="6">
<div>
{{ $t('torrent.properties.status') }}:
</div>
<div>{{ $t('torrent.properties.status') }}:</div>
<v-chip small :class="torrentStateClass" class="white--text caption">{{ torrent.state }}</v-chip>
</v-col>
<v-col cols="6">
<div>
{{ $t('torrent.properties.category') }}:
</div>
<div>{{ $t('torrent.properties.category') }}:</div>
<v-chip small class="upload white--text caption">
{{ torrent.category.length ? torrent.category : $t('navbar.filters.uncategorized') }}
</v-chip>
@ -82,15 +80,11 @@
</v-row>
<v-row>
<v-col cols="6">
<div>
{{ $t('torrent.properties.tracker') }}:
</div>
<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-col>
<v-col cols="6" class="d-flex flex-wrap chipgap">
<div>
{{ $t('torrent.properties.tags') }}:
</div>
<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">
{{ tag }}
</v-chip>
@ -137,16 +131,16 @@
</template>
<script lang="ts">
import dayjs from "dayjs";
import {FullScreenModal} from "@/mixins";
import qbit from "@/services/qbit";
import {getDomainBody, splitByUrl, stringContainsUrl} from "@/helpers";
import {defineComponent} from "vue";
import {Torrent} from "@/models";
import {mapState} from "vuex";
import {mdiArrowDown, mdiArrowUp, mdiCheck, mdiClose, mdiContentSave, mdiPencil} from "@mdi/js";
import {TorrentState} from "@/enums/vuetorrent";
import {Priority} from "@/enums/qbit";
import dayjs from 'dayjs'
import { FullScreenModal } from '@/mixins'
import qbit from '@/services/qbit'
import { getDomainBody, splitByUrl, stringContainsUrl } from '@/helpers'
import { defineComponent } from 'vue'
import { Torrent } from '@/models'
import { mapState } from 'vuex'
import { mdiArrowDown, mdiArrowUp, mdiCheck, mdiClose, mdiContentSave, mdiPencil } from '@mdi/js'
import { TorrentState } from '@/enums/vuetorrent'
import { Priority } from '@/enums/qbit'
export default defineComponent({
name: 'Overflow',
@ -207,9 +201,7 @@ export default defineComponent({
return this.torrent?.state === TorrentState.METADATA
},
shouldRenderPieceStates() {
return !this.isFetchingMetadata
&& this.torrentPieceCount > 0
&& this.torrentPieceCount < this.webuiSettings.torrentPieceCountRenderThreshold
return !this.isFetchingMetadata && this.torrentPieceCount > 0 && this.torrentPieceCount < this.webuiSettings.torrentPieceCountRenderThreshold
}
},
watch: {
@ -299,7 +291,7 @@ export default defineComponent({
},
async copyHash() {
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())
} catch (err) {
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]}`
}
export const isWindows = navigator.userAgent.includes('Windows');
export const isWindows = navigator.userAgent.includes('Windows')
/**
* Convert code to flag
@ -57,7 +57,10 @@ export function genFileTree(files) {
for (const file of files) {
/** @type {TreeRoot | TreeFolder} */
let cursor = rootNode
file.name.replace('\\', '/').split('/').reduce((parentPath, nodeName) => {
file.name
.replace('\\', '/')
.split('/')
.reduce((parentPath, nodeName) => {
const nextPath = parentPath === '' ? nodeName : parentPath + '/' + nodeName
if (file.name.endsWith(nodeName)) {

View file

@ -20,7 +20,7 @@ import type { MainDataResponse, SearchResultsResponse, TorrentPeersResponse } fr
import type { AddTorrentPayload, AppPreferencesPayload, CreateFeedPayload, LoginPayload } from '@/types/qbit/payloads'
import type { FeedRule as VtFeedRule, SortOptions } from '@/types/vuetorrent'
import type { Priority } from '@/enums/qbit'
import {LogType} from "@/enums/qbit";
import { LogType } from '@/enums/qbit'
type Parameters = Record<string, any>

View file

@ -1,13 +1,13 @@
import { i18n } from '@/plugins/i18n'
import type { StoreState } from '@/types/vuetorrent'
import { formatSize } from '@/filters'
import {Torrent} from "@/models";
import { Torrent } from '@/models'
export default {
getAppVersion: (state: StoreState) => () => state.version,
containsTorrent: (state: StoreState) => (hash: string) => state.selected_torrents.includes(hash),
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),
getSettings: (state: StoreState) => () => state.settings,
getStatus: (state: StoreState) => () => state.status,
@ -39,5 +39,5 @@ export default {
},
getSearchPlugins: (state: StoreState) => () => state.searchPlugins,
getApiRefreshInterval: (state: StoreState) => () => state.webuiSettings.refreshInterval,
getContentInterval: (state: StoreState) => () => state.webuiSettings.contentInterval,
getContentInterval: (state: StoreState) => () => state.webuiSettings.contentInterval
}

View file

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

View file

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

View file

@ -26,7 +26,8 @@
multi-sort
:sort-by="['id']"
:sort-desc="[true]"
:item-class="getLogTypeClassName">
:item-class="getLogTypeClassName"
>
<template #top>
<div class="mx-4 mb-5">
<v-select v-model="logTypeFilter" :items="logTypeOptions" :label="$t('modals.logs.filters.type')" multiple chips>
@ -62,8 +63,8 @@ import {mdiClose, mdiCloseBox, mdiMinusBox, mdiCheckboxBlankOutline} from '@mdi/
import qbit from '@/services/qbit'
import { Log } from '@/types/qbit/models'
import { LogType } from '@/enums/qbit'
import dayjs from "dayjs";
import {mapGetters, mapState} from "vuex";
import dayjs from 'dayjs'
import { mapGetters, mapState } from 'vuex'
export default defineComponent({
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.type'), value: 'type', 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: [
{ text: LogType[LogType.NORMAL], value: LogType.NORMAL },
@ -118,7 +119,7 @@ export default defineComponent({
},
methods: {
async updateLogs() {
this.logs.push(...await qbit.getLogs(this.lastFetchedId))
this.logs.push(...(await qbit.getLogs(this.lastFetchedId)))
await this.$nextTick()
},
getLogTypeClassName(log: Log) {

View file

@ -22,7 +22,7 @@
<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-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-tabs>
<v-spacer />
@ -56,7 +56,7 @@ export default defineComponent({
mixins: [General, FullScreenModal],
data() {
return {
tabs: [] as { id: number, value: string }[],
tabs: [] as { id: number; value: string }[],
tabCount: 0,
mdiClose,
mdiToyBrick,

View file

@ -68,7 +68,7 @@
import { mapGetters } from 'vuex'
import { Content, Info, DetailPeers, Trackers, TorrentTagsAndCategories } from '../components/TorrentDetail/Tabs'
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'
export default defineComponent({

View file

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