Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
399
Merge Requests
52
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
31888535
Commit
31888535
authored
2 hours ago
by
Ben Hayward
Browse files
Options
Download
Removed console logs
parent
36f95435
fix/blog-media-nsfw-update-1936
1 merge request
!613
WIP: [Sprint/QuietQuail](fix): Blog & media edit updated to new nsfw system #1936
Pipeline
#97599328
passed with stages
in 48 minutes and 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
src/app/modules/media/edit/edit.component.html
View file @
31888535
...
...
@@ -71,7 +71,11 @@
<option
*ngFor=
"let a of access"
[value]=
"a.value"
>
{{ a.text }}
</option>
</select>
</div>
<m-nsfw-selector
(selectedChange)=
"onNSWFSelections($event)"
>
<m-nsfw-selector
(selectedChange)=
"onNSFWSelections($event)"
(onInit)=
"onNSFWSelections($event)"
[selected]=
"entity.nsfw"
>
</m-nsfw-selector>
</div>
</form>
This diff is collapsed.
src/app/modules/media/edit/edit.component.ts
View file @
31888535
...
...
@@ -30,7 +30,7 @@ export class MediaEditComponent {
description
:
''
,
subtype
:
''
,
license
:
'
all-rights-reserved
'
,
mature
:
false
,
nsfw
:
[]
,
};
inProgress
:
boolean
;
error
:
string
;
...
...
@@ -72,7 +72,7 @@ export class MediaEditComponent {
.
get
(
'
api/v1/entities/entity/
'
+
this
.
guid
,
{
children
:
false
})
.
then
((
response
:
any
)
=>
{
this
.
inProgress
=
false
;
console
.
log
(
response
);
if
(
response
.
entity
)
{
if
(
!
response
.
entity
.
description
)
response
.
entity
.
description
=
''
;
...
...
@@ -82,6 +82,7 @@ export class MediaEditComponent {
response
.
entity
.
mature
=
response
.
entity
.
flags
&&
response
.
entity
.
flags
.
mature
?
1
:
0
;
this
.
entity
.
nsfw
=
response
.
entity
.
nsfw
;
this
.
entity
=
response
.
entity
;
}
});
...
...
@@ -111,7 +112,7 @@ export class MediaEditComponent {
* Sets this blog NSFW
* @param { array } nsfw - Numerical indexes for reasons in an array e.g. [1, 2].
*/
onNS
WF
Selections
(
nsfw
)
{
onNS
FW
Selections
(
nsfw
)
{
this
.
entity
.
nsfw
=
nsfw
.
map
(
reason
=>
reason
.
value
);
}
}
This diff is collapsed.
Please
register
or
sign in
to comment