This commit is contained in:
Daan Wijns 2021-02-07 19:11:28 +01:00 committed by GitHub
parent 0a58d98b9f
commit 6860f06715
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 26 additions and 26 deletions

20
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "vuetorrent",
"version": "0.5.5",
"version": "0.5.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -5150,9 +5150,9 @@
}
},
"apexcharts": {
"version": "3.23.1",
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.23.1.tgz",
"integrity": "sha512-7fRpquXp725BUew5OO1mJWk16/IJPCUl0l8SjhISnAhAtbTaM9PnXPSmN2BvKO4RcT457CzMM7MCG5UokiTwcA==",
"version": "3.24.0",
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.24.0.tgz",
"integrity": "sha512-iT6czJCIVrmAtrcO90MZTQCvC+xi6R6Acf0jNH/d40FVTtCfcqECuKIh5iAMyOTtgUb7+fQ8rbadH2bm1kbL9Q==",
"requires": {
"svg.draggable.js": "^2.2.2",
"svg.easing.js": "^2.0.0",
@ -8389,9 +8389,9 @@
}
},
"eslint": {
"version": "7.18.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz",
"integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==",
"version": "7.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.19.0.tgz",
"integrity": "sha512-CGlMgJY56JZ9ZSYhJuhow61lMPPjUzWmChFya71Z/jilVos7mR/jPgaEfVGgMBY5DshbKdG8Ezb8FDCHcoMEMg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@ -9342,9 +9342,9 @@
}
},
"flatted": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz",
"integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
"integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
"dev": true
},
"flush-write-stream": {

View file

@ -11,7 +11,7 @@
},
"dependencies": {
"@babel/polyfill": "^7.12.1",
"apexcharts": "^3.23.1",
"apexcharts": "^3.24.0",
"axios": "^0.21.1",
"core-js": "^3.8.3",
"dayjs": "^1.10.4",
@ -43,7 +43,7 @@
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/test-utils": "^1.0.3",
"babel-eslint": "^10.1.0",
"eslint": "^7.18.0",
"eslint": "^7.19.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^7.5.0",

View file

@ -199,7 +199,7 @@
Availability
</td>
<td>
{{ torrent.availability }}%
{{ torrent.availability }}
</td>
</tr>
</tbody>

View file

@ -12,6 +12,8 @@
<script>
import VueApexCharts from 'vue-apexcharts'
import { mapGetters } from 'vuex'
import { getDataUnit, getDataValue } from '@/filters'
export default {
name: 'SpeedGraph',
components: {
@ -60,6 +62,11 @@ export default {
return val + ' seconds ago'
}
},
y: {
formatter: value => {
return `${getDataValue(value, 0)} ${getDataUnit(value)}`
}
}
}
}

View file

@ -15,7 +15,7 @@ export default {
computed: {
availability() {
if (this.torrent.availability !== -1) {
return `${this.torrent.availability}%`
return this.torrent.availability
}
return 'N/A'

View file

@ -3,6 +3,7 @@
flat
class="pointer noselect"
:class="{ selected: isSelected}"
@click.native.prevent="selectMode && selectTorrent(torrent.hash)"
@dblclick.prevent="showInfo(torrent.hash)"
@click.ctrl.exact.prevent="selectTorrent(torrent.hash)"
@click.shift.exact.prevent="selectUntil(torrent.hash, index)"
@ -29,7 +30,7 @@ export default {
torrent: Object
},
computed: {
...mapState(['selected_torrents']),
...mapState(['selected_torrents', 'selectMode']),
isSelected() {
return this.selected_torrents.includes(this.torrent.hash)
}

View file

@ -232,14 +232,6 @@
Show Info
</v-list-item-title>
</v-list-item>
<v-list-item v-if="!multiple" link @click="selectTorrent(hash)">
<v-icon>{{ mdiSelect }}</v-icon>
<v-list-item-title
class="ml-2"
>
Select
</v-list-item-title>
</v-list-item>
</v-list>
</template>

View file

@ -84,7 +84,7 @@ export function networkSize(size) {
Vue.filter('networkSize', networkSize)
function getDataUnit(a, b) {
export function getDataUnit(a, b) {
if (a === -1) return null
if (!a) return 'B'
const c = 1024
@ -96,7 +96,7 @@ function getDataUnit(a, b) {
Vue.filter('getDataUnit', getDataUnit)
function getDataValue(a, b) {
export function getDataValue(a, b) {
if (a === -1) return 'None'
if (!a) return '0'
const c = 1024

View file

@ -20,6 +20,6 @@ export default class Status {
return 0
}
return Math.round(value / 1000)
return Math.round(value)
}
}