Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mélanie Chauvel
funkwhale
Commits
420e778e
Verified
Commit
420e778e
authored
Aug 11, 2018
by
Eliot Berriot
Browse files
Fixed #476: invitation code not prefilled in form when accessing invitation link
parent
1c5268b8
Changes
5
Hide whitespace changes
Inline
Side-by-side
changes/changelog.d/476.bugfix
0 → 100644
View file @
420e778e
Fixed invitation code not prefilled in form when accessing invitation link (#476)
front/src/App.vue
View file @
420e778e
...
...
@@ -165,11 +165,7 @@ export default {
messages
:
state
=>
state
.
ui
.
messages
}),
suggestedInstances
()
{
let
rootUrl
=
(
window
.
location
.
protocol
+
'
//
'
+
window
.
location
.
hostname
+
(
window
.
location
.
port
?
'
:
'
+
window
.
location
.
port
:
''
)
)
let
instances
=
[
rootUrl
,
'
https://demo.funkwhale.audio
'
]
let
instances
=
[
this
.
$store
.
getters
[
'
instance/defaultUrl
'
](),
'
https://demo.funkwhale.audio
'
]
return
instances
},
version
()
{
...
...
front/src/router/index.js
View file @
420e778e
...
...
@@ -100,7 +100,7 @@ export default new Router({
name
:
'
signup
'
,
component
:
Signup
,
props
:
(
route
)
=>
({
i
nvitation
:
route
.
query
.
invitation
defaultI
nvitation
:
route
.
query
.
invitation
})
},
{
...
...
front/src/store/instance.js
View file @
420e778e
...
...
@@ -2,6 +2,13 @@ import axios from 'axios'
import
logger
from
'
@/logging
'
import
_
from
'
lodash
'
function
getDefaultUrl
()
{
return
(
window
.
location
.
protocol
+
'
//
'
+
window
.
location
.
hostname
+
(
window
.
location
.
port
?
'
:
'
+
window
.
location
.
port
:
''
)
)
}
export
default
{
namespaced
:
true
,
state
:
{
...
...
@@ -71,6 +78,9 @@ export default {
}
},
getters
:
{
defaultUrl
:
(
state
)
=>
()
=>
{
return
getDefaultUrl
()
},
absoluteUrl
:
(
state
)
=>
(
relativeUrl
)
=>
{
if
(
relativeUrl
.
startsWith
(
'
http
'
))
{
return
relativeUrl
...
...
@@ -78,7 +88,9 @@ export default {
if
(
state
.
instanceUrl
.
endsWith
(
'
/
'
)
&&
relativeUrl
.
startsWith
(
'
/
'
))
{
relativeUrl
=
relativeUrl
.
slice
(
1
)
}
return
state
.
instanceUrl
+
relativeUrl
let
instanceUrl
=
state
.
instanceUrl
||
getDefaultUrl
()
return
instanceUrl
+
relativeUrl
}
},
actions
:
{
...
...
front/yarn.lock
View file @
420e778e
...
...
@@ -7522,9 +7522,9 @@ void-elements@^2.0.0, void-elements@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
vue-gettext@^2.
0.31
:
version "2.
0.31
"
resolved "https://registry.yarnpkg.com/vue-gettext/-/vue-gettext-2.
0.31.tgz#0f113bea6aed747e2a809ae4a0db83eaac0b07fc
"
vue-gettext@^2.
1.0
:
version "2.
1.0
"
resolved "https://registry.yarnpkg.com/vue-gettext/-/vue-gettext-2.
1.0.tgz#e4932037a8601412dd9f7d7d7a5d60c4bdb341d1
"
vue-hot-reload-api@^2.1.0:
version "2.3.0"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment