Browse Source
Merge pull request #191 from dskvr/hotfix/ws
Add ws:// Support
hotfix/theme-1080p
Sandwich
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
2 deletions
-
src/components/relays/pages/RelaysSingle.vue
-
src/router/index.js
-
src/shared/computed.js
|
|
@ -1,5 +1,4 @@ |
|
|
|
<template> |
|
|
|
|
|
|
|
<RelaysNav/> |
|
|
|
|
|
|
|
<MapSingle |
|
|
|
|
|
@ -40,6 +40,10 @@ const routes = [ |
|
|
|
}, |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: '/relay/:protocol(ws?s)/:relayUrl(.*)', |
|
|
|
component: RelaysSingle |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: '/relay/:relayUrl(.*)', |
|
|
|
component: RelaysSingle |
|
|
|
|
|
@ -6,7 +6,8 @@ export default { |
|
|
|
}, |
|
|
|
path: function() { return useRoute().path }, |
|
|
|
relayFromUrl() { |
|
|
|
return `wss://${this.$route.params.relayUrl}` |
|
|
|
const protocol = this.$route.params.protocol ? this.$route.params.protocol : 'wss' |
|
|
|
return `${protocol}://${this.$route.params.relayUrl}` |
|
|
|
}, |
|
|
|
isSingle(){ |
|
|
|
return typeof this.$route.params.relayUrl !== 'undefined' |
|
|
|