From 197b9d7d029c6669cccfb4c4fc183d62fed45de6 Mon Sep 17 00:00:00 2001
From: Larsluph <22910497+Larsluph@users.noreply.github.com>
Date: Thu, 2 Nov 2023 22:43:00 +0100
Subject: [PATCH] perf(filters): Reorder states
---
.../Navbar/SideWidgets/FilterSelect.vue | 54 +++++++++----------
src/constants/qbit/TorrentState.ts | 48 ++++++++---------
src/locales/en.json | 26 ++++-----
3 files changed, 64 insertions(+), 64 deletions(-)
diff --git a/src/components/Navbar/SideWidgets/FilterSelect.vue b/src/components/Navbar/SideWidgets/FilterSelect.vue
index bab31873..c0168369 100644
--- a/src/components/Navbar/SideWidgets/FilterSelect.vue
+++ b/src/components/Navbar/SideWidgets/FilterSelect.vue
@@ -12,7 +12,7 @@ const { statusFilter, categoryFilter, tagFilter, trackerFilter } = toRefs(filter
const vueTorrentStore = useVueTorrentStore()
const statuses = computed(() => Object.values(TorrentState).map(state => (
- { title: t(`torrent.state.${ state }`), value: state }
+ { title: t(`torrent.state.${ state }`), value: state }
)))
const categories = computed(() => [
{ title: t('navbar.side.filters.uncategorized'), value: '' },
@@ -50,8 +50,8 @@ function selectAllTrackers() {
{{ t('navbar.side.filters.state') }}
-
@@ -71,19 +71,19 @@ function selectAllTrackers() {
{{ t('navbar.side.filters.category') }}
-
+
- {{ item.props.title }}
- {{
- t('navbar.side.filters.activeFilter', categoryFilter.length)
- }}
+
+ {{ item.props.title }}
+
+
+ {{ t('navbar.side.filters.activeFilter', categoryFilter.length) }}
+
@@ -92,19 +92,19 @@ function selectAllTrackers() {
{{ t('navbar.side.filters.tag') }}
-
+
- {{ item.props.title }}
- {{
- t('navbar.side.filters.activeFilter', tagFilter.length)
- }}
+
+ {{ item.props.title }}
+
+
+ {{ t('navbar.side.filters.activeFilter', tagFilter.length) }}
+
@@ -114,19 +114,19 @@ function selectAllTrackers() {
{{ t('navbar.side.filters.tracker') }}
-
+
- {{ item.props.title }}
- {{
- t('navbar.side.filters.activeFilter', trackerFilter.length)
- }}
+
+ {{ item.props.title }}
+
+
+ {{ t('navbar.side.filters.activeFilter', trackerFilter.length) }}
+
diff --git a/src/constants/qbit/TorrentState.ts b/src/constants/qbit/TorrentState.ts
index 6074bce3..1209f712 100644
--- a/src/constants/qbit/TorrentState.ts
+++ b/src/constants/qbit/TorrentState.ts
@@ -1,40 +1,40 @@
export enum TorrentState {
- /** Some error occurred, applies to paused torrents */
- ERROR = 'error',
- /** Torrent data files is missing */
- MISSING_FILES = 'missingFiles',
- /** Torrent is being seeded and data is being transferred */
- UPLOADING = 'uploading',
- /** Torrent is paused and has finished downloading */
- PAUSED_UP = 'pausedUP',
- /** Queuing is enabled and torrent is queued for upload */
- QUEUED_UP = 'queuedUP',
- /** Torrent is being seeded, but no connection were made */
- STALLED_UP = 'stalledUP',
- /** Torrent has finished downloading and is being checked */
- CHECKING_UP = 'checkingUP',
- /** Torrent is forced to uploading and ignore queue limit */
- FORCED_UP = 'forcedUP',
- /** Torrent is allocating disk space for download */
- ALLOCATING = 'allocating',
- /** Torrent is being downloaded and data is being transferred */
- DOWNLOADING = 'downloading',
/** Torrent has just started downloading and is fetching metadata */
META_DL = 'metaDL',
+ /** Torrent is forced to downloading to ignore queue limit */
+ FORCED_DL = 'forcedDL',
+ /** Torrent is being downloaded and data is being transferred */
+ DOWNLOADING = 'downloading',
+ /** Torrent is being downloaded, but no connection were made */
+ STALLED_DL = 'stalledDL',
/** Torrent is paused and has NOT finished downloading */
PAUSED_DL = 'pausedDL',
/** Queuing is enabled and torrent is queued for download */
QUEUED_DL = 'queuedDL',
- /** Torrent is being downloaded, but no connection were made */
- STALLED_DL = 'stalledDL',
+ /** Torrent is forced to uploading and ignore queue limit */
+ FORCED_UP = 'forcedUP',
+ /** Torrent is being seeded and data is being transferred */
+ UPLOADING = 'uploading',
+ /** Torrent is being seeded, but no connection were made */
+ STALLED_UP = 'stalledUP',
+ /** Torrent is paused and has finished downloading */
+ PAUSED_UP = 'pausedUP',
+ /** Queuing is enabled and torrent is queued for upload */
+ QUEUED_UP = 'queuedUP',
/** Same as checkingUP, but torrent has NOT finished downloading */
CHECKING_DL = 'checkingDL',
- /** Torrent is forced to downloading to ignore queue limit */
- FORCED_DL = 'forcedDL',
+ /** Torrent has finished downloading and is being checked */
+ CHECKING_UP = 'checkingUP',
/** Checking resume data on qBt startup */
CHECKING_RESUME_DATA = 'checkingResumeData',
+ /** Torrent is allocating disk space for download */
+ ALLOCATING = 'allocating',
/** Torrent is moving to another location */
MOVING = 'moving',
+ /** Torrent data files is missing */
+ MISSING_FILES = 'missingFiles',
+ /** Some error occurred, applies to paused torrents */
+ ERROR = 'error',
/** Unknown status */
UNKNOWN = 'unknown'
}
diff --git a/src/locales/en.json b/src/locales/en.json
index 5f271998..6683493d 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -245,24 +245,24 @@
"uploaded_session": "Uploaded (session)"
},
"state": {
- "error": "Error",
- "missingFiles": "Missing Files",
- "uploading": "Uploading",
- "forcedUP": "[F] Uploading",
- "pausedUP": "Done",
- "queuedUP": "Queued (UP)",
- "stalledUP": "Seeding",
- "checkingUP": "Checking",
- "allocating": "Allocating",
- "downloading": "Downloading",
- "forcedDL": "[F] Downloading",
"metaDL": "Metadata",
+ "forcedDL": "[F] Downloading",
+ "downloading": "Downloading",
+ "stalledDL": "Stalled",
"pausedDL": "Paused",
"queuedDL": "Queued (DL)",
- "stalledDL": "Stalled",
- "checkingDL": "Checking",
+ "forcedUP": "[F] Uploading",
+ "uploading": "Uploading",
+ "stalledUP": "Seeding",
+ "pausedUP": "Done",
+ "queuedUP": "Queued (UP)",
+ "checkingDL": "Checking (incomplete)",
+ "checkingUP": "Checking (finished)",
"checkingResumeData": "Checking resume data",
+ "allocating": "Allocating",
"moving": "Moving",
+ "missingFiles": "Missing Files",
+ "error": "Error",
"unknown": "Unknown"
}
},