mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-03-14 12:10:18 +03:00
fix: magnet handling (#1041)
This commit is contained in:
parent
232b9319ec
commit
c57da2d95a
2 changed files with 3 additions and 4 deletions
|
@ -41,8 +41,7 @@ const router = new Router({
|
|||
{
|
||||
path: '/download=:magnet',
|
||||
name: 'MagnetHandler',
|
||||
component: () => import('./views/MagnetHandler.vue'),
|
||||
props: true
|
||||
component: () => import('./views/MagnetHandler.vue')
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
|
|
|
@ -7,9 +7,9 @@ import { General } from '@/mixins'
|
|||
export default {
|
||||
name: 'MagnetHandler',
|
||||
mixins: [General],
|
||||
props: ['magnet'],
|
||||
created() {
|
||||
this.createModal('AddModal', { initialMagnet: this.magnet })
|
||||
const regex = new RegExp('^\/download\=(.+?)(?:\/(?=$))?$', 'is')
|
||||
this.createModal('AddModal', { initialMagnet: regex.exec(this.$route.fullPath)[1] })
|
||||
this.$router.push({ name: 'dashboard' })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue