perf: overview improvements (#920)

This commit is contained in:
Rémi Marseault 2023-07-02 17:32:56 +02:00 committed by GitHub
parent 0cdcf5c5b3
commit e0c5fb5488
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 10 deletions

View file

@ -2,14 +2,6 @@
<v-card flat>
<v-simple-table>
<tbody>
<tr id="torrentSavePath">
<td :class="commonStyle">
{{ $t('torrent.properties.save_path') | titleCase }}
</td>
<td>
{{ torrent.savePath }}
</td>
</tr>
<tr id="torrentTimeActive">
<td :class="commonStyle">
{{ $t('torrent.properties.time_active') | titleCase }}

View file

@ -36,6 +36,16 @@
</div>
</v-col>
</v-row>
<v-row>
<v-col cols="6">
{{ $t('torrent.properties.save_path') }}:<br/>
{{ torrent.savePath }}
</v-col>
<v-col cols="6">
{{ $t('modals.detail.pageOverview.fileCount') }}:<br/>
{{ torrentFileCount }} <span v-if="torrentFileCount === 1">({{ torrentFileName }})</span>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-col>
@ -44,7 +54,7 @@
<v-card-text>
<v-row>
<v-col cols="6">
{{ $t('modals.detail.pageOverview.status') }}:
{{ $t('torrent.properties.status') }}:
<v-chip small :class="`${torrentStateClass} white--text caption ml-2`">{{ torrent.state }}</v-chip>
</v-col>
<v-col cols="6">
@ -126,6 +136,8 @@ export default defineComponent({
creationDate: '',
downloadSpeedAvg: 0,
isPrivateTorrent: false,
torrentFileCount: 0,
torrentFileName: null,
torrentPieceSize: 0,
torrentPieceOwned: 0,
torrentPieceCount: 0,
@ -142,6 +154,13 @@ export default defineComponent({
async mounted() {
await this.getTorrentProperties()
await this.renderTorrentPieceStates()
const files = await qbit.getTorrentFiles(this.torrent?.hash as string)
this.torrentFileCount = files.length
if (this.torrentFileCount === 1) {
this.torrentFileName = files[0].name
}
},
computed: {
...mapState(['webuiSettings']),

View file

@ -656,7 +656,8 @@
"fetchingMetadata": "Fetching...",
"selectedFileSize": "Selected Files' Size",
"dlSpeedAverage": "Download Speed Average",
"upSpeedAverage": "Upload Speed Average"
"upSpeedAverage": "Upload Speed Average",
"fileCount": "File Count"
},
"pageInfo": {
"eta": "ETA",