Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jovuit
funkwhale
Commits
9c2351ba
Verified
Commit
9c2351ba
authored
May 03, 2019
by
Eliot Berriot
Browse files
Can now provide default app name, scope and redirect uris via query string when creating app
parent
c8fcf1b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
front/src/components/auth/ApplicationForm.vue
View file @
9c2351ba
...
...
@@ -77,17 +77,19 @@ import TranslationsMixin from "@/components/mixins/Translations"
export
default
{
mixins
:
[
TranslationsMixin
],
props
:
{
app
:
{
type
:
Object
,
required
:
false
}
app
:
{
type
:
Object
,
required
:
false
},
defaults
:
{
type
:
Object
,
required
:
false
}
},
data
()
{
let
app
=
this
.
app
||
{}
let
defaults
=
this
.
defaults
||
{}
return
{
isLoading
:
false
,
errors
:
[],
fields
:
{
name
:
app
.
name
||
''
,
redirect_uris
:
app
.
redirect_uris
||
'
urn:ietf:wg:oauth:2.0:oob
'
,
scopes
:
app
.
scopes
||
'
read
'
name
:
app
.
name
||
defaults
.
name
||
''
,
redirect_uris
:
app
.
redirect_uris
||
defaults
.
redirect_uris
||
'
urn:ietf:wg:oauth:2.0:oob
'
,
scopes
:
app
.
scopes
||
defaults
.
scopes
||
'
read
'
},
scopes
:
[
{
id
:
"
profile
"
,
icon
:
'
user
'
},
...
...
front/src/components/auth/ApplicationNew.vue
View file @
9c2351ba
...
...
@@ -9,6 +9,7 @@
<translate
translate-context=
"Content/Applications/Title"
>
Create a new application
</translate>
</h2>
<application-form
:defaults=
"defaults"
@
created=
"$router.push(
{name: 'settings.applications.edit', params: {id: $event.client_id}})" />
</section>
</div>
...
...
@@ -19,6 +20,7 @@
import
ApplicationForm
from
"
@/components/auth/ApplicationForm
"
export
default
{
props
:
[
'
name
'
,
'
redirect_uris
'
,
'
scopes
'
],
components
:
{
ApplicationForm
},
...
...
@@ -26,6 +28,11 @@ export default {
return
{
application
:
null
,
isLoading
:
false
,
defaults
:
{
name
:
this
.
name
,
redirect_uris
:
this
.
redirect_uris
,
scopes
:
this
.
scopes
,
}
}
},
computed
:
{
...
...
front/src/router/index.js
View file @
9c2351ba
...
...
@@ -104,6 +104,11 @@ export default new Router({
{
path
:
'
/settings/applications/new
'
,
name
:
'
settings.applications.new
'
,
props
:
(
route
)
=>
({
scopes
:
route
.
query
.
scopes
,
name
:
route
.
query
.
name
,
redirect_uris
:
route
.
query
.
redirect_uris
,
}),
component
:
()
=>
import
(
/* webpackChunkName: "core" */
"
@/components/auth/ApplicationNew
"
),
},
...
...
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