Browse Source

Merge pull request #191 from dskvr/hotfix/ws

Add ws:// Support
hotfix/theme-1080p
Sandwich 2 years ago
committed by GitHub
parent
commit
e2e5e40f43
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/components/relays/pages/RelaysSingle.vue
  2. 4
      src/router/index.js
  3. 3
      src/shared/computed.js

1
src/components/relays/pages/RelaysSingle.vue

@ -1,5 +1,4 @@
<template>
<RelaysNav/>
<MapSingle

4
src/router/index.js

@ -40,6 +40,10 @@ const routes = [
},
]
},
{
path: '/relay/:protocol(ws?s)/:relayUrl(.*)',
component: RelaysSingle
},
{
path: '/relay/:relayUrl(.*)',
component: RelaysSingle

3
src/shared/computed.js

@ -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'

Loading…
Cancel
Save