mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-03-14 12:10:18 +03:00
feat: copy name/hash/magnet #277
This commit is contained in:
parent
f2761cc0fd
commit
42afd92127
5 changed files with 723 additions and 619 deletions
1284
package-lock.json
generated
1284
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -28,7 +28,7 @@
|
|||
"vue-router": "^3.5.1",
|
||||
"vue-toastification": "^1.7.11",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuetify": "^2.4.9",
|
||||
"vuetify": "^2.5.8",
|
||||
"vuex": "^3.6.2",
|
||||
"vuex-persist": "^3.1.3"
|
||||
},
|
||||
|
@ -48,7 +48,7 @@
|
|||
"eslint-plugin-vue": "^7.8.0",
|
||||
"fibers": "^5.0.0",
|
||||
"node-sass": "^5.0.0",
|
||||
"sass": "^1.32.8",
|
||||
"sass": "~1.32.8",
|
||||
"vue-cli-plugin-vuetify": "^2.3.1",
|
||||
"vue-template-compiler": "^2.6.12",
|
||||
"vuetify-loader": "^1.7.2"
|
||||
|
|
|
@ -234,6 +234,49 @@
|
|||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-menu
|
||||
v-if="!multiple"
|
||||
:open-on-hover="!touchmode"
|
||||
top
|
||||
offset-x
|
||||
:transition="isRightside ? 'slide-x-reverse-transition' : 'slide-x-transition'"
|
||||
:left="isRightside"
|
||||
>
|
||||
<template #activator="{ on }">
|
||||
<v-list-item link v-on="on">
|
||||
<v-icon>{{ mdiContentCopy }}</v-icon>
|
||||
<v-list-item-title
|
||||
class="ml-2"
|
||||
style="font-size: 1em"
|
||||
>
|
||||
Copy
|
||||
</v-list-item-title>
|
||||
<v-list-item-action>
|
||||
<v-icon>{{ mdiChevronRight }}</v-icon>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
</template>
|
||||
<v-list>
|
||||
<v-list-item @click="copyToClipBoard(torrent.name)">
|
||||
<v-icon>{{ mdiContentCopy }}</v-icon>
|
||||
<v-list-item-title class="ml-2">
|
||||
Name
|
||||
</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item @click="copyToClipBoard(torrent.hash)">
|
||||
<v-icon>{{ mdiContentCopy }}</v-icon>
|
||||
<v-list-item-title class="ml-2">
|
||||
Hash
|
||||
</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item @click="copyToClipBoard(torrent.magnet)">
|
||||
<v-icon>{{ mdiMagnet }}</v-icon>
|
||||
<v-list-item-title class="ml-2">
|
||||
Magnet
|
||||
</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-divider v-if="!multiple" />
|
||||
<v-list-item v-if="!multiple" link @click="showInfo">
|
||||
<v-icon>{{ mdiInformation }}</v-icon>
|
||||
|
@ -253,7 +296,7 @@ import {
|
|||
mdiInformation, mdiRenameBox, mdiFolder, mdiDelete,
|
||||
mdiPlay, mdiPause, mdiSelect, mdiPriorityHigh, mdiChevronRight,
|
||||
mdiFastForward, mdiShape, mdiHeadCog, mdiCheckboxMarked, mdiCheckboxBlankOutline,
|
||||
mdiSpeedometerSlow, mdiChevronUp, mdiChevronDown
|
||||
mdiSpeedometerSlow, mdiChevronUp, mdiChevronDown, mdiContentCopy, mdiMagnet
|
||||
} from '@mdi/js'
|
||||
|
||||
export default {
|
||||
|
@ -274,10 +317,10 @@ export default {
|
|||
{ name: 'bottom', icon: mdiPriorityLow, action: 'bottomPrio' }
|
||||
],
|
||||
mdiDelete, mdiPlay, mdiPause, mdiSelect, mdiFastForward,
|
||||
mdiFolder, mdiRenameBox, mdiInformation,
|
||||
mdiFolder, mdiRenameBox, mdiInformation, mdiMagnet,
|
||||
mdiPlaylistCheck, mdiPriorityHigh, mdiBullhorn, mdiChevronRight,
|
||||
mdiShape, mdiHeadCog, mdiCheckboxMarked, mdiCheckboxBlankOutline,
|
||||
mdiSpeedometerSlow, mdiChevronUp, mdiChevronDown
|
||||
mdiSpeedometerSlow, mdiChevronUp, mdiChevronDown, mdiContentCopy
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -359,6 +402,9 @@ export default {
|
|||
},
|
||||
toggleAutoTMM() {
|
||||
qbit.setAutoTMM(this.hashes, !this.torrent.auto_tmm)
|
||||
},
|
||||
copyToClipBoard(text) {
|
||||
navigator.clipboard.writeText(text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ export default class Torrent {
|
|||
this.ratio_limit = data.ratio_limit
|
||||
this.availability = Math.round(data.availability * 100) / 100
|
||||
this.forced = data.state.includes('forced')
|
||||
this.magnet = data.magnet_uri
|
||||
|
||||
Object.freeze(this)
|
||||
}
|
||||
|
|
|
@ -397,7 +397,6 @@ export default {
|
|||
return (this.$store.state.selected_torrents = hashes)
|
||||
},
|
||||
handleKeyboardShortcut(e) {
|
||||
console.log(this.$store.state.modals.length)
|
||||
if (this.$store.state.modals.length > 0) {
|
||||
//e.preventDefault()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue