Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
489
Issue boards
Milestones
Wiki
Code
Merge requests
19
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
funkwhale
funkwhale
Commits
30ab74e4
Verified
Commit
30ab74e4
authored
6 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Fix #305: Added feedback when creating/updating radio
parent
8f8ded74
No related branches found
No related tags found
1 merge request
!333
Resolve "save radio not showing info message"
Pipeline
#1625
passed with stages
Stage: review
Stage: lint
Stage: test
in 4 minutes and 47 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/changelog.d/305.enhancement
+1
-0
1 addition, 0 deletions
changes/changelog.d/305.enhancement
front/src/components/library/radios/Builder.vue
+23
-2
23 additions, 2 deletions
front/src/components/library/radios/Builder.vue
with
24 additions
and
2 deletions
changes/changelog.d/305.enhancement
0 → 100644
+
1
−
0
View file @
30ab74e4
Added feedback when creating/updating radio (#302)
This diff is collapsed.
Click to expand it.
front/src/components/library/radios/Builder.vue
+
23
−
2
View file @
30ab74e4
...
...
@@ -6,7 +6,17 @@
<translate>
Builder
</translate>
</h2>
<p><translate>
You can use this interface to build your own custom radio, which will play tracks according to your criteria.
</translate></p>
<div
class=
"ui form"
>
<div
class=
"ui form"
>
<div
v-if=
"success"
class=
"ui positive message"
>
<div
class=
"header"
>
<template
v-if=
"radioName"
>
<translate>
Radio updated
</translate>
</
template
>
<
template
v-else
>
<translate>
Radio created
</translate>
</
template
>
</div>
</div>
<div
class=
"inline fields"
>
<div
class=
"field"
>
<label
for=
"name"
><translate>
Radio name
</translate></label>
...
...
@@ -16,7 +26,7 @@
<input
id=
"public"
type=
"checkbox"
v-model=
"isPublic"
/>
<label
for=
"public"
><translate>
Display publicly
</translate></label>
</div>
<button
:disabled=
"!canSave"
@
click=
"save"
class=
"
ui green
button"
>
<button
:disabled=
"!canSave"
@
click=
"save"
:
class=
"
['ui', 'green', {loading: isLoading}, '
button
']
"
>
<translate>
Save
</translate>
</button>
<radio-button
v-if=
"id"
type=
"custom"
:custom-radio-id=
"id"
></radio-button>
...
...
@@ -96,6 +106,8 @@ export default {
},
data
:
function
()
{
return
{
isLoading
:
false
,
success
:
false
,
availableFilters
:
[],
currentFilterType
:
null
,
filters
:
[],
...
...
@@ -141,6 +153,7 @@ export default {
},
fetch
:
function
()
{
let
self
=
this
self
.
isLoading
=
true
let
url
=
'
radios/radios/
'
+
this
.
id
+
'
/
'
axios
.
get
(
url
).
then
((
response
)
=>
{
self
.
filters
=
response
.
data
.
config
.
map
(
f
=>
{
...
...
@@ -152,6 +165,7 @@ export default {
})
self
.
radioName
=
response
.
data
.
name
self
.
isPublic
=
response
.
data
.
is_public
self
.
isLoading
=
false
})
},
fetchCandidates
:
function
()
{
...
...
@@ -173,6 +187,9 @@ export default {
},
save
:
function
()
{
let
self
=
this
self
.
success
=
false
self
.
isLoading
=
true
let
final
=
this
.
filters
.
map
(
f
=>
{
let
c
=
_
.
clone
(
f
.
config
)
c
.
type
=
f
.
filter
.
type
...
...
@@ -186,10 +203,14 @@ export default {
if
(
this
.
id
)
{
let
url
=
'
radios/radios/
'
+
this
.
id
+
'
/
'
axios
.
put
(
url
,
final
).
then
((
response
)
=>
{
self
.
isLoading
=
false
self
.
success
=
true
})
}
else
{
let
url
=
'
radios/radios/
'
axios
.
post
(
url
,
final
).
then
((
response
)
=>
{
self
.
success
=
true
self
.
isLoading
=
false
self
.
$router
.
push
({
name
:
'
library.radios.detail
'
,
params
:
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment